1265 lines
79 KiB
XML
1265 lines
79 KiB
XML
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:avalonedit="http://icsharpcode.net/sharpdevelop/avalonedit"
|
|
xmlns:controls="clr-namespace:ClassicAssist.UI.Controls"
|
|
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit">
|
|
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary Source="Colours.xaml" />
|
|
</ResourceDictionary.MergedDictionaries>
|
|
|
|
<Style x:Key="{x:Type xctk:IntegerUpDown}" TargetType="{x:Type xctk:IntegerUpDown}">
|
|
<Setter Property="Background" Value="{DynamicResource ThemeBackgroundBrush}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource ThemeForegroundBrush}" />
|
|
<Setter Property="BorderBrush" Value="{DynamicResource ThemeBorderBrush}" />
|
|
</Style>
|
|
|
|
<Style x:Key="TreeViewStyle" TargetType="{x:Type TreeView}">
|
|
<Style.Resources>
|
|
<Style x:Key="TreeViewItemStyle" TargetType="{x:Type TreeViewItem}">
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
|
|
<Setter Property="Padding" Value="4,1,4,1" />
|
|
<Setter Property="BorderThickness" Value="1" />
|
|
<Setter Property="BorderBrush" Value="Transparent" />
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource TreeViewForegroundBrush}" />
|
|
<Setter Property="Background" Value="{DynamicResource TreeViewBackgroundBrush}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="TreeViewItem">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" MinWidth="19" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<ToggleButton
|
|
Name="Expander"
|
|
ClickMode="Press"
|
|
IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}">
|
|
<ToggleButton.Style>
|
|
<Style TargetType="ToggleButton">
|
|
<Style.Resources>
|
|
<ResourceDictionary />
|
|
</Style.Resources>
|
|
<Setter Property="UIElement.Focusable" Value="False" />
|
|
<Setter Property="FrameworkElement.Width" Value="16" />
|
|
<Setter Property="FrameworkElement.Height" Value="16" />
|
|
<Setter Property="Control.Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ToggleButton">
|
|
<Border
|
|
Width="16"
|
|
Height="16"
|
|
Padding="3"
|
|
Background="Transparent">
|
|
<Path
|
|
x:Name="ExpandPath"
|
|
Grid.Column="1"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Data="M0,0 L2,0 L6,4 L2,8 L0,8 L4,4 z"
|
|
Fill="{DynamicResource TreeViewButtonForegroundBrush}" />
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="ToggleButton.IsChecked" Value="True">
|
|
<Setter TargetName="ExpandPath" Property="Data"
|
|
Value="M0,1 L0,3 L4,7 L8,3 L8,1 L4,5 z" />
|
|
</Trigger>
|
|
<Trigger Property="UIElement.IsMouseOver" Value="True">
|
|
<Setter TargetName="ExpandPath" Property="Shape.Stroke">
|
|
<Setter.Value>
|
|
<SolidColorBrush>#FF27C7F7</SolidColorBrush>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter TargetName="ExpandPath" Property="Shape.Fill">
|
|
<Setter.Value>
|
|
<SolidColorBrush>#FFCCEEFB</SolidColorBrush>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</ToggleButton.Style>
|
|
</ToggleButton>
|
|
<Border
|
|
Name="Bd"
|
|
Grid.Column="1"
|
|
Grid.ColumnSpan="2"
|
|
Padding="{TemplateBinding Control.Padding}"
|
|
Background="{TemplateBinding Panel.Background}"
|
|
BorderBrush="{TemplateBinding Border.BorderBrush}"
|
|
BorderThickness="{TemplateBinding Border.BorderThickness}"
|
|
SnapsToDevicePixels="True">
|
|
<ContentPresenter
|
|
Name="PART_Header"
|
|
HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
|
|
Content="{TemplateBinding HeaderedContentControl.Header}"
|
|
ContentSource="Header"
|
|
ContentStringFormat="{TemplateBinding HeaderedItemsControl.HeaderStringFormat}"
|
|
ContentTemplate="{TemplateBinding HeaderedContentControl.HeaderTemplate}"
|
|
SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
|
|
</Border>
|
|
<ItemsPresenter
|
|
Name="ItemsHost"
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
Grid.ColumnSpan="2" />
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="TreeViewItem.IsExpanded" Value="False">
|
|
<Setter TargetName="ItemsHost" Property="UIElement.Visibility" Value="Collapsed" />
|
|
</Trigger>
|
|
<Trigger Property="ItemsControl.HasItems" Value="False">
|
|
<Setter TargetName="Expander" Property="UIElement.Visibility" Value="Hidden" />
|
|
</Trigger>
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="TreeViewItem.IsSelected" Value="True" />
|
|
<Condition Property="UIElement.IsKeyboardFocused" Value="True" />
|
|
</MultiTrigger.Conditions>
|
|
<MultiTrigger.Setters>
|
|
<Setter TargetName="Bd" Property="Panel.Background"
|
|
Value="{DynamicResource TreeViewSelectecBackgroudBrush}" />
|
|
<Setter Property="TextElement.Foreground"
|
|
Value="{DynamicResource TreeViewForegroundBrush}" />
|
|
<Setter Property="BorderBrush"
|
|
Value="{DynamicResource TreeViewItemBorderBrush}" />
|
|
|
|
</MultiTrigger.Setters>
|
|
</MultiTrigger>
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="TreeViewItem.IsSelected" Value="True" />
|
|
<Condition Property="UIElement.IsKeyboardFocused" Value="False" />
|
|
</MultiTrigger.Conditions>
|
|
<MultiTrigger.Setters>
|
|
<Setter TargetName="Bd" Property="Panel.Background"
|
|
Value="{DynamicResource TreeViewInactiveSelectecBackgroudBrush}" />
|
|
<Setter Property="TextElement.Foreground"
|
|
Value="{DynamicResource TreeViewForegroundBrush}" />
|
|
<Setter Property="BorderBrush"
|
|
Value="{DynamicResource TreeViewItemInactiveBorderBrush}" />
|
|
</MultiTrigger.Setters>
|
|
</MultiTrigger>
|
|
<Trigger Property="UIElement.IsEnabled" Value="False">
|
|
<Setter Property="TextElement.Foreground"
|
|
Value="{DynamicResource TreeViewDisabledForegroundBrush}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Style.Triggers>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter Property="Foreground" Value="{DynamicResource TreeViewDisabledForegroundBrush}" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
<Style BasedOn="{StaticResource TreeViewItemStyle}" TargetType="{x:Type TreeViewItem}">
|
|
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
<Setter Property="Foreground" Value="{DynamicResource TreeViewForegroundBrush}" />
|
|
</Style>
|
|
</Style.Resources>
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
<Setter Property="Background" Value="{DynamicResource TreeViewBackgroundBrush}" />
|
|
<Setter Property="BorderThickness" Value="1" />
|
|
<Setter Property="BorderBrush" Value="{DynamicResource TreeViewBorderBrush}" />
|
|
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type TreeView}">
|
|
<Border
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}">
|
|
<ScrollViewer Focusable="false">
|
|
<VirtualizingStackPanel Margin="1" IsItemsHost="True" />
|
|
</ScrollViewer>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
|
|
<Setter Property="ItemContainerStyle" Value="{StaticResource TreeViewItemStyle}" />
|
|
</Style>
|
|
<Style TargetType="{x:Type TreeView}" BasedOn="{StaticResource TreeViewStyle}">
|
|
<Setter Property="Background" Value="{DynamicResource ThemeInnerControlBackgroundBrush}" />
|
|
</Style>
|
|
|
|
<Style x:Key="{x:Type CheckBox}" TargetType="{x:Type CheckBox}" BasedOn="{StaticResource {x:Type CheckBox}}">
|
|
<Setter Property="Background" Value="{DynamicResource ThemeBackgroundBrush}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource ThemeForegroundBrush}" />
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
<Setter Property="BorderThickness" Value="1" />
|
|
<Setter Property="BorderBrush" Value="{DynamicResource ThemeForegroundBrush}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="CheckBox">
|
|
<BulletDecorator Background="Transparent">
|
|
<BulletDecorator.Bullet>
|
|
<Border x:Name="Border"
|
|
Width="13"
|
|
Height="13"
|
|
CornerRadius="0"
|
|
Background="{TemplateBinding Background}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
BorderBrush="{TemplateBinding BorderBrush}">
|
|
<Grid>
|
|
<Path
|
|
Width="7" Height="7"
|
|
x:Name="CheckMark"
|
|
SnapsToDevicePixels="False"
|
|
Stroke="{StaticResource ThemeForegroundBrush}"
|
|
StrokeThickness="2"
|
|
Data="M 0 0 L 7 7 M 0 7 L 7 0" />
|
|
<Path x:Name="InderminateMark"
|
|
Visibility="Collapsed"
|
|
Width="8"
|
|
Height="8"
|
|
SnapsToDevicePixels="True"
|
|
Fill="{DynamicResource CheckBoxMarkBrush}"
|
|
Data="M 0 0 L 8 0 L 8 8 L 0 8 Z" />
|
|
</Grid>
|
|
</Border>
|
|
</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="{StaticResource ThemeTabBackgroundBrush}" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="true">
|
|
<Setter TargetName="Border" Property="Background"
|
|
Value="{StaticResource ThemeBackgroundBrush}" />
|
|
<Setter TargetName="Border" Property="BorderBrush"
|
|
Value="{StaticResource ThemeBorderBrush}" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForegroundBrush}" />
|
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxDisabledBorderBrush}" />
|
|
<Setter TargetName="CheckMark" Property="Stroke"
|
|
Value="{DynamicResource CheckBoxDisabledMarkBrush}" />
|
|
<Setter TargetName="InderminateMark" Property="Fill"
|
|
Value="{DynamicResource CheckBoxDisabledMarkBrush}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style TargetType="{x:Type ListBox}" BasedOn="{StaticResource {x:Type ListBox}}">
|
|
<Setter Property="Background" Value="{DynamicResource ThemeInnerControlBackgroundBrush}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource ThemeForegroundBrush}" />
|
|
<Setter Property="BorderThickness" Value="1" />
|
|
<Setter Property="BorderBrush" Value="{DynamicResource ThemeBorderBrush}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ListBox}">
|
|
<Border
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}">
|
|
<ScrollViewer Focusable="false">
|
|
<VirtualizingStackPanel Margin="1" IsItemsHost="True" />
|
|
</ScrollViewer>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<Style TargetType="{x:Type GroupBox}" BasedOn="{StaticResource {x:Type GroupBox}}">
|
|
<Setter Property="Background" Value="{DynamicResource ThemeBackgroundBrush}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource ThemeForegroundBrush}" />
|
|
<Setter Property="BorderBrush" Value="{DynamicResource ThemeBorderBrush}" />
|
|
<Setter Property="BorderThickness" Value="1" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type GroupBox}">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<TextBlock Grid.Row="0"
|
|
Background="{TemplateBinding BorderBrush}"
|
|
HorizontalAlignment="Left"
|
|
Foreground="{DynamicResource ThemeForegroundBrush}">
|
|
<ContentPresenter ContentSource="Header"
|
|
RecognizesAccessKey="True"
|
|
Margin="8,3,8,3" />
|
|
</TextBlock>
|
|
<Border Grid.Row="1"
|
|
Background="{TemplateBinding Background}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
BorderBrush="{TemplateBinding BorderBrush}">
|
|
<ContentPresenter Margin="{TemplateBinding Padding}" />
|
|
</Border>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<Style TargetType="{x:Type Label}" BasedOn="{StaticResource {x:Type Label}}">
|
|
<Setter Property="Foreground" Value="{DynamicResource ThemeForegroundBrush}" />
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
<Setter Property="Padding" Value="0" />
|
|
</Style>
|
|
<Style x:Key="{x:Type avalonedit:TextEditor}" TargetType="{x:Type avalonedit:TextEditor}">
|
|
<Setter Property="Foreground" Value="{DynamicResource ThemeForegroundBrush}" />
|
|
<Setter Property="Background" Value="{StaticResource ThemeInnerControlBackgroundBrush}" />
|
|
<Setter Property="FlowDirection" Value="LeftToRight" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type avalonedit:TextEditor}">
|
|
<Border
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}">
|
|
<ScrollViewer
|
|
Focusable="False"
|
|
Name="PART_ScrollViewer"
|
|
CanContentScroll="True"
|
|
VerticalScrollBarVisibility="{TemplateBinding VerticalScrollBarVisibility}"
|
|
HorizontalScrollBarVisibility="{TemplateBinding HorizontalScrollBarVisibility}"
|
|
Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TextArea}"
|
|
VerticalContentAlignment="Top"
|
|
HorizontalContentAlignment="Left"
|
|
Padding="{TemplateBinding Padding}" />
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="WordWrap"
|
|
Value="True">
|
|
<Setter TargetName="PART_ScrollViewer"
|
|
Property="HorizontalScrollBarVisibility"
|
|
Value="Disabled" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<Style TargetType="{x:Type TabControl}">
|
|
<Setter Property="OverridesDefaultStyle" Value="True" />
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type TabControl}">
|
|
<Grid KeyboardNavigation.TabNavigation="Local">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<TabPanel
|
|
Name="HeaderPanel"
|
|
Grid.Row="0"
|
|
Panel.ZIndex="1"
|
|
Margin="0,0,4,-1"
|
|
IsItemsHost="True"
|
|
KeyboardNavigation.TabIndex="1"
|
|
Background="Transparent" />
|
|
<Border
|
|
Name="Border"
|
|
Grid.Row="1"
|
|
Background="{StaticResource ThemeBackgroundBrush}"
|
|
BorderBrush="{StaticResource ThemeBorderBrush}"
|
|
BorderThickness="1"
|
|
CornerRadius="2"
|
|
KeyboardNavigation.TabNavigation="Local"
|
|
KeyboardNavigation.DirectionalNavigation="Contained"
|
|
KeyboardNavigation.TabIndex="2">
|
|
<ContentPresenter
|
|
Name="PART_SelectedContentHost"
|
|
Margin="4"
|
|
ContentSource="SelectedContent" />
|
|
</Border>
|
|
</Grid>
|
|
<!--<ControlTemplate.Triggers>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter Property="Foreground" Value="{x:Static SystemColors.DisabledForegroundBrush}" />
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBorderBrush}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>-->
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<Style TargetType="{x:Type TabItem}" BasedOn="{StaticResource {x:Type TabItem}}">
|
|
<Setter Property="Foreground" Value="{DynamicResource ThemeForegroundBrush}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type TabItem}">
|
|
<Grid>
|
|
<Border
|
|
Name="Border"
|
|
Margin="0,0,-4,0"
|
|
Background="{DynamicResource ThemeBackgroundBrush}"
|
|
BorderBrush="{DynamicResource ThemeBorderBrush}"
|
|
BorderThickness="1,1,1,1"
|
|
CornerRadius="2,12,0,0">
|
|
<ContentPresenter x:Name="ContentSite"
|
|
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 ThemeBackgroundBrush}" />
|
|
<Setter TargetName="Border" Property="BorderThickness" Value="1,1,1,0" />
|
|
</Trigger>
|
|
<!--<Trigger Property="IsEnabled" Value="False">
|
|
<Setter TargetName="Border" Property="Background" Value="{StaticResource DisabledBackgroundBrush}" />
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBorderBrush}" />
|
|
<Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}" />
|
|
</Trigger>-->
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="{x:Static GridView.GridViewScrollViewerStyleKey}" TargetType="ScrollViewer">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ScrollViewer">
|
|
<Grid Background="{TemplateBinding Background}">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<DockPanel Margin="{TemplateBinding Padding}">
|
|
<ScrollViewer DockPanel.Dock="Top"
|
|
HorizontalScrollBarVisibility="Hidden"
|
|
VerticalScrollBarVisibility="Hidden"
|
|
Focusable="false">
|
|
<GridViewHeaderRowPresenter Margin="2,0,2,0"
|
|
Columns="{Binding Path=TemplatedParent.View.Columns,
|
|
RelativeSource={RelativeSource TemplatedParent}}"
|
|
ColumnHeaderContainerStyle="{Binding
|
|
Path=TemplatedParent.View.ColumnHeaderContainerStyle,
|
|
RelativeSource={RelativeSource TemplatedParent}}"
|
|
ColumnHeaderTemplate="{Binding
|
|
Path=TemplatedParent.View.ColumnHeaderTemplate,
|
|
RelativeSource={RelativeSource TemplatedParent}}"
|
|
ColumnHeaderTemplateSelector="{Binding
|
|
Path=TemplatedParent.View.ColumnHeaderTemplateSelector,
|
|
RelativeSource={RelativeSource TemplatedParent}}"
|
|
AllowsColumnReorder="{Binding
|
|
Path=TemplatedParent.View.AllowsColumnReorder,
|
|
RelativeSource={RelativeSource TemplatedParent}}"
|
|
ColumnHeaderContextMenu="{Binding
|
|
Path=TemplatedParent.View.ColumnHeaderContextMenu,
|
|
RelativeSource={RelativeSource TemplatedParent}}"
|
|
ColumnHeaderToolTip="{Binding
|
|
Path=TemplatedParent.View.ColumnHeaderToolTip,
|
|
RelativeSource={RelativeSource TemplatedParent}}"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
</ScrollViewer>
|
|
|
|
<ScrollContentPresenter Name="PART_ScrollContentPresenter" CanContentScroll="True"
|
|
KeyboardNavigation.DirectionalNavigation="Local" />
|
|
</DockPanel>
|
|
|
|
<ScrollBar Name="PART_HorizontalScrollBar"
|
|
Orientation="Horizontal"
|
|
Grid.Row="1"
|
|
Maximum="{TemplateBinding ScrollableWidth}"
|
|
ViewportSize="{TemplateBinding ViewportWidth}"
|
|
Value="{TemplateBinding HorizontalOffset}"
|
|
Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" />
|
|
|
|
<ScrollBar Name="PART_VerticalScrollBar"
|
|
Grid.Column="1"
|
|
Maximum="{TemplateBinding ScrollableHeight}"
|
|
ViewportSize="{TemplateBinding ViewportHeight}"
|
|
Value="{TemplateBinding VerticalOffset}"
|
|
Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" />
|
|
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="GridViewColumnHeaderGripper" TargetType="Thumb">
|
|
<Setter Property="Width" Value="18" />
|
|
<Setter Property="Background" Value="{StaticResource ThemeBackgroundBrush}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Thumb}">
|
|
<Border Padding="{TemplateBinding Padding}"
|
|
Background="Transparent">
|
|
<Rectangle HorizontalAlignment="Center"
|
|
Width="1"
|
|
Fill="{TemplateBinding Background}" />
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="{x:Type GridViewColumnHeader}"
|
|
TargetType="GridViewColumnHeader">
|
|
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
<Setter Property="Foreground"
|
|
Value="{DynamicResource ThemeForegroundBrush}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="GridViewColumnHeader">
|
|
<Grid>
|
|
<Border Name="HeaderBorder"
|
|
BorderThickness="0,1,0,1"
|
|
BorderBrush="{DynamicResource ThemeBorderBrush}"
|
|
Background="{DynamicResource ThemeBackgroundBrush}"
|
|
Padding="2,0,2,0">
|
|
<ContentPresenter Name="HeaderContent"
|
|
Margin="0,0,0,1"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
RecognizesAccessKey="True"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
</Border>
|
|
<Thumb x:Name="PART_HeaderGripper"
|
|
HorizontalAlignment="Right"
|
|
Margin="0,0,-9,0"
|
|
Style="{StaticResource GridViewColumnHeaderGripper}" />
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="true">
|
|
<Setter TargetName="HeaderBorder"
|
|
Property="Background" Value="{StaticResource ThemeBackgroundBrush}" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="true">
|
|
<Setter TargetName="HeaderBorder"
|
|
Property="Background" Value="{StaticResource ThemeBackgroundBrush}" />
|
|
<Setter TargetName="HeaderContent"
|
|
Property="Margin" Value="1,1,0,0" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter Property="Foreground"
|
|
Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Style.Triggers>
|
|
<Trigger Property="Role" Value="Floating">
|
|
<Setter Property="Opacity" Value="0.7" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="GridViewColumnHeader">
|
|
<Canvas Name="PART_FloatingHeaderCanvas">
|
|
<Rectangle Fill="#60000000"
|
|
Width="{TemplateBinding ActualWidth}"
|
|
Height="{TemplateBinding ActualHeight}" />
|
|
</Canvas>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Trigger>
|
|
<Trigger Property="Role" Value="Padding">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="GridViewColumnHeader">
|
|
<Border Name="HeaderBorder"
|
|
BorderThickness="0,1,0,1"
|
|
BorderBrush="{DynamicResource ThemeBorderBrush}"
|
|
Background="{DynamicResource ThemeBackgroundBrush}" />
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style x:Key="{x:Type ListViewItem}" TargetType="{x:Type ListViewItem}">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ListViewItem}">
|
|
<Border
|
|
x:Name="Bd"
|
|
Padding="{TemplateBinding Padding}"
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
SnapsToDevicePixels="true">
|
|
<GridViewRowPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsMouseOver" Value="True" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="Bd" Property="Background"
|
|
Value="{DynamicResource SelectionColor1Brush}" />
|
|
<Setter TargetName="Bd" Property="BorderBrush"
|
|
Value="{DynamicResource SelectionColor2Brush}" />
|
|
</MultiTrigger>
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="Selector.IsSelectionActive" Value="False" />
|
|
<Condition Property="IsSelected" Value="True" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="Bd" Property="Background"
|
|
Value="{DynamicResource ListBoxSelectedInactiveBackgroundBrush}" />
|
|
<Setter TargetName="Bd" Property="BorderBrush"
|
|
Value="{DynamicResource ListBoxForegroundBrush}" />
|
|
</MultiTrigger>
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="Selector.IsSelectionActive" Value="True" />
|
|
<Condition Property="IsSelected" Value="True" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="Bd" Property="Background"
|
|
Value="{DynamicResource SelectionColor1EmphasizedBrush}" />
|
|
<Setter TargetName="Bd" Property="BorderBrush"
|
|
Value="{DynamicResource SelectionColor2EmphasizedBrush}" />
|
|
</MultiTrigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="{x:Type ListView}" TargetType="{x:Type ListView}">
|
|
<Setter Property="SnapsToDevicePixels" Value="true" />
|
|
<Setter Property="OverridesDefaultStyle" Value="true" />
|
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
|
|
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
|
|
<Setter Property="ScrollViewer.CanContentScroll" Value="true" />
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ListView}">
|
|
<Border Name="Border"
|
|
BorderThickness="1"
|
|
BorderBrush="{StaticResource ThemeBorderBrush}"
|
|
Background="{StaticResource ThemeInnerControlBackgroundBrush}">
|
|
<ScrollViewer
|
|
Style="{DynamicResource
|
|
{x:Static GridView.GridViewScrollViewerStyleKey}}">
|
|
<ItemsPresenter />
|
|
</ScrollViewer>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsGrouping"
|
|
Value="true">
|
|
<Setter Property="ScrollViewer.CanContentScroll"
|
|
Value="false" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled"
|
|
Value="false">
|
|
<Setter TargetName="Border"
|
|
Property="Background"
|
|
Value="{StaticResource ThemeBorderBrush}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="{x:Type TextBlock}" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
|
|
<Setter Property="Foreground" Value="{DynamicResource ThemeForegroundBrush}" />
|
|
</Style>
|
|
|
|
<Style x:Key="{x:Type controls:EditTextBlock}" TargetType="{x:Type controls:EditTextBlock}">
|
|
<Setter Property="Foreground" Value="{DynamicResource ThemeForegroundBrush}" />
|
|
<Setter Property="MinWidth" Value="50" />
|
|
</Style>
|
|
|
|
<Style x:Key="{x:Type Button}" TargetType="{x:Type Button}">
|
|
<Setter Property="OverridesDefaultStyle" Value="True" />
|
|
<Setter Property="Background" Value="{DynamicResource ButtonBackgroundBrush}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource ButtonForegroundBrush}" />
|
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderBrush}" />
|
|
<Setter Property="BorderThickness" Value="2" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
<Setter Property="Padding" Value="4" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Button}">
|
|
<Border x:Name="Border"
|
|
Background="{TemplateBinding Background}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
BorderBrush="{TemplateBinding BorderBrush}">
|
|
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
Margin="{TemplateBinding Padding}" />
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="Border" Property="Background"
|
|
Value="{DynamicResource ButtonHoverBackgroundBrush}" />
|
|
<Setter TargetName="Border" Property="BorderBrush"
|
|
Value="{DynamicResource ButtonHoverBorderBrush}" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter TargetName="Border" Property="Background"
|
|
Value="{DynamicResource ButtonPressBackgroundBrush}" />
|
|
<Setter TargetName="Border" Property="BorderBrush"
|
|
Value="{DynamicResource ButtonPressBorderBrush}" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter TargetName="Border" Property="Background"
|
|
Value="{DynamicResource ButtonDisabledBackgroundBrush}" />
|
|
<Setter TargetName="Border" Property="BorderBrush"
|
|
Value="{DynamicResource ButtonDisabledBorderBrush}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDisabledForegroundBrush}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="ScrollBarLineButtonStyle" TargetType="{x:Type RepeatButton}">
|
|
<Setter Property="OverridesDefaultStyle" Value="True" />
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
<Setter Property="Focusable" Value="False" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
|
<Border Background="Transparent"
|
|
Margin="1">
|
|
<Path x:Name="Arrow"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Data="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}"
|
|
Fill="{TemplateBinding Foreground}" />
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="Arrow" Property="Fill"
|
|
Value="{DynamicResource ScrollBarHoverForegroundBrush}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="ScrollBarPageButtonStyle" 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="ScrollBarThumbStyle" 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"
|
|
Background="{TemplateBinding Foreground}"
|
|
BorderThickness="{TemplateBinding Padding}"
|
|
BorderBrush="Transparent" />
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="Border" Property="Background"
|
|
Value="{DynamicResource ScrollBarHoverForegroundBrush}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="{x:Type ScrollBar}" TargetType="{x:Type ScrollBar}">
|
|
<Setter Property="OverridesDefaultStyle" Value="True" />
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
<Setter Property="Background" Value="{DynamicResource ScrollBarBackgroundBrush}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource ScrollBarForegroundBrush}" />
|
|
<Style.Triggers>
|
|
<Trigger Property="Orientation" Value="Horizontal">
|
|
<Setter Property="Width" Value="Auto" />
|
|
<Setter Property="Height" Value="18" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ScrollBar}">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition MaxWidth="18" />
|
|
<ColumnDefinition Width="0.00001*" />
|
|
<ColumnDefinition MaxWidth="18" />
|
|
</Grid.ColumnDefinitions>
|
|
<Border Grid.Column="0"
|
|
Grid.ColumnSpan="3"
|
|
Background="{TemplateBinding Background}" />
|
|
<RepeatButton Grid.Column="0"
|
|
Style="{StaticResource ScrollBarLineButtonStyle}"
|
|
Width="18"
|
|
Command="ScrollBar.LineLeftCommand"
|
|
Content="M 5 0 L 5 10 L 0 5 Z"
|
|
Foreground="{TemplateBinding Foreground}" />
|
|
<Track x:Name="PART_Track"
|
|
Grid.Column="1"
|
|
IsDirectionReversed="False">
|
|
<Track.DecreaseRepeatButton>
|
|
<RepeatButton Style="{StaticResource ScrollBarPageButtonStyle}"
|
|
Command="ScrollBar.PageLeftCommand" />
|
|
</Track.DecreaseRepeatButton>
|
|
<Track.Thumb>
|
|
<Thumb Style="{StaticResource ScrollBarThumbStyle}"
|
|
Foreground="{TemplateBinding Foreground}"
|
|
Padding="0,4,0,4" />
|
|
</Track.Thumb>
|
|
<Track.IncreaseRepeatButton>
|
|
<RepeatButton Style="{StaticResource ScrollBarPageButtonStyle}"
|
|
Command="ScrollBar.PageRightCommand" />
|
|
</Track.IncreaseRepeatButton>
|
|
</Track>
|
|
<RepeatButton Grid.Column="2"
|
|
Style="{StaticResource ScrollBarLineButtonStyle}"
|
|
Width="18"
|
|
Command="ScrollBar.LineRightCommand"
|
|
Content="M 0 0 L 5 5 L 0 10 Z"
|
|
Foreground="{TemplateBinding Foreground}" />
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Trigger>
|
|
<Trigger Property="Orientation" Value="Vertical">
|
|
<Setter Property="Width" Value="18" />
|
|
<Setter Property="Height" Value="Auto" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ScrollBar}">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition MaxHeight="18" />
|
|
<RowDefinition Height="0.00001*" />
|
|
<RowDefinition MaxHeight="18" />
|
|
</Grid.RowDefinitions>
|
|
<Border Grid.Row="0"
|
|
Grid.RowSpan="3"
|
|
Background="{TemplateBinding Background}" />
|
|
<RepeatButton Grid.Row="0"
|
|
Style="{StaticResource ScrollBarLineButtonStyle}"
|
|
Height="18"
|
|
Command="ScrollBar.LineUpCommand"
|
|
Content="M 0 5 L 10 5 L 5 0 Z"
|
|
Foreground="{TemplateBinding Foreground}" />
|
|
<Track x:Name="PART_Track"
|
|
Grid.Row="1"
|
|
IsDirectionReversed="True">
|
|
<Track.DecreaseRepeatButton>
|
|
<RepeatButton Style="{StaticResource ScrollBarPageButtonStyle}"
|
|
Command="ScrollBar.PageUpCommand" />
|
|
</Track.DecreaseRepeatButton>
|
|
<Track.Thumb>
|
|
<Thumb Style="{StaticResource ScrollBarThumbStyle}"
|
|
Foreground="{TemplateBinding Foreground}"
|
|
Padding="4,0,4,0" />
|
|
</Track.Thumb>
|
|
<Track.IncreaseRepeatButton>
|
|
<RepeatButton Style="{StaticResource ScrollBarPageButtonStyle}"
|
|
Command="ScrollBar.PageDownCommand" />
|
|
</Track.IncreaseRepeatButton>
|
|
</Track>
|
|
<RepeatButton Grid.Row="2"
|
|
Style="{StaticResource ScrollBarLineButtonStyle}"
|
|
Height="18"
|
|
Command="ScrollBar.LineDownCommand"
|
|
Content="M 0 0 L 5 5 L 10 0 Z"
|
|
Foreground="{TemplateBinding Foreground}" />
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter Property="Foreground" Value="{DynamicResource ScrollBarDisabledForegroundBrush}" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style x:Key="{x:Type ComboBox}" TargetType="{x:Type ComboBox}">
|
|
<Setter Property="OverridesDefaultStyle" Value="True" />
|
|
<Setter Property="Background" Value="{DynamicResource TextBoxBackgroundBrush}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource TextBoxForegroundBrush}" />
|
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
|
|
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
|
|
<Setter Property="ScrollViewer.CanContentScroll" Value="True" />
|
|
<Setter Property="TextElement.Foreground" Value="{DynamicResource TextBoxForegroundBrush}" />
|
|
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
|
<Setter Property="Validation.ErrorTemplate" Value="{DynamicResource ValidationErrorOverlayTemplate}" />
|
|
<Setter Property="Padding" Value="3,0" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ComboBox}">
|
|
<Grid>
|
|
<TextBox x:Name="PART_EditableTextBox"
|
|
IsReadOnly="{TemplateBinding IsReadOnly}"
|
|
Focusable="True"
|
|
Style="{DynamicResource TextBoxStyle}"
|
|
Visibility="Hidden" />
|
|
<Border x:Name="NonEditableBorder"
|
|
Background="{DynamicResource ComboBoxNonEditableBackgroundBrush}"
|
|
BorderThickness="1"
|
|
BorderBrush="{DynamicResource ComboBoxNonEditableBorderBrush}">
|
|
<ContentPresenter IsHitTestVisible="False"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center"
|
|
Content="{TemplateBinding ComboBox.SelectionBoxItem}"
|
|
ContentTemplate="{TemplateBinding ComboBox.SelectionBoxItemTemplate}"
|
|
ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
|
|
Margin="{TemplateBinding Padding}" />
|
|
</Border>
|
|
<ToggleButton x:Name="ToggleButton"
|
|
ClickMode="Press"
|
|
HorizontalAlignment="Right"
|
|
Background="{DynamicResource ComboBoxButtonBackgroundBrush}"
|
|
BorderBrush="{DynamicResource ComboBoxButtonBorderBrush}"
|
|
BorderThickness="0"
|
|
Foreground="{DynamicResource ComboBoxButtonForegroundBrush}"
|
|
IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsDropDownOpen, Mode=TwoWay}">
|
|
<ToggleButton.Template>
|
|
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="20" />
|
|
</Grid.ColumnDefinitions>
|
|
<Border Grid.Column="1"
|
|
x:Name="ButtonBorder"
|
|
Margin="0"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
Background="{TemplateBinding Background}" />
|
|
<Path x:Name="Arrow"
|
|
Grid.Column="1"
|
|
Data="M0,0 L0,2 L4,6 L8,2 L8,0 L4,4 z"
|
|
Fill="{TemplateBinding Foreground}"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center" />
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="ButtonBorder" Property="Background"
|
|
Value="{DynamicResource ComboBoxButtonHoverBackgroundBrush}" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter TargetName="ButtonBorder" Property="Background"
|
|
Value="{DynamicResource ComboBoxButtonPressBackgroundBrush}" />
|
|
</Trigger>
|
|
<Trigger Property="IsChecked" Value="True">
|
|
<Setter TargetName="ButtonBorder" Property="Background"
|
|
Value="{DynamicResource ComboBoxButtonCheckedBackgroundBrush}" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter TargetName="ButtonBorder" Property="Background"
|
|
Value="{DynamicResource ComboBoxButtonDisabledBackgroundBrush}" />
|
|
<Setter TargetName="ButtonBorder" Property="BorderBrush"
|
|
Value="{DynamicResource ComboBoxButtonDisabledBorderBrush}" />
|
|
<Setter TargetName="Arrow" Property="Fill"
|
|
Value="{DynamicResource ComboBoxButtonDisabledForegroundBrush}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</ToggleButton.Template>
|
|
</ToggleButton>
|
|
<Popup Placement="Bottom"
|
|
Focusable="False"
|
|
AllowsTransparency="True"
|
|
IsOpen="{TemplateBinding ComboBox.IsDropDownOpen}"
|
|
PopupAnimation="Slide">
|
|
<Grid MinWidth="{TemplateBinding ActualWidth}"
|
|
MaxHeight="{TemplateBinding MaxDropDownHeight}">
|
|
<Border BorderThickness="1"
|
|
Background="{DynamicResource ComboBoxListBackgroundBrush}"
|
|
BorderBrush="{DynamicResource ComboBoxListBorderBrush}"
|
|
Margin="0,1,0,0">
|
|
<ScrollViewer SnapsToDevicePixels="True">
|
|
<ItemsPresenter KeyboardNavigation.DirectionalNavigation="Contained" />
|
|
</ScrollViewer>
|
|
</Border>
|
|
</Grid>
|
|
</Popup>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="NonEditableBorder" Property="Background"
|
|
Value="{DynamicResource ComboBoxNonEditableHoverBackgroundBrush}" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter TargetName="NonEditableBorder" Property="Background"
|
|
Value="{DynamicResource ComboBoxNonEditableDisabledBackgroundBrush}" />
|
|
<Setter TargetName="NonEditableBorder" Property="BorderBrush"
|
|
Value="{DynamicResource ComboBoxNonEditableDisabledBorderBrush}" />
|
|
</Trigger>
|
|
<Trigger Property="IsEditable" Value="True">
|
|
<Setter Property="IsTabStop" Value="False" />
|
|
<Setter TargetName="PART_EditableTextBox" Property="Visibility" Value="Visible" />
|
|
<Setter TargetName="NonEditableBorder" Property="Visibility" Value="Hidden" />
|
|
<Setter TargetName="ToggleButton" Property="BorderThickness" Value="1,0,0,0" />
|
|
<Setter TargetName="ToggleButton" Property="Focusable" Value="False" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="TextBoxStyle" TargetType="{x:Type TextBoxBase}">
|
|
<Setter Property="OverridesDefaultStyle" Value="True" />
|
|
<Setter Property="Background" Value="{DynamicResource TextBoxBackgroundBrush}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource TextBoxForegroundBrush}" />
|
|
<Setter Property="CaretBrush" Value="{DynamicResource TextBoxForegroundBrush}" />
|
|
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxBorderBrush}" />
|
|
<Setter Property="BorderThickness" Value="1" />
|
|
<Setter Property="Cursor" Value="IBeam" />
|
|
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
|
<Setter Property="AllowDrop" Value="true" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
<Setter Property="Padding" Value="2" />
|
|
<Setter Property="Validation.ErrorTemplate" Value="{DynamicResource ValidationErrorOverlayTemplate}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type TextBoxBase}">
|
|
<Border x:Name="Border"
|
|
Background="{TemplateBinding Background}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
BorderBrush="{TemplateBinding BorderBrush}">
|
|
<ScrollViewer x:Name="PART_ContentHost"
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
Margin="{TemplateBinding Padding}" />
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="Border" Property="Background"
|
|
Value="{DynamicResource TextBoxHoverBackgroundBrush}" />
|
|
<Setter TargetName="Border" Property="BorderBrush"
|
|
Value="{DynamicResource TextBoxHoverBorderBrush}" />
|
|
</Trigger>
|
|
<Trigger Property="IsFocused" Value="True">
|
|
<Setter TargetName="Border" Property="Background"
|
|
Value="{DynamicResource TextBoxFocusBackgroundBrush}" />
|
|
<Setter TargetName="Border" Property="BorderBrush"
|
|
Value="{DynamicResource TextBoxFocusBorderBrush}" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter TargetName="Border" Property="Background"
|
|
Value="{DynamicResource TextBoxDisabledBackgroundBrush}" />
|
|
<Setter TargetName="Border" Property="BorderBrush"
|
|
Value="{DynamicResource TextBoxDisabledBorderBrush}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource TextBoxDisabledForegroundBrush}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource TextBoxStyle}">
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
</Style>
|
|
|
|
<Style x:Key="{x:Type ScrollViewer}" TargetType="{x:Type ScrollViewer}">
|
|
<Setter Property="OverridesDefaultStyle" Value="True" />
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
<Setter Property="Background" Value="{DynamicResource ScrollViewerBackgroundBrush}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ScrollViewer}">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<ScrollContentPresenter Grid.Row="0"
|
|
Grid.Column="0"
|
|
CanContentScroll="{TemplateBinding CanContentScroll}" />
|
|
<ScrollBar x:Name="PART_VerticalScrollBar"
|
|
Grid.Row="0"
|
|
Grid.Column="1"
|
|
Value="{TemplateBinding VerticalOffset}"
|
|
Maximum="{TemplateBinding ScrollableHeight}"
|
|
ViewportSize="{TemplateBinding ViewportHeight}"
|
|
Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" />
|
|
<ScrollBar x:Name="PART_HorizontalScrollBar"
|
|
Grid.Row="1"
|
|
Grid.Column="0"
|
|
Orientation="Horizontal"
|
|
Value="{TemplateBinding HorizontalOffset}"
|
|
Maximum="{TemplateBinding ScrollableWidth}"
|
|
ViewportSize="{TemplateBinding ViewportWidth}"
|
|
Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" />
|
|
<Rectangle Grid.Row="1"
|
|
Grid.Column="1"
|
|
Fill="{TemplateBinding Background}" />
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="{x:Type GridSplitter}" TargetType="{x:Type GridSplitter}">
|
|
<Setter Property="OverridesDefaultStyle" Value="True" />
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
<Setter Property="Background" Value="{DynamicResource GridSplitterBackgroundBrush}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource GridSplitterForegroundBrush}" />
|
|
<Setter Property="MinWidth" Value="5" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type GridSplitter}">
|
|
<Border Background="{TemplateBinding Background}">
|
|
<Border Height="30"
|
|
Width="3"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
BorderThickness="1,0,1,0"
|
|
BorderBrush="{TemplateBinding Foreground}" />
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style TargetType="{x:Type avalonedit:SearchPanel}" BasedOn="{StaticResource {x:Type avalonedit:SearchPanel}}">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type avalonedit:SearchPanel}">
|
|
<Border Background="{DynamicResource WindowBackgroundBrush}"
|
|
BorderBrush="{DynamicResource AccentColorBrush}"
|
|
BorderThickness="1,0,1,1" HorizontalAlignment="Right"
|
|
VerticalAlignment="Top" Cursor="Arrow">
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBox Name="PART_searchTextBox" Focusable="True"
|
|
BorderBrush="{DynamicResource AccentColorBrush}"
|
|
Width="150" Height="Auto" Margin="3,3,3,3">
|
|
<TextBox.Text>
|
|
<Binding Path="SearchPattern"
|
|
RelativeSource="{RelativeSource TemplatedParent}"
|
|
UpdateSourceTrigger="PropertyChanged">
|
|
<Binding.ValidationRules>
|
|
<ExceptionValidationRule />
|
|
</Binding.ValidationRules>
|
|
</Binding>
|
|
</TextBox.Text>
|
|
</TextBox>
|
|
<!-- FindNext button -->
|
|
<!--
|
|
<Button Margin="0,1,1,1" Height="30" Width="30"
|
|
Command="avalon:SearchCommands.FindNext"
|
|
ToolTip="{Binding Localization.FindNextText,
|
|
RelativeSource={RelativeSource TemplatedParent}}"
|
|
Padding="1" BorderThickness="0" BorderBrush="Transparent">
|
|
<Path
|
|
Data="F1M-218.342,2910.79L-234.066,2926.52 -233.954,2926.63 -225.428,2926.63 -210.87,2912.07 -206.495,2907.7 -225.313,2888.88 -234.066,2888.88 -218.342,2904.6 -259.829,2904.6 -259.829,2910.79 -218.342,2910.79z"
|
|
Fill="{DynamicResource ThemeForegroundBrush}"/>
|
|
|
|
</Button>
|
|
-->
|
|
<!-- FindPrevious (set visibility if required) button -->
|
|
<!--
|
|
<Button Margin="1" Height="30" Width="30"
|
|
Command="avalon:SearchCommands.FindPrevious"
|
|
ToolTip="{Binding Localization.FindPreviousText,
|
|
RelativeSource={RelativeSource TemplatedParent}}"
|
|
Padding="1" BorderThickness="0" BorderBrush="Transparent" Visibility="Collapsed">
|
|
<Path
|
|
Data="F1M-185.925,-2026.96L-203.062,-2048.74C-197.485,-2056.51 -197.433,-2067.31 -203.64,-2075.2 -211.167,-2084.76 -225.019,-2086.42 -234.588,-2078.89 -244.154,-2071.36 -245.808,-2057.51 -238.282,-2047.94 -231.986,-2039.95 -221.274,-2037.5 -212.337,-2041.31L-195.262,-2019.61 -185.925,-2026.96z M-231.201,-2053.51C-235.653,-2059.17 -234.674,-2067.36 -229.02,-2071.81 -223.36,-2076.26 -215.169,-2075.29 -210.721,-2069.63 -206.269,-2063.97 -207.245,-2055.78 -212.902,-2051.33 -218.559,-2046.88 -226.752,-2047.86 -231.201,-2053.51z"
|
|
Stretch="Uniform" Fill="{DynamicResource ThemeForegroundBrush}"
|
|
Width="16" Height="16" />
|
|
</Button>-->
|
|
<!--<StackPanel Orientation="Horizontal">
|
|
<ToggleButton Width="36" Height="36" Margin="0" Cursor="Hand"
|
|
ToolTip="{Binding Localization.MatchCaseText, RelativeSource={RelativeSource TemplatedParent}}"
|
|
IsChecked="{Binding MatchCase, RelativeSource={RelativeSource TemplatedParent}}"
|
|
Style="{DynamicResource}"
|
|
Content="aA" FontWeight="Bold"
|
|
FontFamily="Consolas,Courier New,Courier" />
|
|
<ToggleButton Width="36" Height="36" Margin="0" Cursor="Hand"
|
|
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
|
ToolTip="{Binding Localization.MatchWholeWordsText, RelativeSource={RelativeSource TemplatedParent}}"
|
|
IsChecked="{Binding WholeWords, RelativeSource={RelativeSource TemplatedParent}}"
|
|
Content="Ab" FontWeight="Bold"
|
|
FontFamily="Consolas,Courier New,Courier" />
|
|
<ToggleButton Width="36" Height="36" Margin="0" Cursor="Hand"
|
|
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
|
ToolTip="{Binding Localization.UseRegexText, RelativeSource={RelativeSource TemplatedParent}}"
|
|
IsChecked="{Binding UseRegex, RelativeSource={RelativeSource TemplatedParent}}"
|
|
Content="a*" FontWeight="Bold"
|
|
FontFamily="Consolas,Courier New,Courier" />
|
|
</StackPanel>-->
|
|
<!-- Search Panel close button -->
|
|
<Button Height="16" Width="16" HorizontalAlignment="Right" Padding="0"
|
|
Background="Transparent" Cursor="Hand"
|
|
VerticalAlignment="Top" Command="avalonedit:SearchCommands.CloseSearchPanel"
|
|
VerticalContentAlignment="Center" HorizontalContentAlignment="Center">
|
|
<Path
|
|
Data="F1M54.0573,47.8776L38.1771,31.9974 54.0547,16.1198C55.7604,14.4141 55.7604,11.6511 54.0573,9.94531 52.3516,8.23962 49.5859,8.23962 47.8802,9.94531L32.0026,25.8229 16.1224,9.94531C14.4167,8.23962 11.6511,8.23962 9.94794,9.94531 8.24219,11.6511 8.24219,14.4141 9.94794,16.1198L25.8255,32 9.94794,47.8776C8.24219,49.5834 8.24219,52.3477 9.94794,54.0534 11.6511,55.7572 14.4167,55.7585 16.1224,54.0534L32.0026,38.1745 47.8802,54.0534C49.5859,55.7585 52.3516,55.7572 54.0573,54.0534 55.7604,52.3477 55.763,49.5834 54.0573,47.8776z"
|
|
Height="10" Width="10" Stretch="Uniform"
|
|
Fill="{DynamicResource ThemeForegroundBrush}" Margin="0" />
|
|
</Button>
|
|
</StackPanel>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
</ResourceDictionary> |