-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
SAMKeyUsageCounterDialog.xaml
49 lines (49 loc) · 3.98 KB
/
SAMKeyUsageCounterDialog.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<UserControl x:Class="Leosac.KeyManager.Library.KeyStore.NXP_SAM.UI.SAMKeyUsageCounterDialog"
xmlns="http:https://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http:https://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http:https://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http:https://schemas.microsoft.com/expression/blend/2008"
xmlns:domain="clr-namespace:Leosac.KeyManager.Library.KeyStore.NXP_SAM.UI.Domain"
xmlns:libui="clr-namespace:Leosac.KeyManager.Library.UI;assembly=KeyManager.Library.UI"
xmlns:local="clr-namespace:Leosac.KeyManager.Library.KeyStore.NXP_SAM.UI"
xmlns:materialDesign="http:https://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:properties="clr-namespace:Leosac.KeyManager.Library.KeyStore.NXP_SAM.UI.Properties"
xmlns:wpfappctrls="clr-namespace:Leosac.WpfApp.Controls;assembly=WpfApp"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance domain:SAMKeyUsageCounterDialogViewModel}"
d:DesignHeight="370" d:DesignWidth="500">
<DockPanel LastChildFill="True">
<TextBlock DockPanel.Dock="Top" Text="{x:Static properties:Resources.KeyEntry}" FontSize="18" Margin="5" />
<WrapPanel DockPanel.Dock="Bottom" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="5,25,5,5">
<Button Width="100" IsDefault="True" Content="{x:Static properties:Resources.OK}" Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}" CommandParameter="{Binding Counter}"/>
<Button Width="100" IsCancel="True" Content="{x:Static properties:Resources.Cancel}" Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}" Margin="15,0,0,0"/>
</WrapPanel>
<StackPanel>
<TextBox Grid.Row="1" HorizontalAlignment="Stretch" VerticalAlignment="Center" TextWrapping="Wrap" Text="{Binding Counter.Identifier}" IsEnabled="False" Margin="5,5,5,5"
materialDesign:HintAssist.HelperText="{x:Static properties:Resources.KUCIdentifierHelper}"
materialDesign:HintAssist.Hint="{x:Static properties:Resources.KUCIdentifier}"
Style="{StaticResource MaterialDesignFloatingHintTextBox}"/>
<materialDesign:Card Margin="5,15,5,5">
<StackPanel>
<Expander HorizontalAlignment="Stretch" Header="Counter" IsExpanded="True">
<StackPanel Orientation="Vertical" TextBlock.Foreground="{DynamicResource MaterialDesignBody}" Margin="24,8,24,16">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<wpfappctrls:NumericUpDownControl MinValue="0" MaxValue="4294967295" CurrentValue="{Binding Counter.Value, Mode=TwoWay}" Grid.Row="0"
HelperText="{x:Static properties:Resources.KUCValueHelper}"
Hint="{x:Static properties:Resources.KUCValue}"/>
<wpfappctrls:NumericUpDownControl MinValue="0" MaxValue="4294967295" CurrentValue="{Binding Counter.Limit, Mode=TwoWay}" Grid.Row="1"
HelperText="{x:Static properties:Resources.KUCLimitHelper}"
Hint="{x:Static properties:Resources.KUCLimit}"/>
</Grid>
</StackPanel>
</Expander>
</StackPanel>
</materialDesign:Card>
<local:ChangeKeyReferenceControl ChangeKeyRefId="{Binding Counter.ChangeKeyRefId, Mode=TwoWay}" ChangeKeyRefVersion="{Binding Counter.ChangeKeyRefVersion, Mode=TwoWay}" Margin="5"/>
</StackPanel>
</DockPanel>
</UserControl>