GARbro-mirror/AboutBox.xaml
2014-07-25 06:58:42 +04:00

101 lines
5.9 KiB
XML

<!-- Game Resource browser
Copyright (C) 2014 by morkt
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
-->
<w:ModalWindow x:Class="GARbro.GUI.AboutBox"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:GARbro.GUI"
xmlns:w="clr-namespace:Rnd.Windows"
xmlns:s="clr-namespace:GARbro.GUI.Strings"
Title="{x:Static s:guiStrings.TextAboutTitle}" Height="306" Width="475" ResizeMode="NoResize"
Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"
ShowInTaskbar="False" WindowStartupLocation="CenterOwner">
<Window.Resources>
<local:BooleanToVisibiltyConverter x:Key="guiBoolToVisibilityConverter" />
</Window.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="43*" />
<ColumnDefinition Width="74*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<StackPanel Grid.Column="0" Grid.Row="0" Grid.RowSpan="4" Margin="10,10,10,67.304"
DataContext="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:AboutBox}}}">
<Label Content="{Binding Path=AssemblyTitle, Mode=OneWay}" />
<Label Content="{Binding Path=VersionString, Mode=OneWay}" />
<Label Content="{Binding Path=AssemblyCopyright, Mode=OneWay}" />
</StackPanel>
<Button Grid.Row="3" VerticalAlignment="Bottom" HorizontalAlignment="Left" IsDefault="true"
Content="{x:Static s:guiStrings.ButtonOK}" Margin="10,0,0,10" Width="70" Height="25" Click="Button_Click" IsCancel="True"/>
<Grid Grid.Column="1" Grid.Row="0" Grid.RowSpan="2" Margin="10,8,10,6">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TextBlock Text="{x:Static s:guiStrings.TextAboutSupportedArchives}" Grid.Row="0" Margin="0" />
<Border Grid.Row="1" BorderThickness="1" BorderBrush="Black" VerticalAlignment="Stretch" Margin="0" SnapsToDevicePixels="True">
<ScrollViewer Grid.Row="1" Margin="0" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled"
Background="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"
BorderThickness="1" BorderBrush="Black">
<ItemsControl Name="ArchiveFormats">
<ItemsControl.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Tag}" Margin="3,0,5,0" />
<TextBlock Text="{Binding Description}" />
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
</Border>
</Grid>
<Grid Grid.Column="1" Grid.Row="2" Grid.RowSpan="2" Margin="10,2,10,10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Text="{x:Static s:guiStrings.TextAboutSupportedImages}" Margin="0" />
<Border Grid.Row="1" BorderThickness="1" BorderBrush="Black" VerticalAlignment="Stretch" Margin="0" SnapsToDevicePixels="True">
<ScrollViewer VerticalAlignment="Stretch" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" Margin="0" Background="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}" BorderThickness="1" BorderBrush="Black">
<ItemsControl Name="ImageFormats">
<ItemsControl.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Tag}" Margin="3,0,5,0" />
<TextBlock Text="{x:Static s:guiStrings.TextAboutBuiltin}" Margin="0,0,5,0" Visibility="{Binding IsBuiltin, Converter={StaticResource guiBoolToVisibilityConverter}}"/>
<TextBlock Text="{Binding Description}" />
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
</Border>
</Grid>
</Grid>
</w:ModalWindow>