Skip to content

Commit c429c00

Browse files
991373- Added sorting feature Gif images.
1 parent 80c5f9f commit c429c00

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed
897 KB
Loading
765 KB
Loading

wpf/Kanban-Board/Sorting.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ public class SortingViewModel
156156
{% endhighlight %}
157157
{% endtabs %}
158158

159+
![custom-field-sorting-in-wpf-kanban](SfKanban_images/custom-field-sorting-in-wpf-kanban.gif)
160+
159161
N>
160162
* To apply sorting after a drop operation, handle the `CardDragEnd` event and explicitly call the `RefreshKanbanColumn` method. This ensures the column updates to reflect the new card order based on the defined sorting logic.
161163
* 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` property.
@@ -505,6 +507,8 @@ public class SortingViewModel
505507
{% endhighlight %}
506508
{% endtabs %}
507509

510+
![index-based-sorting-in-wpf-kanban](SfKanban_images/index-based-sorting-in-wpf-kanban.gif)
511+
508512
N>
509513
* The Index-based sorting can be achieved at the sample level after a drag-and-drop action. To implement this handle the `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` method to update the UI with the new order.
510514
* To disable sorting logic, avoid assigning a value to the `SortingMappingPath` property. This ensures that card positions remain static and reflect the order of the `ItemsSource` collection, making it suitable for scenarios where sorting is not required or is managed externally.

0 commit comments

Comments
 (0)