|
|
|
|
@ -11,18 +11,16 @@ |
|
|
|
|
<SolidColorBrush x:Key="CHAR_Background" Color="#B4FFFF"/> |
|
|
|
|
<SolidColorBrush x:Key="HEX_Background" Color="#C8C8FF"/> |
|
|
|
|
<SolidColorBrush x:Key="BIN_Background" Color="#B4FFB4"/> |
|
|
|
|
<!-- Value Converters --> |
|
|
|
|
<!-- n/a --> |
|
|
|
|
|
|
|
|
|
<!-- Styling for all data items --> |
|
|
|
|
<Style x:Key="DataContainerFontStyle" TargetType="{x:Type Control}"> |
|
|
|
|
<Setter Property="FontFamily" Value="Consolas"/> |
|
|
|
|
<Setter Property="FontSize" Value="14"/> |
|
|
|
|
<Setter Property="FontWeight" Value="ExtraLight"/> |
|
|
|
|
</Style> |
|
|
|
|
|
|
|
|
|
<!-- Data Template for Data Container --> |
|
|
|
|
<DataTemplate x:Key="dataContainerTemplate" DataType="vm:IDataViewModel"> |
|
|
|
|
<DataTemplate.Resources> |
|
|
|
|
<!-- Styling for all labels (data items) --> |
|
|
|
|
<Style TargetType="Label"> |
|
|
|
|
<Setter Property="FontFamily" Value="Consolas"/> |
|
|
|
|
<Setter Property="FontSize" Value="13"/> |
|
|
|
|
<Setter Property="FontWeight" Value="ExtraLight"/> |
|
|
|
|
</Style> |
|
|
|
|
</DataTemplate.Resources> |
|
|
|
|
<StackPanel Orientation="Vertical" Margin="0" x:Name="ItemStackPanel"> |
|
|
|
|
<StackPanel.Triggers> |
|
|
|
|
<EventTrigger SourceName="ItemStackPanel" RoutedEvent="Loaded"> |
|
|
|
|
@ -58,7 +56,8 @@ |
|
|
|
|
<Border BorderThickness="0"> |
|
|
|
|
<Label Content="{Binding DisplayStringChar}" Padding="0" Margin="2 0" VerticalAlignment="Center"> |
|
|
|
|
<Label.Style> |
|
|
|
|
<Style TargetType="Label"> |
|
|
|
|
<!-- extend label type with specific setters --> |
|
|
|
|
<Style TargetType="{x:Type Label}" BasedOn="{StaticResource DataContainerFontStyle}"> |
|
|
|
|
<Setter Property="HorizontalAlignment" Value="Left"/> |
|
|
|
|
<Style.Triggers> |
|
|
|
|
<DataTrigger Binding="{Binding ElementName=cbHex,Path=IsChecked}" Value="True"> |
|
|
|
|
@ -67,7 +66,7 @@ |
|
|
|
|
<DataTrigger Binding="{Binding ElementName=cbBin,Path=IsChecked}" Value="True"> |
|
|
|
|
<Setter Property="HorizontalAlignment" Value="Right"/> |
|
|
|
|
</DataTrigger> |
|
|
|
|
</Style.Triggers> |
|
|
|
|
</Style.Triggers> |
|
|
|
|
</Style> |
|
|
|
|
</Label.Style> |
|
|
|
|
</Label> |
|
|
|
|
@ -91,7 +90,8 @@ |
|
|
|
|
</Border> |
|
|
|
|
<!-- Hexadecimal --> |
|
|
|
|
<Border BorderThickness="0" Background="{StaticResource HEX_Background}"> |
|
|
|
|
<Label Content="{Binding DisplayStringHex}" HorizontalAlignment="Right" VerticalAlignment="Center" Padding="0" Margin="2 0"/> |
|
|
|
|
<Label Content="{Binding DisplayStringHex}" Style="{StaticResource DataContainerFontStyle}" |
|
|
|
|
HorizontalAlignment="Right" VerticalAlignment="Center" Padding="0" Margin="2 0"/> |
|
|
|
|
<Border.Style> |
|
|
|
|
<Style TargetType="Border"> |
|
|
|
|
<Setter Property="Visibility" Value="Collapsed"/> |
|
|
|
|
@ -105,7 +105,8 @@ |
|
|
|
|
</Border> |
|
|
|
|
<!-- Binary --> |
|
|
|
|
<Border BorderThickness="0" Background="{StaticResource BIN_Background}"> |
|
|
|
|
<Label Content="{Binding DisplayStringBin}" HorizontalAlignment="Right" VerticalAlignment="Center" Padding="0" Margin="2"/> |
|
|
|
|
<Label Content="{Binding DisplayStringBin}" Style="{StaticResource DataContainerFontStyle}" |
|
|
|
|
HorizontalAlignment="Right" VerticalAlignment="Center" Padding="0" Margin="2"/> |
|
|
|
|
<Border.Style> |
|
|
|
|
<Style TargetType="Border"> |
|
|
|
|
<Setter Property="Visibility" Value="Collapsed"/> |
|
|
|
|
@ -158,7 +159,7 @@ |
|
|
|
|
|
|
|
|
|
<!-- Show only when other checkboxes than "Characters" is checked --> |
|
|
|
|
<TextBox.Style> |
|
|
|
|
<Style TargetType="TextBox"> |
|
|
|
|
<Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource DataContainerFontStyle}"> |
|
|
|
|
<Setter Property="Visibility" Value="Collapsed"/> |
|
|
|
|
<Style.Triggers> |
|
|
|
|
<DataTrigger Binding="{Binding ElementName=cbCharacter,Path=IsChecked}" Value="True"> |
|
|
|
|
|