demo to update text
This commit is contained in:
@@ -25,12 +25,12 @@
|
|||||||
<u:Divider Content="Change Right ->" />
|
<u:Divider Content="Change Right ->" />
|
||||||
<u:NumericUIntUpDown
|
<u:NumericUIntUpDown
|
||||||
Name="numd"
|
Name="numd"
|
||||||
Command="{Binding TrythisCommand}"
|
|
||||||
Width="{Binding Width}"
|
Width="{Binding Width}"
|
||||||
HorizontalAlignment="{Binding HorizontalAlignment}"
|
HorizontalAlignment="{Binding HorizontalAlignment}"
|
||||||
HorizontalContentAlignment="{Binding HorizontalContentAlignment}"
|
HorizontalContentAlignment="{Binding HorizontalContentAlignment}"
|
||||||
AllowDrag="{Binding AllowDrag}"
|
AllowDrag="{Binding AllowDrag}"
|
||||||
AllowSpin="{Binding AllowSpin}"
|
AllowSpin="{Binding AllowSpin}"
|
||||||
|
Command="{Binding TrythisCommand}"
|
||||||
FontFamily="{Binding FontFamily, Mode=OneWay}"
|
FontFamily="{Binding FontFamily, Mode=OneWay}"
|
||||||
FormatString="{Binding FormatString}"
|
FormatString="{Binding FormatString}"
|
||||||
InnerLeftContent="{Binding InnerLeftContent}"
|
InnerLeftContent="{Binding InnerLeftContent}"
|
||||||
@@ -43,6 +43,11 @@
|
|||||||
Step="{Binding Step}"
|
Step="{Binding Step}"
|
||||||
Watermark="{Binding Watermark}"
|
Watermark="{Binding Watermark}"
|
||||||
Value="{Binding Value}" />
|
Value="{Binding Value}" />
|
||||||
|
<TextBox
|
||||||
|
Width="NaN"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
IsReadOnly="true"
|
||||||
|
Text="{Binding CommandUpdateText}" />
|
||||||
<u:Divider Content="Demo" />
|
<u:Divider Content="Demo" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
|||||||
@@ -40,13 +40,15 @@ public partial class NumericUpDownDemoViewModel : ObservableObject
|
|||||||
|
|
||||||
[ObservableProperty] private bool _IsEnable = true;
|
[ObservableProperty] private bool _IsEnable = true;
|
||||||
|
|
||||||
|
[ObservableProperty] private string _CommandUpdateText = "Command not Execute";
|
||||||
|
|
||||||
uint v = 0;
|
uint v = 0;
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
// void Trythis()
|
// void Trythis()
|
||||||
void Trythis(uint v)
|
void Trythis(uint v)
|
||||||
// void Trythis(object v)
|
// void Trythis(object v)
|
||||||
{
|
{
|
||||||
System.Diagnostics.Trace.WriteLine(v);
|
CommandUpdateText = $"Command Exe,CommandParameter={v}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user