Files
UnrealEngineUWP/Engine/Source/Programs/nDisplayLauncher/MainWindow.xaml
Marc Audy f6b41e86b7 Merging //UE4/Dev-Main to Dev-Framework (//UE4/Dev-Framework) @ 4126704
#rb
#rnx

[CL 4127976 by Marc Audy in Dev-Framework branch]
2018-06-13 15:02:22 -04:00

603 lines
33 KiB
XML

<Window
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:local="clr-namespace:nDisplayLauncher"
xmlns:conv="clr-namespace:nDisplayLauncher.ValueConversion"
xmlns:uictrl="clr-namespace:nDisplayLauncher.UIControl"
xmlns:scm ="clr-namespace:System.ComponentModel;assembly=WindowsBase"
xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
x:Class="nDisplayLauncher.MainWindow"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:fa="http://schemas.fontawesome.io/icons/"
mc:Ignorable="d"
Title="nDisplay Launcher"
Loaded="Window_Loaded"
MinWidth="800"
MinHeight="600" d:DesignHeight="600" ScrollViewer.VerticalScrollBarVisibility="Disabled">
<Window.Resources>
<!--Converters-->
<BooleanToVisibilityConverter x:Key="BoolToVisConverter" />
<conv:SizeConverter x:Key="SizeConverter" />
<sys:String x:Key="emailRegex">^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@
[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]
*[a-zA-Z]$</sys:String>
<Style x:Key="CommonStyle" TargetType="{x:Type FrameworkElement}"/>
<Style x:Key="TabContent" TargetType="{x:Type Grid}">
<Setter Property="Height" Value="430" />
<Setter Property="Background" Value="#1C1C1C" />
</Style>
<Style x:Key="ControlsStyle" TargetType="{x:Type Control}" BasedOn="{StaticResource CommonStyle}">
<Setter Property="Background" Value="#3F3F46" />
<Setter Property="Margin" Value="2" />
<Setter Property="Foreground" Value="WhiteSmoke" />
<Setter Property="BorderBrush" Value="{x:Null}" />
<Setter Property="BorderThickness" Value="1" />
</Style>
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource ControlsStyle}" >
<Setter Property="Background" Value="#FF333337" />
</Style>
<Style x:Key="CustomTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource ControlsStyle}" >
<Setter Property="Background" Value="#FF333337" />
</Style>
<Style TargetType="{x:Type TabItem}" BasedOn="{StaticResource CommonStyle}">
<Setter Property="Background" Value="#2D2D30" />
<Setter Property="Foreground" Value="WhiteSmoke" />
<Setter Property="BorderBrush" Value="{x:Null}" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabItem}">
<Border x:Name="Border" BorderThickness="0"
Padding="10,5,15,5" Margin="0,0,0,0" >
<ContentPresenter x:Name="ContentSite" ContentSource="Header" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="TextElement.Foreground" TargetName="ContentSite" Value="WhiteSmoke"/>
<Setter TargetName="Border" Property="Background" Value="#0079CB"/>
</Trigger>
<Trigger Property="IsSelected" Value="False">
<Setter Property="TextElement.Foreground" TargetName="ContentSite" Value="WhiteSmoke"/>
<Setter TargetName="Border" Property="Background" Value="#2D2D30" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type CheckBox}" BasedOn="{StaticResource ControlsStyle}">
<Setter Property="FlowDirection" Value="LeftToRight" />
<Setter Property="HorizontalAlignment" Value="Left" />
</Style>
<Style TargetType="{x:Type Menu}" >
<Setter Property="Background" Value="#2D2D30" />
</Style>
<Style TargetType="{x:Type MenuItem}" >
<Setter Property="Background" Value="#2D2D30" />
<Setter Property="Margin" Value="0"/>
</Style>
<Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource ControlsStyle}" >
<Setter Property="MinWidth" Value="40" />
<Setter Property="MaxWidth" Value="200" />
<Setter Property="HorizontalAlignment" Value="Left" />
</Style>
<Style x:Key="SizeTB" TargetType="{x:Type TextBox}" BasedOn="{StaticResource ControlsStyle}">
<Setter Property="Width" Value="70" />
<Setter Property="HorizontalAlignment" Value="Left" />
</Style>
<Style x:Key="NameTB" TargetType="{x:Type TextBox}" BasedOn="{StaticResource ControlsStyle}">
<Setter Property="Width" Value="150" />
<Setter Property="HorizontalAlignment" Value="Left" />
</Style>
<Style TargetType="{x:Type ComboBox}" BasedOn="{StaticResource ControlsStyle}">
<Setter Property="Width" Value="150" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="BorderBrush" Value="{x:Null}" />
</Style>
<Style TargetType="{x:Type TreeView}" BasedOn="{StaticResource ControlsStyle}">
<Setter Property="MinWidth" Value="100" />
<Setter Property="MaxWidth" Value="200" />
<Setter Property="Height" Value="300" />
</Style>
<Style TargetType="{x:Type ListBox}" BasedOn="{StaticResource ControlsStyle}">
<Setter Property="MinWidth" Value="100" />
<Setter Property="MaxWidth" Value="200" />
<Setter Property="Height" Value="300" />
</Style>
<Style TargetType="{x:Type uictrl:UnselectableListBox}" BasedOn="{StaticResource ControlsStyle}">
<Setter Property="MinWidth" Value="100" />
<Setter Property="MaxWidth" Value="200" />
<Setter Property="Height" Value="300" />
</Style>
<Style TargetType="{x:Type Label}">
<Setter Property="Foreground" Value="WhiteSmoke" />
</Style>
<ControlTemplate x:Key="MenuItemControlTemplate" TargetType="{x:Type MenuItem}">
<Grid Margin="10,0">
<DockPanel>
<ContentPresenter x:Name="content" ContentSource="Header" />
</DockPanel>
<Popup x:Name="PART_Popup" Focusable="false" IsOpen="{Binding IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}" Placement="Bottom" VerticalOffset="-1">
<Border BorderThickness="0" BorderBrush="White" Background="#2D2D30">
<ScrollViewer x:Name="SubMenuScrollViewer" CanContentScroll="true" Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer, TypeInTargetAssembly={x:Type FrameworkElement}}}">
<Grid RenderOptions.ClearTypeHint="Enabled">
<ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Cycle" Grid.IsSharedSizeScope="true" Margin="2" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" KeyboardNavigation.TabNavigation="Cycle"/>
</Grid>
</ScrollViewer>
</Border>
</Popup>
</Grid>
</ControlTemplate>
<ControlTemplate x:Key="CustomCheckBoxControlTemplate" TargetType="{x:Type CheckBox}">
<Grid x:Name="templateRoot" Background="Transparent" SnapsToDevicePixels="True">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Border x:Name="checkBoxBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Height="21" Width="21" Margin="5,0">
<Grid x:Name="markGrid" Margin="0,0,3,0" Width="21" Height="21">
<Path x:Name="optionMark" Data="M19.43043,2.3829644 L9.1518969,17.722808 8.8077779,17.722808 0,10.116135 2.4867883,6.8598807 8.2883854,11.859559 16.232593,2.9722871E-05 19.43043,2.3829644 z" Fill="#0079CB" Margin="0,0,2.3,2.3" Opacity="0" Stretch="None" VerticalAlignment="Center" HorizontalAlignment="Center" Height="18.7" Width="18.7"/>
<Rectangle x:Name="indeterminateMark" Fill="#FF212121" Margin="2" Opacity="0"/>
</Grid>
</Border>
<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Grid.Column="1" ContentStringFormat="{TemplateBinding ContentStringFormat}" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="2,3,2,-3" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="HasContent" Value="True">
<Setter Property="FocusVisualStyle">
<Setter.Value>
<Style>
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Rectangle Margin="14,0,0,0" SnapsToDevicePixels="True" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Setter.Value>
</Setter>
<Setter Property="Padding" Value="4,-1,0,0"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" TargetName="checkBoxBorder" Value="#FF333337"/>
<Setter Property="BorderBrush" TargetName="checkBoxBorder" Value="#FF5593FF"/>
<Setter Property="Fill" TargetName="optionMark" Value="#FF0079CB"/>
<Setter Property="Fill" TargetName="indeterminateMark" Value="#FF0079CB"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" TargetName="checkBoxBorder" Value="#FF333337"/>
<Setter Property="BorderBrush" TargetName="checkBoxBorder" Value="#FFBCBCBC"/>
<Setter Property="Fill" TargetName="optionMark" Value="#FF707070"/>
<Setter Property="Fill" TargetName="indeterminateMark" Value="#FF707070"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" TargetName="checkBoxBorder" Value="#FF333337"/>
<Setter Property="BorderBrush" TargetName="checkBoxBorder" Value="#FF3C77DD"/>
<Setter Property="Fill" TargetName="optionMark" Value="#FF0079CB"/>
<Setter Property="Fill" TargetName="indeterminateMark" Value="#FF0079CB"/>
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Opacity" TargetName="optionMark" Value="1"/>
<Setter Property="Opacity" TargetName="indeterminateMark" Value="0"/>
</Trigger>
<Trigger Property="IsChecked" Value="{x:Null}">
<Setter Property="Opacity" TargetName="optionMark" Value="0"/>
<Setter Property="Opacity" TargetName="indeterminateMark" Value="1"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<Style x:Key="SubTabItemStyle" TargetType="{x:Type TabItem}" BasedOn="{StaticResource CommonStyle}">
<Setter Property="Background" Value="#2D2D30" />
<Setter Property="Foreground" Value="WhiteSmoke" />
<Setter Property="BorderBrush" Value="{x:Null}" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabItem}">
<Border x:Name="Border" BorderThickness="0"
Padding="5,2,5,2" >
<ContentPresenter x:Name="ContentSite" ContentSource="Header" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="TextElement.Foreground" TargetName="ContentSite" Value="#0079CB"/>
<Setter TargetName="Border" Property="Background" Value="#252527"/>
</Trigger>
<Trigger Property="IsSelected" Value="False">
<Setter Property="TextElement.Foreground" TargetName="ContentSite" Value="WhiteSmoke"/>
<Setter TargetName="Border" Property="Background" Value="#2D2D30" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="TabControlStyle" TargetType="{x:Type TabControl}">
<Setter Property="Padding" Value="2"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Background" Value="{StaticResource TabItem.Selected.Background}"/>
<Setter Property="BorderBrush" Value="{StaticResource TabItem.Selected.Border}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabControl}">
<Grid x:Name="templateRoot" ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
<Grid.ColumnDefinitions>
<ColumnDefinition x:Name="ColumnDefinition0"/>
<ColumnDefinition x:Name="ColumnDefinition1" Width="0"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition x:Name="RowDefinition0" Height="Auto"/>
<RowDefinition x:Name="RowDefinition1" Height="*"/>
</Grid.RowDefinitions>
<TabPanel x:Name="headerPanel" Background="Transparent" Grid.Column="0" IsItemsHost="true" Margin="0" Grid.Row="0" KeyboardNavigation.TabIndex="1" Panel.ZIndex="1"/>
<Border x:Name="contentPanel" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.Column="0" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="1" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local">
<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="TabStripPlacement" Value="Bottom">
<Setter Property="Grid.Row" TargetName="headerPanel" Value="1"/>
<Setter Property="Grid.Row" TargetName="contentPanel" Value="0"/>
<Setter Property="Height" TargetName="RowDefinition0" Value="*"/>
<Setter Property="Height" TargetName="RowDefinition1" Value="Auto"/>
<Setter Property="Margin" TargetName="headerPanel" Value="2,0,2,2"/>
</Trigger>
<Trigger Property="TabStripPlacement" Value="Left">
<Setter Property="Grid.Row" TargetName="headerPanel" Value="0"/>
<Setter Property="Grid.Row" TargetName="contentPanel" Value="0"/>
<Setter Property="Grid.Column" TargetName="headerPanel" Value="0"/>
<Setter Property="Grid.Column" TargetName="contentPanel" Value="1"/>
<Setter Property="Width" TargetName="ColumnDefinition0" Value="Auto"/>
<Setter Property="Width" TargetName="ColumnDefinition1" Value="*"/>
<Setter Property="Height" TargetName="RowDefinition0" Value="*"/>
<Setter Property="Height" TargetName="RowDefinition1" Value="0"/>
<Setter Property="Margin" TargetName="headerPanel" Value="2,2,0,2"/>
</Trigger>
<Trigger Property="TabStripPlacement" Value="Right">
<Setter Property="Grid.Row" TargetName="headerPanel" Value="0"/>
<Setter Property="Grid.Row" TargetName="contentPanel" Value="0"/>
<Setter Property="Grid.Column" TargetName="headerPanel" Value="1"/>
<Setter Property="Grid.Column" TargetName="contentPanel" Value="0"/>
<Setter Property="Width" TargetName="ColumnDefinition0" Value="*"/>
<Setter Property="Width" TargetName="ColumnDefinition1" Value="Auto"/>
<Setter Property="Height" TargetName="RowDefinition0" Value="*"/>
<Setter Property="Height" TargetName="RowDefinition1" Value="0"/>
<Setter Property="Margin" TargetName="headerPanel" Value="0,2,2,2"/>
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="TextElement.Foreground" TargetName="templateRoot" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--ScrollViewer-->
<Style TargetType="{x:Type ScrollViewer}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ScrollViewer}">
<Grid Background="#FF3F3F46">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<ScrollContentPresenter Grid.Column="0" />
<ScrollBar x:Name="PART_VerticalScrollBar" Grid.Row="0" Grid.Column="1" Value="{TemplateBinding VerticalOffset}" Maximum="{TemplateBinding ScrollableHeight}" ViewportSize="{TemplateBinding ViewportHeight}" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"/>
<ScrollBar x:Name="PART_HorizontalScrollBar" Orientation="Horizontal" Grid.Row="1" Grid.Column="0" Value="{TemplateBinding HorizontalOffset}" Maximum="{TemplateBinding ScrollableWidth}" ViewportSize="{TemplateBinding ViewportWidth}" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"/>
<Rectangle Grid.Row="1" Grid.Column="1" Fill="Transparent"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--Scrollbar Thumbs-->
<Style x:Key="ScrollThumbs" TargetType="{x:Type Thumb}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}">
<Grid x:Name="Grid">
<Rectangle HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Fill="Transparent" />
<Border x:Name="Rectangle1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Background="{TemplateBinding Background}" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="Tag" Value="Horizontal">
<Setter TargetName="Rectangle1" Property="Width" Value="Auto" />
<Setter TargetName="Rectangle1" Property="Height" Value="7" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--ScrollBars-->
<Style x:Key="{x:Type ScrollBar}" TargetType="{x:Type ScrollBar}">
<Setter Property="Stylus.IsFlicksEnabled" Value="false" />
<Setter Property="Foreground" Value="#8C8C8C" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Width" Value="8" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ScrollBar}">
<Grid x:Name="GridRoot" Width="8" Background="{TemplateBinding Background}">
<Grid.RowDefinitions>
<RowDefinition Height="0.00001*" />
</Grid.RowDefinitions>
<Track x:Name="PART_Track" Grid.Row="0" IsDirectionReversed="true" Focusable="false">
<Track.Thumb>
<Thumb x:Name="Thumb" Background="{TemplateBinding Foreground}" Style="{DynamicResource ScrollThumbs}" />
</Track.Thumb>
<Track.IncreaseRepeatButton>
<RepeatButton x:Name="PageUp" Command="ScrollBar.PageDownCommand" Opacity="0" Focusable="false" />
</Track.IncreaseRepeatButton>
<Track.DecreaseRepeatButton>
<RepeatButton x:Name="PageDown" Command="ScrollBar.PageUpCommand" Opacity="0" Focusable="false" />
</Track.DecreaseRepeatButton>
</Track>
</Grid>
<ControlTemplate.Triggers>
<Trigger SourceName="Thumb" Property="IsMouseOver" Value="true">
<Setter Value="{DynamicResource ButtonSelectBrush}" TargetName="Thumb" Property="Background" />
</Trigger>
<Trigger SourceName="Thumb" Property="IsDragging" Value="true">
<Setter Value="{DynamicResource DarkBrush}" TargetName="Thumb" Property="Background" />
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter TargetName="Thumb" Property="Visibility" Value="Collapsed" />
</Trigger>
<Trigger Property="Orientation" Value="Horizontal">
<Setter TargetName="GridRoot" Property="LayoutTransform">
<Setter.Value>
<RotateTransform Angle="-90" />
</Setter.Value>
</Setter>
<Setter TargetName="PART_Track" Property="LayoutTransform">
<Setter.Value>
<RotateTransform Angle="-90" />
</Setter.Value>
</Setter>
<Setter Property="Width" Value="Auto" />
<Setter Property="Height" Value="8" />
<Setter TargetName="Thumb" Property="Tag" Value="Horizontal" />
<Setter TargetName="PageDown" Property="Command" Value="ScrollBar.PageLeftCommand" />
<Setter TargetName="PageUp" Property="Command" Value="ScrollBar.PageRightCommand" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Grid Background="#2D2D30" Margin="0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TabControl Grid.Row="0" x:Name="tabControl" VerticalAlignment="Top" MinWidth="500" MinHeight="200" Background="#FF2D2D30" BorderThickness="0,3,0,0" BorderBrush="#0079CB" Margin="10" Padding="0" Style="{DynamicResource TabControlStyle}" >
<TabItem Header="Launcher" x:Name="CtrlLauncherTab" VerticalAlignment="Top" >
<Grid Style="{StaticResource TabContent}" Height="Auto">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid Grid.Row="0" Background="#FF1C1C1C">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="3" />
</Grid.RowDefinitions>
<Grid Grid.Column="0" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid Grid.Column="0" Visibility="{Binding IsChecked, Converter={StaticResource BoolToVisConverter}, ElementName=showPanelToggle}" >
<Grid Background="#252527">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Orientation="Horizontal" Margin="0,0,5,0">
<Label Grid.Column="0" Grid.Row="0" Content="Render API" />
<ComboBox x:Name="renderApi" Grid.Column="1" Grid.Row="0" ItemsSource="{Binding RenderApiParams}" SelectedItem="{Binding SelectedRenderApiParam}" DisplayMemberPath="Key" Template="{DynamicResource ComboBoxTemplate}" HorizontalAlignment="Stretch" Width="172"/>
</StackPanel>
<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0,0,5,0">
<Label Grid.Column="0" Grid.Row="0" Content="Render mode" />
<ComboBox x:Name="renderMode" Grid.Column="1" Grid.Row="0" ItemsSource="{Binding RenderModeParams}" SelectedItem="{Binding SelectedRenderModeParam}" DisplayMemberPath="Key" Template="{DynamicResource ComboBoxTemplate}" Width="160"/>
</StackPanel>
<!--<CheckBox x:Name="runParamsCheckBox" Grid.Row="4" Grid.Column="0" Content="Run With Params" Template="{DynamicResource CustomCheckBoxControlTemplate}" IsChecked="{Binding isRunWithParams}" />-->
<Grid Grid.Row="2" Margin="0,10,5,0" >
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Label Grid.Column="0" Grid.Row="0" Content="Optional parameters:" />
<CheckBox x:Name="coresCheckBox" Grid.Row="1" Content="Use All Available Cores" Template="{DynamicResource CustomCheckBoxControlTemplate}" IsChecked="{Binding IsUseAllCores}" />
<CheckBox x:Name="textureStreamingCheckBox" Grid.Row="2" Content="No Texture Streaming" Template="{DynamicResource CustomCheckBoxControlTemplate}" IsChecked="{Binding IsNotextureStreaming}" />
<Label Grid.Row="3" Content="Custom command line arguments:" />
<TextBox x:Name="CtrlCustomCmdLineTb" Grid.Row="4" Style="{DynamicResource NameTB}" Width="Auto" Text="{Binding CustomCommonParams, UpdateSourceTrigger=PropertyChanged}" Margin="2" HorizontalAlignment="Stretch" MaxWidth="400" />
</Grid>
</Grid>
</Grid>
<Grid Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Top" >
<ToggleButton x:Name="showPanelToggle" Content="Options" Padding="1" Background="#2D2D30" Foreground="WhiteSmoke" Margin="-15,15,-15,0" RenderTransformOrigin="0.5,0.5" BorderBrush="{x:Null}" HorizontalAlignment="Right" Width="50" Height="20" VerticalAlignment="Top" IsChecked="True" >
<ToggleButton.Template>
<ControlTemplate TargetType="{x:Type ButtonBase}">
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="Button.IsDefaulted" Value="True">
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" TargetName="border" Value="#0079CB"/>
<Setter Property="BorderBrush" TargetName="border" Value="#FF3C7FB1"/>
</Trigger>
<Trigger Property="ToggleButton.IsChecked" Value="True">
<Setter Property="Background" TargetName="border" Value="#0079CB"/>
<Setter Property="BorderBrush" TargetName="border" Value="#FF245A83"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</ToggleButton.Template>
<ToggleButton.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="90"/>
<TranslateTransform/>
</TransformGroup>
</ToggleButton.RenderTransform>
</ToggleButton>
</Grid>
</Grid>
<Grid Grid.Column="1" >
<Grid Background="#252527" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="10" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<!--<RowDefinition Height="*" />-->
<RowDefinition Height="3" />
</Grid.RowDefinitions>
<Grid Grid.Column="0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="5" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label Content="Applications" Grid.Column="0" Grid.Row="0" />
<ListBox x:Name="applicationsListBox" Height="150" MinWidth="150" Grid.Column="0" Grid.Row="1" ItemsSource="{Binding Applications}" SelectedItem="{Binding SelectedApplication}" MaxWidth="780" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" MinHeight="150" UseLayoutRounding="True" ToolTip="List of applications"/>
<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Button Grid.Column="0" x:Name="addAppBtn" Content="Add" Template="{DynamicResource ButtonTemplate}" Click="addAppButton_Click" ToolTip="Add new application to list" />
<Button Grid.Column="1" x:Name="deleteAppBtn" Content="Delete" Template="{DynamicResource ButtonTemplate}" Click="deleteAppButton_Click" ToolTip="Delete selected application" />
</Grid>
<Grid Grid.Row="4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Label Content="Config Files" Grid.Column="0" Grid.Row="0"/>
<ComboBox x:Name="configsCb" Height="Auto" Grid.Column="1" Grid.Row="0" ItemsSource="{Binding Configs}" SelectedItem="{Binding SelectedConfig}" VerticalAlignment="Top" Template="{DynamicResource ComboBoxTemplate}" DropDownOpened="configsCb_DropDownOpened" Width="Auto" MinWidth="150" MaxWidth="720" ToolTip="Select config file" HorizontalAlignment="Stretch" SelectionChanged="configsCb_SelectionChanged" />
<Button Grid.Column="2" x:Name="addConfigBtn" Content="Add" Template="{DynamicResource ButtonTemplate}" ToolTip="Add new application to list" Click="addConfigButton_Click" Padding="3,1" />
<Button Grid.Column="3" x:Name="deleteConfigBtn" Content="Delete" Template="{DynamicResource ButtonTemplate}" ToolTip="Delete selected application" Click="deleteConfigButton_Click" Padding="3,1" />
</Grid>
</Grid>
</Grid>
</Grid>
</Grid>
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid Grid.Row="0" VerticalAlignment="Stretch" />
<Grid Grid.Row="1" Margin="0,5,0,2" VerticalAlignment="Top">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Button x:Name="runBtn" Content="Run" Grid.Column="0" Template="{DynamicResource ButtonTemplate}" Click="runBtn_Click" FontSize="16" Padding="1,3" ToolTip="Run Application" Margin="2" />
<Button x:Name="killBtn" Content="Kill" Grid.Column="1" Template="{DynamicResource ButtonTemplate}" Click="killBtn_Click" FontSize="16" Padding="1,3" ToolTip="Kill current application" />
</Grid>
<Grid Grid.Row="2" Margin="0,2,0,5" VerticalAlignment="Top">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Button x:Name="startDaemonsBtn" Content="Start listeners" Grid.Column="0" Template="{DynamicResource ButtonTemplate}" Click="startDaemonsBtn_Click" FontSize="16" Padding="1,3" ToolTip="Start listeners on remote PCs" />
<Button x:Name="stopDaemonsBtn" Content="Stop listeners" Grid.Column="1" Template="{DynamicResource ButtonTemplate}" Click="stopDaemonsBtn_Click" FontSize="16" Padding="1,3" ToolTip="Stop listeners on remote PCs" />
<Button x:Name="deployAppBtn" Content="Deploy application" Grid.Column="2" Template="{DynamicResource ButtonTemplate}" Click="deployAppBtn_Click" FontSize="16" Padding="1,3" ToolTip="Update application on remote PCs" />
</Grid>
</Grid>
</Grid>
</TabItem>
</TabControl>
<DockPanel x:Name="logContainer" Grid.Row="1" HorizontalAlignment="Stretch" LastChildFill="true" Margin="10,5" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Auto" MinHeight="60">
<StackPanel Width="Auto" DockPanel.Dock="Right">
<Button Grid.Column="0" x:Name="copyAppLogBtn" Content="Copy" Width="100" Template="{DynamicResource ButtonTemplate}" ToolTip="Copy application log to Buffer" Click="copyAppLogBtn_Click" />
<Button Grid.Column="1" x:Name="cleanAppLogBtn" Content="Clean" Width="100" Template="{DynamicResource ButtonTemplate}" ToolTip="Clean log" Click="cleanAppLogBtn_Click" />
</StackPanel>
<ScrollViewer uictrl:AutoScroller.AutoScroll="True" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" >
<TextBox x:Name="appLogTextBox" IsReadOnly="True" Text="{Binding Log, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" TextWrapping="Wrap" AcceptsReturn="True" CaretIndex="{x:Static sys:Int32.MaxValue}" Foreground="White" ToolTip="Log Window" HorizontalAlignment="Stretch" ScrollViewer.CanContentScroll="True" VerticalScrollBarVisibility="Auto" MaxWidth="Infinity" MinWidth="200" Margin="2,2,2,5" Padding="0,0,0,0" VerticalAlignment="Top" VerticalContentAlignment="Stretch" />
</ScrollViewer>
</DockPanel>
</Grid>
</Window>