aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Search/DropDownButton.xaml
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2019-04-08 13:49:55 +0300
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2019-04-08 13:49:55 +0300
commitfc8a05358a92cc3c77c5f1e30d536807ef0614fd (patch)
treec65f696ebd60f3790145721307c255e5a339923f /Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Search/DropDownButton.xaml
parentb4a71931ea52636c6b36376aa9d71697ccf73524 (diff)
downloadTango-fc8a05358a92cc3c77c5f1e30d536807ef0614fd.tar.gz
Tango-fc8a05358a92cc3c77c5f1e30d536807ef0614fd.zip
were added scripting projects
Diffstat (limited to 'Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Search/DropDownButton.xaml')
-rw-r--r--Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Search/DropDownButton.xaml71
1 files changed, 71 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Search/DropDownButton.xaml b/Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Search/DropDownButton.xaml
new file mode 100644
index 000000000..8c7649c00
--- /dev/null
+++ b/Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Search/DropDownButton.xaml
@@ -0,0 +1,71 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:local="clr-namespace:Tango.Scripting.Editors.Search"
+>
+ <!-- Colors for DropDownButton and SplitButton -->
+ <SolidColorBrush x:Key="{ComponentResourceKey {x:Type local:DropDownButton}, ActiveBorder}" Color="#FF0A246A"/>
+ <SolidColorBrush x:Key="{ComponentResourceKey {x:Type local:DropDownButton}, ActiveBackground}" Color="#FFB6BDD2"/>
+
+ <!-- Style and Template for DropDownButton -->
+ <Style TargetType="{x:Type local:DropDownButton}">
+ <Setter Property="TextElement.Foreground" Value = "{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
+ <Setter Property="Control.Padding" Value="2,2,2,2"/>
+ <Setter Property="Border.BorderThickness" Value="1,1,1,1"/>
+ <Setter Property="Panel.Background" Value="Transparent"/>
+ <Setter Property="Border.BorderBrush" Value="Transparent"/>
+ <Setter Property="FrameworkElement.HorizontalAlignment" Value="Center"/>
+ <Setter Property="FrameworkElement.VerticalAlignment" Value="Center"/>
+ <Setter Property="Control.HorizontalContentAlignment" Value="Center"/>
+ <Setter Property="Control.VerticalContentAlignment" Value="Center"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="local:DropDownButton"
+ xmlns:s="clr-namespace:System;assembly=mscorlib">
+ <Border
+ BorderThickness="{TemplateBinding Border.BorderThickness}"
+ BorderBrush="{TemplateBinding Border.BorderBrush}"
+ Background="{TemplateBinding Panel.Background}"
+ Name="OuterBorder"
+ SnapsToDevicePixels="True"
+ >
+ <StackPanel Orientation="Horizontal">
+ <ContentPresenter
+ Margin="{TemplateBinding Control.Padding}"
+ Content="{TemplateBinding ContentControl.Content}"
+ ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
+ ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}"
+ HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
+ VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
+ SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
+ <Path Margin="0,2,2,2"
+ Data = "M0,0 L1,0 0.5,1 z"
+ Fill = "{TemplateBinding TextElement.Foreground}"
+ Width = "7"
+ Height = "3.5"
+ Stretch = "Fill"/>
+ </StackPanel>
+ </Border>
+ <ControlTemplate.Triggers>
+ <Trigger Property="UIElement.IsMouseOver" Value="True">
+ <Setter Property="Border.BorderBrush" TargetName="OuterBorder" Value="{DynamicResource {ComponentResourceKey {x:Type local:DropDownButton}, ActiveBorder}}" />
+ <Setter Property="Panel.Background" TargetName="OuterBorder" Value="{DynamicResource {ComponentResourceKey {x:Type local:DropDownButton}, ActiveBackground}}"/>
+ </Trigger>
+ <Trigger Property="UIElement.IsKeyboardFocused" Value="True">
+ <Setter Property="Border.BorderBrush" TargetName="OuterBorder" Value="{DynamicResource {ComponentResourceKey {x:Type local:DropDownButton}, ActiveBorder}}"/>
+ <Setter Property="Panel.Background" TargetName="OuterBorder" Value="{DynamicResource {ComponentResourceKey {x:Type local:DropDownButton}, ActiveBackground}}"/>
+ </Trigger>
+ <Trigger Property="UIElement.IsEnabled" Value="False">
+ <Setter Property="TextElement.Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
+ </Trigger>
+ <Trigger Property="local:DropDownButton.IsDropDownContentOpen" Value="True">
+ <Setter Property="Border.BorderBrush" TargetName="OuterBorder" Value="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}" />
+ <Setter Property="Border.BorderThickness" TargetName="OuterBorder" Value="1,1,1,0" />
+ <Setter Property="Border.Padding" TargetName="OuterBorder" Value="0,0,0,1" />
+ <Setter Property="Panel.Background" TargetName="OuterBorder" Value="Transparent"/>
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+</ResourceDictionary> \ No newline at end of file