<Controls:MetroWindow x:Name="MetroWindowMain" x:Class="NETworkManager.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:Converter="clr-namespace:NETworkManager.Converters"
        xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
        xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
        xmlns:IconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
        xmlns:Resources="clr-namespace:NETworkManager.Properties"
        xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
        mc:Ignorable="d"
        Title="{x:Static Resources:Resources.NETworkManager_ProjectName}" Style="{DynamicResource DefaultWindow}" MinWidth="650" MinHeight="500" Height="650" Width="1000" SaveWindowPosition="True" TitleAlignment="Left" Closing="MetroWindowMain_Closing" StateChanged="MetroWindowMain_StateChanged">
    <Controls:MetroWindow.WindowButtonCommands>
        <Controls:WindowButtonCommands Template="{DynamicResource MahApps.Metro.Templates.WindowButtonCommands.Win10}" />
    </Controls:MetroWindow.WindowButtonCommands>
    <Controls:MetroWindow.IconTemplate>
        <DataTemplate>
            <Rectangle Width="20" Height="20" Fill="{DynamicResource GrayBrush3}" >
                <Rectangle.LayoutTransform>
                    <RotateTransform Angle="-90"/>
                </Rectangle.LayoutTransform>
                <Rectangle.OpacityMask>
                    <VisualBrush Stretch="Uniform" Visual="{IconPacks:Material Kind=Sitemap}" />
                </Rectangle.OpacityMask>
            </Rectangle>
        </DataTemplate>
    </Controls:MetroWindow.IconTemplate>
    <Controls:MetroWindow.RightWindowCommands>
        <Controls:WindowCommands>
            <Button Focusable="False" Command="{Binding OpenDocumentationCommand}" Cursor="Hand">
                <StackPanel Orientation="Horizontal">
                    <Rectangle Width="20" Height="20" Fill="{Binding RelativeSource={RelativeSource AncestorType=Button}, Path=Foreground}">
                        <Rectangle.OpacityMask>
                            <VisualBrush Stretch="Uniform" Visual="{IconPacks:Octicons Kind=Repo}" />
                        </Rectangle.OpacityMask>
                    </Rectangle>
                    <TextBlock Text="{DynamicResource String_Documentation}" VerticalAlignment="Center" Margin="5,0,0,0" />
                </StackPanel>
            </Button>
            <Button Focusable="False" Command="{Binding OpenWebsiteCommand}" CommandParameter="{x:Static Resources:Resources.NETworkManager_ProjectUrl}" Cursor="Hand">
                <StackPanel Orientation="Horizontal">
                    <Rectangle Width="20" Height="20" Fill="{Binding RelativeSource={RelativeSource AncestorType=Button}, Path=Foreground}">
                        <Rectangle.OpacityMask>
                            <VisualBrush Stretch="Uniform" Visual="{IconPacks:Modern Kind=SocialGithubOctocat}" />
                        </Rectangle.OpacityMask>
                    </Rectangle>
                    <TextBlock Text="{DynamicResource String_ForkMeOnGitHub}" VerticalAlignment="Center" Margin="5,0,0,0" />
                </StackPanel>
            </Button>
        </Controls:WindowCommands>
    </Controls:MetroWindow.RightWindowCommands>
    <Controls:MetroWindow.Resources>
        <Converter:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
        <ContextMenu x:Key="ContextMenuNotifyIcon" MinWidth="200" Opened="ContextMenu_Opened" x:Shared="False">
            <MenuItem Header="{DynamicResource String_Show}" Command="{Binding ShowWindowCommand}">
                <MenuItem.Icon>
                    <Rectangle Width="16" Height="16" Fill="{DynamicResource BlackColorBrush}">
                        <Rectangle.OpacityMask>
                            <VisualBrush Stretch="Uniform" Visual="{IconPacks:Material Kind=OpenInNew}" />
                        </Rectangle.OpacityMask>
                    </Rectangle>
                </MenuItem.Icon>
            </MenuItem>
            <MenuItem Header="{DynamicResource String_Settings}" Command="{Binding OpenSettingsCommand}">
                <MenuItem.Icon>
                    <Rectangle Width="16" Height="16" Fill="{DynamicResource BlackColorBrush}">
                        <Rectangle.OpacityMask>
                            <VisualBrush Stretch="Uniform" Visual="{IconPacks:MaterialLight Kind=Cog}" />
                        </Rectangle.OpacityMask>
                    </Rectangle>
                </MenuItem.Icon>
            </MenuItem>
            <Separator />
            <MenuItem Header="{DynamicResource String_Close}" Command="{Binding CloseApplicationCommand}">
                <MenuItem.Icon>
                    <Rectangle Width="16" Height="16" Fill="{DynamicResource CleanWindowCloseButtonBackgroundBrush}">
                        <Rectangle.OpacityMask>
                            <VisualBrush Stretch="Uniform" Visual="{IconPacks:Material Kind=WindowClose}" />
                        </Rectangle.OpacityMask>
                    </Rectangle>
                </MenuItem.Icon>
            </MenuItem>
        </ContextMenu>
        <Style x:Key="MetroTabItemHeader" BasedOn="{StaticResource MetroTabItem}" TargetType="{x:Type TabItem}">
            <Setter Property="mah:ControlsHelper.HeaderFontSize" Value="20" />
        </Style>
    </Controls:MetroWindow.Resources>
    <Grid>
        <!-- 1 = Content, 2 = StatusBar -->
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid Grid.Row="0">
            <Grid.Style>
                <Style TargetType="{x:Type Grid}">
                    <Setter Property="Visibility" Value="Visible" />
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding ShowSettingsView}" Value="True">
                            <Setter Property="Visibility" Value="Collapsed" />
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </Grid.Style>
            <!-- 1 = Search & ApplicationList, 2 = ApplicationView-->
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Border Grid.Column="0" BorderBrush="{DynamicResource GrayBrush8}" BorderThickness="0,0,1,0">
                <Grid x:Name="ApplicationViewGrid">
                    <Grid.RowDefinitions>
                        <!-- 1 = Search, 2 = ApplicationList, 3 = Settings-->
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="*" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Grid.Style>
                        <Style TargetType="{x:Type Grid}">
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding ApplicationView_Expand}" Value="True">
                                    <Setter Property="MinWidth" Value="250"/>
                                </DataTrigger>
                                <MultiDataTrigger>
                                    <MultiDataTrigger.Conditions>
                                        <Condition Binding="{Binding OpenApplicationList}" Value="True" />
                                        <Condition Binding="{Binding IsTextBoxSearchFocused}" Value="True" />
                                    </MultiDataTrigger.Conditions>
                                    <MultiDataTrigger.Setters>
                                        <Setter Property="MinWidth" Value="250" />
                                    </MultiDataTrigger.Setters>
                                </MultiDataTrigger>
                                <MultiDataTrigger>
                                    <MultiDataTrigger.Conditions>
                                        <Condition Binding="{Binding OpenApplicationList}" Value="True" />
                                        <Condition Binding="{Binding IsMouseOverApplicationList}" Value="True" />
                                    </MultiDataTrigger.Conditions>
                                    <MultiDataTrigger.Setters>
                                        <Setter Property="MinWidth" Value="250" />
                                    </MultiDataTrigger.Setters>
                                </MultiDataTrigger>
                            </Style.Triggers>
                        </Style>
                    </Grid.Style>
                    <Border Grid.Row="0" BorderBrush="{DynamicResource GrayBrush8}" BorderThickness="0,0,0,1" Background="Transparent">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Button Grid.Column="0" Padding="8" Width="48" Height="48" Command="{Binding OpenApplicationListCommand}" Focusable="False" ToolTip="{DynamicResource String_Expand}">
                                <Button.Style>
                                    <Style TargetType="{x:Type Button}" BasedOn="{StaticResource CleanButton}">
                                        <Style.Triggers>
                                            <DataTrigger Binding="{Binding ApplicationView_Expand}" Value="False">
                                                <Setter Property="Visibility" Value="Visible" />
                                            </DataTrigger>
                                            <MultiDataTrigger>
                                                <MultiDataTrigger.Conditions>
                                                    <Condition Binding="{Binding OpenApplicationList}" Value="False" />
                                                    <Condition Binding="{Binding IsTextBoxSearchFocused}" Value="False" />
                                                </MultiDataTrigger.Conditions>
                                                <MultiDataTrigger.Setters>
                                                    <Setter Property="Visibility" Value="Visible" />
                                                </MultiDataTrigger.Setters>
                                            </MultiDataTrigger>
                                            <MultiDataTrigger>
                                                <MultiDataTrigger.Conditions>
                                                    <Condition Binding="{Binding OpenApplicationList}" Value="False" />
                                                    <Condition Binding="{Binding IsMouseOverApplicationList}" Value="False" />
                                                </MultiDataTrigger.Conditions>
                                                <MultiDataTrigger.Setters>
                                                    <Setter Property="Visibility" Value="Visible" />
                                                </MultiDataTrigger.Setters>
                                            </MultiDataTrigger>
                                        </Style.Triggers>
                                    </Style>
                                </Button.Style>
                                <Rectangle Width="24" Height="24">
                                    <Rectangle.OpacityMask>
                                        <VisualBrush Stretch="Uniform" Visual="{IconPacks:FontAwesome Kind=BarsSolid}" />
                                    </Rectangle.OpacityMask>
                                    <Rectangle.Style>
                                        <Style TargetType="{x:Type Rectangle}">
                                            <Setter Property="Fill" Value="{DynamicResource GrayBrush3}" />
                                            <Style.Triggers>
                                                <DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Button}}, Path=IsMouseOver}" Value="True">
                                                    <Setter Property="Fill" Value="{DynamicResource GrayBrush5}" />
                                                </DataTrigger>
                                            </Style.Triggers>
                                        </Style>
                                    </Rectangle.Style>
                                </Rectangle>
                            </Button>
                            <TextBox x:Name="txtSearch" Grid.Column="0" VerticalAlignment="Center" Text="{Binding Search, UpdateSourceTrigger=PropertyChanged}" mah:TextBoxHelper.Watermark="{DynamicResource String_Watermark_Search}" Controls:TextBoxHelper.ClearTextButton="True">
                                <TextBox.Style>
                                    <Style BasedOn="{StaticResource SearchTextBox}" TargetType="{x:Type TextBox}">
                                        <Setter Property="Visibility" Value="Hidden" />
                                        <Setter Property="Width" Value="0" />
                                        <Style.Triggers>
                                            <DataTrigger Binding="{Binding ApplicationView_Expand}" Value="True">
                                                <Setter Property="Visibility" Value="Visible" />
                                                <Setter Property="Width" Value="Auto" />
                                                <Setter Property="Margin" Value="10,0" />
                                            </DataTrigger>
                                            <MultiDataTrigger>
                                                <MultiDataTrigger.Conditions>
                                                    <Condition Binding="{Binding OpenApplicationList}" Value="True" />
                                                    <Condition Binding="{Binding IsTextBoxSearchFocused}" Value="True" />
                                                </MultiDataTrigger.Conditions>
                                                <MultiDataTrigger.Setters>
                                                    <Setter Property="Visibility" Value="Visible" />
                                                    <Setter Property="Width" Value="Auto" />
                                                    <Setter Property="Margin" Value="10,0" />
                                                </MultiDataTrigger.Setters>
                                            </MultiDataTrigger>
                                            <MultiDataTrigger>
                                                <MultiDataTrigger.Conditions>
                                                    <Condition Binding="{Binding OpenApplicationList}" Value="True" />
                                                    <Condition Binding="{Binding IsMouseOverApplicationList}" Value="True" />
                                                </MultiDataTrigger.Conditions>
                                                <MultiDataTrigger.Setters>
                                                    <Setter Property="Visibility" Value="Visible" />
                                                    <Setter Property="Width" Value="Auto" />
                                                    <Setter Property="Margin" Value="10,0" />
                                                </MultiDataTrigger.Setters>
                                            </MultiDataTrigger>
                                            <Trigger Property="Controls:TextBoxHelper.HasText" Value="True">
                                                <Setter Property="Controls:TextBoxHelper.ButtonContentTemplate" Value="{x:Null}" />
                                            </Trigger>
                                        </Style.Triggers>
                                    </Style>
                                </TextBox.Style>
                                <Interactivity:Interaction.Triggers>
                                    <Interactivity:EventTrigger EventName="GotKeyboardFocus">
                                        <Interactivity:InvokeCommandAction Command="{Binding TextBoxSearchGotKeyboardFocusCommand}" />
                                    </Interactivity:EventTrigger>
                                    <Interactivity:EventTrigger EventName="LostKeyboardFocus">
                                        <Interactivity:InvokeCommandAction Command="{Binding TextBoxSearchLostKeyboardFocusCommand}" />
                                    </Interactivity:EventTrigger>
                                </Interactivity:Interaction.Triggers>
                            </TextBox>
                            <ToggleButton Grid.Column="1" Width="32" Height="32" IsChecked="{Binding ApplicationView_Expand}" Focusable="False">
                                <ToggleButton.Style>
                                    <Style TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource MetroCircleButtonStyle}">
                                        <Setter Property="Visibility" Value="Collapsed" />
                                        <Setter Property="Template">
                                            <Setter.Value>
                                                <ControlTemplate TargetType="{x:Type ToggleButton}">
                                                    <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" RecognizesAccessKey="True" />
                                                </ControlTemplate>
                                            </Setter.Value>
                                        </Setter>
                                        <Style.Triggers>
                                            <DataTrigger Binding="{Binding ApplicationView_Expand}" Value="True">
                                                <Setter Property="Visibility" Value="Visible" />
                                            </DataTrigger>
                                            <MultiDataTrigger>
                                                <MultiDataTrigger.Conditions>
                                                    <Condition Binding="{Binding OpenApplicationList}" Value="True" />
                                                    <Condition Binding="{Binding IsTextBoxSearchFocused}" Value="True" />
                                                </MultiDataTrigger.Conditions>
                                                <MultiDataTrigger.Setters>
                                                    <Setter Property="Visibility" Value="Visible" />
                                                </MultiDataTrigger.Setters>
                                            </MultiDataTrigger>
                                            <MultiDataTrigger>
                                                <MultiDataTrigger.Conditions>
                                                    <Condition Binding="{Binding OpenApplicationList}" Value="True" />
                                                    <Condition Binding="{Binding IsMouseOverApplicationList}" Value="True" />
                                                </MultiDataTrigger.Conditions>
                                                <MultiDataTrigger.Setters>
                                                    <Setter Property="Visibility" Value="Visible" />
                                                </MultiDataTrigger.Setters>
                                            </MultiDataTrigger>
                                        </Style.Triggers>
                                    </Style>
                                </ToggleButton.Style>
                                <Rectangle Width="16" Height="16">
                                    <Rectangle.Resources>
                                        <VisualBrush x:Key="VisualPin" Visual="{IconPacks:Modern Kind=Pin}" />
                                    </Rectangle.Resources>
                                    <Rectangle.Style>
                                        <Style TargetType="{x:Type Rectangle}">
                                            <Setter Property="OpacityMask" Value="{StaticResource VisualPin}" />
                                            <Setter Property="Fill" Value="{DynamicResource GrayBrush3}" />
                                            <Style.Triggers>
                                                <Trigger Property="IsMouseOver" Value="True">
                                                    <Setter Property="Fill" Value="{DynamicResource GrayBrush5}" />
                                                </Trigger>
                                                <DataTrigger Binding="{Binding ApplicationView_Expand}" Value="True">
                                                    <Setter Property="Fill" Value="{DynamicResource AccentColorBrush}" />
                                                    <Setter Property="OpacityMask" Value="{StaticResource VisualPin}" />
                                                    <Setter Property="RenderTransformOrigin" Value="0.5,0.5" />
                                                    <Setter Property="LayoutTransform">
                                                        <Setter.Value>
                                                            <RotateTransform Angle="-45" />
                                                        </Setter.Value>
                                                    </Setter>
                                                </DataTrigger>
                                                <MultiDataTrigger>
                                                    <MultiDataTrigger.Conditions>
                                                        <Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}" Value="True" />
                                                        <Condition Binding="{Binding ApplicationView_Expand}" Value="True" />
                                                    </MultiDataTrigger.Conditions>
                                                    <MultiDataTrigger.Setters>
                                                        <Setter Property="Fill" Value="{DynamicResource AccentColorBrush2}" />
                                                    </MultiDataTrigger.Setters>
                                                </MultiDataTrigger>
                                            </Style.Triggers>
                                        </Style>
                                    </Rectangle.Style>
                                </Rectangle>
                            </ToggleButton>
                        </Grid>
                    </Border>
                    <ScrollViewer Grid.Row="1" ManipulationBoundaryFeedback="ScrollViewer_ManipulationBoundaryFeedback" Style="{StaticResource FadeOutScrollViewer}">
                        <ListView x:Name="listViewApplication" ItemsSource="{Binding Applications}" SelectedItem="{Binding SelectedApplication, Mode=TwoWay}" SelectionMode="Single" BorderThickness="0">
                            <ListView.ItemTemplate>
                                <DataTemplate>
                                    <Grid Height="48">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="48" />
                                            <ColumnDefinition Width="Auto" />
                                        </Grid.ColumnDefinitions>
                                        <Grid.Style>
                                            <Style TargetType="{x:Type Grid}">
                                                <Setter Property="ToolTip" Value="{Binding TranslatedName}" />
                                                <Style.Triggers>
                                                    <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}}, Path=DataContext.ApplicationView_Expand}" Value="True">
                                                        <Setter Property="ToolTip" Value="{x:Null}" />
                                                    </DataTrigger>
                                                    <MultiDataTrigger>
                                                        <MultiDataTrigger.Conditions>
                                                            <Condition Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}}, Path=DataContext.OpenApplicationList}" Value="True" />
                                                            <Condition Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}}, Path=DataContext.IsTextBoxSearchFocused}" Value="True" />
                                                        </MultiDataTrigger.Conditions>
                                                        <MultiDataTrigger.Setters>
                                                            <Setter Property="ToolTip" Value="{x:Null}" />
                                                        </MultiDataTrigger.Setters>
                                                    </MultiDataTrigger>
                                                    <MultiDataTrigger>
                                                        <MultiDataTrigger.Conditions>
                                                            <Condition Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}}, Path=DataContext.OpenApplicationList}" Value="True" />
                                                            <Condition Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}}, Path=DataContext.IsMouseOverApplicationList}" Value="True" />
                                                        </MultiDataTrigger.Conditions>
                                                        <MultiDataTrigger.Setters>
                                                            <Setter Property="ToolTip" Value="{x:Null}" />
                                                        </MultiDataTrigger.Setters>
                                                    </MultiDataTrigger>
                                                </Style.Triggers>
                                            </Style>
                                        </Grid.Style>
                                        <Rectangle Grid.Column="0" Width="24" Height="24">
                                            <Rectangle.OpacityMask>
                                                <VisualBrush Stretch="Uniform" Visual="{Binding Icon}" />
                                            </Rectangle.OpacityMask>
                                            <Rectangle.Style>
                                                <Style TargetType="{x:Type Rectangle}">
                                                    <Setter Property="Fill" Value="{DynamicResource GrayBrush3}" />
                                                    <Style.Triggers>
                                                        <DataTrigger Binding="{Binding Path=IsMouseOver,RelativeSource={RelativeSource AncestorType={x:Type ListViewItem}}}" Value="True" >
                                                            <Setter Property="Fill" Value="{DynamicResource GrayBrush5}" />
                                                        </DataTrigger>
                                                        <DataTrigger Binding="{Binding Path=IsSelected,RelativeSource={RelativeSource AncestorType={x:Type ListViewItem}}}" Value="True" >
                                                            <Setter Property="Fill" Value="{DynamicResource AccentColorBrush}" />
                                                        </DataTrigger>
                                                    </Style.Triggers>
                                                </Style>
                                            </Rectangle.Style>
                                        </Rectangle>
                                        <TextBlock Grid.Column="1" Text="{Binding TranslatedName}">
                                            <TextBlock.Style>
                                                <Style TargetType="{x:Type TextBlock}" BasedOn="{StaticResource HeaderTextBlock}">
                                                    <Setter Property="Foreground" Value="{DynamicResource GrayBrush3}" />
                                                    <Setter Property="Margin" Value="0" />
                                                    <Setter Property="VerticalAlignment" Value="Center" />
                                                    <Setter Property="FontSize" Value="18" />
                                                    <Setter Property="Visibility" Value="Collapsed" />
                                                    <Style.Triggers>
                                                        <DataTrigger Binding="{Binding Path=IsMouseOver,RelativeSource={RelativeSource AncestorType={x:Type ListViewItem}}}" Value="True" >
                                                            <Setter Property="Foreground" Value="{DynamicResource GrayBrush5}" />
                                                        </DataTrigger>
                                                        <DataTrigger Binding="{Binding Path=IsSelected,RelativeSource={RelativeSource AncestorType={x:Type ListViewItem}}}" Value="True" >
                                                            <Setter Property="Foreground" Value="{DynamicResource AccentColorBrush}" />
                                                        </DataTrigger>
                                                        <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}}, Path=DataContext.ApplicationView_Expand}" Value="True">
                                                            <Setter Property="Visibility" Value="Visible" />
                                                            <Setter Property="Margin" Value="0,0,10,0" />
                                                        </DataTrigger>
                                                        <MultiDataTrigger>
                                                            <MultiDataTrigger.Conditions>
                                                                <Condition Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}}, Path=DataContext.OpenApplicationList}" Value="True" />
                                                                <Condition Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}}, Path=DataContext.IsTextBoxSearchFocused}" Value="True" />
                                                            </MultiDataTrigger.Conditions>
                                                            <MultiDataTrigger.Setters>
                                                                <Setter Property="Visibility" Value="Visible" />
                                                                <Setter Property="Margin" Value="0,0,10,0" />
                                                            </MultiDataTrigger.Setters>
                                                        </MultiDataTrigger>
                                                        <MultiDataTrigger>
                                                            <MultiDataTrigger.Conditions>
                                                                <Condition Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}}, Path=DataContext.OpenApplicationList}" Value="True" />
                                                                <Condition Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}}, Path=DataContext.IsMouseOverApplicationList}" Value="True" />
                                                            </MultiDataTrigger.Conditions>
                                                            <MultiDataTrigger.Setters>
                                                                <Setter Property="Visibility" Value="Visible" />
                                                                <Setter Property="Margin" Value="0,0,10,0" />
                                                            </MultiDataTrigger.Setters>
                                                        </MultiDataTrigger>
                                                    </Style.Triggers>
                                                </Style>
                                            </TextBlock.Style>
                                        </TextBlock>
                                    </Grid>
                                </DataTemplate>
                            </ListView.ItemTemplate>
                            <ListView.ItemContainerStyle>
                                <Style TargetType="{x:Type ListViewItem}">
                                    <Setter Property="SnapsToDevicePixels" Value="True" />
                                    <Setter Property="Template">
                                        <Setter.Value>
                                            <ControlTemplate TargetType="{x:Type ListViewItem}">
                                                <Border Background="Transparent" BorderThickness="0">
                                                    <Grid>
                                                        <ContentPresenter x:Name="contentPresenter" />
                                                    </Grid>
                                                </Border>
                                            </ControlTemplate>
                                        </Setter.Value>
                                    </Setter>
                                    <Setter Property="VerticalContentAlignment" Value="Center" />
                                </Style>
                            </ListView.ItemContainerStyle>
                            <!-- BUGFIX This has to be set, to enable mouse wheel scrolling -->
                            <ListBox.Template>
                                <ControlTemplate>
                                    <ItemsPresenter />
                                </ControlTemplate>
                            </ListBox.Template>
                            <ListBox.ItemsPanel>
                                <ItemsPanelTemplate>
                                    <VirtualizingStackPanel />
                                </ItemsPanelTemplate>
                            </ListBox.ItemsPanel>
                            <!-- /BUGFIX-->
                        </ListView>
                    </ScrollViewer>
                    <Grid Grid.Row="1" MaxWidth="{Binding ElementName=ApplicationViewGrid, Path=MinWidth}" VerticalAlignment="Center" Visibility="{Binding SearchNothingFound, Converter={StaticResource BooleanToVisibilityConverter}}">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <Button Grid.Row="0" Command="{Binding ClearSearchCommand}" Style="{StaticResource CleanButton}" Margin="0,0,0,10">
                            <Rectangle Width="24" Height="24">
                                <Rectangle.OpacityMask>
                                    <VisualBrush Stretch="Uniform" Visual="{IconPacks:Material Kind=FilterRemoveOutline}" />
                                </Rectangle.OpacityMask>
                                <Rectangle.Style>
                                    <Style TargetType="{x:Type Rectangle}">
                                        <Setter Property="Fill" Value="{DynamicResource GrayBrush3}" />
                                        <Style.Triggers>
                                            <DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Button}}, Path=IsMouseOver}" Value="True">
                                                <Setter Property="Fill" Value="{DynamicResource GrayBrush5}" />
                                            </DataTrigger>
                                        </Style.Triggers>
                                    </Style>
                                </Rectangle.Style>
                            </Rectangle>
                        </Button>
                        <TextBlock Grid.Row="1" Style="{StaticResource HeaderTextBlock}" Foreground="{DynamicResource GrayBrush3}" Text="{DynamicResource String_SearchedApplicationNotFound}" Margin="10,0" TextWrapping="Wrap" TextAlignment="Center" />
                    </Grid>
                    <Border Grid.Row="2" BorderBrush="{DynamicResource GrayBrush8}" BorderThickness="0,1,0,0" Background="Transparent">
                        <Button Height="48" HorizontalContentAlignment="Stretch" Command="{Binding OpenSettingsCommand}" Focusable="False">
                            <Button.Style>
                                <Style TargetType="{x:Type Button}" BasedOn="{StaticResource SettingsButton}">
                                    <Setter Property="ToolTip" Value="{DynamicResource String_Settings}" />
                                    <Style.Triggers>
                                        <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}}, Path=DataContext.ApplicationView_Expand}" Value="True">
                                            <Setter Property="ToolTip" Value="{x:Null}" />
                                        </DataTrigger>
                                        <MultiDataTrigger>
                                            <MultiDataTrigger.Conditions>
                                                <Condition Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}}, Path=DataContext.OpenApplicationList}" Value="True" />
                                                <Condition Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}}, Path=DataContext.IsTextBoxSearchFocused}" Value="True" />
                                            </MultiDataTrigger.Conditions>
                                            <MultiDataTrigger.Setters>
                                                <Setter Property="ToolTip" Value="{x:Null}" />
                                            </MultiDataTrigger.Setters>
                                        </MultiDataTrigger>
                                        <MultiDataTrigger>
                                            <MultiDataTrigger.Conditions>
                                                <Condition Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}}, Path=DataContext.OpenApplicationList}" Value="True" />
                                                <Condition Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}}, Path=DataContext.IsMouseOverApplicationList}" Value="True" />
                                            </MultiDataTrigger.Conditions>
                                            <MultiDataTrigger.Setters>
                                                <Setter Property="ToolTip" Value="{x:Null}" />
                                            </MultiDataTrigger.Setters>
                                        </MultiDataTrigger>
                                    </Style.Triggers>
                                </Style>
                            </Button.Style>
                            <Grid HorizontalAlignment="Left">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="48" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <Rectangle Grid.Column="0" Width="24" Height="24">
                                    <Rectangle.OpacityMask>
                                        <VisualBrush Stretch="Uniform" Visual="{IconPacks:MaterialLight Kind=Cog}" />
                                    </Rectangle.OpacityMask>
                                    <Rectangle.Style>
                                        <Style TargetType="{x:Type Rectangle}">
                                            <Setter Property="Fill" Value="{DynamicResource GrayBrush3}" />
                                            <Style.Triggers>
                                                <DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Button}}, Path=IsMouseOver}" Value="True">
                                                    <Setter Property="Fill" Value="{DynamicResource GrayBrush5}" />
                                                </DataTrigger>
                                            </Style.Triggers>
                                        </Style>
                                    </Rectangle.Style>
                                </Rectangle>
                                <TextBlock Grid.Column="1" Text="{DynamicResource String_Settings}" >
                                    <TextBlock.Style>
                                        <Style TargetType="{x:Type TextBlock}" BasedOn="{StaticResource HeaderTextBlock}">
                                            <Setter Property="Foreground" Value="{DynamicResource GrayBrush3}" />
                                            <Setter Property="Margin" Value="0" />
                                            <Setter Property="VerticalAlignment" Value="Center" />
                                            <Setter Property="HorizontalAlignment" Value="Right" />
                                            <Setter Property="FontSize" Value="18" />
                                            <Setter Property="Visibility" Value="Collapsed" />
                                            <Style.Triggers>
                                                <DataTrigger Binding="{Binding Path=IsMouseOver,RelativeSource={RelativeSource AncestorType={x:Type Button}}}" Value="True" >
                                                    <Setter Property="Foreground" Value="{DynamicResource GrayBrush5}" />
                                                </DataTrigger>
                                                <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}}, Path=DataContext.ApplicationView_Expand}" Value="True">
                                                    <Setter Property="Visibility" Value="Visible" />
                                                    <Setter Property="Margin" Value="0,0,10,0" />
                                                </DataTrigger>
                                                <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}}, Path=DataContext.IsTextBoxSearchFocused}" Value="True">
                                                    <Setter Property="Visibility" Value="Visible" />
                                                    <Setter Property="Margin" Value="0,0,10,0" />
                                                </DataTrigger>
                                                <MultiDataTrigger>
                                                    <MultiDataTrigger.Conditions>
                                                        <Condition Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}}, Path=DataContext.OpenApplicationList}" Value="True" />
                                                        <Condition Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}}, Path=DataContext.IsMouseOverApplicationList}" Value="True" />
                                                    </MultiDataTrigger.Conditions>
                                                    <MultiDataTrigger.Setters>
                                                        <Setter Property="Visibility" Value="Visible" />
                                                        <Setter Property="Margin" Value="0,0,10,0" />
                                                    </MultiDataTrigger.Setters>
                                                </MultiDataTrigger>
                                            </Style.Triggers>
                                        </Style>
                                    </TextBlock.Style>
                                </TextBlock>
                            </Grid>
                        </Button>
                    </Border>
                    <Interactivity:Interaction.Triggers>
                        <Interactivity:EventTrigger  EventName="MouseEnter" >
                            <Interactivity:InvokeCommandAction Command="{Binding ApplicationListMouseEnterCommand}" />
                        </Interactivity:EventTrigger>
                        <Interactivity:EventTrigger EventName="MouseLeave" >
                            <Interactivity:InvokeCommandAction Command="{Binding ApplicationListMouseLeaveCommand}" />
                        </Interactivity:EventTrigger>
                    </Interactivity:Interaction.Triggers>
                </Grid>
            </Border>
            <Grid Grid.Column="1">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>
                <Border x:Name="HeaderBorder" Grid.Row="0" BorderBrush="{DynamicResource GrayBrush8}" BorderThickness="0,0,0,1" MouseDown="HeaderBorder_MouseDown">
                    <Border.Style>
                        <Style TargetType="{x:Type Border}">
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding ShowCurrentApplicationTitle}" Value="False">
                                    <Setter Property="Visibility" Value="Collapsed" />
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </Border.Style>
                    <TextBlock VerticalAlignment="Center" Height="48" TextAlignment="Center" FontSize="22" Style="{StaticResource HeaderTextBlock}" Text="{Binding SelectedApplication.TranslatedName}" Foreground="{DynamicResource GrayBrush3}" Margin="0" />
                </Border>
                <ContentControl x:Name="contentControlApplication" Grid.Row="1" Focusable="False">
                    <ContentControl.Style>
                        <Style TargetType="{x:Type ContentControl}">
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding ShowCurrentApplicationTitle}" Value="False">
                                    <Setter Property="Margin" Value="0,5,0,0" />
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </ContentControl.Style>
                </ContentControl>
            </Grid>
        </Grid>
        <Grid Grid.Row="0">
            <Grid.Style>
                <Style TargetType="{x:Type Grid}">
                    <Setter Property="Visibility" Value="Collapsed" />
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding ShowSettingsView}" Value="True">
                            <Setter Property="Visibility" Value="Visible" />
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </Grid.Style>
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>
                <Border Grid.Row="0" BorderBrush="{DynamicResource GrayBrush8}" BorderThickness="0,0,0,1" MouseDown="HeaderBorder_MouseDown">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Button Grid.Column="0" HorizontalAlignment="Right" Command="{Binding CloseSettingsCommand}" Style="{StaticResource CleanButton}" Margin="10">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <Rectangle Grid.Column="0" Width="20" Height="20">
                                    <Rectangle.OpacityMask>
                                        <VisualBrush Stretch="Uniform" Visual="{IconPacks:MaterialLight Kind=ArrowLeft}" />
                                    </Rectangle.OpacityMask>
                                    <Rectangle.Style>
                                        <Style TargetType="{x:Type Rectangle}">
                                            <Setter Property="Fill" Value="{DynamicResource GrayBrush3}" />
                                            <Style.Triggers>
                                                <DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Button}}, Path=IsMouseOver}" Value="True">
                                                    <Setter Property="Fill" Value="{DynamicResource GrayBrush5}" />
                                                </DataTrigger>
                                            </Style.Triggers>
                                        </Style>
                                    </Rectangle.Style>
                                </Rectangle>
                                <TextBlock Grid.Column="1" Text="{DynamicResource String_Back}" VerticalAlignment="Center" Margin="10,0,0,0">
                                    <TextBlock.Style>
                                        <Style TargetType="{x:Type TextBlock}" BasedOn="{StaticResource DefaultTextBlock}">
                                            <Setter Property="Foreground" Value="{DynamicResource GrayBrush3}" />
                                            <Style.Triggers>
                                                <DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Button}}, Path=IsMouseOver}" Value="True">
                                                    <Setter Property="Foreground" Value="{DynamicResource GrayBrush5}" />
                                                </DataTrigger>
                                            </Style.Triggers>
                                        </Style>
                                    </TextBlock.Style>
                                </TextBlock>
                            </Grid>
                        </Button>
                        <TextBlock Grid.Column="1" VerticalAlignment="Center" Height="48" TextAlignment="Center" Style="{StaticResource HeaderTextBlock}" Text="{DynamicResource String_Header_Settings}" FontSize="22" Foreground="{DynamicResource GrayBrush3}" Margin="10,0" />
                    </Grid>
                </Border>
                <ContentControl Grid.Row="1" x:Name="contentControlSettings" />
            </Grid>
        </Grid>
        <Border Grid.Row="1" BorderThickness="0,1,0,0" BorderBrush="{DynamicResource GrayBrush8}">
            <StatusBar Foreground="{DynamicResource GrayBrush3}">
                <StatusBarItem>
                    <TextBlock Text="{Binding Version}" Style="{StaticResource DefaultTextBlock}" Foreground="{DynamicResource GrayBrush3}" FontWeight="Bold" />
                </StatusBarItem>
                <Separator Background="{DynamicResource GrayBrush8}" Visibility="{Binding UpdateAvailable, Converter={StaticResource BooleanToVisibilityConverter}}" Margin="10,0" />
                <StatusBarItem Visibility="{Binding UpdateAvailable, Converter={StaticResource BooleanToVisibilityConverter}}" HorizontalAlignment="Left">
                    <StatusBarItem.InputBindings>
                        <MouseBinding Gesture="LeftClick" Command="{Binding OpenWebsiteCommand}" CommandParameter="{x:Static Resources:Resources.NETworkManager_LatestReleaseURL}" />
                    </StatusBarItem.InputBindings>
                    <StatusBarItem.Style>
                        <Style TargetType="{x:Type StatusBarItem}" BasedOn="{StaticResource MetroStatusBarItem}">
                            <Setter Property="Cursor" Value="Hand" />
                            <Setter Property="Foreground" Value="{DynamicResource AccentColorBrush}" />
                            <Style.Triggers>
                                <Trigger Property="IsMouseOver" Value="True">
                                    <Setter Property="Foreground" Value="{DynamicResource BlackColorBrush}" />
                                </Trigger>
                            </Style.Triggers>
                        </Style>
                    </StatusBarItem.Style>
                    <StackPanel Orientation="Horizontal">
                        <Rectangle Width="16" Height="20">
                            <Rectangle.OpacityMask>
                                <VisualBrush Stretch="Uniform" Visual="{IconPacks:Material Kind=OpenInNew}"/>
                            </Rectangle.OpacityMask>
                            <Rectangle.Style>
                                <Style TargetType="{x:Type Rectangle}">
                                    <Setter Property="Fill" Value="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type StatusBarItem}}, Path=Foreground}" />
                                </Style>
                            </Rectangle.Style>
                        </Rectangle>
                        <TextBlock Text="{Binding UpdateText}" VerticalAlignment="Center" FontSize="14" Margin="10,0,0,0" />
                    </StackPanel>
                </StatusBarItem>
            </StatusBar>
        </Border>
    </Grid>
</Controls:MetroWindow>
