fix:should be PathPickerForListView in demo
add:Maybe we can add a command demo here to show how to trigger the bound command. change:I think these two themes should be merged, and the "AcceptReturn" should just be controlled by "AllowMultiple" add:One more thing, we should add a property to control what to do when user cancelled a selection. Sometimes I just want to keep the original selection.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
|
||||
namespace Ursa.Demo.ViewModels;
|
||||
|
||||
@@ -7,4 +8,11 @@ public partial class PathPickerDemoViewModel : ViewModelBase
|
||||
{
|
||||
[ObservableProperty] private string? _path;
|
||||
[ObservableProperty] private IReadOnlyList<string>? _paths;
|
||||
[ObservableProperty] private int _commandTriggerCount = 0;
|
||||
|
||||
[RelayCommand]
|
||||
private void Selected(IReadOnlyList<string> paths)
|
||||
{
|
||||
CommandTriggerCount++;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user