90 lines
5.2 KiB
XML
90 lines
5.2 KiB
XML
<UserControl x:Class="Metadata_Translator.LanguagePanel"
|
|
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:Metadata_Translator"
|
|
xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase"
|
|
mc:Ignorable="d"
|
|
x:Name="lPanel"
|
|
d:DesignHeight="450" d:DesignWidth="800" Background="#FFF9F5EB">
|
|
<UserControl.Resources>
|
|
<CollectionViewSource x:Key="TranslationGroups"
|
|
Source="{Binding TranslationGroups, ElementName=lPanel}">
|
|
<CollectionViewSource.SortDescriptions>
|
|
<scm:SortDescription PropertyName="Name"/>
|
|
</CollectionViewSource.SortDescriptions>
|
|
</CollectionViewSource>
|
|
<local:PercentageConverter x:Key="PercentageConverter" />
|
|
</UserControl.Resources>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
<Button Grid.Column="1" Height="16" Width="16" Background="Transparent" Margin="0,2,18,2"
|
|
BorderThickness="0" HorizontalAlignment="Right" VerticalAlignment="Top"
|
|
Click="CancelButton_Click">
|
|
<Image>
|
|
<Image.Source>
|
|
<DrawingImage>
|
|
<DrawingImage.Drawing>
|
|
<DrawingGroup>
|
|
<DrawingGroup.Transform>
|
|
<TransformGroup>
|
|
<ScaleTransform ScaleX="1" ScaleY="1"/>
|
|
<SkewTransform/>
|
|
<RotateTransform/>
|
|
<TranslateTransform/>
|
|
</TransformGroup>
|
|
</DrawingGroup.Transform>
|
|
<DrawingGroup.Children>
|
|
<GeometryDrawing Geometry="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm101.8-262.2L295.6 256l62.2 62.2c4.7 4.7 4.7 12.3 0 17l-22.6 22.6c-4.7 4.7-12.3 4.7-17 0L256 295.6l-62.2 62.2c-4.7 4.7-12.3 4.7-17 0l-22.6-22.6c-4.7-4.7-4.7-12.3 0-17l62.2-62.2-62.2-62.2c-4.7-4.7-4.7-12.3 0-17l22.6-22.6c4.7-4.7 12.3-4.7 17 0l62.2 62.2 62.2-62.2c4.7-4.7 12.3-4.7 17 0l22.6 22.6c4.7 4.7 4.7 12.3 0 17z">
|
|
<GeometryDrawing.Pen>
|
|
<Pen Brush="Black" Thickness="1"/>
|
|
</GeometryDrawing.Pen>
|
|
<GeometryDrawing.Brush>
|
|
<RadialGradientBrush>
|
|
<GradientStop Color="Gray"/>
|
|
</RadialGradientBrush>
|
|
</GeometryDrawing.Brush>
|
|
</GeometryDrawing>
|
|
</DrawingGroup.Children>
|
|
</DrawingGroup>
|
|
</DrawingImage.Drawing>
|
|
</DrawingImage>
|
|
</Image.Source>
|
|
</Image>
|
|
</Button>
|
|
<ScrollViewer Grid.Row="1" x:Name="underline">
|
|
<ItemsControl ItemsSource="{Binding Source={StaticResource TranslationGroups}}">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<StackPanel Margin="4,0" />
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition/>
|
|
<RowDefinition/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
<TextBlock Grid.Row="0" DockPanel.Dock="Top" Text="{Binding Name}" FontStyle="Italic" FontWeight="DemiBold" Margin="4,0"/>
|
|
<Rectangle Grid.Row="1" DockPanel.Dock="Top" Fill="Gray" Height="0.5" Width="{Binding ElementName=underline, Path=ActualWidth, Converter={StaticResource PercentageConverter}}" />
|
|
<local:TranslationGroupPanel Grid.Row="2" Grid.ColumnSpan="2" Margin="18,0,4,4"
|
|
Languages="{Binding Languages, ElementName=lPanel}"
|
|
TranslationGroupId="{Binding Tag}"/>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</ScrollViewer>
|
|
</Grid>
|
|
</UserControl>
|