54 lines
2.4 KiB
XML
54 lines
2.4 KiB
XML
<Window x:Class="UnicodeCharacterInspector.MainWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:System="clr-namespace:System;assembly=mscorlib"
|
|
xmlns:local="clr-namespace:UnicodeCharacterInspector"
|
|
mc:Ignorable="d"
|
|
Title="MainWindow"
|
|
Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"
|
|
Height="350" Width="525">
|
|
<Window.DataContext>
|
|
<local:CharacterInfoViewModel />
|
|
</Window.DataContext>
|
|
<Grid Margin="10">
|
|
<Grid.Resources>
|
|
<Style TargetType="{x:Type Label}" BasedOn="{StaticResource ResourceKey={x:Type Label}}">
|
|
<Setter Property="Margin" Value="3" />
|
|
</Style>
|
|
<Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource ResourceKey={x:Type TextBox}}">
|
|
<Setter Property="Margin" Value="3" />
|
|
</Style>
|
|
<Style TargetType="{x:Type TextBlock}" BasedOn="{StaticResource ResourceKey={x:Type TextBlock}}">
|
|
<Setter Property="Margin" Value="3" />
|
|
</Style>
|
|
</Grid.Resources>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBox Grid.Row="0" Grid.ColumnSpan="2" MaxLength="2" MaxLines="1">
|
|
<TextBox.Text>
|
|
<Binding Path="Character" UpdateSourceTrigger="PropertyChanged">
|
|
<Binding.ValidationRules>
|
|
<ExceptionValidationRule />
|
|
</Binding.ValidationRules>
|
|
</Binding>
|
|
</TextBox.Text>
|
|
</TextBox>
|
|
<TextBlock Grid.Row="1" Grid.ColumnSpan="2" Text="{Binding Character}" FontSize="96" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
|
<Label Grid.Row="2" Grid.Column="0" Content="Code point" />
|
|
<TextBlock Grid.Row="2" Grid.Column="1" Text="{Binding CodePoint, StringFormat=U+{0:X4}, TargetNullValue={x:Static System:String.Empty}}" VerticalAlignment="Center" />
|
|
<Label Grid.Row="3" Grid.Column="0" Content="Category" />
|
|
<TextBlock Grid.Row="3" Grid.Column="1" Text="{Binding Category}" VerticalAlignment="Center" />
|
|
</Grid>
|
|
</Window>
|