diff --git a/winui/Kanban/cards.md b/winui/Kanban/cards.md index 898d1d455..77305ca0b 100644 --- a/winui/Kanban/cards.md +++ b/winui/Kanban/cards.md @@ -31,7 +31,7 @@ new KanbanModel() Description = "Crosshair label template not visible in UWP", Category = "Open", IndicatorColorKey = "High", - Tags = new List() { "Bug Fixing" }, + Tags = new List() { "Bug Fixing" }, Image = new Image { Source = new BitmapImage(new Uri("ms-appx:///Assets/Kanban/People_Circle1.png")) @@ -61,8 +61,9 @@ The following code snippet defines the colors for each key. {% highlight C# hl_lines="2 3 4 5 6" %} +// Add using Windows.UI; for Colors access. this.kanban.ItemsSource = new ViewModel().TaskDetails; -List indicatorColorPalette = new List(); +List indicatorColorPalette = new List(); indicatorColorPalette.Add(new KanbanColorMapping() { Key="Low", Color = Colors.Blue }); indicatorColorPalette.Add(new KanbanColorMapping() { Key= "Normal", Color = Colors.Green }); indicatorColorPalette.Add(new KanbanColorMapping() { Key= "High", Color = Colors.Red }); @@ -524,11 +525,11 @@ N> The `DataContext` for both the [CardTemplate](https://help.syncfusion.com/cr/ ## Cards tooltip -An interactive tooltip provides additional details about the cards on hovering the mouse over them. +An interactive tooltip provides additional details about the cards when the mouse hovers over them. ### Enable tooltip for cards -To enable tooltip for the kanban cards, use [IsToolTipEnabled](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_IsToolTipEnabled) property of [SfKanban](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html). By default, [IsToolTipEnabled](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_IsToolTipEnabled) is set to `false.` To provide users with additional information or context about cards, simply set this property to `true.` +To enable tooltip for the kanban cards, use [IsToolTipEnabled](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_IsToolTipEnabled) property of [SfKanban](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html). By default, [IsToolTipEnabled](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_IsToolTipEnabled) is set to `false`. To provide users with additional information or context about cards, simply set this property to `true`. {% tabs %} {% highlight XAML hl_lines="2" %} @@ -813,4 +814,4 @@ public class ViewModel ![card-tool-tip-customization-support-in-winui-kanban](images/cards/card-tool-tip-customization-support-in-winui-kanban.gif) N> -* This property will only be applicable when [IsToolTipEnabled](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_IsToolTipEnabled) is set to `true.` \ No newline at end of file +* This property will only be applicable when [IsToolTipEnabled](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_IsToolTipEnabled) is set to `true`. \ No newline at end of file diff --git a/winui/Kanban/columns.md b/winui/Kanban/columns.md index 0267d635b..492f44dea 100644 --- a/winui/Kanban/columns.md +++ b/winui/Kanban/columns.md @@ -142,6 +142,8 @@ public class ViewModel You can also define the exact width for the columns using [ColumnWidth](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_ColumnWidth) property of [SfKanban](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html). +N> When both [ColumnWidth](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_ColumnWidth) and the [MinimumColumnWidth](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_MinimumColumnWidth)/[MaximumColumnWidth](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_MaximumColumnWidth) properties are set, the effective column width will be constrained within the defined minimum and maximum bounds. + {% tabs %} {% highlight XAML hl_lines="3" %} @@ -659,7 +661,7 @@ public class ViewModel ![multi-category-columns-in-winui-kanban](images/columns/multi-category-columns-in-winui-kanban.png) -## Customize columns header appearance +## Customize column header appearance The WinUI Kanban control allows you to customize the header text, column header template, and more. @@ -1096,7 +1098,7 @@ public class ViewModel ## Column drag and drop -Columns can be reordered in the .NET WinUI Kanban control using built-in drag-and-drop. +Columns can be reordered in the WinUI Kanban control using built-in drag-and-drop. Enable this by setting the [`AllowColumnReorder`](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_AllowColumnReorder) property of [SfKanban](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html) to `true`. The default value is `false`. {% tabs %} @@ -1154,7 +1156,7 @@ public class ViewModel ## Card drag and drop -Cards can be dragged and dropped across columns, within columns, or across swimlane rows to modify the card's status. To enable drag-and-drop functionality within the kanban, set the [AllowDrag](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanColumn.html#Syncfusion_UI_Xaml_Kanban_KanbanColumn_AllowDrag) property of [KanbanColumn](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanColumn.html) to `true`. The default value is `true`. +Cards can be dragged and dropped across columns, within columns, or across swimlane rows to modify the card's status. To enable drag-and-drop functionality within the kanban, set the [AllowDrag](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanColumn.html#Syncfusion_UI_Xaml_Kanban_KanbanColumn_AllowDrag) property of [KanbanColumn](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanColumn.html) to `true`. By default, both the [AllowDrag](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanColumn.html#Syncfusion_UI_Xaml_Kanban_KanbanColumn_AllowDrag) and [AllowDrop](https://learn.microsoft.com/en-us/uwp/api/windows.ui.xaml.uielement.allowdrop?view=winrt-26100#windows-ui-xaml-uielement-allowdrop) properties are set to `true`. ![card-drag-drop-in-winui-kanban](images/columns/card-drag-drop-in-winui-kanban.gif) @@ -1290,7 +1292,7 @@ public class ViewModel ![disable-card-drag-drop-in-winui-kanban](images/columns/disable-card-drag-drop-in-winui-kanban.gif) -### Placeholder in WinUI Kanban control +### Placeholders in WinUI Kanban control The placeholders in the WinUI Kanban control visually indicate the exact position where a card is dragged and where it will be placed within a Kanban column during a drag-and-drop operation. @@ -1448,7 +1450,7 @@ public class ViewModel The WinUI Kanban control allows users to set limits on the number of tasks in each column at every stage of the workflow, helping to prevent overload. The minimum and maximum number of items allowed in a column can be customized using the [MinimumCount](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanColumn.html#Syncfusion_UI_Xaml_Kanban_KanbanColumn_MinimumCount) and [MaximumCount](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanColumn.html#Syncfusion_UI_Xaml_Kanban_KanbanColumn_MaximumCount) properties in [KanbanColumn](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanColumn.html). -The Kanban control also supports built-in error bars that change color when the WIP limit is exceeded or when a task fails validation, making it easier to quickly identify bottlenecks in the process. +The Kanban control also supports built-in indicator bars that change color when the WIP limit is exceeded or when a task fails validation, making it easier to quickly identify bottlenecks in the process. {% tabs %} {% highlight XAML hl_lines="4 5 6" %} diff --git a/winui/Kanban/events.md b/winui/Kanban/events.md index e6cf32f24..2574ce93b 100644 --- a/winui/Kanban/events.md +++ b/winui/Kanban/events.md @@ -11,7 +11,7 @@ documentation: ug ## ColumnDragStarting -The [`ColumnDragStarting`](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_ColumnDragStarting) event occurs when a column begins to be dragged. We can get the following details from the [`ColumnDragStarting`](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_ColumnDragStarting) event. +The [`ColumnDragStarting`](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_ColumnDragStarting) event occurs when a column begins to be dragged. The following details can be retrieved from the [`ColumnDragStarting`](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_ColumnDragStarting) event. [`Column`](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanColumnDragStartingEventArgs.html#Syncfusion_UI_Xaml_Kanban_KanbanColumnDragStartingEventArgs_Column) - Returns the source column where the column is being dragged. [`ColumnIndex`](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanColumnDragStartingEventArgs.html#Syncfusion_UI_Xaml_Kanban_KanbanColumnDragStartingEventArgs_ColumnIndex) - Returns the index of the dragged column within the Kanban column collection. @@ -75,7 +75,7 @@ public class ViewModel ## ColumnDragOver -The [`ColumnDragOver`](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_ColumnDragOver) event occurs when a column is being dragged over another column. We can get the following details from the [`ColumnDragOver`](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_ColumnDragOver) event. +The [`ColumnDragOver`](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_ColumnDragOver) event occurs when a column is being dragged over another column. The following details can be retrieved from the [`ColumnDragOver`](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_ColumnDragOver) event. [`SourceColumn`](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanColumnDragOverEventArgs.html#Syncfusion_UI_Xaml_Kanban_KanbanColumnDragOverEventArgs_SourceColumn) - Returns the column where the drag operation originated. [`CurrentColumn`](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanColumnDragOverEventArgs.html#Syncfusion_UI_Xaml_Kanban_KanbanColumnDragOverEventArgs_CurrentColumn) - Returns the current column over which the dragged column is positioned. @@ -114,7 +114,7 @@ private void OnKanbanColumnDragOver(object sender, KanbanColumnDragOverEventArgs var sourceColumn = e.SourceColumn; var currentColumn = e.CurrentColumn; int previousColumnIndex = e.PreviousColumnIndex; - int currentColumnIndex = e.CurrentColumnIndex + int currentColumnIndex = e.CurrentColumnIndex; } {% endhighlight %} @@ -143,7 +143,7 @@ public class ViewModel ## ColumnDrop -The [`ColumnDrop`](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_ColumnDrop) event occurs when a dragged column is dropped into a new position. We can get the following details from the [`ColumnDrop`](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_ColumnDrop) event. +The [`ColumnDrop`](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_ColumnDrop) event occurs when a dragged column is dropped into a new position. The following details can be retrieved from the [`ColumnDrop`](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_ColumnDrop) event. [`SourceColumn`](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanColumnDropEventArgs.html#Syncfusion_UI_Xaml_Kanban_KanbanColumnDropEventArgs_SourceColumn) - Returns the column from which the drag operation originated. [`PreviousColumnIndex`](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanColumnDropEventArgs.html#Syncfusion_UI_Xaml_Kanban_KanbanColumnDropEventArgs_PreviousColumnIndex) - Returns the column index before the drop. @@ -182,7 +182,7 @@ private void OnKanbanColumnDrop(object sender, KanbanColumnDropEventArgs e) var sourceColumn = e.SourceColumn; var previousColumnIndex = e.PreviousColumnIndex; int targetColumnIndex = e.TargetColumnIndex; - int targetColumn = e.TargetColumn; + var targetColumn = e.TargetColumn; } {% endhighlight %} @@ -211,11 +211,11 @@ public class ViewModel ## DragStarting -The [CardDragStarting](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_CardDragStarting) event occurs when a card begins to be dragged. We can get the following details from the [CardDragStarting](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_CardDragStarting) event. +The [CardDragStarting](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_CardDragStarting) event occurs when a card begins to be dragged. The following details can be retrieved from the [CardDragStarting](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_CardDragStarting) event. * [Column](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanCardDragStartingEventArgs.html#Syncfusion_UI_Xaml_Kanban_KanbanCardDragStartingEventArgs_Column) - Returns the source column from which the card is being dragged. * [Card](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanCardDragStartingEventArgs.html#Syncfusion_UI_Xaml_Kanban_KanbanCardDragStartingEventArgs_Card) - Returns the dragging card in the kanban. -* [KeepCard](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanCardDragStartingEventArgs.html#Syncfusion_UI_Xaml_Kanban_KanbanCardDragStartingEventArgs_KeepCard) - Determines whether the original card remains in the source column during a drag operation. When set to `true`, the card stays in its original column while being dragged, allowing repeated drag-and-drop actions without relocating the card. A preview of the card is generated during the drag. +* [KeepCard](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanCardDragStartingEventArgs.html#Syncfusion_UI_Xaml_Kanban_KanbanCardDragStartingEventArgs_KeepCard) - Determines whether the original card remains in the source column during a drag operation. When set to `true`, the card stays in its original column while being dragged, allowing repeated drag-and-drop actions without relocating the card. A preview of the card is generated during the drag. The default value is `false`. {% tabs %} {% highlight XAML hl_lines="3" %} @@ -344,7 +344,7 @@ public class ViewModel ## DragOver -The [CardDragOver](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_CardDragOver) event occurs when a card is being dragged over a column. We can get the following details from the [CardDragOver](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_CardDragOver) event. +The [CardDragOver](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_CardDragOver) event occurs when a card is being dragged over a column. The following details can be retrieved from the [CardDragOver](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_CardDragOver) event. * [Column](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanCardDragOverEventArgs.html#Syncfusion_UI_Xaml_Kanban_KanbanCardDragOverEventArgs_Column) - Returns the column in which the card is currently being dragged. * [CurrentIndex](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanCardDragOverEventArgs.html#Syncfusion_UI_Xaml_Kanban_KanbanCardDragOverEventArgs_CurrentIndex) - Returns the current index position of the card within its column. @@ -482,7 +482,7 @@ public class ViewModel ## Drop -The [CardDrop](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_CardDrop) event occurs when a dragged card is dropped into a column. We can get the following details from the [CardDrop](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_CardDrop) event. +The [CardDrop](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_CardDrop) event occurs when a dragged card is dropped into a column. The following details can be retrieved from the [CardDrop](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_CardDrop) event. * [SourceColumn](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanCardDropEventArgs.html#Syncfusion_UI_Xaml_Kanban_KanbanCardDropEventArgs_SourceColumn) - Returns the column from which the user drags the card. * [PreviousCardIndex](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanCardDropEventArgs.html#Syncfusion_UI_Xaml_Kanban_KanbanCardDropEventArgs_PreviousCardIndex) - Returns the integer value that indicates the previous card index while dragging into the next column. @@ -630,7 +630,7 @@ public class ViewModel ## CardTapped -The [CardTapped](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_CardTapped) event occurs when the card is tapped. We can get the following details from the [CardTapped](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_CardTapped) event. +The [CardTapped](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_CardTapped) event occurs when the card is tapped. The following details can be retrieved from the [CardTapped](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_CardTapped) event. * [SelectedCard](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanCardTappedEventArgs.html#Syncfusion_UI_Xaml_Kanban_KanbanCardTappedEventArgs_SelectedCard) - Returns the instance of the card that was tapped. * [SelectedColumn](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanCardTappedEventArgs.html#Syncfusion_UI_Xaml_Kanban_KanbanCardTappedEventArgs_SelectedColumn) - Returns the instance of the column containing the tapped card. @@ -764,9 +764,9 @@ public class ViewModel {% endtabs %} -## Command +## CardTapped Command -Kanban commands allow to map [CardTapped](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_CardTapped) event to command which supports the MVVM (Model-View-ViewModel) pattern. +Kanban commands allow mapping the [CardTapped](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_CardTapped) event to a command, which supports the MVVM (Model-View-ViewModel) pattern. ### CardTappedCommand @@ -777,7 +777,7 @@ The [CardTappedCommand](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml. + CardTappedCommand="{Binding CardTappedCommand}"> @@ -907,16 +907,16 @@ The [CardTappedCommand](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml. { if (parameter is KanbanCardTappedEventArgs args) { - var selectedCoumn = args.SelectedColumn; + var selectedColumn = args.SelectedColumn; } } /// /// Determines whether the CardTapped command can be executed. /// - /// The source of the command. + /// The source of the command. /// Returns a boolean indicating whether the command can be executed. - private bool CanExecuteCardTapped(object sender) + private bool CanExecuteCardTapped(object parameter) { return true; } @@ -933,7 +933,7 @@ public class RelayCommand : ICommand public event EventHandler CanExecuteChanged; private readonly Action execute; - + private readonly Predicate canExecute; public RelayCommand(Action execute, Predicate canExecute = null) @@ -951,7 +951,6 @@ public class RelayCommand : ICommand public void Execute(object parameter) => execute(parameter); - public void RaiseCanExecuteChanged() { if (CanExecuteChanged != null) diff --git a/winui/Kanban/getting-started.md b/winui/Kanban/getting-started.md index bfd848974..3340a878d 100644 --- a/winui/Kanban/getting-started.md +++ b/winui/Kanban/getting-started.md @@ -190,7 +190,7 @@ The [`ColumnMappingPath`](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xam * **Defining columns in the Kanban Board:** The [`Columns`](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_Columns) in the Kanban board are mapped based on the values of a specified property (e.g., "Status") from your custom data model. The [`ColumnMappingPath`](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_ColumnMappingPath) specifies the name of the property within the data object that is used to generate columns in the Kanban control when [`AutoGenerateColumns`](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_AutoGenerateColumns) is set to `true`. -Alternatively, you can manually define columns by setting [`AutoGenerateColumns`](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_AutoGenerateColumns) to `false` and adding instances of [`KanbanColumn`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Kanban.KanbanColumn.html) to the [`Columns`](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_Columns) collection of the [`SfKanban`](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html) control. Based on the property specified in [`ColumnMappingPath`](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_ColumnMappingPath), the Kanban control will generate the columns and render the corresponding cards accordingly. +Alternatively, you can manually define columns by setting [`AutoGenerateColumns`](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_AutoGenerateColumns) to `false` and adding instances of [`KanbanColumn`](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanColumn.html) to the [`Columns`](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_Columns) collection of the [`SfKanban`](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html) control. Based on the property specified in [`ColumnMappingPath`](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_ColumnMappingPath), the Kanban control will generate the columns and render the corresponding cards accordingly. Let’s look at the practical code example: @@ -279,7 +279,7 @@ public class ViewModel taskDetail = new TaskDetails(); taskDetail.Title = "New Feature"; - taskDetail.Description = "ragging events support for Kanban"; + taskDetail.Description = "Dragging events support for Kanban"; taskDetail.Status = "In Progress"; taskDetails.Add(taskDetail); diff --git a/winui/Kanban/overview.md b/winui/Kanban/overview.md index 9a608f7cd..4efa2b2a2 100644 --- a/winui/Kanban/overview.md +++ b/winui/Kanban/overview.md @@ -15,7 +15,7 @@ The Syncfusion® WinUI Kanban control provides an efficient way to vi ## Key features -* **Work-in-progress (WIP) limit**: Users can set task limits per stage, preventing overload and improving efficiency. +* **Work-in-Progress (WIP) limit**: Users can set task limits per stage, preventing overload and improving efficiency. work-in-progress-limit-in-winui-kanban @@ -28,7 +28,7 @@ The Syncfusion® WinUI Kanban control provides an efficient way to vi ![swim-lanes-in-winui-kanban](images/overview/swim-lanes-in-winui-kanban.png) -* **Interaction**: Includes card tapping, column expansion/collapse, and drag-and-drop. +* **Interaction**: Includes card tapping, column expand/collapse, and drag-and-drop. * **Events**: Triggered when cards are dragged, repositioned, or tapped. * **Appearance customization**: Customize each element using templates, e.g., column headers, cards, and swim lane headers. diff --git a/winui/Kanban/sorting.md b/winui/Kanban/sorting.md index d8327b3a5..86ba5f880 100644 --- a/winui/Kanban/sorting.md +++ b/winui/Kanban/sorting.md @@ -7,11 +7,11 @@ control: SfKanban documentation: ug --- -# Card Item Sorting in .NET WinUI Kanban (SfKanban) +# Card Item Sorting in WinUI Kanban (SfKanban) -The Kanban control supports customizable card sorting within columns based on specific data fields such as `Priority`, `DueDate`, or `Status`. Sorting can be configured programmatically and updated dynamically at runtime using the following properties: +The Kanban control supports customizable card sorting within columns based on specific data fields such as `Priority`, `Index`, or `Category`. Sorting can be configured programmatically and updated dynamically at runtime using the following properties: -* [SortingMappingPath](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_SortingMappingPath) - Used to map the sorting field to a property name in the [KanbanModel](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanModel.html) or `CustomModel`. The default value is `string.Empty`, in which case the cards will not be sorted. +* [SortingMappingPath](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_SortingMappingPath) - Used to map the sorting field to a property name in the [KanbanModel](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanModel.html) or `CustomModel`. The default value is `string.Empty`, in which case the cards will not be sorted. The mapped property must be a comparable type (e.g., `string`, `int`, `DateTime`). * [SortingOrder](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_SortingOrder) - Used to define the direction of cards sorting within each column. * [Ascending](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanSortingOrder.html#Syncfusion_UI_Xaml_Kanban_KanbanSortingOrder_Ascending) - Cards with lower values appear first. * [Descending](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanSortingOrder.html#Syncfusion_UI_Xaml_Kanban_KanbanSortingOrder_Descending) - Cards with higher values appear first. @@ -168,7 +168,7 @@ N> ### Index-Based Sorting -The index-based approach in the Kanban control allows cards to be dropped at precise positions within a column. Upon dropping, the card's index is updated based on the index of the previous card. Additionally, the index of the next card is incremented relative to the drop position to maintain continuous ordering. +The index-based approach in the Kanban control allows cards to be dropped at precise positions within a column. Upon dropping, the card's index is updated based on the index of the previous card. Additionally, the next card's index is incremented to maintain continuous ordering. N> The [SortingMappingPath](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_SortingMappingPath) property must be mapped to a valid numeric property name from the [ItemsSource](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_ItemsSource) to enable index-based sorting updates. @@ -265,7 +265,7 @@ private void OnKanbanCardDragStarting(object? sender, KanbanCardDragStartingEven this.selectedCard = e.Card; } -private void OnCardDrop(object? sender, KanbanDragEndEventArgs e) +private void OnCardDrop(object? sender, KanbanCardDropEventArgs e) { this.targetColumn = e.TargetColumn; if (this.kanban == null) diff --git a/winui/Kanban/swimlane.md b/winui/Kanban/swimlane.md index 592f91248..c95700c39 100644 --- a/winui/Kanban/swimlane.md +++ b/winui/Kanban/swimlane.md @@ -9,9 +9,11 @@ documentation: ug # Swimlane in WinUI Kanban (SfKanban) control -Swimlanes are horizontal categorizations of cards on the WinUI Kanban Board. It is used for grouping of cards, which brings transparency to the workflow process. They allow you to categorize your workflow by projects, teams, users, or any other criteria you need. +Swimlanes are horizontal categorizations of cards on the WinUI Kanban Board. They are used to group cards, bringing transparency to the workflow process. They allow you to categorize your workflow by projects, teams, users, or any other criteria you need. -By default, swimlanes are categorized based on the [Assignee](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanModel.html#Syncfusion_UI_Xaml_Kanban_KanbanModel_Assignee) values in the [KanbanModel](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanModel.html) class. You can also define a category by mapping [SwimlaneKey](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_SwimlaneKey) to the appropriate property name in the defined [KanbanModel](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanModel.html). +By default, swimlanes are categorized based on the [Assignee](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanModel.html#Syncfusion_UI_Xaml_Kanban_KanbanModel_Assignee) values in the [KanbanModel](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanModel.html) class. You can also define the swimlane grouping field by mapping [SwimlaneKey](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_SwimlaneKey) to the appropriate property name in the defined [KanbanModel](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanModel.html). + +N> Swimlanes are only displayed when the configured [SwimlaneKey](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_SwimlaneKey) property (or the default [Assignee](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanModel.html#Syncfusion_UI_Xaml_Kanban_KanbanModel_Assignee)) is present and non-null in the bound data. If the property is absent or null across all cards, swimlane grouping is not rendered. The following example code demonstrates, how to group the underlying data collection using the [SwimlaneKey](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_SwimlaneKey) property in the Kanban control. @@ -470,6 +472,6 @@ public class ViewModel {% endhighlight %} {% endtabs %} -N> The `DataContext` for the [SwimlaneHeaderTemplate](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_SwimlaneHeaderTemplate) property in [SfKanban](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html) is set to the [KanbanModel](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanModel.html). +N> The `DataContext` for the [SwimlaneHeaderTemplate](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_SwimlaneHeaderTemplate) property in [SfKanban](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html) is set to the [KanbanModel](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanModel.html). The template's `DataContext` exposes the group key value via the standard [KanbanModel](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanModel.html) properties (e.g., the [Title](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanModel.html#Syncfusion_UI_Xaml_Kanban_KanbanModel_Title) property returns the swimlane group's title). ![swimlane-header-template-in-winui-kanban](images/swimlane/swimlane-header-template-in-winui-kanban.png) diff --git a/winui/Kanban/workflows.md b/winui/Kanban/workflows.md index 6bce37b76..37f16aaa1 100644 --- a/winui/Kanban/workflows.md +++ b/winui/Kanban/workflows.md @@ -11,7 +11,9 @@ documentation: ug The [WinUI Kanban](https://www.syncfusion.com/winui-controls/kanban) workflow allows to define the flow of cards between columns, offering restrictions when moving cards from one column to another. It also supports preventing drag-and-drop actions on specific columns. -To define the flow of card transitions between different states, create an instance of the [KanbanWorkflow](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanWorkflow.html) class and add it to the [Workflows](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_Workflows) property of the [SfKanban](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html) to define the workflow for each column. The [KanbanWorkflow](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanWorkflow.html) class contains the following properties to specify the source and target categories. +To define the flow of card transitions between different states, create an instance of the [KanbanWorkflow](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanWorkflow.html) class. Add it to the [Workflows](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_Workflows) property of the [SfKanban](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html) to define the workflow for each column. The [KanbanWorkflow](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanWorkflow.html) class contains the following properties to specify the source and target categories. + +N> When no [Workflows](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_Workflows) collection is defined, cards can be moved freely between any columns by default. * [Category](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanWorkflow.html#Syncfusion_UI_Xaml_Kanban_KanbanWorkflow_Category) – Used to define the source category or state. * [AllowedTransitions](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.Kanban.KanbanWorkflow.html#Syncfusion_UI_Xaml_Kanban_KanbanWorkflow_AllowedTransitions) – Used to define the list of categories or states to which a card can be moved from the current category. @@ -37,6 +39,12 @@ To define the flow of card transitions between different states, create an insta Won't Fix + + + Open + In Progress + + @@ -58,6 +66,7 @@ this.kanban.Workflows = new List() { new KanbanWorkflow() { Category = "Open", AllowedTransitions ={ "In Progress" } }, new KanbanWorkflow() { Category = "In Progress", AllowedTransitions ={ "Closed", "Won't Fix" } }, + new KanbanWorkflow() { Category = "Postponed", AllowedTransitions ={ "Open", "In Progress" } }, }; {% endhighlight %}