feat: add property Size.

This commit is contained in:
Zhang Dian
2024-06-07 18:09:36 +08:00
parent 8c53aea890
commit 9a79d7213c
6 changed files with 46 additions and 7 deletions

View File

@@ -28,6 +28,16 @@
Count="{Binding Count}"
DefaultValue="{Binding DefaultValue}" />
<u:Rating
Classes="Small"
AllowClear="{Binding AllowClear}"
AllowHalf="{Binding AllowHalf}"
AllowFocus="{Binding AllowFocus}"
IsEnabled="{Binding IsEnabled}"
Value="{Binding Value}"
Count="{Binding Count}"
DefaultValue="{Binding DefaultValue}" />
<u:Rating
Size="48"
AllowClear="{Binding AllowClear}"
AllowHalf="{Binding AllowHalf}"
AllowFocus="{Binding AllowFocus}"
@@ -40,7 +50,7 @@
</StackPanel>
</Grid>
<Border Grid.Column="1" VerticalAlignment="Top">
<Grid ColumnDefinitions="*, Auto" RowDefinitions="*,*,*,*,*,*,*">
<Grid ColumnDefinitions="*, Auto" RowDefinitions="*,*,*,*,*,*,*,*">
<Label
Grid.Row="0"
Grid.Column="0"

View File

@@ -12,9 +12,9 @@ public partial class RatingDemoViewModel : ViewModelBase
[ObservableProperty] private double _value;
// [ObservableProperty] private object _character;
[ObservableProperty] private int _count = 5;
[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"];
}