1388 lines
86 KiB
XML
1388 lines
86 KiB
XML
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
|
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
|
<DrawingBrush x:Key="CheckerboardBrush" TileMode="Tile" ViewportUnits="Absolute" Viewport="0,0,10,10">
|
|
<DrawingBrush.Drawing>
|
|
<DrawingGroup>
|
|
<GeometryDrawing Brush="LightGray">
|
|
<GeometryDrawing.Geometry>
|
|
<PathGeometry>
|
|
<PathGeometry.Figures>
|
|
<PathFigure StartPoint="0,0">
|
|
<LineSegment Point="5,0" />
|
|
<LineSegment Point="5,5" />
|
|
<LineSegment Point="0,5" />
|
|
<LineSegment Point="0,0" />
|
|
</PathFigure>
|
|
<PathFigure StartPoint="5,5">
|
|
<LineSegment Point="10,5" />
|
|
<LineSegment Point="10,10" />
|
|
<LineSegment Point="5,10" />
|
|
<LineSegment Point="5,5" />
|
|
</PathFigure>
|
|
</PathGeometry.Figures>
|
|
</PathGeometry>
|
|
</GeometryDrawing.Geometry>
|
|
</GeometryDrawing>
|
|
<GeometryDrawing Brush="White">
|
|
<GeometryDrawing.Geometry>
|
|
<PathGeometry>
|
|
<PathGeometry.Figures>
|
|
<PathFigure StartPoint="0,5">
|
|
<LineSegment Point="5,5" />
|
|
<LineSegment Point="5,10" />
|
|
<LineSegment Point="0,10" />
|
|
<LineSegment Point="0,5" />
|
|
</PathFigure>
|
|
<PathFigure StartPoint="5,0">
|
|
<LineSegment Point="10,0" />
|
|
<LineSegment Point="10,5" />
|
|
<LineSegment Point="5,5" />
|
|
<LineSegment Point="5,0" />
|
|
</PathFigure>
|
|
</PathGeometry.Figures>
|
|
</PathGeometry>
|
|
</GeometryDrawing.Geometry>
|
|
</GeometryDrawing>
|
|
</DrawingGroup>
|
|
</DrawingBrush.Drawing>
|
|
</DrawingBrush>
|
|
|
|
<Style TargetType="{x:Type Window}" x:Key="{x:Type Window}">
|
|
<Setter Property="Background" Value="{DynamicResource GeneralBackground}" />
|
|
</Style>
|
|
|
|
<Style TargetType="{x:Type TextBlock}" x:Key="{x:Type TextBlock}">
|
|
<Setter Property="Foreground" Value="{DynamicResource Foreground}" />
|
|
</Style>
|
|
|
|
<Style TargetType="{x:Type DataGridColumnHeadersPresenter}" x:Key="{x:Type DataGridColumnHeadersPresenter}">
|
|
<Setter Property="Height" Value="22"/>
|
|
<Setter Property="Background" Value="{DynamicResource GeneralBackground}"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type DataGridColumnHeadersPresenter}">
|
|
<ItemsPresenter/>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style TargetType="{x:Type DataGridCellsPanel}" x:Key="{x:Type DataGridCellsPanel}">
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
</Style>
|
|
|
|
<Style TargetType="{x:Type DataGridColumnHeader}" x:Key="{x:Type DataGridColumnHeader}">
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type DataGridColumnHeader}">
|
|
<Grid Background="{DynamicResource PseudoTransparent}" Margin="-1,0,0,0">
|
|
<Border x:Name="checkedBorder" CornerRadius="1" BorderBrush="{DynamicResource SunkenBorder}" BorderThickness="1" Background="{DynamicResource SunkenGradient}" Visibility="Collapsed" />
|
|
<Border x:Name="hoverBorder" CornerRadius="1" BorderBrush="{DynamicResource DimSeparatingBorder}" BorderThickness="1" Background="{DynamicResource LightGradient}" />
|
|
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="4,0" />
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style TargetType="{x:Type DataGridCell}" x:Key="DataGridCell">
|
|
<Setter Property="Background" Value="{DynamicResource GeneralBackground}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type DataGridCell}">
|
|
<Border x:Name="border" BorderBrush="{DynamicResource DimSeparatingBorder}" BorderThickness="0" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
|
<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Style.Triggers>
|
|
<Trigger Property="IsSelected" Value="False">
|
|
<Setter Property="Background" Value="{DynamicResource GeneralBackground}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource Foreground}" />
|
|
</Trigger>
|
|
<Trigger Property="IsSelected" Value="True">
|
|
<Setter Property="Background" Value="{DynamicResource NormalGradient}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource Foreground}" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style TargetType="{x:Type DataGridCell}" x:Key="{x:Type DataGridCell}" BasedOn="{StaticResource DataGridCell}"/>
|
|
|
|
<Style TargetType="{x:Type DataGridRow}" x:Key="{x:Type DataGridRow}">
|
|
<Setter Property="Background" Value="Red" />
|
|
<Setter Property="BorderThickness" Value="0" />
|
|
<Setter Property="SnapsToDevicePixels" Value="true" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type DataGridRow}">
|
|
<Border x:Name="DGR_Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{DynamicResource GeneralBackground}" SnapsToDevicePixels="True" CornerRadius="8,8,8,8">
|
|
<SelectiveScrollingGrid>
|
|
<SelectiveScrollingGrid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</SelectiveScrollingGrid.ColumnDefinitions>
|
|
<SelectiveScrollingGrid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</SelectiveScrollingGrid.RowDefinitions>
|
|
<DataGridCellsPresenter Grid.Column="1" ItemsPanel="{TemplateBinding ItemsPanel}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
<DataGridDetailsPresenter Grid.Column="1" Grid.Row="1" Visibility="{TemplateBinding DetailsVisibility}" SelectiveScrollingGrid.SelectiveScrollingOrientation= "{Binding AreRowDetailsFrozen, ConverterParameter={x:Static SelectiveScrollingOrientation.Vertical}, Converter={x:Static DataGrid.RowDetailsScrollingConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
|
<DataGridRowHeader Grid.RowSpan="2" SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical" Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.Row}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" />
|
|
</SelectiveScrollingGrid>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<!--Style and template for the DataGrid.-->
|
|
<Style TargetType="{x:Type DataGrid}">
|
|
<Setter Property="Background" Value="{DynamicResource GeneralBackground}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource Foreground}" />
|
|
<Setter Property="BorderBrush" Value="{DynamicResource DimSeparatingBorder}" />
|
|
<Setter Property="BorderThickness" Value="0" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type DataGrid}">
|
|
<Border x:Name="border" SnapsToDevicePixels="True" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
|
|
<ScrollViewer x:Name="DG_ScrollViewer" Focusable="false">
|
|
<ScrollViewer.Template>
|
|
<ControlTemplate TargetType="{x:Type ScrollViewer}">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Button Focusable="false" Command="{x:Static DataGrid.SelectAllCommand}" Style="{DynamicResource {ComponentResourceKey ResourceId=DataGridSelectAllButtonStyle, TypeInTargetAssembly={x:Type DataGrid}}}" Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.All}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" Width="{Binding CellsPanelHorizontalOffset, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" />
|
|
|
|
<DataGridColumnHeadersPresenter x:Name="PART_ColumnHeadersPresenter" Grid.Column="1" Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.Column}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" />
|
|
|
|
<ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Grid.ColumnSpan="2" Grid.Row="1" CanContentScroll="{TemplateBinding CanContentScroll}" />
|
|
|
|
<ScrollBar x:Name="PART_VerticalScrollBar" Grid.Column="2" Grid.Row="1" Orientation="Vertical" ViewportSize="{TemplateBinding ViewportHeight}" Maximum="{TemplateBinding ScrollableHeight}" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"/>
|
|
|
|
<Grid Grid.Column="1" Grid.Row="2">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="{Binding NonFrozenColumnsViewportHorizontalOffset, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<ScrollBar x:Name="PART_HorizontalScrollBar" Grid.Column="1" Orientation="Horizontal" ViewportSize="{TemplateBinding ViewportWidth}" Maximum="{TemplateBinding ScrollableWidth}" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"/>
|
|
</Grid>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</ScrollViewer.Template>
|
|
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
</ScrollViewer>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Style.Triggers>
|
|
<Trigger Property="IsGrouping" Value="true">
|
|
<Setter Property="ScrollViewer.CanContentScroll" Value="false" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style TargetType="{x:Type ToolTip}" x:Key="{x:Type ToolTip}">
|
|
<Setter Property="OverridesDefaultStyle" Value="true" />
|
|
<Setter Property="HasDropShadow" Value="True" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ToolTip">
|
|
<Border Name="Border" BorderThickness="1" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Background="{DynamicResource GeneralBackground}" BorderBrush="{DynamicResource DimSeparatingBorder}">
|
|
<ContentPresenter Margin="4" HorizontalAlignment="Left" VerticalAlignment="Top" />
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="HasDropShadow" Value="true">
|
|
<Setter TargetName="Border" Property="CornerRadius" Value="4" />
|
|
<Setter TargetName="Border" Property="SnapsToDevicePixels" Value="true" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<ControlTemplate x:Key="ErrorTemplateStyle">
|
|
<StackPanel Orientation="Horizontal">
|
|
<Border BorderThickness="1" BorderBrush="#FFdc000c" CornerRadius="0.7" VerticalAlignment="Top">
|
|
<Grid>
|
|
<Polygon x:Name="toolTipCorner"
|
|
Grid.ZIndex="2"
|
|
Margin="-1"
|
|
Points="6,6 6,0 0,0"
|
|
Fill="#FFdc000c"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Top"
|
|
IsHitTestVisible="True"/>
|
|
<Polyline Grid.ZIndex="3"
|
|
Points="7,7 0,0" Margin="-1" HorizontalAlignment="Right"
|
|
StrokeThickness="1.5"
|
|
StrokeEndLineCap="Round"
|
|
StrokeStartLineCap="Round"
|
|
Stroke="White"
|
|
VerticalAlignment="Top"
|
|
IsHitTestVisible="True"/>
|
|
<AdornedElementPlaceholder x:Name="adorner"/>
|
|
</Grid>
|
|
</Border>
|
|
<Popup x:Name="errorPopup" Placement="Right" PopupAnimation="Fade" AllowsTransparency="True" Margin="-5,-5,-5,-5">
|
|
<Grid Margin="5,0,0,0">
|
|
<Border x:Name="errorBorder" Background="#FFdc000c" Margin="5,0,0,0" CornerRadius="1.5" IsHitTestVisible="False" MinHeight="24" MaxWidth="267">
|
|
<Border.Effect>
|
|
<DropShadowEffect ShadowDepth="2.25" Color="Black" Opacity="0.4" Direction="315" BlurRadius="4"/>
|
|
</Border.Effect>
|
|
<TextBlock Text="{Binding ElementName=adorner, Path=AdornedElement.(Validation.Errors).CurrentItem.ErrorContent}" Foreground="White" Margin="8,3,8,3" TextWrapping="Wrap"/>
|
|
</Border>
|
|
</Grid>
|
|
</Popup>
|
|
</StackPanel>
|
|
<ControlTemplate.Triggers>
|
|
<DataTrigger Value="True">
|
|
<DataTrigger.Binding>
|
|
<Binding ElementName="toolTipCorner" Path="IsMouseOver"/>
|
|
</DataTrigger.Binding>
|
|
<DataTrigger.Setters>
|
|
<Setter TargetName="errorPopup" Property="IsOpen" Value="True" />
|
|
</DataTrigger.Setters>
|
|
</DataTrigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
|
|
<Style x:Key="ExpandCollapseToggleStyle" TargetType="ToggleButton">
|
|
<Setter Property="Focusable" Value="False" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ToggleButton">
|
|
<Grid Width="15" Height="13" Background="Transparent">
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CheckStates">
|
|
<VisualState x:Name="Checked">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Collapsed">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Expanded">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Unchecked" />
|
|
<VisualState x:Name="Indeterminate" />
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
<Path x:Name="Collapsed" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="1,1,1,1" Data="M 4 0 L 8 4 L 4 8 Z">
|
|
<Path.Fill>
|
|
<SolidColorBrush Color="{DynamicResource ForegroundColor}" />
|
|
</Path.Fill>
|
|
</Path>
|
|
<Path x:Name="Expanded" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="1,1,1,1" Data="M 0 4 L 8 4 L 4 8 Z" Visibility="Hidden">
|
|
<Path.Fill>
|
|
<SolidColorBrush Color="{DynamicResource ForegroundColor}" />
|
|
</Path.Fill>
|
|
</Path>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="{x:Type TreeViewItem}" TargetType="{x:Type TreeViewItem}">
|
|
<Setter Property="HorizontalContentAlignment" Value="Left"/>
|
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
<Setter Property="Padding" Value="0,0,5,0"/>
|
|
<Setter Property="Background">
|
|
<Setter.Value>
|
|
<SolidColorBrush Color="{DynamicResource GeneralBackgroundColor}" />
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type TreeViewItem}">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition MinWidth="19" Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="SelectionStates">
|
|
<VisualState x:Name="Selected">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Bd" Storyboard.TargetProperty="(Panel.Background)">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{DynamicResource BrightGradient}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Unselected" />
|
|
<VisualState x:Name="SelectedInactive">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Bd" Storyboard.TargetProperty="(Panel.Background)">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{DynamicResource BrightGradient}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
<VisualStateGroup x:Name="ExpansionStates">
|
|
<VisualState x:Name="Expanded">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="ItemsHost">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Collapsed" />
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
<ToggleButton x:Name="Expander" Style="{StaticResource ExpandCollapseToggleStyle}" ClickMode="Press" IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" />
|
|
<Border x:Name="Bd" Grid.Column="1" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
|
|
<ContentPresenter x:Name="PART_Header" ContentSource="Header" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
|
|
</Border>
|
|
<ItemsPresenter x:Name="ItemsHost" Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Visibility="Collapsed" />
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="HasItems" Value="false">
|
|
<Setter TargetName="Expander" Property="Visibility" Value="Hidden" />
|
|
</Trigger>
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="HasHeader" Value="false" />
|
|
<Condition Property="Width" Value="Auto" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="PART_Header" Property="MinWidth" Value="75" />
|
|
</MultiTrigger>
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="HasHeader" Value="false" />
|
|
<Condition Property="Height" Value="Auto" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="PART_Header" Property="MinHeight" Value="19" />
|
|
</MultiTrigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="TransparentTextBox" TargetType="{x:Type Control}">
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
<Setter Property="Foreground" Value="White" />
|
|
<Setter Property="BorderThickness" Value="0" />
|
|
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
|
<Setter Property="VerticalAlignment" Value="Stretch" />
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate>
|
|
<Border Background="#01808080">
|
|
<ScrollViewer x:Name="PART_ContentHost" />
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="TextBoxBase" TargetType="{x:Type Control}">
|
|
<Setter Property="Foreground" Value="{DynamicResource Foreground}" />
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
<Setter Property="Height" Value="20" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate>
|
|
<Grid>
|
|
<Border x:Name="rootBorder" Background="{DynamicResource LightGradient}" BorderBrush="{DynamicResource GroupBackground}" BorderThickness="1" CornerRadius="3" />
|
|
<Border BorderBrush="{DynamicResource DarkSeparatingBorder}" BorderThickness="1" CornerRadius="2" Margin="0,0,0,1">
|
|
<Border BorderBrush="{DynamicResource BrightGradient}" BorderThickness="1,1,1,0" CornerRadius="1">
|
|
<ScrollViewer x:Name="PART_ContentHost" />
|
|
</Border>
|
|
</Border>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<Style x:Key="{x:Type TextBoxBase}" TargetType="{x:Type Control}" BasedOn="{StaticResource TextBoxBase}" />
|
|
<Style x:Key="{x:Type TextBox}" TargetType="{x:Type Control}" BasedOn="{StaticResource TextBoxBase}" />
|
|
|
|
<ControlTemplate x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
|
|
<Grid>
|
|
<Border x:Name="rootBorder" Background="{DynamicResource LightGradient}" BorderBrush="{DynamicResource GroupBackground}" BorderThickness="1" CornerRadius="2" />
|
|
<Border BorderBrush="{DynamicResource DarkSeparatingBorder}" BorderThickness="1" CornerRadius="2" Margin="0,0,0,1">
|
|
<Border BorderBrush="{DynamicResource BrightGradient}" BorderThickness="1,1,1,0" CornerRadius="1">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Path Fill="{DynamicResource Foreground}" Data="M0,0 L8,0 L4,5 Z" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="3,0" Grid.Column="1" />
|
|
<ContentPresenter Margin="3,0,0,1" VerticalAlignment="Center" />
|
|
</Grid>
|
|
</Border>
|
|
</Border>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="rootBorder" Property="Background" Value="{DynamicResource BrightGradient}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter TargetName="rootBorder" Property="Background" Value="{DynamicResource NormalGradient}"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
|
|
<ControlTemplate x:Key="ComboBoxToggleButtonNoArrow" TargetType="{x:Type ToggleButton}">
|
|
<Grid>
|
|
<Border x:Name="rootBorder" Background="{DynamicResource LightGradient}" BorderBrush="{DynamicResource GroupBackground}" BorderThickness="1" CornerRadius="2" />
|
|
<Border BorderBrush="{DynamicResource DarkSeparatingBorder}" BorderThickness="1" CornerRadius="2" Margin="0,0,0,1">
|
|
<Border BorderBrush="{DynamicResource BrightGradient}" BorderThickness="1,1,1,0" CornerRadius="1">
|
|
<ContentPresenter Margin="3,0,0,1" VerticalAlignment="Center" />
|
|
</Border>
|
|
</Border>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="rootBorder" Property="Background" Value="{DynamicResource BrightGradient}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter TargetName="rootBorder" Property="Background" Value="{DynamicResource NormalGradient}"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
|
|
<ControlTemplate x:Key="ComboBoxTextBox" TargetType="TextBox">
|
|
<Border x:Name="PART_ContentHost" Focusable="False" Background="{TemplateBinding Background}" />
|
|
</ControlTemplate>
|
|
|
|
<Style x:Key="{x:Type ComboBox}" TargetType="{x:Type Control}">
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
<Setter Property="MinHeight" Value="19" />
|
|
<Setter Property="Foreground" Value="{DynamicResource Foreground}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ComboBox}">
|
|
<Grid>
|
|
<ToggleButton Name="ToggleButton" Margin="0,0,0,-1" Template="{StaticResource ComboBoxToggleButton}" Grid.Column="2" Focusable="false" IsChecked="{Binding Path=IsDropDownOpen,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" />
|
|
<ContentPresenter Name="ContentSite" IsHitTestVisible="False" TextBlock.Foreground="{DynamicResource Foreground}" Content="{TemplateBinding SelectionBoxItem}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" Margin="3,2,15,3" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
|
<TextBox x:Name="PART_EditableTextBox" Foreground="{DynamicResource Foreground}" Style="{x:Null}" Template="{StaticResource ComboBoxTextBox}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="3,3,15,3" Focusable="True" Background="Transparent" Visibility="Hidden" IsReadOnly="{TemplateBinding IsReadOnly}" />
|
|
<Popup Name="Popup" Placement="Bottom" IsOpen="{TemplateBinding IsDropDownOpen}" AllowsTransparency="True" Focusable="False" PopupAnimation="Slide">
|
|
<Grid Name="DropDown" MinWidth="{TemplateBinding ActualWidth}" MaxWidth="{TemplateBinding MaxDropDownHeight}" MaxHeight="{TemplateBinding MaxDropDownHeight}">
|
|
<Border x:Name="DropDownBorder" CornerRadius="0,0,4,4" Margin="0,-2,0,0" Background="{DynamicResource NormalGradient}" BorderThickness="1" BorderBrush="{DynamicResource DimSeparatingBorder}"/>
|
|
<ScrollViewer Margin="2,0,1,1" VerticalScrollBarVisibility="Auto">
|
|
<ItemsPresenter KeyboardNavigation.DirectionalNavigation="Contained" />
|
|
</ScrollViewer>
|
|
</Grid>
|
|
</Popup>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="HasItems" Value="false">
|
|
<Setter TargetName="DropDownBorder" Property="MinHeight" Value="95"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsGrouping" Value="true">
|
|
<Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEditable" Value="true">
|
|
<Setter Property="IsTabStop" Value="false"/>
|
|
<Setter TargetName="PART_EditableTextBox" Property="Visibility" Value="Visible"/>
|
|
<Setter TargetName="ContentSite" Property="Visibility" Value="Hidden"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="NoHeaderComboBox" BasedOn="{StaticResource {x:Type ComboBox}}" TargetType="{x:Type Control}">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ComboBox}">
|
|
<Grid>
|
|
<ToggleButton Name="ToggleButton" Margin="0,0,0,-1" Template="{StaticResource ComboBoxToggleButton}" Grid.Column="2" Focusable="false" IsChecked="{Binding Path=IsDropDownOpen,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" />
|
|
<Popup Name="Popup" Placement="Bottom" IsOpen="{TemplateBinding IsDropDownOpen}" AllowsTransparency="True" Focusable="False" PopupAnimation="Slide">
|
|
<Grid Name="DropDown" MinWidth="{TemplateBinding ActualWidth}" MaxWidth="{TemplateBinding MaxDropDownHeight}" MaxHeight="{TemplateBinding MaxDropDownHeight}">
|
|
<Border x:Name="DropDownBorder" CornerRadius="0,0,4,4" Margin="0,-2,0,0" Background="{DynamicResource NormalGradient}" BorderThickness="1" BorderBrush="{DynamicResource DimSeparatingBorder}"/>
|
|
<ScrollViewer Margin="2,0,1,1" VerticalScrollBarVisibility="Auto">
|
|
<ItemsPresenter KeyboardNavigation.DirectionalNavigation="Contained" />
|
|
</ScrollViewer>
|
|
</Grid>
|
|
</Popup>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="HasItems" Value="false">
|
|
<Setter TargetName="DropDownBorder" Property="MinHeight" Value="95"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsGrouping" Value="true">
|
|
<Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="{x:Type ComboBoxItem}" TargetType="{x:Type ComboBoxItem}">
|
|
<Setter Property="SnapsToDevicePixels" Value="true"/>
|
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ComboBoxItem">
|
|
<Border Name="Border" Padding="2" SnapsToDevicePixels="true">
|
|
<ContentPresenter TextBlock.Foreground="{DynamicResource Foreground}" />
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsHighlighted" Value="true">
|
|
<Setter TargetName="Border" Property="Background" Value="{DynamicResource LightGradient}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter Property="Foreground" Value="{DynamicResource DisabledBorderBrush}"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="{x:Type ListBox}" TargetType="ListBox">
|
|
<Setter Property="SnapsToDevicePixels" Value="true"/>
|
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
|
|
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
|
|
<Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
|
|
<Setter Property="MinWidth" Value="120"/>
|
|
<Setter Property="MinHeight" Value="95"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ListBox">
|
|
<Border Name="Border" Background="{DynamicResource GeneralBackground}" BorderBrush="{DynamicResource DimSeparatingBorder}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="1">
|
|
<ScrollViewer Margin="0" Focusable="false">
|
|
<ItemsPresenter Margin="2" />
|
|
</ScrollViewer>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource DisabledBorderBrush}" />
|
|
</Trigger>
|
|
<Trigger Property="IsGrouping" Value="true">
|
|
<Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="{x:Type ListBoxItem}" TargetType="ListBoxItem">
|
|
<Setter Property="SnapsToDevicePixels" Value="true"/>
|
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ListBoxItem">
|
|
<Border Name="Border" Padding="2" SnapsToDevicePixels="true">
|
|
<ContentPresenter />
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsSelected" Value="true">
|
|
<Setter TargetName="Border" Property="Background" Value="{DynamicResource LightGradient}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter Property="Foreground" Value="{DynamicResource DisabledBorderBrush}"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style TargetType="{x:Type GridSplitter}">
|
|
<Setter Property="Background" Value="{DynamicResource DimSeparatingBorder}" />
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate>
|
|
<Border Background="{TemplateBinding Background}" />
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="{x:Type CheckBox}" TargetType="CheckBox">
|
|
<Setter Property="SnapsToDevicePixels" Value="true"/>
|
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
|
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="CheckBox">
|
|
<BulletDecorator Background="Transparent" x:Name="Bullet">
|
|
<BulletDecorator.Bullet>
|
|
<Grid HorizontalAlignment="Left" VerticalAlignment="Stretch">
|
|
<Border x:Name="Border" Width="13" Height="13" VerticalAlignment="Center" CornerRadius="0" Background="{DynamicResource NormalGradient}" BorderThickness="1" BorderBrush="{DynamicResource DimSeparatingBorder}">
|
|
<Path Width="7" Height="7" x:Name="CheckMark" SnapsToDevicePixels="False" Stroke="{DynamicResource Foreground}" StrokeThickness="2" Data="M 0 0 L 7 7 M 0 7 L 7 0" />
|
|
</Border>
|
|
</Grid>
|
|
</BulletDecorator.Bullet>
|
|
<ContentPresenter Margin="4,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Left" RecognizesAccessKey="True"/>
|
|
</BulletDecorator>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsChecked" Value="false">
|
|
<Setter TargetName="CheckMark" Property="Visibility" Value="Collapsed"/>
|
|
</Trigger>
|
|
<Trigger Property="IsChecked" Value="{x:Null}">
|
|
<Setter TargetName="CheckMark" Property="Data" Value="M 0 7 L 7 0" />
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="true">
|
|
<Setter TargetName="Border" Property="Background" Value="{DynamicResource BrightGradient}" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="true">
|
|
<Setter TargetName="Border" Property="Background" Value="{DynamicResource LightGradient}" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter TargetName="Bullet" Property="Opacity" Value="0.5" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="{x:Type ButtonBase}" TargetType="{x:Type ButtonBase}">
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
<Setter Property="Foreground" Value="{DynamicResource ForegroundGradient}" />
|
|
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ButtonBase}">
|
|
<Grid Background="{DynamicResource PseudoTransparent}">
|
|
<Border x:Name="checkedBorder" CornerRadius="1" BorderBrush="{DynamicResource SunkenBorder}" BorderThickness="1" Background="{DynamicResource SunkenGradient}" Visibility="Collapsed" />
|
|
<Border x:Name="hoverBorder" CornerRadius="1" BorderBrush="{DynamicResource DimSeparatingBorder}" BorderThickness="1" Background="{DynamicResource LightGradient}" />
|
|
<ContentPresenter x:Name="contentPresenter" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="{TemplateBinding Padding}" />
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="hoverBorder" Property="Background" Value="{DynamicResource BrightGradient}" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter TargetName="hoverBorder" Property="Background" Value="{DynamicResource NormalGradient}" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter TargetName="contentPresenter" Property="Opacity" Value="0.5" />
|
|
</Trigger>
|
|
<Trigger Property="ToggleButton.IsChecked" Value="True">
|
|
<Setter TargetName="checkedBorder" Property="Visibility" Value="Visible" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Style.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="Foreground" Value="{DynamicResource HighlightGradient}" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter Property="Foreground" Value="{DynamicResource ForegroundGradient}" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style x:Key="{x:Type Button}" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type ButtonBase}}" />
|
|
|
|
<Style x:Key="ToolButton" TargetType="{x:Type ButtonBase}" BasedOn="{StaticResource {x:Type ButtonBase}}">
|
|
<Setter Property="Width" Value="20" />
|
|
<Setter Property="Height" Value="20" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ButtonBase}">
|
|
<Grid Background="{DynamicResource PseudoTransparent}">
|
|
<Border x:Name="checkedBorder" CornerRadius="1" BorderBrush="{DynamicResource SunkenBorder}" BorderThickness="1" Background="{DynamicResource SunkenGradient}" Visibility="Collapsed" />
|
|
<Border x:Name="hoverBorder" CornerRadius="1" BorderBrush="{DynamicResource DimSeparatingBorder}" BorderThickness="1" Background="{DynamicResource BrightGradient}" Visibility="Collapsed" />
|
|
<ContentPresenter x:Name="contentPresenter" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="hoverBorder" Property="Visibility" Value="Visible" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter TargetName="hoverBorder" Property="Background" Value="{DynamicResource NormalGradient}" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter TargetName="contentPresenter" Property="Opacity" Value="0.5" />
|
|
</Trigger>
|
|
<Trigger Property="ToggleButton.IsChecked" Value="True">
|
|
<Setter TargetName="checkedBorder" Property="Visibility" Value="Visible" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="SliderButtonStyle" TargetType="{x:Type RepeatButton}">
|
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
<Setter Property="IsTabStop" Value="false"/>
|
|
<Setter Property="Focusable" Value="false"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
|
<Border Background="Transparent" />
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="SliderThumbStyle" TargetType="{x:Type Thumb}">
|
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
<Setter Property="Height" Value="12"/>
|
|
<Setter Property="Width" Value="7"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Thumb}">
|
|
<Path Name="Ellipse" Data="M0,3 L3,0 L6,3 L6,8 L3,11 L0,8 Z" Fill="{DynamicResource LightGradient}" Stroke="{DynamicResource DimSeparatingBorder}" StrokeThickness="1" />
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="Ellipse" Property="Fill" Value="{DynamicResource BrightGradient}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter TargetName="Ellipse" Property="Fill" Value="{DynamicResource DimSeparatingBorder}"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<ControlTemplate x:Key="HorizontalSlider" TargetType="{x:Type Slider}">
|
|
<Grid Height="16">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Button Command="Slider.DecreaseLarge" Grid.Column="0" Height="16" Width="16" Style="{StaticResource ToolButton}">
|
|
<Path Margin="4,0" Data="M0,0 L7,0 L7,2 L0,2 Z" VerticalAlignment="Center" Fill="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=Button}, Path=Foreground}" />
|
|
</Button>
|
|
<Border Name="TrackBackground" Margin="0" Height="6" Grid.Column="1" Background="{DynamicResource DarkBackground}" BorderBrush="{DynamicResource DimSeparatingBorder}" BorderThickness="1" />
|
|
<Track Grid.Row="1" Name="PART_Track" Grid.Column="1">
|
|
<Track.DecreaseRepeatButton>
|
|
<RepeatButton Style="{StaticResource SliderButtonStyle}" Command="Slider.DecreaseLarge" />
|
|
</Track.DecreaseRepeatButton>
|
|
<Track.Thumb>
|
|
<Thumb Style="{StaticResource SliderThumbStyle}" />
|
|
</Track.Thumb>
|
|
<Track.IncreaseRepeatButton>
|
|
<RepeatButton Style="{StaticResource SliderButtonStyle}" Command="Slider.IncreaseLarge" />
|
|
</Track.IncreaseRepeatButton>
|
|
</Track>
|
|
<Button Command="Slider.IncreaseLarge" Grid.Column="2" Height="16" Width="16" Style="{StaticResource ToolButton}">
|
|
<Path Margin="3,0" Data="M0,3 L3,3 L3,0 L5,0 L5,3 L8,3 L8,5 L5,5 L5,8 L3,8 L3,5 L0,5 Z" Fill="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=Button}, Path=Foreground}" />
|
|
</Button>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
|
|
<Style TargetType="{x:Type RepeatButton}">
|
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
<Setter Property="Focusable" Value="false"/>
|
|
<Setter Property="Background" Value="{DynamicResource LightGradient}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource Foreground}"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
|
<Border Background="{TemplateBinding Background}" BorderBrush="{DynamicResource DimSeparatingBorder}" BorderThickness="1">
|
|
<ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center" />
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Style.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="Background" Value="{DynamicResource BrightGradient}" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="true">
|
|
<Setter Property="Background" Value="{DynamicResource BrightGradient}" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style x:Key="ScrollBarLineButton" TargetType="{x:Type RepeatButton}" BasedOn="{StaticResource {x:Type RepeatButton}}">
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
|
<Border Background="{TemplateBinding Background}" BorderBrush="{DynamicResource DimSeparatingBorder}" BorderThickness="1">
|
|
<Path HorizontalAlignment="Center" VerticalAlignment="Center" Fill="{TemplateBinding Foreground}" Data="{Binding Path=Content, RelativeSource={RelativeSource TemplatedParent}}" />
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="ScrollBarPageButton" TargetType="{x:Type RepeatButton}">
|
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
<Setter Property="IsTabStop" Value="false"/>
|
|
<Setter Property="Focusable" Value="false"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
|
<Border Background="Transparent" />
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="ScrollBarThumb" TargetType="{x:Type Thumb}">
|
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
<Setter Property="IsTabStop" Value="false"/>
|
|
<Setter Property="Focusable" Value="false"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Thumb}">
|
|
<Border x:Name="Border" CornerRadius="1" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" />
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="Border" Property="Background" Value="{DynamicResource BrightGradient}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<ControlTemplate x:Key="VerticalScrollBar" TargetType="{x:Type ScrollBar}">
|
|
<Grid >
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition MaxHeight="18"/>
|
|
<RowDefinition Height="0.00001*"/>
|
|
<RowDefinition MaxHeight="18"/>
|
|
</Grid.RowDefinitions>
|
|
<Border Grid.RowSpan="3" CornerRadius="1" Background="{DynamicResource ScrollbarGradient}" />
|
|
<RepeatButton Grid.Row="0" Style="{StaticResource ScrollBarLineButton}" Height="18" Command="ScrollBar.LineUpCommand" Content="M 0 4 L 8 4 L 4 0 Z" />
|
|
<Track Name="PART_Track" Grid.Row="1" IsDirectionReversed="true">
|
|
<Track.DecreaseRepeatButton>
|
|
<RepeatButton Style="{StaticResource ScrollBarPageButton}" Command="ScrollBar.PageUpCommand" />
|
|
</Track.DecreaseRepeatButton>
|
|
<Track.Thumb>
|
|
<Thumb Style="{StaticResource ScrollBarThumb}" Margin="0,-1" Background="{DynamicResource LightGradient}" BorderBrush="{DynamicResource DimSeparatingBorder}" />
|
|
</Track.Thumb>
|
|
<Track.IncreaseRepeatButton>
|
|
<RepeatButton Style="{StaticResource ScrollBarPageButton}" Command="ScrollBar.PageDownCommand" />
|
|
</Track.IncreaseRepeatButton>
|
|
</Track>
|
|
<RepeatButton Grid.Row="3" Style="{StaticResource ScrollBarLineButton}" Height="18" Command="ScrollBar.LineDownCommand" Content="M 0 0 L 4 4 L 8 0 Z"/>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
|
|
<ControlTemplate x:Key="HorizontalScrollBar" TargetType="{x:Type ScrollBar}">
|
|
<Grid >
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition MaxWidth="18"/>
|
|
<ColumnDefinition Width="0.00001*"/>
|
|
<ColumnDefinition MaxWidth="18"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Border Grid.ColumnSpan="3" CornerRadius="1" Background="{DynamicResource ScrollbarGradient}" />
|
|
<RepeatButton Grid.Column="0" Style="{StaticResource ScrollBarLineButton}" Width="18" Command="ScrollBar.LineLeftCommand" Content="M 4 0 L 4 8 L 0 4 Z" />
|
|
<Track Name="PART_Track" Grid.Column="1" IsDirectionReversed="False">
|
|
<Track.DecreaseRepeatButton>
|
|
<RepeatButton Style="{StaticResource ScrollBarPageButton}" Command="ScrollBar.PageLeftCommand" />
|
|
</Track.DecreaseRepeatButton>
|
|
<Track.Thumb>
|
|
<Thumb Style="{StaticResource ScrollBarThumb}" Margin="-1,0" Background="{DynamicResource LightGradient}" BorderBrush="{DynamicResource DimSeparatingBorder}" />
|
|
</Track.Thumb>
|
|
<Track.IncreaseRepeatButton>
|
|
<RepeatButton Style="{StaticResource ScrollBarPageButton}" Command="ScrollBar.PageRightCommand" />
|
|
</Track.IncreaseRepeatButton>
|
|
</Track>
|
|
<RepeatButton Grid.Column="3" Style="{StaticResource ScrollBarLineButton}" Width="18" Command="ScrollBar.LineRightCommand" Content="M 0 0 L 4 4 L 0 8 Z"/>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
|
|
<Style x:Key="{x:Type ScrollBar}" TargetType="{x:Type ScrollBar}">
|
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
<Setter Property="Margin" Value="-1" />
|
|
<Style.Triggers>
|
|
<Trigger Property="Orientation" Value="Horizontal">
|
|
<Setter Property="Width" Value="Auto"/>
|
|
<Setter Property="Height" Value="18" />
|
|
<Setter Property="Template" Value="{StaticResource HorizontalScrollBar}" />
|
|
</Trigger>
|
|
<Trigger Property="Orientation" Value="Vertical">
|
|
<Setter Property="Width" Value="18"/>
|
|
<Setter Property="Height" Value="Auto" />
|
|
<Setter Property="Template" Value="{StaticResource VerticalScrollBar}" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style x:Key="ExpanderToggleButton" TargetType="{x:Type ToggleButton}">
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
|
<Grid Background="{DynamicResource PseudoTransparent}" Cursor="Hand">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid Width="20">
|
|
<Grid.LayoutTransform>
|
|
<TransformGroup>
|
|
<TransformGroup.Children>
|
|
<TransformCollection>
|
|
<RotateTransform Angle="180"/>
|
|
</TransformCollection>
|
|
</TransformGroup.Children>
|
|
</TransformGroup>
|
|
</Grid.LayoutTransform>
|
|
<Path x:Name="arrow" Data="M 0,0 L 4.5,6 L 9,0 Z" HorizontalAlignment="Center" Fill="{DynamicResource Foreground}" VerticalAlignment="Center"/>
|
|
</Grid>
|
|
<ContentPresenter Grid.Column="1" HorizontalAlignment="Left" />
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsChecked" Value="true">
|
|
<Setter Property="Data" TargetName="arrow" Value="M 0,6 L 4.5,0 L 9,6 Z"/>
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="true">
|
|
<Setter Property="Fill" TargetName="arrow" Value="{DynamicResource Highlight}" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="true">
|
|
<Setter Property="Fill" TargetName="arrow" Value="{DynamicResource Highlight}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="{x:Static ToolBar.ButtonStyleKey}" BasedOn="{StaticResource ToolButton}" TargetType="{x:Type Button}"/>
|
|
<Style x:Key="{x:Static ToolBar.ToggleButtonStyleKey}" BasedOn="{StaticResource ToolButton}" TargetType="{x:Type ToggleButton}"/>
|
|
<Style x:Key="{x:Static ToolBar.CheckBoxStyleKey}" BasedOn="{StaticResource ToolButton}" TargetType="{x:Type CheckBox}"/>
|
|
<Style x:Key="{x:Static ToolBar.ComboBoxStyleKey}" BasedOn="{StaticResource {x:Type ComboBox}}" TargetType="{x:Type ComboBox}"/>
|
|
<Style x:Key="{x:Static ToolBar.RadioButtonStyleKey}" BasedOn="{StaticResource ToolButton}" TargetType="{x:Type RadioButton}"/>
|
|
<Style x:Key="{x:Static ToolBar.TextBoxStyleKey}" BasedOn="{StaticResource {x:Type TextBox}}" TargetType="{x:Type TextBox}" />
|
|
|
|
<Style x:Key="ToolBarThumbStyle" TargetType="{x:Type Thumb}">
|
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
<Setter Property="Cursor" Value="SizeAll"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Thumb}">
|
|
<Image RenderOptions.BitmapScalingMode="NearestNeighbor" Width="3" Height="20" Source="/Tool;component/Images/thumb.png" />
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="ToolBarOverflowButtonStyle" TargetType="{x:Type ToggleButton}">
|
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
|
<Border Name="Bd" CornerRadius="0,2,2,0" Background="Transparent" >
|
|
<Grid>
|
|
<Path Name="Arrow" Fill="{DynamicResource Foreground}" VerticalAlignment="Bottom" Margin="2,3" Data="M -0.5 3 L 5.5 3 L 2.5 6 Z"/>
|
|
<ContentPresenter/>
|
|
</Grid>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="true">
|
|
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource Highlight}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsKeyboardFocused" Value="true">
|
|
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource Highlight}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsChecked" Value="true">
|
|
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource Highlight}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter TargetName="Arrow" Property="Fill" Value="{DynamicResource DisabledForegroundBrush}"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="{x:Type ToolBar}" TargetType="{x:Type ToolBar}">
|
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
<Setter Property="Height" Value="24"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource Foreground}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ToolBar}">
|
|
<DockPanel >
|
|
<ToggleButton DockPanel.Dock="Right" Visibility="{TemplateBinding HasOverflowItems, Converter={StaticResource BooleanToVisibilityConverter}}" Style="{StaticResource ToolBarOverflowButtonStyle}" IsChecked="{Binding Path=IsOverflowOpen,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press">
|
|
<Popup x:Name="OverflowPopup" AllowsTransparency="true" Placement="Bottom" IsOpen="{Binding Path=IsOverflowOpen,RelativeSource={RelativeSource TemplatedParent}}" StaysOpen="false" Focusable="false" PopupAnimation="Slide">
|
|
<Border x:Name="DropDownBorder" BorderThickness="1">
|
|
<ToolBarOverflowPanel x:Name="PART_ToolBarOverflowPanel" Margin="2" WrapWidth="200" Focusable="true" FocusVisualStyle="{x:Null}" KeyboardNavigation.TabNavigation="Cycle" KeyboardNavigation.DirectionalNavigation="Cycle"/>
|
|
</Border>
|
|
</Popup>
|
|
</ToggleButton>
|
|
|
|
<Thumb x:Name="ToolBarThumb" Style="{StaticResource ToolBarThumbStyle}" Width="5" Margin="3,0" />
|
|
<ToolBarPanel x:Name="PART_ToolBarPanel" IsItemsHost="true" Margin="0,1,2,1"/>
|
|
</DockPanel>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsOverflowOpen" Value="true">
|
|
<Setter TargetName="ToolBarThumb" Property="IsEnabled" Value="false"/>
|
|
</Trigger>
|
|
<Trigger Property="ToolBarTray.IsLocked" Value="true">
|
|
<Setter TargetName="ToolBarThumb" Property="Visibility" Value="Collapsed"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="{x:Type ToolBarTray}" TargetType="{x:Type ToolBarTray}" >
|
|
<Setter Property="Background" Value="{DynamicResource LightGradient}"/>
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
<Setter Property="Height" Value="24"/>
|
|
</Style>
|
|
|
|
<Style x:Key="PopupContentStyle" TargetType="{x:Type ContentControl}">
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
<Setter Property="Margin" Value="0,0,8,8" />
|
|
<Setter Property="BorderThickness" Value="1,0,1,1" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ContentControl}">
|
|
<Border x:Name="SubMenuBorder" BorderBrush="{DynamicResource MenuBorder}" Background="{DynamicResource MenuBackground}" BorderThickness="{TemplateBinding BorderThickness}" Margin="{TemplateBinding Margin}" Padding="2,2,2,2">
|
|
<Border.Effect>
|
|
<DropShadowEffect Color="Black" Opacity="0.5" ShadowDepth="4" BlurRadius="5" />
|
|
</Border.Effect>
|
|
<ContentPresenter />
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style TargetType="{x:Type MenuItem}">
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="BorderBrush" Value="Transparent"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource Foreground}" />
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="OverridesDefaultStyle" Value="True" />
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Left"/>
|
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type MenuItem}">
|
|
<Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition x:Name="Col0" MinWidth="30" Width="Auto" SharedSizeGroup="MenuItemIconColumnGroup"/>
|
|
<ColumnDefinition Width="Auto" SharedSizeGroup="MenuTextColumnGroup"/>
|
|
<ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemIGTColumnGroup"/>
|
|
<ColumnDefinition x:Name="Col3" Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<ContentPresenter Grid.Column="0" HorizontalAlignment="Center" Margin="0,0,6,0" x:Name="Icon" VerticalAlignment="Center" ContentSource="Icon" />
|
|
|
|
<Grid Grid.Column="0" Visibility="Hidden" HorizontalAlignment="Center" Margin="0,0,6,0" x:Name="GlyphPanel" VerticalAlignment="Center">
|
|
<Path x:Name="GlyphPanelpath" VerticalAlignment="Center" Fill="{TemplateBinding Foreground}" Data="M0,2 L0,4.8 L2.5,7.4 L7.1,2.8 L7.1,0 L2.5,4.6 z" />
|
|
</Grid>
|
|
<ContentPresenter Grid.Column="1" Margin="{TemplateBinding Padding}" x:Name="HeaderHost" VerticalAlignment="Center" RecognizesAccessKey="True" ContentSource="Header"/>
|
|
<ContentPresenter Grid.Column="2" Margin="16,1,8,1" x:Name="IGTHost" ContentSource="InputGestureText" VerticalAlignment="Center"/>
|
|
<Grid Grid.Column="3" Width="14" Margin="4,0,6,0" x:Name="ArrowPanel" VerticalAlignment="Center">
|
|
<Path x:Name="ArrowPanelPath" HorizontalAlignment="Right" VerticalAlignment="Center" Fill="{TemplateBinding Foreground}" Data="M0,0 L0,8 L4,4 z"/>
|
|
</Grid>
|
|
<Border x:Name="InnerBorder" Grid.ColumnSpan="4" BorderBrush="{DynamicResource MenuBorder}" BorderThickness="1,1,0,0" Visibility="Collapsed" />
|
|
<Popup IsOpen="{Binding Path=IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}" AllowsTransparency="True" Placement="Right" x:Name="SubMenuPopup" PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}">
|
|
<ContentControl Style="{StaticResource PopupContentStyle}" x:Name="SubMenuPopupContent">
|
|
<Grid x:Name="SubMenu" Grid.IsSharedSizeScope="True">
|
|
<Border Width="27" HorizontalAlignment="Left" VerticalAlignment="Stretch" Background="{DynamicResource LightGradient}" />
|
|
<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle" />
|
|
</Grid>
|
|
</ContentControl>
|
|
</Popup>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="Role" Value="TopLevelHeader">
|
|
<Setter Property="Padding" Value="6,0"/>
|
|
<Setter Property="Placement" Value="Bottom" TargetName="SubMenuPopup"/>
|
|
<Setter Property="MinWidth" Value="0" TargetName="Col0"/>
|
|
<Setter Property="Width" Value="Auto" TargetName="Col3"/>
|
|
<Setter Property="Height" Value="23" />
|
|
<Setter Property="Visibility" Value="Collapsed" TargetName="Icon"/>
|
|
<Setter Property="Visibility" Value="Collapsed" TargetName="GlyphPanel"/>
|
|
<Setter Property="Visibility" Value="Collapsed" TargetName="IGTHost"/>
|
|
<Setter Property="Visibility" Value="Collapsed" TargetName="ArrowPanel"/>
|
|
</Trigger>
|
|
<Trigger Property="Role" Value="TopLevelItem">
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
</Trigger>
|
|
<Trigger Property="Role" Value="SubmenuHeader">
|
|
<Setter Property="DockPanel.Dock" Value="Top"/>
|
|
<Setter Property="Padding" Value="0,2,0,2"/>
|
|
<Setter Property="Border.BorderThickness" Value="1" TargetName="SubMenuPopupContent"/>
|
|
</Trigger>
|
|
<Trigger Property="Role" Value="SubmenuItem">
|
|
<Setter Property="DockPanel.Dock" Value="Top"/>
|
|
<Setter Property="Padding" Value="0,2,0,2"/>
|
|
<Setter Property="Visibility" Value="Collapsed" TargetName="ArrowPanel"/>
|
|
</Trigger>
|
|
<Trigger Property="IsSuspendingPopupAnimation" Value="true">
|
|
<Setter Property="PopupAnimation" Value="None" TargetName="SubMenuPopup"/>
|
|
</Trigger>
|
|
<Trigger Property="Icon" Value="{x:Null}">
|
|
<Setter Property="Visibility" Value="Collapsed" TargetName="Icon"/>
|
|
</Trigger>
|
|
<Trigger Property="IsChecked" Value="true">
|
|
<Setter Property="Visibility" Value="Visible" TargetName="GlyphPanel"/>
|
|
<Setter Property="Visibility" Value="Collapsed" TargetName="Icon"/>
|
|
</Trigger>
|
|
<Trigger Property="IsHighlighted" Value="true">
|
|
<Setter Property="Background" Value="{DynamicResource BrightGradient}" TargetName="Border"/>
|
|
<Setter Property="BorderBrush" Value="{DynamicResource MenuBorder}" TargetName="Border"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
|
|
<Setter Property="Opacity" Value="0.3" TargetName="Icon"/>
|
|
</Trigger>
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsSubmenuOpen" Value="true" />
|
|
<Condition Property="Role" Value="TopLevelHeader" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter Property="Background" Value="{DynamicResource BrightGradient}" TargetName="Border"/>
|
|
<Setter Property="BorderBrush" Value="Transparent" TargetName="Border"/>
|
|
<Setter Property="Visibility" Value="Visible" TargetName="InnerBorder"/>
|
|
</MultiTrigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="{x:Type ContextMenu}" TargetType="{x:Type ContextMenu}">
|
|
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
|
<Setter Property="OverridesDefaultStyle" Value="True"/>
|
|
<Setter Property="Grid.IsSharedSizeScope" Value="true"/>
|
|
<Setter Property="HasDropShadow" Value="True"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ContextMenu">
|
|
<ContentControl Style="{StaticResource PopupContentStyle}" x:Name="SubMenuPopupContent">
|
|
<Grid x:Name="SubMenu" Grid.IsSharedSizeScope="True">
|
|
<Border Width="27" HorizontalAlignment="Left" VerticalAlignment="Stretch" Background="{DynamicResource LightGradient}" />
|
|
<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle" />
|
|
</Grid>
|
|
</ContentControl>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="{x:Type Menu}" TargetType="{x:Type Menu}">
|
|
<Setter Property="OverridesDefaultStyle" Value="True"/>
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
<Setter Property="Background" Value="{DynamicResource LightGradient}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Menu">
|
|
<Border Background="{TemplateBinding Background}">
|
|
<StackPanel ClipToBounds="True" Orientation="Horizontal" IsItemsHost="True"/>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="{x:Static ToolBar.MenuStyleKey}" TargetType="{x:Type Menu}" BasedOn="{StaticResource {x:Type Menu}}" />
|
|
|
|
<Style x:Key="VerticalSeparator" TargetType="{x:Type Separator}">
|
|
<Setter Property="Height" Value="4"/>
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Separator">
|
|
<StackPanel Orientation="Vertical" Margin="25,0,0,0" Height="2">
|
|
<Border BorderBrush="{DynamicResource SeparatorShadow}" BorderThickness="0,1,0,0" Height="1" HorizontalAlignment="Stretch" />
|
|
<Border BorderBrush="{DynamicResource SeparatorHighlight}" BorderThickness="0,1,0,0" Height="1" HorizontalAlignment="Stretch" />
|
|
</StackPanel>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="HorizontalSeparator" TargetType="{x:Type Separator}">
|
|
<Setter Property="Width" Value="4"/>
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Separator">
|
|
<StackPanel Orientation="Horizontal" Margin="0,0,0,0" Width="2">
|
|
<Border BorderBrush="{DynamicResource SeparatorShadow}" BorderThickness="1,0,0,0" Width="1" VerticalAlignment="Stretch" />
|
|
<Border BorderBrush="{DynamicResource SeparatorHighlight}" BorderThickness="1,0,0,0" Width="1" VerticalAlignment="Stretch" />
|
|
</StackPanel>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="{x:Static MenuItem.SeparatorStyleKey}" TargetType="{x:Type Separator}" BasedOn="{StaticResource VerticalSeparator}"/>
|
|
|
|
|
|
<Style TargetType="{x:Type TabControl}">
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type TabControl}">
|
|
<Grid KeyboardNavigation.TabNavigation="Local" Background="{DynamicResource DimSeparatingBorder}">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
<TabPanel Name="HeaderPanel" Grid.Row="0" Panel.ZIndex="1" Margin="0,0,4,0" IsItemsHost="True" KeyboardNavigation.TabIndex="1" Background="Transparent" />
|
|
<Border Name="Border" Grid.Row="1" BorderBrush="{DynamicResource DarkSeparatingBorder}" BorderThickness="1" KeyboardNavigation.TabNavigation="Local" KeyboardNavigation.DirectionalNavigation="Contained" KeyboardNavigation.TabIndex="2">
|
|
<ContentPresenter Name="PART_SelectedContentHost" ContentSource="SelectedContent" />
|
|
</Border>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style TargetType="{x:Type TabItem}">
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type TabItem}">
|
|
<Grid>
|
|
<Border Name="Border" Margin="0,0,-4,0" Background="{DynamicResource NormalGradient}" BorderBrush="{DynamicResource DarkSeparatingBorder}" BorderThickness="1,1,1,0" CornerRadius="1,12,0,0">
|
|
<ContentPresenter x:Name="ContentSite" TextBlock.Foreground="{DynamicResource Foreground}" VerticalAlignment="Center" HorizontalAlignment="Center" ContentSource="Header" Margin="12,2,12,2" RecognizesAccessKey="True"/>
|
|
</Border>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsSelected" Value="True">
|
|
<Setter Property="Panel.ZIndex" Value="100" />
|
|
<Setter TargetName="Border" Property="Background" Value="{DynamicResource GeneralBackground}" />
|
|
<Setter TargetName="Border" Property="Margin" Value="0,0,-4,-1" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource DisabledForegroundBrush}" />
|
|
<Setter TargetName="ContentSite" Property="TextBlock.Foreground" Value="{DynamicResource DisabledForegroundBrush}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<ControlTemplate x:Key="ExpanderToggleButtonTemplate" TargetType="{x:Type ToggleButton}">
|
|
<Grid Cursor="Hand" Height="19">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="20" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Border Background="{DynamicResource PseudoTransparent}" />
|
|
<Path Name="Up_Arrow" HorizontalAlignment="Center" VerticalAlignment="Center" Fill="{DynamicResource Foreground}" Data="M0,0L4,4 8,0z" RenderTransformOrigin="0.5,0.5">
|
|
<Path.RenderTransform>
|
|
<TransformGroup>
|
|
<ScaleTransform ScaleX="1" ScaleY="1" />
|
|
<SkewTransform AngleX="0" AngleY="0" />
|
|
<RotateTransform Angle="-90" />
|
|
<TranslateTransform X="0" Y="0" />
|
|
</TransformGroup>
|
|
</Path.RenderTransform>
|
|
</Path>
|
|
<Path Name="Down_Arrow" Visibility="Collapsed" HorizontalAlignment="Center" VerticalAlignment="Center" Fill="{DynamicResource Foreground}" Data="M0,4L4,0 8,4z" RenderTransformOrigin="0.5,0.5">
|
|
<Path.RenderTransform>
|
|
<TransformGroup>
|
|
<ScaleTransform ScaleX="1" ScaleY="1" />
|
|
<SkewTransform AngleX="0" AngleY="0" />
|
|
<RotateTransform Angle="135" />
|
|
<TranslateTransform X="0" Y="1" />
|
|
</TransformGroup>
|
|
</Path.RenderTransform>
|
|
</Path>
|
|
<ContentPresenter Grid.Column="1" Margin="1" RecognizesAccessKey="True" />
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="ToggleButton.IsChecked" Value="true">
|
|
<Setter TargetName="Down_Arrow" Property="UIElement.Visibility" Value="Visible" />
|
|
<Setter TargetName="Up_Arrow" Property="UIElement.Visibility" Value="Collapsed" />
|
|
<Setter TargetName="Down_Arrow" Property="UIElement.OpacityMask" Value="#FF000000" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
|
|
<Style x:Key="ExpanderStyle" TargetType="{x:Type Expander}">
|
|
<Setter Property="Control.Padding" Value="0" />
|
|
<Setter Property="TextBlock.Foreground" Value="{DynamicResource GroupText}" />
|
|
<Setter Property="TextBlock.FontWeight" Value="Normal" />
|
|
<Setter Property="TextBlock.FontSize" Value="10" />
|
|
<Setter Property="BorderBrush" Value="Transparent" />
|
|
<Setter Property="BorderThickness" Value="0" />
|
|
<Setter Property="Control.Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Expander}">
|
|
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
|
|
<Grid Margin="0,0,0,-1">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Name="ContentRow" Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<Border Name="Border" Background="{DynamicResource BarGradient}" BorderBrush="{DynamicResource DimSeparatingBorder}" BorderThickness="0,1">
|
|
<ToggleButton Template="{StaticResource ExpanderToggleButtonTemplate}" OverridesDefaultStyle="True" Content="{TemplateBinding Header}" IsChecked="{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
|
|
</Border>
|
|
<Border Name="ExpandSite" Grid.Row="1" Margin="0">
|
|
<ContentPresenter HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}" Margin="{TemplateBinding Control.Padding}" VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}" Focusable="False" />
|
|
</Border>
|
|
</Grid>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="Expander.IsExpanded" Value="False">
|
|
<Setter TargetName="ExpandSite" Property="UIElement.Visibility" Value="Collapsed" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
</ResourceDictionary> |