File tree Expand file tree Collapse file tree 2 files changed +3
-18
lines changed
Expand file tree Collapse file tree 2 files changed +3
-18
lines changed Original file line number Diff line number Diff line change 3535 <smtx : XamlDisplay Margin =" 10,5"
3636 VerticalAlignment =" Top"
3737 UniqueKey =" decimalUpDown_default" >
38- <StackPanel >
39- <materialDesign : DecimalUpDown Value =" {Binding MyDecimal, Mode=TwoWay}" ValueStep =" 0.5" Minimum =" -2.5" Maximum =" 2.5" />
40- <TextBlock Text =" {Binding MyDecimal, Mode=TwoWay}" />
41- <Button Content =" a button to focus" />
42- </StackPanel >
38+ <materialDesign : DecimalUpDown ValueStep =" 0.5" Minimum =" -2.5" Maximum =" 2.5" />
4339 </smtx : XamlDisplay >
4440
4541 <smtx : XamlDisplay Margin =" 10,5"
Original file line number Diff line number Diff line change 1- using CommunityToolkit . Mvvm . ComponentModel ;
2-
3- namespace MaterialDesignDemo ;
1+ namespace MaterialDesignDemo ;
42
53public partial class NumericUpDown : UserControl
64{
7- public NumericUpDown ( )
8- {
9- InitializeComponent ( ) ;
10- this . DataContext = new MyVM ( ) ;
11- }
12- }
5+ public NumericUpDown ( ) => InitializeComponent ( ) ;
136
14- public partial class MyVM : ObservableObject
15- {
16- [ ObservableProperty ]
17- private decimal _myDecimal ;
187}
You can’t perform that action at this time.
0 commit comments