Class SfKanban
This class represents a Kanban control that displays the cards in different columns based on the category.
Inheritance
Implements
Namespace: Syncfusion.Maui.Kanban
Assembly: Syncfusion.Maui.Kanban.dll
Syntax
public class SfKanban : View, IContentView, IView, IElement, ITransform, IPadding, ICrossPlatformLayout, IParentThemeElement, IThemeElement
Constructors
SfKanban()
Initializes a new instance of the SfKanban.
Declaration
public SfKanban()
Fields
AutoGenerateColumnsProperty
Identifies the AutoGenerateColumns bindable property.
Declaration
public static readonly BindableProperty AutoGenerateColumnsProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
CardTemplateProperty
Identifies the CardTemplate bindable property.
Declaration
public static readonly BindableProperty CardTemplateProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
ColumnMappingPathProperty
Identifies the ColumnMappingPath bindable property.
Declaration
public static readonly BindableProperty ColumnMappingPathProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
ColumnsProperty
Identifies the Columns bindable property.
Declaration
public static readonly BindableProperty ColumnsProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
ColumnWidthProperty
Identifies the ColumnWidth bindable property.
Declaration
public static readonly BindableProperty ColumnWidthProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
HeaderTemplateProperty
Identifies the HeaderTemplate bindable property.
Declaration
public static readonly BindableProperty HeaderTemplateProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
ItemsSourceProperty
Identifies the ItemsSource bindable property.
Declaration
public static readonly BindableProperty ItemsSourceProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
MaximumColumnWidthProperty
Identifies the MaximumColumnWidth bindable property.
Declaration
public static readonly BindableProperty MaximumColumnWidthProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
MaximumHeaderHeightProperty
Identifies the MaximumHeaderHeight bindable property.
Declaration
public static readonly BindableProperty MaximumHeaderHeightProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
MinimumColumnWidthProperty
Identifies the MinimumColumnWidth bindable property.
Declaration
public static readonly BindableProperty MinimumColumnWidthProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
MinimumHeaderHeightProperty
Identifies the MinimumHeaderHeight bindable property.
Declaration
public static readonly BindableProperty MinimumHeaderHeightProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
WorkflowsProperty
Identifies the Workflows bindable property.
Declaration
public static readonly BindableProperty WorkflowsProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Properties
ActualColumns
This API holds the kanban columns collection.
Declaration
public ReadOnlyObservableCollection<KanbanColumn> ActualColumns { get; }
Property Value
Type |
---|
System.Collections.ObjectModel.ReadOnlyObservableCollection<KanbanColumn> |
AutoGenerateColumns
Gets or sets a value indicating whether the KanbanColumn can be auto-generated based on the ColumnMappingPath value.
Declaration
public bool AutoGenerateColumns { get; set; }
Property Value
Type |
---|
System.Boolean |
Remarks
A KanbanColumn will be generated automatically only if the user does not specify the KanbanColumn explicitly for a category using Columns property.
CardTemplate
Gets or sets the custom card template of KanbanColumn that belongs to SfKanban.
Declaration
public DataTemplate CardTemplate { get; set; }
Property Value
Type |
---|
Microsoft.Maui.Controls.DataTemplate |
ColumnMappingPath
Gets or sets a property name, which is used to categorize the columns.
Declaration
public string ColumnMappingPath { get; set; }
Property Value
Type |
---|
System.String |
Remarks
If a list of KanbanModel is bound to ItemsSource property, SfKanban will automatically categorize the items using Category property. If ItemsSource contains custom objects, the path of the property which can be used to categorize the card should be explicitly defined using this property.
Columns
Gets or sets the collection of KanbanColumn that belongs to SfKanban.
Declaration
public KanbanColumnCollection Columns { get; set; }
Property Value
Type | Description |
---|---|
KanbanColumnCollection | This property take the ObservableCollection of KanbanColumn. |
ColumnWidth
Gets or sets the width of the KanbanColumn.
Declaration
public double ColumnWidth { get; set; }
Property Value
Type |
---|
System.Double |
HeaderTemplate
Gets or sets the custom header template of KanbanColumn that belongs to SfKanban.
Declaration
public DataTemplate HeaderTemplate { get; set; }
Property Value
Type |
---|
Microsoft.Maui.Controls.DataTemplate |
ItemsSource
Gets or sets a collection used to generate the content of the SfKanban.
Declaration
public ObservableCollection<KanbanModel> ItemsSource { get; set; }
Property Value
Type |
---|
System.Collections.ObjectModel.ObservableCollection<KanbanModel> |
Remarks
KanbanColumn will be populated with cards for the data in the ItemsSource. Each item in ItemsSource will be associated to a KanbanColumn using either Category property or ColumnMappingPath property depending on whether the item type is KanbanModel or custom model respectively.
MaximumColumnWidth
Gets or sets the maximum width constraint of the KanbanColumn.
Declaration
public double MaximumColumnWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double | This property take the double value. |
MaximumHeaderHeight
Gets or sets the maximum width constraint of the column header.
Declaration
public double MaximumHeaderHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double | This property take the double value. |
MinimumColumnWidth
Gets or sets the minimum width constraint of the KanbanColumn.
Declaration
public double MinimumColumnWidth { get; set; }
Property Value
Type |
---|
System.Double |
MinimumHeaderHeight
Gets or sets the minimum width constraint of the column header.
Declaration
public double MinimumHeaderHeight { get; set; }
Property Value
Type |
---|
System.Double |
Workflows
This feature is used to control the flow of the card transitions from one state to another state.
Declaration
public List<KanbanWorkflow> Workflows { get; set; }
Property Value
Type |
---|
System.Collections.Generic.List<KanbanWorkflow> |
Methods
ArrangeOverride(Rect)
Declaration
protected override Size ArrangeOverride(Rect bounds)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Maui.Graphics.Rect | bounds |
Returns
Type |
---|
Microsoft.Maui.Graphics.Size |
Finalize()
Declaration
protected override void Finalize()
Events
DragEnd
This event should be fired whenever dragging is cancelled in following cases, Event can be cancelled.When this event is cancelled, card will not be dropped on to the target column.
Declaration
public event EventHandler<KanbanDragEndEventArgs> DragEnd
Event Type
Type |
---|
System.EventHandler<KanbanDragEndEventArgs> |
DragEnter
This event should be fired when a card enters a column. Event can be cancelled. When it is cancelled, DragOver events will not be fired for that target column at all and placeholder should not appear on further move over the same column.
Declaration
public event EventHandler<KanbanDragEnterEventArgs> DragEnter
Event Type
Type |
---|
System.EventHandler<KanbanDragEnterEventArgs> |
DragLeave
This event should be fired when the card leaves the column. So it means, this event should be preceded by DragStart or DragEnter events.
Declaration
public event EventHandler<KanbanDragLeaveEventArgs> DragLeave
Event Type
Type |
---|
System.EventHandler<KanbanDragLeaveEventArgs> |
DragOver
This event will be fired when placeholder appears in new position or whenever placeholder position changes on further move within same column. Usually this event will be called after DragStart or DragEnter events.
Declaration
public event EventHandler<KanbanDragOverEventArgs> DragOver
Event Type
Type |
---|
System.EventHandler<KanbanDragOverEventArgs> |
DragStart
This event will be fired when we start to drag a card.
Declaration
public event EventHandler<KanbanDragStartEventArgs> DragStart
Event Type
Type |
---|
System.EventHandler<KanbanDragStartEventArgs> |