menu

Xamarin.Android

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfKanban - Xamarin.Android API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SfKanban

    Represents a Kanban control which is used for visualizing and managing the workflow of any process, like the software development process, in an effective way.

    Inheritance
    System.Object
    SfKanban
    Namespace: Syncfusion.SfKanban.Android
    Assembly: Syncfusion.SfKanban.Android.dll
    Syntax
    public class SfKanban : FrameLayout
    Examples
    SfKanban kanban = new SfKanban();

    Constructors

    SfKanban(Context)

    Declaration
    public SfKanban(Context context)
    Parameters
    Type Name Description
    Android.Content.Context context

    SfKanban(Context, IAttributeSet)

    Initializes a new instance of the SfKanban class.

    Declaration
    public SfKanban(Context context, IAttributeSet attributes)
    Parameters
    Type Name Description
    Android.Content.Context context

    The context.

    Android.Util.IAttributeSet attributes

    The attributes.

    SfKanban(Context, IAttributeSet, Int32)

    Initializes a new instance of the SfKanban class.

    Declaration
    public SfKanban(Context context, IAttributeSet attributes, int styleAttributes)
    Parameters
    Type Name Description
    Android.Content.Context context

    The context.

    Android.Util.IAttributeSet attributes

    The attributes.

    System.Int32 styleAttributes

    The style attributes.

    SfKanban(Context, IAttributeSet, Int32, Int32)

    Initializes a new instance of the SfKanban class.

    Declaration
    public SfKanban(Context context, IAttributeSet attributes, int styleAttributes, int styleRes)
    Parameters
    Type Name Description
    Android.Content.Context context

    The context.

    Android.Util.IAttributeSet attributes

    The attributes.

    System.Int32 styleAttributes

    The style attributes.

    System.Int32 styleRes

    The style res.

    Properties

    ActualColumns

    Gets the auto-generated KanbanColumns.

    Declaration
    public ObservableCollection<KanbanColumn> ActualColumns { get; }
    Property Value
    Type
    System.Collections.ObjectModel.ObservableCollection<KanbanColumn>
    Remarks

    If AutoGenerateColumns is set to true and also Columns are defined by user, this property will contain both the auto-generated KanbanColumns and also user specified Columns. If AutoGenerateColumns is set to false, this property will contain only the user specified columns.

    Adapter

    Declaration
    public KanbanAdapter Adapter { get; set; }
    Property Value
    Type
    KanbanAdapter

    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.

    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 ObservableCollection<KanbanColumn> Columns { get; set; }
    Property Value
    Type Description
    System.Collections.ObjectModel.ObservableCollection<KanbanColumn>

    The columns.

    Remarks

    This is the ContentProperty of the SfKanban. A KanbanColumn collection determines the schema of the SfKanban.

    Examples
    SfKanban kanban = new SfKanban();
    KanbanColumn todoColumn = new KanbanColumn();
    todoColumn.Title = "To Do";
    kanban.Columns.Add(todoColumn);

    ColumnWidth

    Gets or sets the width of the KanbanColumn.

    Declaration
    public double ColumnWidth { get; set; }
    Property Value
    Type Description
    System.Double

    The width of the column.

    IndicatorColorPalette

    Gets or sets the list of KanbanColorMapping, which is used to define the colors for each key.

    Declaration
    public List<KanbanColorMapping> IndicatorColorPalette { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.List<KanbanColorMapping>

    List of KanbanColorMapping

    Remarks

    To have a color indicator in the card, define the ColorModel and map the ColorKey value to the corresponding KanbanModel item's ColorKey property.

    Examples
    List<KanbanColorMapping> colormodels = new List<KanbanColorMapping>();
    colormodels.Add(new KanbanColorMapping("Green", Color.Green));
    colormodels.Add(new KanbanColorMapping("Red", Color.Red));
    colormodels.Add(new KanbanColorMapping("Aqua", Color.Aqua));
    colormodels.Add(new KanbanColorMapping("Blue", Color.Blue));
    Kanban.ColorModel = colormodels;

    ItemsSource

    Gets or sets a collection used to generate the content.

    Declaration
    public IEnumerable ItemsSource { get; set; }
    Property Value
    Type Description
    System.Collections.IEnumerable

    The items source.

    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.

    MaxColumnWidth

    Gets or sets the maximum width constraint of the KanbanColumn.

    Declaration
    public int MaxColumnWidth { get; set; }
    Property Value
    Type Description
    System.Int32

    The width of the max column.

    MinColumnWidth

    Gets or sets the minimum width constraint of the KanbanColumn.

    Declaration
    public int MinColumnWidth { get; set; }
    Property Value
    Type Description
    System.Int32

    The minimum width of the column.

    PlaceholderStyle

    Gets or sets the KanbanPlaceholderStyle instance that provides the style for a card placeholder.

    Declaration
    public KanbanPlaceholderStyle PlaceholderStyle { get; set; }
    Property Value
    Type
    KanbanPlaceholderStyle

    Workflows

    Gets or sets the workflows. Each KanbanWorkflow item defines the workflow for a particular category, which is used to determine the target columns a card can be dropped.

    Declaration
    public List<KanbanWorkflow> Workflows { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.List<KanbanWorkflow>

    List of KanbanWorkflow.

    Examples
    List<KanbanWorkflow> workflows = new List<KanbanWorkflow>();
    KanbanWorkflow openWorkflow = new KanbanWorkflow();
    openWorkflow.Category = "Open"; 
    openWorkflow.AllowedTransitions = new List<object>{ "In Progress" }; 
    workflows.Add(openWorkflow); 
    Kanban.Workflows = workflows;

    Methods

    Dispose(Boolean)

    Dispose the specified disposing.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    If set to true disposing.

    OnAttachedToWindow()

    Declaration
    protected override void OnAttachedToWindow()

    OnInterceptTouchEvent(MotionEvent)

    Declaration
    public override bool OnInterceptTouchEvent(MotionEvent ev)
    Parameters
    Type Name Description
    Android.Views.MotionEvent ev
    Returns
    Type
    System.Boolean

    OnLayout(Boolean, Int32, Int32, Int32, Int32)

    Declaration
    protected override void OnLayout(bool changed, int left, int top, int right, int bottom)
    Parameters
    Type Name Description
    System.Boolean changed
    System.Int32 left
    System.Int32 top
    System.Int32 right
    System.Int32 bottom

    OnSizeChanged(Int32, Int32, Int32, Int32)

    Declaration
    protected override void OnSizeChanged(int w, int h, int oldw, int oldh)
    Parameters
    Type Name Description
    System.Int32 w
    System.Int32 h
    System.Int32 oldw
    System.Int32 oldh

    OnTouchEvent(MotionEvent)

    Declaration
    public override bool OnTouchEvent(MotionEvent e)
    Parameters
    Type Name Description
    Android.Views.MotionEvent e
    Returns
    Type
    System.Boolean

    ScrollToColumn(SfKanban, Int32)

    Declaration
    public void ScrollToColumn(SfKanban kanban, int column)
    Parameters
    Type Name Description
    SfKanban kanban
    System.Int32 column

    Events

    ColumnsGenerated

    This event will be fired when after the columns are auto-generated. In this event, user can change the header text of the column.

    Declaration
    public event EventHandler ColumnsGenerated
    Event Type
    Type
    System.EventHandler

    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>

    ItemTapped

    This event will be fired when we tap on the card.

    Declaration
    public event EventHandler<KanbanTappedEventArgs> ItemTapped
    Event Type
    Type
    System.EventHandler<KanbanTappedEventArgs>

    See Also

    https://help.syncfusion.com/xamarin-android/sfkanban/getting-started
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved