Feat: add a new control PathPicker, add PathPickerDemo
This commit is contained in:
@@ -4,6 +4,7 @@ using Avalonia;
|
||||
using Avalonia.Styling;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using Ursa.Controls;
|
||||
using Ursa.Themes.Semi;
|
||||
|
||||
namespace Ursa.Demo.ViewModels;
|
||||
@@ -79,6 +80,7 @@ public partial class MainViewViewModel : ViewModelBase
|
||||
MenuKeys.MenuKeyTreeComboBox => new TreeComboBoxDemoViewModel(),
|
||||
MenuKeys.MenuKeyTwoTonePathIcon => new TwoTonePathIconDemoViewModel(),
|
||||
MenuKeys.AspectRatioLayout => new AspectRatioLayoutDemoViewModel(),
|
||||
MenuKeys.PathPicker => new PathPickerDemoViewModel(),
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(s), s, null)
|
||||
};
|
||||
}
|
||||
|
||||
@@ -59,7 +59,8 @@ public class MenuViewModel : ViewModelBase
|
||||
new() { MenuHeader = "ToolBar", Key = MenuKeys.MenuKeyToolBar },
|
||||
new() { MenuHeader = "TreeComboBox", Key = MenuKeys.MenuKeyTreeComboBox },
|
||||
new() { MenuHeader = "TwoTonePathIcon", Key = MenuKeys.MenuKeyTwoTonePathIcon },
|
||||
new() { MenuHeader = "AspectRatioLayout", Key = MenuKeys.AspectRatioLayout ,Status = "WIP"},
|
||||
new() { MenuHeader = "AspectRatioLayout", Key = MenuKeys.AspectRatioLayout, Status = "New" },
|
||||
new() { MenuHeader = "PathPicker", Key = MenuKeys.PathPicker, Status = "WIP" },
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -115,4 +116,5 @@ public static class MenuKeys
|
||||
public const string MenuKeyTreeComboBox = "TreeComboBox";
|
||||
public const string MenuKeyTwoTonePathIcon = "TwoTonePathIcon";
|
||||
public const string AspectRatioLayout = "AspectRatioLayout";
|
||||
public const string PathPicker = "PathPicker";
|
||||
}
|
||||
10
demo/Ursa.Demo/ViewModels/PathPickerDemoViewModel.cs
Normal file
10
demo/Ursa.Demo/ViewModels/PathPickerDemoViewModel.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using System.Collections.Generic;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
|
||||
namespace Ursa.Demo.ViewModels;
|
||||
|
||||
public partial class PathPickerDemoViewModel : ViewModelBase
|
||||
{
|
||||
[ObservableProperty] private string? _path;
|
||||
[ObservableProperty] private IReadOnlyList<string>? _paths;
|
||||
}
|
||||
Reference in New Issue
Block a user