feat: add input mode, allow null ipaddress, refactor code for better readbility.

This commit is contained in:
rabbitism
2023-02-25 13:22:57 +08:00
parent 6d63cd566e
commit 9b28cd07b8
3 changed files with 321 additions and 257 deletions

View File

@@ -17,19 +17,27 @@
Name="format"
Margin="0,0,0,50"
Content="Show Leading Zeroes" />
<TextBlock Classes="" Text="Normal" />
<u:IPv4Box
Name="box"
Width="200"
ShowLeadingZero="{Binding #format.IsChecked}" />
<TextBlock Text="IP: " />
<TextBlock Text="{Binding #box.IPAddress}" />
<TextBlock Classes="" Text="Fast input" />
<u:IPv4Box
Width="200"
InputMode="Fast"
ShowLeadingZero="{Binding #format.IsChecked}" />
<TextBlock Classes="" Text="Binding From Source" />
<RepeatButton Command="{Binding ChangeAddress}" Content="Random" />
<u:IPv4Box
Width="200"
IPAddress="{Binding Address}"
ShowLeadingZero="{Binding #format.IsChecked}" />
<TextBlock Classes="" Text="Disabled" />
<u:IPv4Box Width="200" IsEnabled="False" />
</StackPanel>
</UserControl>