Events in UWP Kanban Board (SfKanban)

12 Jul 20224 minutes to read

CardTapped

This event is triggered when you tap on any card. The argument contains the following information.

Command

The CardTappedCommand property is used to associate a command with an instance of SfKanban. This property is most often set with MVVM pattern to bind callbacks back into the ViewModel.

CommandParameter

The CardTappedCommandParameter property is used to set the parameter reference, based on which the event argument is shown.

NOTE
The default value of the CardTappedCommandParameter is null.

CardDoubleTapped

The CardDoubleTapped event is triggered when you double tap on any card. The argument contains the following information:

DragStart

This event is triggered when you start to drag a card. The argument contains the following information.

  • IsCancel - Used to cancel the drag action.
  • SelectedCard - Used to get the underlying model of the card.
  • KeepCard - Determines whether to keep the dragged card in the source location itself, until it is dropped in a new location. When it is true, the preview of the card will be created for dragging.
  • SelectedColumn - Used to get the source column of card.
  • SelectedCardIndex - Used to get the index of the card in source column.

DragEnd

This event is triggered when whenever dragging is canceled. The argument contains the following information.

  • IsCancel - Used to cancel the drag action.
  • SelectedCard - Used to get the underlying model of the card.
  • SelectedColumn - Used to get the source column of the card.
  • SelectedCardIndex - Used to get the index of the card in source column.
  • TargetKey - Used to get the category of the column where the card is going to be dropped.
  • TargetColumn - Used to get the current column which is the drop target for the card.
  • TargetCardIndex - Used to get the index of the card in target column.
  • TargetRowIndex - Used to get the target row index where the card is going to be inserted.
  • TargetColumnIndex - Used to get the target column index where the card is going to be inserted.

DragEnter

This event is triggered when a card enters into a column while dragging. The argument contains the following information.

DragLeave

This event is triggered when a card leaves a column while dragging. The argument contains the following information.

DragOver

This event is triggered when a card is dragged to a new index within a column. The argument contains the following information.

ColumnsGenerated

This event will be fired after the columns are generated automatically. You can access the auto-generated columns using SfKanban.ActualColumns property.

ColumnGenerated

This event is triggered when a column generated.

  • Columns - used to get the generated columns.
  • IsCancel - used to cancel the generated column added to the SfKanban.
  • CurrentColumn - used to get the current generated column.