Skip to content

Commit 429e988

Browse files
committed
cleanup demo
1 parent d7da38b commit 429e988

File tree

2 files changed

+3
-18
lines changed

2 files changed

+3
-18
lines changed

src/MainDemo.Wpf/NumericUpDown.xaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,7 @@
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"
Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,7 @@
1-
using CommunityToolkit.Mvvm.ComponentModel;
2-
3-
namespace MaterialDesignDemo;
1+
namespace MaterialDesignDemo;
42

53
public 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
}

0 commit comments

Comments
 (0)