diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2019-04-09 01:47:48 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2019-04-09 01:47:48 +0300 |
| commit | 080f1697e97e13461ec6df4d31c8924d01257a1b (patch) | |
| tree | b1fe0285de7bc9bc52e9e2195e66fe022bf8f5b3 /Software/Visual_Studio/Scripting/Tango.Scripting.IDE/Themes/ToolbarStyle.xaml | |
| parent | 1608e69a417bc5e40a607c3958c4a60f19f66f1a (diff) | |
| download | Tango-080f1697e97e13461ec6df4d31c8924d01257a1b.tar.gz Tango-080f1697e97e13461ec6df4d31c8924d01257a1b.zip | |
MERGE
Diffstat (limited to 'Software/Visual_Studio/Scripting/Tango.Scripting.IDE/Themes/ToolbarStyle.xaml')
| -rw-r--r-- | Software/Visual_Studio/Scripting/Tango.Scripting.IDE/Themes/ToolbarStyle.xaml | 236 |
1 files changed, 236 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Scripting/Tango.Scripting.IDE/Themes/ToolbarStyle.xaml b/Software/Visual_Studio/Scripting/Tango.Scripting.IDE/Themes/ToolbarStyle.xaml new file mode 100644 index 000000000..6223934b5 --- /dev/null +++ b/Software/Visual_Studio/Scripting/Tango.Scripting.IDE/Themes/ToolbarStyle.xaml @@ -0,0 +1,236 @@ +<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + x:Class="ToolbarSttyle.MainWindow"> + <Style x:Key="ToolBarVerticalOverflowButtonStyle" TargetType="{x:Type ToggleButton}"> + <Setter Property="Background" Value="{DynamicResource ToolBarToggleButtonVerticalBackground}"/> + <Setter Property="MinHeight" Value="0"/> + <Setter Property="MinWidth" Value="0"/> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type ToggleButton}"> + <Border x:Name="Bd" SnapsToDevicePixels="true" CornerRadius="0,0,3,3" Background="{TemplateBinding Background}"> + <Canvas Width="7" VerticalAlignment="Bottom" SnapsToDevicePixels="true" Margin="2,7,2,2" Height="6" HorizontalAlignment="Right"> + <!--<Path x:Name="Path1" Data="M 1.5 1 L 1.5 6" Stroke="{DynamicResource ToolBarGripper}"/>--> + <Path x:Name="Path2" Data="M 0.5 0 L 0.5 5" Stroke="{DynamicResource ControlForegroundKey}"/> + <!--<Path x:Name="Path3" Data="M 3.5 0.5 L 7 3.5 L 4 6.5 Z" Fill="{DynamicResource ToolBarGripper}"/>--> + <Path x:Name="Path4" Data="M 3 -0.5 L 6 2.5 L 3 5.5 Z" Fill="{DynamicResource ControlForegroundKey}"/> + </Canvas> + </Border> + <ControlTemplate.Triggers> + <Trigger Property="IsMouseOver" Value="true"> + <Setter Property="Background" TargetName="Bd" Value="{DynamicResource ToolBarButtonHover}"/> + <Setter Property="Stroke" TargetName="Path2" Value="{DynamicResource Grip.Submenu.Background.Selected}"/> + <Setter Property="Fill" TargetName="Path4" Value="{DynamicResource Grip.Submenu.Background.Selected}"/> + </Trigger> + <Trigger Property="IsKeyboardFocused" Value="true"> + <Setter Property="Background" TargetName="Bd" Value="{DynamicResource ToolBarButtonHover}"/> + <Setter Property="Stroke" TargetName="Path2" Value="{DynamicResource Grip.Submenu.Background.Selected}"/> + <Setter Property="Fill" TargetName="Path4" Value="{DynamicResource Grip.Submenu.Background.Selected}"/> + </Trigger> + <Trigger Property="IsEnabled" Value="false"> + <Setter Property="Foreground" Value="{DynamicResource ToolBarGripper}"/> + </Trigger> + <Trigger Property="IsPressed" Value="True"> + <Setter Property="Stroke" TargetName="Path2" Value="{DynamicResource Grip.Submenu.Background.Selected}"/> + <Setter Property="Fill" TargetName="Path4" Value="{DynamicResource Grip.Submenu.Background.Selected}"/> + </Trigger> + </ControlTemplate.Triggers> + </ControlTemplate> + </Setter.Value> + </Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding Source={x:Static SystemParameters.HighContrast}}" Value="true"> + <Setter Property="Background" Value="{DynamicResource ControlBrushColorKey}"/> + </DataTrigger> + </Style.Triggers> + </Style> + <Style x:Key="ToolBarHorizontalOverflowButtonStyle" TargetType="{x:Type ToggleButton}"> + <Setter Property="Background" Value="{DynamicResource ToolBarToggleButtonHorizontalBackground}"/> + <Setter Property="MinHeight" Value="0"/> + <Setter Property="MinWidth" Value="0"/> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type ToggleButton}"> + <Border x:Name="Bd" SnapsToDevicePixels="true" CornerRadius="0,3,3,0" Background="{TemplateBinding Background}"> + <Canvas Width="6" VerticalAlignment="Bottom" SnapsToDevicePixels="true" Margin="7,2,2,2" Height="7" HorizontalAlignment="Right"> + <!--<Path x:Name="Path1" Data="M 1 1.5 L 6 1.5" Stroke="{DynamicResource ControlForegroundKey}"/>--> + <Path x:Name="Path2" Data="M 0 0.5 L 5 0.5" Stroke="{DynamicResource ControlForegroundKey}"/> + <!--<Path x:Name="Path3" Data="M 0.5 4 L 6.5 4 L 3.5 7 Z" Fill="{DynamicResource ControlForegroundKey}"/>--> + <Path x:Name="Path4" Data="M -0.5 3 L 5.5 3 L 2.5 6 Z" Fill="{DynamicResource ControlForegroundKey}"/> + </Canvas> + </Border> + <ControlTemplate.Triggers> + <Trigger Property="IsMouseOver" Value="true"> + <Setter Property="Background" TargetName="Bd" Value="{DynamicResource ToolBarButtonHover}"/> + <Setter Property="Stroke" TargetName="Path2" Value="{DynamicResource Grip.Submenu.Background.Selected}"/> + <Setter Property="Fill" TargetName="Path4" Value="{DynamicResource Grip.Submenu.Background.Selected}"/> + </Trigger> + <Trigger Property="IsKeyboardFocused" Value="true"> + <Setter Property="Background" TargetName="Bd" Value="{DynamicResource ToolBarButtonHover}"/> + <Setter Property="Stroke" TargetName="Path2" Value="{DynamicResource Grip.Submenu.Background.Selected}"/> + <Setter Property="Fill" TargetName="Path4" Value="{DynamicResource Grip.Submenu.Background.Selected}"/> + </Trigger> + <Trigger Property="IsEnabled" Value="false"> + <Setter Property="Foreground" Value="{DynamicResource ToolBarGripper}"/> + </Trigger> + <Trigger Property="IsPressed" Value="True"> + <Setter Property="Stroke" TargetName="Path2" Value="{DynamicResource Grip.Submenu.Background.Selected}"/> + <Setter Property="Fill" TargetName="Path4" Value="{DynamicResource Grip.Submenu.Background.Selected}"/> + </Trigger> + </ControlTemplate.Triggers> + </ControlTemplate> + </Setter.Value> + </Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding Source={x:Static SystemParameters.HighContrast}}" Value="true"> + <Setter Property="Background" Value="{DynamicResource ControlBrushColorKey}"/> + </DataTrigger> + </Style.Triggers> + </Style> + <Style x:Key="ToolBarThumbStyle" TargetType="{x:Type Thumb}"> + <Setter Property="OverridesDefaultStyle" Value="true" /> + <Setter Property="Cursor" Value="SizeAll" /> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type Thumb}"> + <Border Background="Transparent" SnapsToDevicePixels="True"> + <Rectangle Margin="0,2" > + <Rectangle.Fill> + <DrawingBrush Viewport="0,0,4,4" ViewportUnits="Absolute" Viewbox="0,0,8,8" ViewboxUnits="Absolute" TileMode="Tile"> + <DrawingBrush.Drawing> + <DrawingGroup> + <GeometryDrawing Brush="#FF46464A" + Geometry="M 4 4 L 4 8 L 8 8 L 8 4 z" /> + </DrawingGroup> + </DrawingBrush.Drawing> + </DrawingBrush> + </Rectangle.Fill> + </Rectangle> + </Border> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> + <Style x:Key="ToolBarMainPanelBorderStyle" TargetType="{x:Type Border}"> + <Setter Property="Margin" Value="0,0,11,0"/> + <Setter Property="CornerRadius" Value="3,3,3,3"/> + <Style.Triggers> + <DataTrigger Binding="{Binding Source={x:Static SystemParameters.HighContrast}}" Value="true"> + <Setter Property="CornerRadius" Value="0,0,0,0"/> + </DataTrigger> + </Style.Triggers> + </Style> + <Style x:Key="TangoToolBarStyle" TargetType="{x:Type ToolBar}"> + <Setter Property="Background" Value="{DynamicResource ToolBarHorizontalBackground}"/> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type ToolBar}"> + <Grid x:Name="Grid" Margin="3,1,1,1" SnapsToDevicePixels="true"> + <Grid x:Name="OverflowGrid" HorizontalAlignment="Right"> + <ToggleButton x:Name="OverflowButton" ClickMode="Press" FocusVisualStyle="{x:Null}" IsChecked="{Binding IsOverflowOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" IsEnabled="{TemplateBinding HasOverflowItems}" Style="{DynamicResource ToolBarHorizontalOverflowButtonStyle}"/> + <Popup x:Name="OverflowPopup" AllowsTransparency="true" Focusable="false" IsOpen="{Binding IsOverflowOpen, RelativeSource={RelativeSource TemplatedParent}}" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom" StaysOpen="false"> + <!--<AThemes:SystemDropShadowChrome x:Name="Shdw" Color="Transparent">--> + <Border x:Name="ToolBarSubMenuBorder" BorderBrush="{DynamicResource ToolBarMenuBorder}" BorderThickness="1" Background="{DynamicResource ToolBarSubMenuBackground}" RenderOptions.ClearTypeHint="Enabled"> + <ToolBarOverflowPanel x:Name="PART_ToolBarOverflowPanel" KeyboardNavigation.DirectionalNavigation="Cycle" FocusVisualStyle="{x:Null}" Focusable="true" Margin="2" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" KeyboardNavigation.TabNavigation="Cycle" WrapWidth="200"/> + </Border> + <!--</AThemes:SystemDropShadowChrome>--> + </Popup> + </Grid> + <Border x:Name="MainPanelBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" Style="{DynamicResource ToolBarMainPanelBorderStyle}"> + <DockPanel KeyboardNavigation.TabIndex="1" KeyboardNavigation.TabNavigation="Local"> + <Thumb x:Name="ToolBarThumb" Margin="-3,-1,0,0" Padding="6,5,1,6" Style="{StaticResource ToolBarThumbStyle}" Width="10"/> + <ContentPresenter x:Name="ToolBarHeader" ContentSource="Header" HorizontalAlignment="Center" Margin="4,0,4,0" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center"/> + <ToolBarPanel x:Name="PART_ToolBarPanel" IsItemsHost="true" Margin="0,1,2,2" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/> + </DockPanel> + </Border> + </Grid> + <ControlTemplate.Triggers> + <Trigger Property="IsOverflowOpen" Value="true"> + <Setter Property="IsEnabled" TargetName="ToolBarThumb" Value="false"/> + </Trigger> + <Trigger Property="Header" Value="{x:Null}"> + <Setter Property="Visibility" TargetName="ToolBarHeader" Value="Collapsed"/> + </Trigger> + <Trigger Property="ToolBarTray.IsLocked" Value="true"> + <Setter Property="Visibility" TargetName="ToolBarThumb" Value="Collapsed"/> + </Trigger> + <Trigger Property="HasDropShadow" SourceName="OverflowPopup" Value="true"> + <!--<Setter Property="Margin" TargetName="Shdw" Value="0,0,5,5"/> + <Setter Property="SnapsToDevicePixels" TargetName="Shdw" Value="true"/> + <Setter Property="Color" TargetName="Shdw" Value="#71000000"/>--> + </Trigger> + <Trigger Property="Orientation" Value="Vertical"> + <Setter Property="Margin" TargetName="Grid" Value="1,3,1,1"/> + <Setter Property="Style" TargetName="OverflowButton" Value="{StaticResource ToolBarVerticalOverflowButtonStyle}"/> + <Setter Property="Height" TargetName="ToolBarThumb" Value="10"/> + <Setter Property="Width" TargetName="ToolBarThumb" Value="Auto"/> + <Setter Property="Margin" TargetName="ToolBarThumb" Value="-1,-3,0,0"/> + <Setter Property="Padding" TargetName="ToolBarThumb" Value="5,6,6,1"/> + <Setter Property="Margin" TargetName="ToolBarHeader" Value="0,0,0,4"/> + <Setter Property="Margin" TargetName="PART_ToolBarPanel" Value="1,0,2,2"/> + <Setter Property="DockPanel.Dock" TargetName="ToolBarThumb" Value="Top"/> + <Setter Property="DockPanel.Dock" TargetName="ToolBarHeader" Value="Top"/> + <Setter Property="HorizontalAlignment" TargetName="OverflowGrid" Value="Stretch"/> + <Setter Property="VerticalAlignment" TargetName="OverflowGrid" Value="Bottom"/> + <Setter Property="Placement" TargetName="OverflowPopup" Value="Right"/> + <Setter Property="Margin" TargetName="MainPanelBorder" Value="0,0,0,11"/> + <Setter Property="Background" Value="{DynamicResource ToolBarVerticalBackground}"/> + </Trigger> + <Trigger Property="IsEnabled" Value="false"> + <Setter Property="Foreground" Value="{DynamicResource Menu.Disable.Foreground}"/> + </Trigger> + </ControlTemplate.Triggers> + </ControlTemplate> + </Setter.Value> + </Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding Source={x:Static SystemParameters.HighContrast}}" Value="true"> + <Setter Property="Background" Value="{DynamicResource ControlBrushColorKey}"/> + </DataTrigger> + </Style.Triggers> + <Style.Resources> + <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}" SnapsToDevicePixels="true"> + <Grid> + <Rectangle x:Name="background" Fill="Transparent" Opacity="1"/> + <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/> + </Grid> + </Border> + <ControlTemplate.Triggers> + <Trigger Property="IsDefaulted" Value="true"> + <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/> + </Trigger> + <Trigger Property="IsMouseOver" Value="true"> + <Setter Property="Fill" TargetName="background" Value="{DynamicResource Toolbar.Button.MaouseMove.Background}"/> + </Trigger> + <Trigger Property="IsPressed" Value="true"> + <Setter Property="Fill" TargetName="background" Value="{DynamicResource ControlBrushColorKey}"/> + </Trigger> + <Trigger Property="IsEnabled" Value="false"> + <Setter Property="Background" TargetName="border" Value="{DynamicResource Button.Disabled.Background}"/> + <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource Button.Disabled.Border}"/> + <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{DynamicResource Button.Disabled.Foreground}"/> + </Trigger> + </ControlTemplate.Triggers> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> + </Style.Resources> + </Style> + + <Style x:Key="{x:Static ToolBar.SeparatorStyleKey}" TargetType="{x:Type Separator}"> + <Setter Property="Width" Value="1" /> + <Setter Property="Margin" Value="10,2,10,2" /> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type Separator}"> + <Rectangle Fill="{DynamicResource Inactive.Selection}" VerticalAlignment="Stretch"/> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> +</ResourceDictionary>
\ No newline at end of file |
