From af4ce4b181c4525af33f6e8054505d29761c6ca6 Mon Sep 17 00:00:00 2001 From: Sanjay Vikram Mariappan <154953240+sanjayvikramsf4373@users.noreply.github.com> Date: Mon, 1 Dec 2025 11:48:48 +0530 Subject: [PATCH] 991373-[Hotfix] Added Github example sample for sorting into the WPF Kanban UG documentation. --- wpf/Kanban-Board/Sorting.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wpf/Kanban-Board/Sorting.md b/wpf/Kanban-Board/Sorting.md index 0f7efb9fa..92130a849 100644 --- a/wpf/Kanban-Board/Sorting.md +++ b/wpf/Kanban-Board/Sorting.md @@ -158,6 +158,9 @@ public class SortingViewModel ![custom-field-sorting-in-wpf-kanban](SfKanban_images/custom-field-sorting-in-wpf-kanban.gif) +N> +[View sample in GitHub](https://github.com/SyncfusionExamples/wpf-kanban-examples/tree/master/CustomFieldSorting) + N> * To apply sorting after a drop operation, handle the [CardDragEnd](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_CardDragEnd) event and explicitly call the [RefreshKanbanColumn](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_RefreshKanbanColumn_System_String_) method. This ensures the column updates to reflect the new card order based on the defined sorting logic. * When using a custom data model, the default card UI is not applicable. To render the card content, you must define a custom `DataTemplate` using the [CardTemplate](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_CardTemplate) property. @@ -509,6 +512,9 @@ public class SortingViewModel ![index-based-sorting-in-wpf-kanban](SfKanban_images/index-based-sorting-in-wpf-kanban.gif) +N> +[View sample in GitHub](https://github.com/SyncfusionExamples/wpf-kanban-examples/tree/master/IndexBasedSorting) + N> * The Index-based sorting can be achieved at the sample level after a drag-and-drop action. To implement this handle the [CardDragEnd](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_CardDragEnd) event, access the items in the target column using `e.TargetColumn.Items`, and update the numeric field used for sorting to maintain a continuous order. Finally, call [RefreshKanbanColumn](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_RefreshKanbanColumn_System_String_) method to update the UI with the new order. * To disable sorting logic, avoid assigning a value to the [SortingMappingPath](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_SortingMappingPath) property. This ensures that card positions remain static and reflect the order of the [ItemsSource](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Kanban.SfKanban.html#Syncfusion_UI_Xaml_Kanban_SfKanban_ItemsSource) collection, making it suitable for scenarios where sorting is not required or is managed externally. \ No newline at end of file