<UserControl  x:Class="HandBrakeWPF.Views.OptionsView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:cal="http://www.caliburnproject.org"
              xmlns:Options="clr-namespace:HandBrakeWPF.Converters.Options"
              xmlns:Converters="clr-namespace:HandBrakeWPF.Converters" xmlns:local="clr-namespace:HandBrakeWPF.Model"
              xmlns:Properties="clr-namespace:HandBrakeWPF.Properties">

    <UserControl.Resources>
        <Style TargetType="Button">
            <Setter Property="Padding" Value="8,2" />
            <Setter Property="FontSize" Value="11.5" />
            <Setter Property="VerticalAlignment" Value="Center" />
            <Setter Property="MinHeight" Value="22" />
        </Style>

        <Style TargetType="TextBlock">
            <Setter Property="Margin" Value="0,0,5,0" />
        </Style>

        <Style TargetType="TextBox">
            <Setter Property="Padding" Value="5,2" />
            <Setter Property="MinHeight" Value="22" />
            <Setter Property="VerticalContentAlignment" Value="Center" />
            <Setter Property="ToolTipService.ShowDuration" Value="20000" />
        </Style>

        <Style TargetType="CheckBox">
            <Setter Property="Margin" Value="0,2,0,2" />
            <Setter Property="VerticalAlignment" Value="Center" />
        </Style>

        <Style TargetType="ListBoxItem">
            <Setter Property="Padding" Value="8,4" />
        </Style>

        <Options:OptionsTabConverter x:Key="tabConverter" />
        <Options:OptionsTabNameConverter x:Key="tabNameConverter" />
        <Converters:EnumComboConverter x:Key="enumComboConverter" />
        <Options:LogLevelConverter x:Key="LogLevelConverter" />
        <Options:FileSizeConverter x:Key="fileSizeConverter" />
        <Converters:OptionTabConverter x:Key="optionTabConverter" />
        

        <Converters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />

        <ObjectDataProvider MethodName="GetValues"
                        ObjectType="{x:Type local:OptionsTab}"
                        x:Key="OptionTabsList">
            <ObjectDataProvider.MethodParameters>
                <x:Type TypeName="local:OptionsTab" />
            </ObjectDataProvider.MethodParameters>
        </ObjectDataProvider>

    </UserControl.Resources>

    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="150" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <!-- Row 1 -->
        <StackPanel  Grid.Row="0" Grid.ColumnSpan="2" Orientation="Horizontal">
            <TextBlock Text="Preferences" FontSize="26" FontFamily="Segoe UI Light" FontWeight="Bold" Margin="10,10,10,10" Grid.Row="0" Grid.ColumnSpan="2" />

        </StackPanel>
        
        <Border BorderBrush="DarkGray"  Grid.Column="0" Grid.Row="1"  BorderThickness="0,0,1,0">
            <StackPanel Orientation="Vertical" Margin="11,5,-1,0">

                <ListBox ItemsSource="{Binding Source={StaticResource OptionTabsList}, Converter={StaticResource optionTabConverter}}" SelectedItem="{Binding SelectedTab}"
                     BorderThickness="0" Background="Transparent">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding Converter={StaticResource tabNameConverter}}"/>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>

            </StackPanel>
        </Border>

        <ScrollViewer Grid.Column="1" Grid.Row="1" >
            <StackPanel Orientation="Vertical">

                <StackPanel Name="General" Orientation="Vertical" Margin="10,5,0,0"
                            Visibility="{Binding SelectedTab, Converter={StaticResource tabConverter}, ConverterParameter={x:Static local:OptionsTab.General}}">

                    <TextBlock Text="{x:Static Properties:ResourcesUI.Options_General}" FontSize="20" FontFamily="Segoe UI Light"  />

                    <StackPanel Orientation="Vertical" Margin="0,10,0,20">

                        <TextBlock Text="{x:Static Properties:ResourcesUI.Options_OnStartup}" FontSize="14" Margin="0,0,0,10"/>

                        <StackPanel Orientation="Vertical" Margin="20,0,0,0">
                            <CheckBox Content="{x:Static Properties:ResourcesUI.Options_CheckForUpdates}" IsChecked="{Binding CheckForUpdates}" />
                            <ComboBox Name="checkForUpdateFrequency" ItemsSource="{Binding CheckForUpdatesFrequencies}" SelectedIndex="{Binding CheckForUpdatesFrequency}" Margin="25,0,0,5" HorizontalAlignment="Left" Width="120"></ComboBox>
                        </StackPanel>
                    </StackPanel>

                    <StackPanel Orientation="Vertical" Margin="0,0,0,20">
                        <TextBlock Text="{x:Static Properties:ResourcesUI.Options_WhenDone}" FontSize="14" Margin="0,0,0,10" />

                        <StackPanel Orientation="Vertical" Margin="20,0,0,0">
                            <StackPanel Orientation="Horizontal">
                                <ComboBox Name="whenDone" ItemsSource="{Binding WhenDoneOptions}" SelectedItem="{Binding WhenDone}" Width="120"  HorizontalAlignment="Left" />
                                <CheckBox Content="{x:Static Properties:ResourcesUI.Options_ResetDoNothing}" VerticalAlignment="Center" Margin="5,0,0,0" IsChecked="{Binding ResetWhenDoneAction}" />
                            </StackPanel>

                            <StackPanel Orientation="Horizontal" Margin="0,5,0,0">
                                
                            </StackPanel>

                            <StackPanel Orientation="Horizontal" Margin="0,5,0,0">
                                <CheckBox VerticalAlignment="Center" VerticalContentAlignment="Center" IsChecked="{Binding SendFileAfterEncode}" Margin="0,1,0,0">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock Text="{x:Static Properties:ResourcesUI.Options_SendFileTo}" VerticalAlignment="Center" />
                                        <TextBlock Text="{Binding SendFileTo}" VerticalAlignment="Center" Margin="5,0,5,0"  />
                                    </StackPanel>
                                </CheckBox>
       
                                <Button Content="Browse" cal:Message.Attach="[Event Click] = [Action BrowseSendFileTo]" />
                            </StackPanel>

                            <StackPanel Orientation="Horizontal" Margin="0,5,0,0">
                                <TextBlock VerticalAlignment="Center"  Margin="25,0,5,0" Text="{x:Static Properties:ResourcesUI.Options_Arguments}" />
                                <TextBox Name="SendToArguments" Text="{Binding Arguments}" Width="250" />
                            </StackPanel>

                            <StackPanel Orientation="Vertical" Margin="0,7,0,0">
                                <CheckBox Content="{x:Static Properties:ResourcesUI.OptionsView_PlaySoundWhenDone}"  
                                          VerticalAlignment="Center" VerticalContentAlignment="Center" IsChecked="{Binding PlaySoundWhenDone}" Margin="0,1,0,0" />
                                <CheckBox Content="{x:Static Properties:ResourcesUI.OptionsView_PlaySoundWhenQueueDone}"  
                                          VerticalAlignment="Center" VerticalContentAlignment="Center" IsChecked="{Binding PlaySoundWhenQueueDone}" Margin="0,5,0,0" />
                                <StackPanel Orientation="Horizontal" Margin="25,2,0,0">
                                    <TextBlock Text="{Binding WhenDoneAudioFile}" VerticalAlignment="Center" Margin="5,2,5,0"  />
                                    <Button Content="Browse" cal:Message.Attach="[Event Click] = [Action BrowseWhenDoneAudioFile]" />
                                </StackPanel>
                
                            </StackPanel>


                        </StackPanel>
                    </StackPanel>

                    <StackPanel Orientation="Vertical" Margin="0,0,0,20">

                        <TextBlock Text="{x:Static Properties:ResourcesUI.Options_PathToVLC}" FontSize="14" Margin="0,0,0,10"/>

                        <StackPanel Orientation="Vertical" Margin="20,0,0,0">

                            <StackPanel Orientation="Horizontal">
                                <TextBlock VerticalAlignment="Center" Text="{x:Static Properties:ResourcesUI.Options_Path}" />
                                <TextBox Name="vlcPath" Text="{Binding VLCPath}"  Width="250" />
                                <Button Content="Browse" cal:Message.Attach="[Event Click] = [Action BrowseVlcPath]" Margin="5,0,0,0" />
                            </StackPanel>
                            <TextBlock Margin="35,0,0,0" Text="{x:Static Properties:ResourcesUI.Options_VideoPreviewPath}" />

                        </StackPanel>
                    </StackPanel>


                    <StackPanel Orientation="Vertical" Margin="0,0,0,20">

                        <TextBlock Text="{x:Static Properties:ResourcesUI.Options_UserInterface}" FontSize="14" Margin="0,0,0,10"/>

                        <StackPanel Orientation="Vertical" Margin="20,0,0,0">
                            <CheckBox Content="{x:Static Properties:ResourcesUI.Options_MinimiseTray}" IsChecked="{Binding MinimiseToTray}" />
                            <CheckBox Content="{x:Static Properties:ResourcesUI.Options_ClearCompleted}" IsChecked="{Binding ClearQueueOnEncodeCompleted}" />
                            <CheckBox Content="{x:Static Properties:ResourcesUI.Options_AdvancedTab}" IsChecked="{Binding ShowAdvancedTab}" />
                            <CheckBox Content="{x:Static Properties:ResourcesUI.Options_ShowQueueInline}" IsChecked="{Binding ShowQueueInline}" Visibility="Collapsed" />
                            <CheckBox Content="{x:Static Properties:ResourcesUI.OptionsView_ShowStatusInTitleBar}" IsChecked="{Binding ShowStatusInTitleBar}" />
                        </StackPanel>
                    </StackPanel>
                </StackPanel>

                <StackPanel Name="Output" Orientation="Vertical" Margin="10,5,0,0"
                            Visibility="{Binding SelectedTab, Converter={StaticResource tabConverter}, ConverterParameter={x:Static local:OptionsTab.OutputFiles}}">

                    <TextBlock Text="{x:Static Properties:ResourcesUI.Options_Output}" FontSize="20" FontFamily="Segoe UI Light"  />

                    <StackPanel Orientation="Vertical" Margin="0,10,0,20">

                        <TextBlock Text="{x:Static Properties:ResourcesUI.Options_AutomaticFileNaming}" FontSize="14" Margin="0,0,0,10"/>

                        <StackPanel Orientation="Vertical" Margin="20,0,0,0">
                            <CheckBox Content="{x:Static Properties:ResourcesUI.Options_AutoNameOutput}" IsChecked="{Binding AutomaticallyNameFiles}" />

                            <Grid Margin="0,5,0,0">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="5"/>

                                    <RowDefinition Height="Auto"/>
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>

                                <TextBlock VerticalAlignment="Center" Text="{x:Static Properties:ResourcesUI.Options_DefaultPath}" Grid.Column="0" Grid.Row="0" />
                                <TextBox Name="autoNameOutputPath" Text="{Binding AutoNameDefaultPath}" Width="380" Grid.Column="1" Grid.Row="0" 
                                         ToolTip="{x:Static Properties:Resources.Options_DefaultPathAdditionalParams}" />
                                <Button Content="Browse" Margin="5,0,0,0" Grid.Column="2" Grid.Row="0" 
                                        cal:Message.Attach="[Event Click] = [Action BrowseAutoNamePath]" />

                                <TextBlock VerticalAlignment="Center" Text="{x:Static Properties:ResourcesUI.Options_Format}"  Grid.Column="0" Grid.Row="2" Margin="0,5,0,0" />
                                <TextBox Name="autoNameFormat" Text="{Binding AutonameFormat, UpdateSourceTrigger=PropertyChanged}" Width="380"  Grid.Column="1" Grid.Row="2"  Margin="0,0,0,0"
                                         ToolTip="{x:Static Properties:Resources.Options_AdditionalFormatOptions}"  />
                            </Grid>

                            <StackPanel Orientation="Vertical" Margin="0,15,0,0">
                                <CheckBox Content="{x:Static Properties:ResourcesUI.Options_TitleCase}" IsChecked="{Binding ChangeToTitleCase}" />
                                <CheckBox Content="{x:Static Properties:ResourcesUI.Options_ReplaceUnderscores}" IsChecked="{Binding RemoveUnderscores}"/>
                                <CheckBox Content="{x:Static Properties:ResourcesUI.Options_RemovePunctuation}" ToolTip="Dash (-), Period (.) and Comma (,) " IsChecked="{Binding RemovePunctuation}"  />
                            </StackPanel>

                            <StackPanel Orientation="Horizontal" Margin="0,15,0,0">
                                <TextBlock VerticalAlignment="Center" Text="{x:Static Properties:ResourcesUI.Options_MP4FileExtension}" />
                                <ComboBox Name="mp4FileExtension" Width="120" ItemsSource="{Binding Mp4ExtensionOptions}" SelectedIndex="{Binding SelectedMp4Extension}" HorizontalAlignment="Left" />
                            </StackPanel>
                        </StackPanel>
                    </StackPanel>
                </StackPanel>

                <StackPanel Name="Hardware" Orientation="Vertical" Margin="10,5,0,0"
                            Visibility="{Binding SelectedTab, Converter={StaticResource tabConverter}, ConverterParameter={x:Static local:OptionsTab.Video}}">

                    <TextBlock Text="{x:Static Properties:ResourcesUI.Options_Video}" FontSize="20" FontFamily="Segoe UI Light" />

                    <StackPanel Orientation="Vertical" Margin="0,0,0,20">

                        <TextBlock Text="{x:Static Properties:ResourcesUI.Options_Decoding}" FontSize="14" Margin="0,10,0,10" />

                        <StackPanel Orientation="Vertical" Margin="20,0,0,0">
                            <CheckBox Content="{x:Static Properties:ResourcesUI.Options_QsvDecode}" IsEnabled="{Binding IsQuickSyncAvailable}" IsChecked="{Binding EnableQuickSyncDecoding}" />
                            <CheckBox Content="{x:Static Properties:ResourcesUI.Options_QsvDecodeForNonFullPath}" Visibility="{Binding IsUseQsvDecAvailable, Converter={StaticResource boolToVisConverter}}" IsChecked="{Binding UseQSVDecodeForNonQSVEnc}" />
                            <TextBlock Text="{x:Static Properties:Resources.Video_QuickSyncNotAvailable}" Margin="17,2,0,0" TextWrapping="Wrap"
                                        Visibility="{Binding IsQuickSyncAvailable, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}" />
                        </StackPanel>

                        <TextBlock Text="{x:Static Properties:ResourcesUI.Options_Scaling}" FontSize="14" Margin="0,20,0,10" Visibility="Collapsed" />

                        <StackPanel Orientation="Horizontal" Margin="20,0,0,0" Visibility="Collapsed">
                            <TextBlock Text="{x:Static Properties:ResourcesUI.Options_Scaler}" Margin="0,0,5,0" VerticalAlignment="Center" />
                            <ComboBox  ItemsSource="{Binding ScalingOptions, Converter={StaticResource enumComboConverter}}" 
                                       SelectedItem="{Binding SelectedScalingMode, Converter={StaticResource enumComboConverter}}" 
                                       Width="120" VerticalAlignment="Center" />
                        </StackPanel>

                    </StackPanel>


                </StackPanel>

                <StackPanel  Name="Advanced" Orientation="Vertical" Margin="10,5,0,0"
                            Visibility="{Binding SelectedTab, Converter={StaticResource tabConverter}, ConverterParameter={x:Static local:OptionsTab.Advanced}}">


                    <TextBlock Text="{x:Static Properties:ResourcesUI.Options_Advanced}" FontSize="20" FontFamily="Segoe UI Light"  />

                    <StackPanel Orientation="Vertical" Margin="0,10,0,20">

                        <TextBlock Text="{x:Static Properties:ResourcesUI.Options_AdvancedOptions}" FontSize="14" Margin="0,0,0,10"/>

                        <StackPanel Orientation="Vertical" Margin="20,0,0,0">
                            <CheckBox Content="{x:Static Properties:ResourcesUI.Options_PreventSleep}" IsChecked="{Binding PreventSleep}" />
                            <CheckBox Content="{x:Static Properties:ResourcesUI.Options_PauseQueueOnLowDiskSpace}" 
                                      IsChecked="{Binding PauseOnLowDiskspace}" />
                            <StackPanel Orientation="Horizontal" Margin="0,5,0,0">
                                <TextBlock Text="{x:Static Properties:ResourcesUI.Options_LowDiskspaceSize}" VerticalAlignment="Center"  Width="250" />
                                <TextBox x:Name="PauseOnLowDiskspaceLEvel" Text="{Binding PauseOnLowDiskspaceLevel, Converter={StaticResource fileSizeConverter}, UpdateSourceTrigger=PropertyChanged}"  Width="120"/>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
                                <TextBlock Text="{x:Static Properties:ResourcesUI.Options_PreviewScanCount}" VerticalAlignment="Center" Width="250" />
                                <ComboBox Name="numberOfPreviews" ItemsSource="{Binding PreviewPicturesToScan}" SelectedItem="{Binding SelectedPreviewCount}" Width="120" />
                            </StackPanel>
                            <StackPanel Orientation="Horizontal" Margin="0,5,0,0">
                                <TextBlock Text="{x:Static Properties:ResourcesUI.Options_MinTitleScanLength}" VerticalAlignment="Center" Width="250" />
                                <TextBox x:Name="MinTitleLength" Text="{Binding MinLength}"  Width="120"/>
                                <!-- Find a control for this-->
                            </StackPanel>
                            <StackPanel Orientation="Horizontal" Margin="0,5,0,0">
                                <TextBlock Text="{x:Static Properties:ResourcesUI.Options_PriorityLevel}" Width="250" VerticalAlignment="Center" />
                                <ComboBox Name="processPriorityLevel" ItemsSource="{Binding PriorityLevelOptions}" SelectedItem="{Binding SelectedPriority}" Width="120" />
                            </StackPanel>
                  </StackPanel>
                    </StackPanel>

                    <StackPanel Orientation="Vertical" Margin="0,10,0,20">
                        <TextBlock Text="{x:Static Properties:ResourcesUI.Options_x264}" FontSize="14" Margin="0,0,0,10"/>
                        <StackPanel Orientation="Horizontal" Margin="20,0,0,0">
                            <TextBlock Text="{x:Static Properties:ResourcesUI.Options_x264Granularity}" VerticalAlignment="Center" Width="250" />
                            <ComboBox Name="x264Granularity" ItemsSource="{Binding ConstantQualityGranularity}" SelectedItem="{Binding SelectedGranulairty}" Width="120"/>
                        </StackPanel>
                    </StackPanel>

                    <StackPanel Orientation="Vertical" Margin="0,10,0,20">

                        <TextBlock Text="{x:Static Properties:ResourcesUI.Options_DVD}" FontSize="14" Margin="0,0,0,10"/>

                        <StackPanel Orientation="Vertical" Margin="20,0,0,0">
                            <CheckBox Content="{x:Static Properties:ResourcesUI.Options_DvdRead}" IsChecked="{Binding DisableLibdvdNav}" />
                        </StackPanel>

                    </StackPanel>

                    <StackPanel Orientation="Vertical" Margin="0,10,0,20">

                        <TextBlock Text="{x:Static Properties:ResourcesUI.Options_Logging}" FontSize="14" Margin="0,0,0,10"/>

                        <StackPanel Orientation="Vertical" Margin="20,0,0,0">
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="{x:Static Properties:ResourcesUI.Options_LogLevel}" Width="250" VerticalAlignment="Center" />
                                <ComboBox Name="logVerbosityLevel" ItemsSource="{Binding LogVerbosityOptions, Converter={StaticResource LogLevelConverter}}" SelectedItem="{Binding SelectedVerbosity, Converter={StaticResource LogLevelConverter}}" Width="120" />
                            </StackPanel>

                            <CheckBox Content="{x:Static Properties:ResourcesUI.Options_CopyLogToEncDir}" Margin="0,5,0,0" IsChecked="{Binding CopyLogToEncodeDirectory}" />
                            <CheckBox Content="{x:Static Properties:ResourcesUI.Options_CopyLogToDir}" Margin="0,5,0,0" IsChecked="{Binding CopyLogToSepcficedLocation}" />
                            <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
                                <TextBlock Text="{x:Static Properties:ResourcesUI.Options_LogPath}" VerticalAlignment="Center" />
                                <TextBox Width="380" Text="{Binding LogDirectory}" />
                                <Button Content="Browse" Margin="5,0,0,0" cal:Message.Attach="[Event Click] = [Action BrowseLogPath]" />
                            </StackPanel>
                            <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
                                <Button Content="{x:Static Properties:ResourcesUI.Options_ViewLogDirectory}" cal:Message.Attach="[Event Click] = [Action ViewLogDirectory]" Margin="0,0,5,0" />
                                <Button Content="{x:Static Properties:ResourcesUI.Options_ClearLogs}" cal:Message.Attach="[Event Click] = [Action ClearLogHistory]" />
                            </StackPanel>

                            <CheckBox Content="{x:Static Properties:ResourcesUI.Options_30DayLogClear}" Margin="0,10,0,0" IsChecked="{Binding ClearOldOlgs}" />
                        </StackPanel>

                    </StackPanel>

                </StackPanel>

                <StackPanel Name="Updates" Orientation="Vertical" Margin="10,5,0,0"
                            Visibility="{Binding SelectedTab, Converter={StaticResource tabConverter}, ConverterParameter={x:Static local:OptionsTab.Updates}}">


                    <TextBlock Text="{x:Static Properties:ResourcesUI.Options_Updates}" FontSize="20" FontFamily="Segoe UI Light" />

                    <TextBlock Text="{x:Static Properties:ResourcesUI.Options_CurVersion}" FontSize="14" Margin="0,10,0,10"/>

                    <Grid Margin="20,10,0,20">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="70" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>

                        <!-- Version -->
                        <TextBlock Grid.Column="0" Margin="0,0,5,0" Text="{x:Static Properties:ResourcesUI.Options_Version}" />
                        <TextBlock Grid.Column="1" Margin="0,0,0,1" VerticalAlignment="Bottom" Text="{Binding Version}" />
                    </Grid>

                    <TextBlock Text="{x:Static Properties:ResourcesUI.Options_Updates}" FontSize="14" Margin="0,10,0,10"/>

                    <StackPanel Margin="20,0,0,0" Orientation="Horizontal">
                        <Button Content="{x:Static Properties:ResourcesUI.Options_CheckForUpdates}" MaxWidth="130" Margin="0,0,5,0" cal:Message.Attach="[Event Click] = [Action PerformUpdateCheck]" />
                        <Button Content="{x:Static Properties:ResourcesUI.Options_DownloadUpdates}" Width="120" cal:Message.Attach="[Event Click] = [Action DownloadUpdate]" Visibility="{Binding UpdateAvailable, Converter={StaticResource boolToVisConverter}}" />
                    </StackPanel>

                    <StackPanel Margin="20,10,0,0" Orientation="Horizontal">
                        <ProgressBar Minimum="0" Maximum="100" Height="20" Width="400" Value="{Binding DownloadProgressPercentage}" 
                                 Visibility="{Binding UpdateAvailable, Converter={StaticResource boolToVisConverter}}" />

                    </StackPanel>

                    <TextBlock Text="{Binding UpdateMessage}" Margin="20,5,10,0" VerticalAlignment="Center" TextWrapping="Wrap" />

                </StackPanel>

                <StackPanel Name="About" Orientation="Vertical" Margin="10,5,0,0"
                            Visibility="{Binding SelectedTab, Converter={StaticResource tabConverter}, ConverterParameter={x:Static local:OptionsTab.About}}">

                    <TextBlock Text="{x:Static Properties:ResourcesUI.Options_About}" FontSize="20" FontFamily="Segoe UI Light"  />

                    <ContentControl x:Name="AboutViewModel" />

                </StackPanel>
            </StackPanel>
        </ScrollViewer>

        <StackPanel HorizontalAlignment="Stretch" Grid.Row="2" Grid.Column="0" >

            <Button Content="&#60; Back" IsDefault="True" cal:Message.Attach="[Event Click] = [Action Close]" 
                    HorizontalAlignment="Center" Padding="12,2" Margin="0,5,10,5" FontWeight="Bold" />
        </StackPanel>
    </Grid>

</UserControl>
