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