<StackPanel x:Class="GameRes.Formats.GUI.WidgetMCG"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:s="clr-namespace:GameRes.Formats.Strings"
      xmlns:p="clr-namespace:GameRes.Formats.Properties"
      xmlns:gui="clr-namespace:GameRes.Formats.GUI"
      MaxWidth="250" Orientation="Vertical">
    <StackPanel.Resources>
        <gui:ByteToStringConverter x:Key="byteKeyConverter" />
        <gui:StringToByteConverter x:Key="stringKeyConverter" />
    </StackPanel.Resources>
    <Label Content="{x:Static s:arcStrings.MCGChoose}" Target="{Binding ElementName=Title}" HorizontalAlignment="Left" Padding="0,0,0,10"/>
    <ComboBox Name="Title" ItemsSource="{Binding}"
              SelectedValue="{Binding ElementName=Passkey, Path=Text, Mode=TwoWay, Converter={StaticResource stringKeyConverter}}"
              SelectedValuePath="Value" DisplayMemberPath="Key"
              Width="200" HorizontalAlignment="Left"/>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition MinWidth="50" Width="*"/>
        </Grid.ColumnDefinitions>
        <Label Content="{x:Static s:arcStrings.MCGLabelKey}" Target="{Binding ElementName=Passkey}" ToolTip="{x:Static s:arcStrings.TooltipHex}" Grid.Column="0" Grid.Row="0" Padding="0,1" VerticalAlignment="Center" HorizontalAlignment="Right"/>
        <TextBox Name="Passkey" Text="{Binding Source={x:Static p:Settings.Default}, Path=MCGLastKey, Mode=TwoWay, Converter={StaticResource byteKeyConverter}}"
                 ToolTip="{x:Static s:arcStrings.TooltipHex}" Margin="5" Width="50" Grid.Column="1" Grid.Row="0"/>
    </Grid>
</StackPanel>
