Loading files
366e28f22This file is pinned to the selected release. Download the original to open it in your design tool.
<UserControl x:Class="IDE.Documents.Views.FontDesignerView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:IDE.Documents.Views"
xmlns:ctrls="clr-namespace:IDE.Controls"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/IDE.Presentation;component/Controls/InplaceEditBox/Views/EditBox.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<UserControl.InputBindings>
<KeyBinding Key="F2"
Command="{Binding CurrentChar.BeginRenameCommand}" />
<KeyBinding Key="Delete"
Command="{Binding DeleteCharCommand}" />
</UserControl.InputBindings>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="3*" />
</Grid.ColumnDefinitions>
<local:CanvasDesignerControl Grid.Column="1" />
<Grid Margin="10" Grid.Column="0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal"
Margin="0,5">
<Button Command="{Binding AddCharCommand}"
CommandParameter="{Binding}"
ToolTip="Add a new char"
Grid.Column="3"
Focusable="False"
Margin="3,0"
Width="24"
Height="24"
Padding="2">
<Image Source="{StaticResource plus}"
Stretch="Uniform" />
</Button>
<Button Command="{Binding CurrentChar.BeginRenameCommand}"
CommandParameter="{Binding}"
ToolTip="Rename char"
Grid.Column="3"
Focusable="False"
Margin="3,0"
Width="24"
Height="24"
Padding="2">
<Image Source="{StaticResource pencil}"
Stretch="Uniform" />
</Button>
<Button Command="{Binding DeleteCharCommand}"
CommandParameter="{Binding}"
ToolTip="Delete char"
Grid.Column="4"
Focusable="False"
Margin="3,0"
Width="24"
Height="24"
Padding="2">
<Image Source="{StaticResource cross}"
Stretch="Uniform" />
</Button>
</StackPanel>
<Separator Grid.Row="1" />
<ListView Grid.Row="2"
Margin="0,10,0,0"
SelectionMode="Single"
ItemsSource="{Binding Chars}"
SelectedItem="{Binding CurrentChar, UpdateSourceTrigger=PropertyChanged}"
SelectedIndex="0">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel>
<ctrls:EditBox Text="{Binding Name, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
DisplayText="{Binding Name, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
IsEditableOnDoubleClick="True"
FontSize="12"
FontFamily="Segoe UI"
Focusable="True"
IsReadOnly="False"
VerticalAlignment="Center"
HorizontalAlignment="Left"
RenameCommand="{Binding RenameCommand}"
ToolTipService.ShowOnDisabled="True" />
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
</Grid>
</UserControl>