misc: rename & remove.

This commit is contained in:
Zhang Dian
2024-06-07 18:20:33 +08:00
parent 9a79d7213c
commit 6a21aec1dc
6 changed files with 8 additions and 41 deletions

View File

@@ -22,7 +22,6 @@
<u:Rating
AllowClear="{Binding AllowClear}"
AllowHalf="{Binding AllowHalf}"
AllowFocus="{Binding AllowFocus}"
IsEnabled="{Binding IsEnabled}"
Value="{Binding Value}"
Count="{Binding Count}"
@@ -31,7 +30,6 @@
Classes="Small"
AllowClear="{Binding AllowClear}"
AllowHalf="{Binding AllowHalf}"
AllowFocus="{Binding AllowFocus}"
IsEnabled="{Binding IsEnabled}"
Value="{Binding Value}"
Count="{Binding Count}"
@@ -40,7 +38,6 @@
Size="48"
AllowClear="{Binding AllowClear}"
AllowHalf="{Binding AllowHalf}"
AllowFocus="{Binding AllowFocus}"
IsEnabled="{Binding IsEnabled}"
Value="{Binding Value}"
Count="{Binding Count}"
@@ -71,16 +68,6 @@
Grid.Column="1"
VerticalAlignment="Center"
IsChecked="{Binding AllowHalf}" />
<Label
Grid.Row="2"
Grid.Column="0"
VerticalAlignment="Center"
Content="AllowFocus" />
<ToggleSwitch
Grid.Row="2"
Grid.Column="1"
VerticalAlignment="Center"
IsChecked="{Binding AllowFocus}" />
<Label
Grid.Row="3"
Grid.Column="0"

View File

@@ -38,7 +38,7 @@ public class MenuViewModel: ViewModelBase
new() { MenuHeader = "NumPad", Key = MenuKeys.MenuKeyNumPad },
new() { MenuHeader = "Pagination", Key = MenuKeys.MenuKeyPagination },
new() { MenuHeader = "RangeSlider", Key = MenuKeys.MenuKeyRangeSlider },
new() { MenuHeader = "Rating", Key = MenuKeys.MenuKeyRating },
new() { MenuHeader = "Rating", Key = MenuKeys.MenuKeyRating, Status = "New"},
new() { MenuHeader = "Scroll To", Key = MenuKeys.MenuKeyScrollToButton },
new() { MenuHeader = "Selection List", Key = MenuKeys.MenuKeySelectionList },
new() { MenuHeader = "Skeleton", Key = MenuKeys.MenuKeySkeleton },

View File

@@ -1,5 +1,4 @@
using System.Collections.ObjectModel;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.ComponentModel;
namespace Ursa.Demo.ViewModels;
@@ -7,14 +6,8 @@ public partial class RatingDemoViewModel : ViewModelBase
{
[ObservableProperty] private bool _allowClear = true;
[ObservableProperty] private bool _allowHalf = true;
[ObservableProperty] private bool _allowFocus;
[ObservableProperty] private bool _isEnabled = true;
[ObservableProperty] private double _value;
[ObservableProperty] private double _defaultValue = 2.3;
[ObservableProperty] private int _count = 5;
// [ObservableProperty] private object _character;
public ObservableCollection<string> Tooltips { get; set; } = ["1", "2", "3", "4", "5"];
}