Files
quantconnect--lean/VisualStudioPlugin/ToolWindow1Control.xaml

470 lines
43 KiB
XML

<!--
QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:vsShell="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.14.0"
xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero2" x:Class="QuantConnect.VisualStudioPlugin.ToolWindow1Control"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300"
x:Name="MyToolWindow" x:ClassModifier="internal">
<UserControl.Resources>
<Style x:Key="FocusVisual">
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Rectangle Margin="2" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<SolidColorBrush x:Key="ComboBox.MouseOver.Glyph" Color="#FF000000"/>
<SolidColorBrush x:Key="ComboBox.Pressed.Glyph" Color="#FF000000"/>
<SolidColorBrush x:Key="ComboBox.Disabled.Glyph" Color="#FFBFBFBF"/>
<SolidColorBrush x:Key="ComboBox.Static.Glyph" Color="#FF606060"/>
<Style x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
<Setter Property="OverridesDefaultStyle" Value="true"/>
<Setter Property="IsTabStop" Value="false"/>
<Setter Property="Focusable" Value="false"/>
<Setter Property="ClickMode" Value="Press"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border x:Name="templateRoot" BorderBrush="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxBorderBrushKey}}" BorderThickness="{TemplateBinding BorderThickness}" Background="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxBackgroundBrushKey}}" SnapsToDevicePixels="true">
<Border x:Name="splitBorder" BorderBrush="Transparent" BorderThickness="1" HorizontalAlignment="Right" Margin="0" SnapsToDevicePixels="true" Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}">
<Path x:Name="arrow" Data="F1 M 0,0 L 2.667,2.66665 L 5.3334,0 L 5.3334,-1.78168 L 2.6667,0.88501 L0,-1.78168 L0,0 Z" Fill="{StaticResource ComboBox.Static.Glyph}" HorizontalAlignment="Center" Margin="0" VerticalAlignment="Center"/>
</Border>
</Border>
<ControlTemplate.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
<Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="false"/>
<Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}" Value="false"/>
<Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="true"/>
</MultiDataTrigger.Conditions>
<Setter Property="Background" TargetName="templateRoot" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxBackgroundBrushKey}}"/>
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxBorderBrushKey}}"/>
<Setter Property="Background" TargetName="splitBorder" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxBackgroundBrushKey}}"/>
<Setter Property="BorderBrush" TargetName="splitBorder" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxBorderBrushKey}}"/>
</MultiDataTrigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Fill" TargetName="arrow" Value="{StaticResource ComboBox.MouseOver.Glyph}"/>
</Trigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true"/>
<Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="false"/>
</MultiDataTrigger.Conditions>
<Setter Property="Background" TargetName="templateRoot" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxMouseOverBackgroundBeginBrushKey}}"/>
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxMouseOverBorderBrushKey}}"/>
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true"/>
<Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
</MultiDataTrigger.Conditions>
<Setter Property="Background" TargetName="templateRoot" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxMouseOverBackgroundBeginBrushKey}}"/>
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxMouseOverBorderBrushKey}}"/>
<Setter Property="Background" TargetName="splitBorder" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxMouseOverBackgroundBeginBrushKey}}"/>
<Setter Property="BorderBrush" TargetName="splitBorder" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxMouseOverBorderBrushKey}}"/>
</MultiDataTrigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Fill" TargetName="arrow" Value="{StaticResource ComboBox.Pressed.Glyph}"/>
</Trigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}" Value="true"/>
<Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="false"/>
</MultiDataTrigger.Conditions>
<Setter Property="Background" TargetName="templateRoot" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxMouseOverBackgroundBeginBrushKey}}"/>
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxMouseOverBorderBrushKey}}"/>
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}" Value="true"/>
<Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
</MultiDataTrigger.Conditions>
<Setter Property="Background" TargetName="templateRoot" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxMouseOverBackgroundBeginBrushKey}}"/>
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxMouseOverBorderBrushKey}}"/>
<Setter Property="Background" TargetName="splitBorder" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxMouseOverBackgroundBeginBrushKey}}"/>
<Setter Property="BorderBrush" TargetName="splitBorder" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxMouseOverBorderBrushKey}}"/>
</MultiDataTrigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Fill" TargetName="arrow" Value="{StaticResource ComboBox.Disabled.Glyph}"/>
</Trigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false"/>
<Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="false"/>
</MultiDataTrigger.Conditions>
<Setter Property="Background" TargetName="templateRoot" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxDisabledBackgroundBrushKey}}"/>
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxDisabledBorderBrushKey}}"/>
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false"/>
<Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
</MultiDataTrigger.Conditions>
<Setter Property="Background" TargetName="templateRoot" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxMouseOverBackgroundBeginBrushKey}}"/>
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxMouseOverBorderBrushKey}}"/>
<Setter Property="Background" TargetName="splitBorder" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxMouseOverBackgroundBeginBrushKey}}"/>
<Setter Property="BorderBrush" TargetName="splitBorder" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxMouseOverBorderBrushKey}}"/>
</MultiDataTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<ControlTemplate x:Key="ComboBoxTemplate" TargetType="{x:Type ComboBox}">
<Grid x:Name="templateRoot" SnapsToDevicePixels="true">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" Width="0"/>
</Grid.ColumnDefinitions>
<Popup x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="1" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
<Themes:SystemDropShadowChrome x:Name="shadow" Color="Transparent" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{Binding ActualWidth, ElementName=templateRoot}">
<Border x:Name="dropDownBorder" BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}" BorderThickness="1" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}">
<ScrollViewer x:Name="DropDownScrollViewer">
<Grid x:Name="grid" RenderOptions.ClearTypeHint="Enabled">
<Canvas x:Name="canvas" HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
<Rectangle x:Name="opaqueRect" Fill="{Binding Background, ElementName=dropDownBorder}" Height="{Binding ActualHeight, ElementName=dropDownBorder}" Width="{Binding ActualWidth, ElementName=dropDownBorder}"/>
</Canvas>
<ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Contained" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</Grid>
</ScrollViewer>
</Border>
</Themes:SystemDropShadowChrome>
</Popup>
<ToggleButton x:Name="toggleButton" BorderBrush="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxBorderBrushKey}}" BorderThickness="{TemplateBinding BorderThickness}" Background="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxBackgroundBrushKey}}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxToggleButton}"/>
<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" Content="{TemplateBinding SelectionBoxItem}" ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsHitTestVisible="false" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="true">
<Setter Property="Margin" TargetName="shadow" Value="0,0,5,5"/>
<Setter Property="Color" TargetName="shadow" Value="#71000000"/>
</Trigger>
<Trigger Property="HasItems" Value="false">
<Setter Property="Height" TargetName="dropDownBorder" Value="95"/>
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsGrouping" Value="true"/>
<Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false"/>
</MultiTrigger.Conditions>
<Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
</MultiTrigger>
<Trigger Property="ScrollViewer.CanContentScroll" SourceName="DropDownScrollViewer" Value="false">
<Setter Property="Canvas.Top" TargetName="opaqueRect" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}"/>
<Setter Property="Canvas.Left" TargetName="opaqueRect" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<Style x:Key="ComboBoxEditableTextBox" TargetType="{x:Type TextBox}">
<Setter Property="OverridesDefaultStyle" Value="true"/>
<Setter Property="AllowDrop" Value="true"/>
<Setter Property="MinWidth" Value="0"/>
<Setter Property="MinHeight" Value="0"/>
<Setter Property="Background" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxBackgroundBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxTextBrushKey}}"/>
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxBorderBrushKey}}"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="SelectionBrush" Value="Transparent"/>
<Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBox}">
<ScrollViewer x:Name="PART_ContentHost" Background="Transparent" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<ControlTemplate x:Key="ComboBoxEditableTemplate" TargetType="{x:Type ComboBox}">
<Grid x:Name="templateRoot" SnapsToDevicePixels="true">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" Width="0"/>
</Grid.ColumnDefinitions>
<Popup x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
<Themes:SystemDropShadowChrome x:Name="shadow" Color="Transparent" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{Binding ActualWidth, ElementName=templateRoot}">
<Border x:Name="dropDownBorder" BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}" BorderThickness="1" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}">
<ScrollViewer x:Name="DropDownScrollViewer">
<Grid x:Name="grid" RenderOptions.ClearTypeHint="Enabled">
<Canvas x:Name="canvas" HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
<Rectangle x:Name="opaqueRect" Fill="{Binding Background, ElementName=dropDownBorder}" Height="{Binding ActualHeight, ElementName=dropDownBorder}" Width="{Binding ActualWidth, ElementName=dropDownBorder}"/>
</Canvas>
<ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Contained" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</Grid>
</ScrollViewer>
</Border>
</Themes:SystemDropShadowChrome>
</Popup>
<ToggleButton x:Name="toggleButton" BorderBrush="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxBorderBrushKey}}" BorderThickness="{TemplateBinding BorderThickness}" Background="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxBackgroundBrushKey}}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxToggleButton}"/>
<Border x:Name="border" Background="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxBackgroundBrushKey}}" Margin="{TemplateBinding BorderThickness}">
<TextBox x:Name="PART_EditableTextBox" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}" Style="{StaticResource ComboBoxEditableTextBox}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Opacity" TargetName="border" Value="0.56"/>
</Trigger>
<Trigger Property="IsKeyboardFocusWithin" Value="true">
<Setter Property="Foreground" Value="Black"/>
</Trigger>
<Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="true">
<Setter Property="Margin" TargetName="shadow" Value="0,0,5,5"/>
<Setter Property="Color" TargetName="shadow" Value="#71000000"/>
</Trigger>
<Trigger Property="HasItems" Value="false">
<Setter Property="Height" TargetName="dropDownBorder" Value="95"/>
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsGrouping" Value="true"/>
<Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false"/>
</MultiTrigger.Conditions>
<Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
</MultiTrigger>
<Trigger Property="ScrollViewer.CanContentScroll" SourceName="DropDownScrollViewer" Value="false">
<Setter Property="Canvas.Top" TargetName="opaqueRect" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}"/>
<Setter Property="Canvas.Left" TargetName="opaqueRect" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</UserControl.Resources>
<Grid>
<Grid.Resources>
<Style TargetType="{x:Type ComboBoxItem}" x:Key="CustomComboBoxItemStyle">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ComboBoxItem}">
<Border x:Name="myBorder">
<ContentPresenter />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxItemMouseOverBackgroundBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxItemMouseOverTextBrushKey}}"/>
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxItemMouseOverBorderBrushKey}}"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxItemMouseOverBackgroundBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxItemMouseOverTextBrushKey}}"/>
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxItemMouseOverBorderBrushKey}}"/>
</Trigger>
<Trigger Property="IsHighlighted" Value="True">
<Setter Property="Background" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxItemMouseOverBackgroundBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxItemMouseOverTextBrushKey}}"/>
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxItemMouseOverBorderBrushKey}}"/>
</Trigger>
<Trigger Property="IsKeyboardFocused" Value="True">
<Setter Property="Background" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxItemMouseOverBackgroundBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxItemMouseOverTextBrushKey}}"/>
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxItemMouseOverBorderBrushKey}}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ComboBoxStyle1" TargetType="{x:Type ComboBox}">
<Setter Property="ItemContainerStyle" Value="{StaticResource CustomComboBoxItemStyle}"/>
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
<Setter Property="Background" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxBackgroundBrushKey}}"/>
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxBorderBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxTextBrushKey}}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
<Setter Property="Padding" Value="6,3,5,3"/>
<Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
<Setter Property="ScrollViewer.PanningMode" Value="Both"/>
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
<Setter Property="Template" Value="{StaticResource ComboBoxTemplate}"/>
<Style.Triggers>
<Trigger Property="IsEditable" Value="true">
<Setter Property="IsTabStop" Value="false"/>
<Setter Property="Padding" Value="2"/>
<Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}"/>
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="{x:Type Path}" x:Key="CustomPath">
<Setter Property="Fill" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ToolWindowTextBrushKey}}"/>
<Setter Property="Stroke" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ToolWindowTextBrushKey}}"/>
</Style>
<Style TargetType="{x:Type Button}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
<ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="{TemplateBinding Padding}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Border" Property="Background" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.CommandBarMouseOverBackgroundBeginBrushKey}}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition Height="189*"/>
</Grid.RowDefinitions>
<Button Grid.Row="0" x:Name="refreshButton" VerticalAlignment="Top" Margin="0,4,2,0"
Height="22" Click="RefreshButton_OnClick" Width="22" HorizontalAlignment="Right"
Background="Transparent" BorderThickness="0" ToolTip="Refresh">
<Path Style="{StaticResource CustomPath}"
StrokeThickness="1"
Data="M12,6V9L16,5L12,1V4A8,8 0 0,0 4,12C4,13.57 4.46,15.03 5.24,16.26L6.7,14.8C6.25,13.97 6,13 6,12A6,6 0 0,1 12,6M18.76,7.74L17.3,9.2C17.74,10.04 18,11 18,12A6,6 0 0,1 12,18V15L8,19L12,23V20A8,8 0 0,0 20,12C20,10.43 19.54,8.97 18.76,7.74Z"
Stretch="Fill"
Width="13"
Height="16"/>
</Button>
<Button Grid.Row="0" x:Name="newProjectButton" VerticalAlignment="Top" Margin="0,4,26,0"
Height="22" Click="NewProjectButton_OnClick" Width="22" HorizontalAlignment="Right"
Background="Transparent" BorderThickness="0" ToolTip="New Project">
<Path Style="{StaticResource CustomPath}"
StrokeThickness="0"
Data="m 97.713009,215.97801 c -1.83839,-0.29469 -3.33645,-1.43744 -4.15819,-3.17194 l -0.3889,-0.82089 -0.0614,-16.40639 -0.0615,-16.4064 -16.41283,-0.0615 -16.41282,-0.0615 -0.93306,-0.46116 c -1.68565,-0.83315 -2.814185,-2.38004 -3.047643,-4.17743 -0.157786,-1.2148 -0.153141,-17.73354 0.0053,-18.83423 0.295106,-2.05015 1.636612,-3.71701 3.600023,-4.47314 0.45655,-0.17583 2.25633,-0.2034 16.85608,-0.25829 l 16.34495,-0.0614 0.0615,-16.40639 0.0614,-16.4064 0.38669,-0.81849 c 0.66507,-1.40771 1.78197,-2.42265 3.24889,-2.95229 l 0.78862,-0.28474 h 9.647211 c 9.09326,0 9.68601,0.0132 10.32312,0.22935 1.46667,0.49765 2.68894,1.58995 3.35686,2.99991 l 0.39142,0.82626 0.0615,16.4064 0.0614,16.40639 16.4064,0.0614 16.4064,0.0615 0.82626,0.39141 c 1.40996,0.66793 2.50225,1.89019 2.99991,3.35686 0.21617,0.63711 0.22934,1.22987 0.22934,10.32313 0,9.1333 -0.0123,9.68321 -0.23186,10.32313 -0.52207,1.5219 -1.45459,2.58332 -2.89552,3.29574 l -0.91528,0.45253 -16.41282,0.0615 -16.41283,0.0615 -0.0614,16.4064 -0.0615,16.40639 -0.44565,0.92171 c -0.66984,1.38539 -1.6851,2.30491 -3.16669,2.86806 -0.67933,0.25822 -0.81952,0.26215 -10.02893,0.28172 -5.13699,0.0109 -9.616491,-0.0245 -9.954451,-0.0787 z"
Stretch="Fill"
Width="14"
Height="14"/>
</Button>
<ComboBox x:Name="projectNameBox" Grid.Row="0" Margin="2,4,53,0" VerticalAlignment="Top"
Width="Auto" SelectionChanged="ProjectNameBox_SelectionChanged" IsReadOnly="True"
Style="{DynamicResource ComboBoxStyle1}" ToolTip="Project Name">
<ComboBox.Resources>
<Style TargetType="TextBlock">
<Setter Property="Background" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxBackgroundBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxItemTextBrushKey}}"/>
<Style.Triggers>
<DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource AncestorType=ComboBoxItem}}" Value="True">
<Setter Property="Background" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxItemMouseOverBackgroundBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxItemMouseOverTextBrushKey}}"/>
</DataTrigger>
<DataTrigger Binding="{Binding IsMouseOver, RelativeSource={RelativeSource AncestorType=ComboBoxItem}}" Value="True">
<Setter Property="Background" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxItemMouseOverBackgroundBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ComboBoxItemMouseOverTextBrushKey}}"/>
</DataTrigger>
</Style.Triggers>
</Style>
</ComboBox.Resources>
</ComboBox>
<DataGrid x:Name="dataGrid" Grid.Row="1" Margin="2,0,2,2" AutoGenerateColumns="False" RowHeaderWidth="0"
CanUserAddRows="False" ItemsSource="{Binding}" CanUserReorderColumns="False" CanUserResizeRows="False"
BorderBrush="{x:Null}" CanUserDeleteRows="False" BorderThickness="0.5,0.5,0.5,0.5">
<DataGrid.Resources>
<Style TargetType="{x:Type DataGridColumnHeader}">
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="Background" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.CommandBarGradientBeginBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ToolWindowTextBrushKey}}"/>
</Style>
<Style TargetType="{x:Type DataGrid}">
<Setter Property="Background" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ToolWindowBackgroundBrushKey}}"/>
</Style>
<Style TargetType="{x:Type DataGridRow}">
<Setter Property="Background" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ToolWindowBackgroundBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ToolWindowTextBrushKey}}"/>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ToolWindowBackgroundBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ToolWindowTextBrushKey}}"/>
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ToolWindowBorderBrushKey}}"/>
</Trigger>
<Trigger Property="IsFocused" Value="True">
<Setter Property="Background" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ToolWindowBackgroundBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ToolWindowTextBrushKey}}"/>
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ToolWindowBorderBrushKey}}"/>
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="{x:Type DataGridCell}">
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ToolWindowBackgroundBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ToolWindowTextBrushKey}}"/>
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ToolWindowBorderBrushKey}}"/>
</Trigger>
<Trigger Property="IsFocused" Value="True">
<Setter Property="Background" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ToolWindowBackgroundBrushKey}}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ToolWindowTextBrushKey}}"/>
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static vsShell:EnvironmentColors.ToolWindowBorderBrushKey}}"/>
</Trigger>
</Style.Triggers>
</Style>
</DataGrid.Resources>
<DataGrid.Columns>
<DataGridTextColumn Header="Date" IsReadOnly="True" Binding="{Binding Date}" Width="135" SortDirection="Descending"/>
<DataGridTextColumn Header="Name" IsReadOnly="True" Binding="{Binding Name}" Width="*"/>
<DataGridTextColumn Header="Status" IsReadOnly="True" Binding="{Binding Status}" Width="73" CanUserResize="False"/>
<DataGridTemplateColumn Header="Progress" IsReadOnly="True" Width="80" CanUserResize="False">
<DataGridTemplateColumn.CellTemplate>
<ItemContainerTemplate>
<Grid>
<ProgressBar Value="{Binding Progress, Mode=OneWay}" Minimum="0" Maximum="1" Width="76" Height="15"/>
</Grid>
</ItemContainerTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="" Width="110" IsReadOnly="True" CanUserResize="False">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<WrapPanel>
<Button Click="Edit_OnClick" Width="35" Height="23"
HorizontalContentAlignment="Stretch" ToolTip="Edit Backtest"
VerticalContentAlignment="Stretch" Background="Transparent" BorderThickness="0">
<Path Style="{StaticResource CustomPath}"
StrokeThickness="0"
Data="m 54.30751,136.60612 c -4.033074,-0.73246 -7.269314,-3.67076 -8.53575,-7.74993 l -0.277236,-0.89298 -0.03338,-41.363522 c -0.03712,-45.99989 -0.104533,-42.19499 0.785734,-44.348518 1.336775,-3.233617 4.005442,-5.521968 7.471615,-6.406823 0.889322,-0.227029 1.812233,-0.233271 34.488653,-0.233271 h 33.574884 l 0.50786,0.336092 c 0.74353,0.492039 1.1553,1.181399 1.21724,2.037829 0.0959,1.325133 0.18849,1.206625 -5.07779,6.496371 -2.65549,2.667327 -5.02005,4.970039 -5.25459,5.117137 l -0.42643,0.267452 -26.438539,0.06092 -26.43854,0.06092 -0.03066,36.155006 -0.03066,36.155007 h 36.183322 36.183317 l 0.0328,-11.84861 0.0328,-11.848611 0.26533,-0.48734 c 0.14611,-0.26837 2.47279,-2.68617 5.17805,-5.38086 5.1779,-5.157649 5.17669,-5.156647 6.25293,-5.156647 1.11014,0 2.33671,0.897893 2.60926,1.91006 0.0997,0.370386 0.12813,5.653267 0.1038,19.310888 l -0.0335,18.80101 -0.27117,0.95381 c -1.14792,4.03757 -3.80084,6.70165 -7.89104,7.92423 l -0.85285,0.25492 -41.180768,0.0225 c -34.730504,0.019 -41.327053,-0.004 -42.114708,-0.14708 z M 84.786823,114.9153 c -1.185376,-0.31508 -2.180024,-1.15396 -2.807989,-2.36822 C 81.46,111.54383 81.501758,110.85301 82.762537,99.582269 L 83.920219,89.233146 108.69038,64.455105 c 13.62359,-13.627923 24.90912,-24.852086 25.07897,-24.942582 0.50236,-0.26768 1.13924,-0.336631 1.71256,-0.18541 0.4882,0.128773 1.49044,1.093727 10.98797,10.579244 7.05381,7.044881 10.52891,10.598558 10.69116,10.9329 0.30496,0.6284 0.30681,1.397228 0.005,1.976691 -0.13509,0.259165 -10.80475,11.011978 -25.00696,25.20184 l -24.77135,24.749802 -10.660701,1.17435 c -5.863386,0.64589 -10.797768,1.1692 -10.965293,1.16291 -0.167525,-0.006 -0.606137,-0.0916 -0.974693,-0.18955 z M 162.51857,55.581997 c -0.54594,-0.234923 -20.84023,-20.479437 -21.2922,-21.239972 -0.39902,-0.671439 -0.421,-1.452036 -0.0603,-2.142373 0.29664,-0.567772 8.70326,-8.968761 9.53438,-9.527994 1.62415,-1.09283 2.99225,-1.498217 5.05622,-1.498217 2.38937,0 4.04969,0.608709 5.81534,2.132024 1.6618,1.433724 12.09421,12.035239 12.58222,12.78617 1.80738,2.78118 1.86943,6.453328 0.15864,9.388205 -0.39861,0.68383 -1.38119,1.742121 -4.9578,5.339818 -2.45336,2.46783 -4.66408,4.592355 -4.9127,4.721168 -0.53706,0.278264 -1.33319,0.295303 -1.92377,0.04117 z"
Stretch="Fill"
Width="14"
Height="15"/>
</Button>
<Button Click="Open_OnClick" Width="35" Height="23"
HorizontalContentAlignment="Stretch" ToolTip="Open Chart"
VerticalContentAlignment="Stretch" Background="Transparent" BorderThickness="0">
<Path Style="{StaticResource CustomPath}"
StrokeThickness="0"
Data="M22,21H2V3H4V19H6V10H10V19H12V6H16V19H18V14H22V21Z"
Stretch="Fill"
Width="14"
Height="15"/>
</Button>
<Button Click="Delete_OnClick" Width="35" Height="23"
HorizontalContentAlignment="Stretch" ToolTip="Delete Backtest"
VerticalContentAlignment="Stretch" Background="Transparent" BorderThickness="0">
<Path Style="{StaticResource CustomPath}"
StrokeThickness="0"
Data="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z"
Stretch="Fill"
Width="11"
Height="15"/>
</Button>
</WrapPanel>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</Grid>
</UserControl>