mirror of
https://github.com/Micke-K/IntuneManagement.git
synced 2026-09-28 19:05:38 +02:00
IntuneManagement 4.0.0-beta1
This commit is contained in:
@@ -0,0 +1,675 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<!-- Color resources -->
|
||||
<SolidColorBrush x:Key="TitleBackgroundColor" Color="#FF1E1E1E"/>
|
||||
<SolidColorBrush x:Key="TitleForegroundColor" Color="#FFCCCCCC"/>
|
||||
<!-- Settings-dialog section headers only. Deliberately NOT TitleBackgroundColor:
|
||||
that brush doubles as the window/modal title-bar background (#FF1E1E1E =
|
||||
WindowBackgroundColor), which made section headers invisible in Dark. -->
|
||||
<SolidColorBrush x:Key="SettingsSectionBackgroundColor" Color="#FF3F3F3F"/>
|
||||
<SolidColorBrush x:Key="TextColor" Color="#FFEEEEEE"/>
|
||||
<SolidColorBrush x:Key="SelectedRowBackgroundColor" Color="#FF555555" />
|
||||
<SolidColorBrush x:Key="MismatchColor" Color="#FFFF7B72"/>
|
||||
|
||||
<!-- Selection highlight, as the SystemColors keys rather than as a settable
|
||||
property: DataGridCell, TreeViewItem and ListBoxItem all bind their selected
|
||||
state to these in their default templates, so a theme that does not override
|
||||
them paints the OS accent no matter what the row style says. These are the
|
||||
values that used to be hardcoded inside each DataGridRow style; they live
|
||||
here now so Light can carry its own. Keep them in step with
|
||||
SelectedRowBackgroundColor and TextColor above. -->
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#FF555555"/>
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="#FFEEEEEE"/>
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="#FF555555"/>
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}" Color="#FFEEEEEE"/>
|
||||
|
||||
<SolidColorBrush x:Key="WindowBackgroundColor" Color="#FF1E1E1E"/>
|
||||
<SolidColorBrush x:Key="PanelBackgroundColor" Color="#FF252526"/>
|
||||
<SolidColorBrush x:Key="ControlBackgroundColor" Color="#FF2D2D2D"/>
|
||||
<SolidColorBrush x:Key="BorderColor" Color="#FF555555"/>
|
||||
<!-- Foreground color for disabled controls. Dim enough to read as "muted /
|
||||
non-interactive" against the dark background. -->
|
||||
<SolidColorBrush x:Key="DisabledForegroundColor" Color="#FF777777"/>
|
||||
|
||||
<SolidColorBrush x:Key="PersonPictureForegroundThemeBrush" Color="#FF888888"/>
|
||||
<SolidColorBrush x:Key="PersonPictureEllipseBadgeForegroundThemeBrush" Color="#FF888888"/>
|
||||
<SolidColorBrush x:Key="PersonPictureEllipseBadgeFillThemeBrush" Color="#FF888888"/>
|
||||
<SolidColorBrush x:Key="PersonPictureEllipseBadgeStrokeThemeBrush" Color="#FF888888"/>
|
||||
<SolidColorBrush x:Key="PersonPictureEllipseFillThemeBrush" Color="#FF888888"/>
|
||||
<x:Double x:Key="PersonPictureEllipseBadgeStrokeOpacity">0.8</x:Double>
|
||||
<x:Double x:Key="PersonPictureEllipseBadgeImageSourceStrokeOpacity">1.0</x:Double>
|
||||
<x:Double x:Key="PersonPictureEllipseStrokeThickness">0</x:Double>
|
||||
<x:Double x:Key="PersonPictureEllipseBadgeStrokeThickness">2</x:Double>
|
||||
|
||||
<!-- System color overrides for menus and hyperlinks -->
|
||||
<Color x:Key="{x:Static SystemColors.HotTrackColorKey}" >#FF6CB3F5</Color>
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.HotTrackBrushKey}" Color="#FF6CB3F5"/>
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.MenuBrushKey}" Color="#FF2D2D2D"/>
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.MenuBarBrushKey}" Color="#FF1E1E1E"/>
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.MenuTextBrushKey}" Color="#FFEEEEEE"/>
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.MenuHighlightBrushKey}" Color="#FF555555"/>
|
||||
|
||||
<!-- Default control styles -->
|
||||
<Style TargetType="{x:Type Window}">
|
||||
<Setter Property="Background" Value="{StaticResource WindowBackgroundColor}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type Label}">
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Background" Value="{StaticResource ControlBackgroundColor}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}"/>
|
||||
<Setter Property="CaretBrush" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="Padding" Value="2,1"/>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type PasswordBox}">
|
||||
<Setter Property="Background" Value="{StaticResource ControlBackgroundColor}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}"/>
|
||||
<Setter Property="CaretBrush" Value="{StaticResource TextColor}"/>
|
||||
</Style>
|
||||
<!-- TreeView / TreeViewItem: WPF ships no themed default for these, so a
|
||||
bare TreeView rendered with the OS colours - a white panel inside the
|
||||
dark window (the ADMX Import category tree). Item selection uses the
|
||||
SystemColors keys because the default TreeViewItem template binds the
|
||||
highlight to them rather than to a settable property. -->
|
||||
<Style TargetType="{x:Type TreeView}">
|
||||
<Setter Property="Background" Value="{StaticResource ControlBackgroundColor}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type TreeViewItem}">
|
||||
<Style.Resources>
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#FF555555"/>
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="#FFEEEEEE"/>
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="#FF555555"/>
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}" Color="#FFEEEEEE"/>
|
||||
</Style.Resources>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="{x:Type ComboBoxItem}">
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="Padding" Value="4,2"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ComboBoxItem}">
|
||||
<Border x:Name="border" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}">
|
||||
<ContentPresenter/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsHighlighted" Value="True">
|
||||
<Setter TargetName="border" Property="Background" Value="{StaticResource SelectedRowBackgroundColor}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Foreground" Value="#FF777777"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type ComboBox}">
|
||||
<Setter Property="Background" Value="{StaticResource ControlBackgroundColor}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="Padding" Value="4,2"/>
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ComboBox}">
|
||||
<Grid x:Name="root">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="20"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border x:Name="mainBorder"
|
||||
Grid.ColumnSpan="2"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"/>
|
||||
<ContentPresenter Grid.Column="0"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
Content="{TemplateBinding SelectionBoxItem}"
|
||||
ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}"
|
||||
ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
|
||||
VerticalAlignment="Center"
|
||||
IsHitTestVisible="False"/>
|
||||
<Path Grid.Column="1"
|
||||
Data="M0,0 L4,4 L8,0"
|
||||
Stroke="{StaticResource TextColor}"
|
||||
StrokeThickness="1.5"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
IsHitTestVisible="False"/>
|
||||
<ToggleButton Grid.ColumnSpan="2"
|
||||
Focusable="False"
|
||||
IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}">
|
||||
<ToggleButton.Style>
|
||||
<Style TargetType="ToggleButton">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ToggleButton">
|
||||
<Border Background="Transparent"/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ToggleButton.Style>
|
||||
</ToggleButton>
|
||||
<Popup x:Name="PART_Popup"
|
||||
Grid.ColumnSpan="2"
|
||||
IsOpen="{TemplateBinding IsDropDownOpen}"
|
||||
Placement="Bottom"
|
||||
AllowsTransparency="True"
|
||||
Focusable="False">
|
||||
<Border Background="{StaticResource ControlBackgroundColor}"
|
||||
BorderBrush="{StaticResource BorderColor}"
|
||||
BorderThickness="1"
|
||||
MaxHeight="{TemplateBinding MaxDropDownHeight}"
|
||||
MinWidth="{Binding ActualWidth, ElementName=root}">
|
||||
<ScrollViewer>
|
||||
<ItemsPresenter/>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
</Popup>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="mainBorder" Property="BorderBrush" Value="{StaticResource TextColor}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsDropDownOpen" Value="True">
|
||||
<Setter TargetName="mainBorder" Property="BorderBrush" Value="{StaticResource TextColor}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type CheckBox}">
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="Background" Value="{StaticResource ControlBackgroundColor}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type CheckBox}">
|
||||
<BulletDecorator Background="Transparent">
|
||||
<BulletDecorator.Bullet>
|
||||
<Border x:Name="checkBorder"
|
||||
Width="13" Height="13"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="1">
|
||||
<Path x:Name="checkMark"
|
||||
Data="M 1,5 L 4,8 L 8,1"
|
||||
Stroke="{StaticResource TextColor}"
|
||||
StrokeThickness="1.5"
|
||||
Visibility="Collapsed"
|
||||
SnapsToDevicePixels="False"/>
|
||||
</Border>
|
||||
</BulletDecorator.Bullet>
|
||||
<ContentPresenter Margin="4,0,0,0" VerticalAlignment="Center" RecognizesAccessKey="True"/>
|
||||
</BulletDecorator>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter TargetName="checkMark" Property="Visibility" Value="Visible"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsChecked" Value="{x:Null}">
|
||||
<Setter TargetName="checkMark" Property="Visibility" Value="Visible"/>
|
||||
<Setter TargetName="checkMark" Property="Opacity" Value="0.5"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="checkBorder" Property="BorderBrush" Value="{StaticResource TextColor}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter TargetName="checkBorder" Property="Opacity" Value="0.5"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type RadioButton}">
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="Background" Value="{StaticResource ControlBackgroundColor}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type RadioButton}">
|
||||
<BulletDecorator Background="Transparent">
|
||||
<BulletDecorator.Bullet>
|
||||
<Border x:Name="outerBorder"
|
||||
Width="13" Height="13"
|
||||
CornerRadius="6.5"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="1">
|
||||
<Ellipse x:Name="checkMark"
|
||||
Width="5" Height="5"
|
||||
Fill="{StaticResource TextColor}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Visibility="Collapsed"/>
|
||||
</Border>
|
||||
</BulletDecorator.Bullet>
|
||||
<ContentPresenter Margin="4,0,0,0" VerticalAlignment="Center" RecognizesAccessKey="True"/>
|
||||
</BulletDecorator>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter TargetName="checkMark" Property="Visibility" Value="Visible"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="outerBorder" Property="BorderBrush" Value="{StaticResource TextColor}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter TargetName="outerBorder" Property="Opacity" Value="0.5"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type Button}">
|
||||
<Setter Property="Background" Value="{StaticResource ControlBackgroundColor}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="Padding" Value="5,2"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Border Name="border"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Padding="{TemplateBinding Padding}">
|
||||
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
RecognizesAccessKey="True"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="border" Property="Background" Value="#FF555555"/>
|
||||
<Setter Property="Foreground" Value="#FFEEEEEE"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter TargetName="border" Property="Background" Value="#FF666666"/>
|
||||
<Setter Property="Foreground" Value="#FFEEEEEE"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter TargetName="border" Property="Opacity" Value="0.5"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type ListBox}">
|
||||
<Setter Property="Background" Value="{StaticResource ControlBackgroundColor}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}"/>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type ListView}">
|
||||
<Setter Property="Background" Value="{StaticResource ControlBackgroundColor}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}"/>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type GridViewColumnHeader}">
|
||||
<Setter Property="Background" Value="{StaticResource PanelBackgroundColor}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}"/>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type Menu}">
|
||||
<Setter Property="Background" Value="{StaticResource WindowBackgroundColor}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type MenuItem}">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="Padding" Value="6,3"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type MenuItem}">
|
||||
<Grid>
|
||||
<Border x:Name="border"
|
||||
Background="{TemplateBinding Background}"
|
||||
Padding="{TemplateBinding Padding}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<!-- MinWidth=18 reserves a consistent left gutter for
|
||||
icons + check marks so all rows in a context menu
|
||||
line up even when only some carry a tick. -->
|
||||
<ColumnDefinition Width="Auto" MinWidth="18"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Grid.Column="0" Margin="0,0,6,0">
|
||||
<ContentPresenter x:Name="iconPresenter"
|
||||
ContentSource="Icon"
|
||||
VerticalAlignment="Center"/>
|
||||
<Path x:Name="checkMark"
|
||||
Data="M 0 4 L 3 7 L 8 1"
|
||||
Stroke="{TemplateBinding Foreground}"
|
||||
StrokeThickness="1.5"
|
||||
Width="10" Height="8"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Center"
|
||||
Visibility="Collapsed"/>
|
||||
</Grid>
|
||||
<ContentPresenter Grid.Column="1"
|
||||
ContentSource="Header"
|
||||
RecognizesAccessKey="True"
|
||||
VerticalAlignment="Center"/>
|
||||
<TextBlock Grid.Column="2"
|
||||
Text="{TemplateBinding InputGestureText}"
|
||||
VerticalAlignment="Center"
|
||||
Margin="12,0,0,0"
|
||||
Opacity="0.7"/>
|
||||
<!-- Arrow column auto-sizes to 0 when arrow Visibility
|
||||
is Collapsed (the default — only Visible on
|
||||
SubmenuHeader items). No right gutter on plain items. -->
|
||||
<Path x:Name="arrow"
|
||||
Grid.Column="3"
|
||||
Data="M 0 0 L 4 3.5 L 0 7 Z"
|
||||
Fill="{StaticResource TextColor}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Margin="8,0,0,0"
|
||||
Visibility="Collapsed"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
<Popup x:Name="PART_Popup"
|
||||
AllowsTransparency="True"
|
||||
Focusable="False"
|
||||
IsOpen="{Binding IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
Placement="Bottom"
|
||||
PopupAnimation="Fade">
|
||||
<Border Background="{StaticResource ControlBackgroundColor}"
|
||||
BorderBrush="{StaticResource BorderColor}"
|
||||
BorderThickness="1"
|
||||
Padding="0,2">
|
||||
<ItemsPresenter/>
|
||||
</Border>
|
||||
</Popup>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="Role" Value="TopLevelHeader">
|
||||
<Setter Property="Padding" Value="8,2"/>
|
||||
</Trigger>
|
||||
<Trigger Property="Role" Value="TopLevelItem">
|
||||
<Setter Property="Padding" Value="8,2"/>
|
||||
</Trigger>
|
||||
<Trigger Property="Role" Value="SubmenuHeader">
|
||||
<Setter TargetName="arrow" Property="Visibility" Value="Visible"/>
|
||||
<Setter TargetName="PART_Popup" Property="Placement" Value="Right"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsHighlighted" Value="True">
|
||||
<Setter TargetName="border" Property="Background" Value="{StaticResource SelectedRowBackgroundColor}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsSubmenuOpen" Value="True">
|
||||
<Setter TargetName="border" Property="Background" Value="{StaticResource SelectedRowBackgroundColor}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Foreground" Value="{StaticResource DisabledForegroundColor}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="Icon" Value="{x:Null}">
|
||||
<Setter TargetName="iconPresenter" Property="Visibility" Value="Collapsed"/>
|
||||
</Trigger>
|
||||
<!-- Show the tick whenever the item is checked; force the icon
|
||||
presenter Collapsed in the same trigger so an item with both
|
||||
an Icon and IsChecked doesn't render them on top of each
|
||||
other. -->
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter TargetName="checkMark" Property="Visibility" Value="Visible"/>
|
||||
<Setter TargetName="iconPresenter" Property="Visibility" Value="Collapsed"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type Separator}">
|
||||
<Setter Property="Background" Value="{StaticResource BorderColor}"/>
|
||||
<Setter Property="Margin" Value="0,2"/>
|
||||
<Setter Property="Height" Value="1"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Separator}">
|
||||
<Rectangle Height="1" Fill="{TemplateBinding Background}"/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="{x:Static MenuItem.SeparatorStyleKey}" TargetType="{x:Type Separator}">
|
||||
<Setter Property="Background" Value="{StaticResource BorderColor}"/>
|
||||
<Setter Property="Margin" Value="6,2"/>
|
||||
<Setter Property="Height" Value="1"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Separator}">
|
||||
<Rectangle Height="1" Fill="{TemplateBinding Background}"/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type ContextMenu}">
|
||||
<Setter Property="Background" Value="{StaticResource ControlBackgroundColor}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}"/>
|
||||
<!-- Replace the default Aero2 template, which bakes in a hardcoded
|
||||
#F1F1F1 icon-gutter Rectangle on the left and renders as a white
|
||||
stripe under dark theme. -->
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ContextMenu}">
|
||||
<Border Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="1"
|
||||
Padding="0,2">
|
||||
<ItemsPresenter Grid.IsSharedSizeScope="True"
|
||||
KeyboardNavigation.DirectionalNavigation="Cycle"/>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type TabControl}">
|
||||
<Setter Property="Background" Value="{StaticResource WindowBackgroundColor}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}"/>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type TabItem}">
|
||||
<Setter Property="Background" Value="{StaticResource PanelBackgroundColor}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}"/>
|
||||
<Setter Property="Padding" Value="8,3"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type TabItem}">
|
||||
<Border Name="border"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="1,1,1,0"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Margin="0,2,2,0">
|
||||
<ContentPresenter ContentSource="Header"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter TargetName="border" Property="Background" Value="#FF3C3C3C"/>
|
||||
<Setter TargetName="border" Property="Margin" Value="0,0,2,-1"/>
|
||||
</Trigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsMouseOver" Value="True"/>
|
||||
<Condition Property="IsSelected" Value="False"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter TargetName="border" Property="Background" Value="#FF3C3C3C"/>
|
||||
</MultiTrigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type DataGrid}">
|
||||
<Setter Property="Background" Value="{StaticResource ControlBackgroundColor}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="RowBackground" Value="{StaticResource ControlBackgroundColor}"/>
|
||||
<Setter Property="AlternatingRowBackground" Value="{StaticResource PanelBackgroundColor}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}"/>
|
||||
<Setter Property="HorizontalGridLinesBrush" Value="{StaticResource BorderColor}"/>
|
||||
<Setter Property="VerticalGridLinesBrush" Value="{StaticResource BorderColor}"/>
|
||||
<Setter Property="RowHeaderWidth" Value="0"/>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type DataGridColumnHeader}">
|
||||
<Setter Property="Background" Value="{StaticResource PanelBackgroundColor}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}"/>
|
||||
<Setter Property="SeparatorBrush" Value="{StaticResource BorderColor}"/>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type DataGridCell}">
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type ScrollViewer}">
|
||||
<Setter Property="Background" Value="{StaticResource WindowBackgroundColor}"/>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type ScrollBar}">
|
||||
<Setter Property="Background" Value="{StaticResource PanelBackgroundColor}"/>
|
||||
<Setter Property="Width" Value="14"/>
|
||||
<Setter Property="MinWidth" Value="14"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ScrollBar}">
|
||||
<Border Background="{TemplateBinding Background}">
|
||||
<Track x:Name="PART_Track" IsDirectionReversed="True">
|
||||
<Track.DecreaseRepeatButton>
|
||||
<RepeatButton Command="ScrollBar.PageUpCommand">
|
||||
<RepeatButton.Template>
|
||||
<ControlTemplate TargetType="RepeatButton">
|
||||
<Border Background="Transparent"/>
|
||||
</ControlTemplate>
|
||||
</RepeatButton.Template>
|
||||
</RepeatButton>
|
||||
</Track.DecreaseRepeatButton>
|
||||
<Track.Thumb>
|
||||
<Thumb>
|
||||
<Thumb.Template>
|
||||
<ControlTemplate TargetType="Thumb">
|
||||
<Border x:Name="tb" Background="#FF555555" CornerRadius="3" Margin="2,0"/>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="tb" Property="Background" Value="#FF666666"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsDragging" Value="True">
|
||||
<Setter TargetName="tb" Property="Background" Value="#FF777777"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Thumb.Template>
|
||||
</Thumb>
|
||||
</Track.Thumb>
|
||||
<Track.IncreaseRepeatButton>
|
||||
<RepeatButton Command="ScrollBar.PageDownCommand">
|
||||
<RepeatButton.Template>
|
||||
<ControlTemplate TargetType="RepeatButton">
|
||||
<Border Background="Transparent"/>
|
||||
</ControlTemplate>
|
||||
</RepeatButton.Template>
|
||||
</RepeatButton>
|
||||
</Track.IncreaseRepeatButton>
|
||||
</Track>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="Orientation" Value="Horizontal">
|
||||
<Setter Property="Height" Value="14"/>
|
||||
<Setter Property="MinHeight" Value="14"/>
|
||||
<Setter Property="Width" Value="Auto"/>
|
||||
<Setter Property="MinWidth" Value="0"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ScrollBar}">
|
||||
<Border Background="{TemplateBinding Background}">
|
||||
<Track x:Name="PART_Track" IsDirectionReversed="False">
|
||||
<Track.DecreaseRepeatButton>
|
||||
<RepeatButton Command="ScrollBar.PageLeftCommand">
|
||||
<RepeatButton.Template>
|
||||
<ControlTemplate TargetType="RepeatButton">
|
||||
<Border Background="Transparent"/>
|
||||
</ControlTemplate>
|
||||
</RepeatButton.Template>
|
||||
</RepeatButton>
|
||||
</Track.DecreaseRepeatButton>
|
||||
<Track.Thumb>
|
||||
<Thumb>
|
||||
<Thumb.Template>
|
||||
<ControlTemplate TargetType="Thumb">
|
||||
<Border x:Name="tb" Background="#FF555555" CornerRadius="3" Margin="0,2"/>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="tb" Property="Background" Value="#FF666666"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsDragging" Value="True">
|
||||
<Setter TargetName="tb" Property="Background" Value="#FF777777"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Thumb.Template>
|
||||
</Thumb>
|
||||
</Track.Thumb>
|
||||
<Track.IncreaseRepeatButton>
|
||||
<RepeatButton Command="ScrollBar.PageRightCommand">
|
||||
<RepeatButton.Template>
|
||||
<ControlTemplate TargetType="RepeatButton">
|
||||
<Border Background="Transparent"/>
|
||||
</ControlTemplate>
|
||||
</RepeatButton.Template>
|
||||
</RepeatButton>
|
||||
</Track.IncreaseRepeatButton>
|
||||
</Track>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type GroupBox}">
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}"/>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type ToolTip}">
|
||||
<Setter Property="Background" Value="{StaticResource ControlBackgroundColor}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}"/>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type Hyperlink}">
|
||||
<Setter Property="Foreground" Value="#FF6CB3F5"/>
|
||||
<Setter Property="TextDecorations" Value="None"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Foreground" Value="#FF9ECBFF"/>
|
||||
<Setter Property="TextDecorations" Value="Underline"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,689 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<!--
|
||||
Light palette, refreshed 2026-08-23 to sit closer to Windows 11.
|
||||
|
||||
Keep these values in step with the Light dictionary in
|
||||
UI/Avalonia/Themes/Brushes.axaml - the two backends are meant to look the
|
||||
same, and the Avalonia file carries the same comments.
|
||||
|
||||
The headline change is TitleBackgroundColor: it was #FF9B9B9B, a heavy
|
||||
mid-grey that read as a Windows 7 toolbar. It cannot simply go white,
|
||||
though - it backs the title strips (MainWindow caption, the Intune
|
||||
Manager panel header, EditScriptDialog) which must stay distinct from the
|
||||
window, so it becomes a light grey rather than disappearing.
|
||||
-->
|
||||
|
||||
<!-- Title strips. Dark text sits on this, so it stays well above mid-grey. -->
|
||||
<SolidColorBrush x:Key="TitleBackgroundColor" Color="#FFECECEC"/>
|
||||
<!-- Settings-dialog section headers. One step darker than the title strip so a
|
||||
header still reads as a header when the two are adjacent; previously both
|
||||
were #FF9B9B9B, which stopped working once the title strip lightened. -->
|
||||
<SolidColorBrush x:Key="SettingsSectionBackgroundColor" Color="#FFE0E0E0"/>
|
||||
<SolidColorBrush x:Key="TitleForegroundColor" Color="#FF1A1A1A"/>
|
||||
<!-- Near-black rather than pure black: matches the Windows 11 text colour and
|
||||
is noticeably less harsh on a white background. -->
|
||||
<SolidColorBrush x:Key="TextColor" Color="#FF1A1A1A"/>
|
||||
<!-- Selection reads as selected rather than merely grey. This is the long-standing
|
||||
Explorer selection tint, so it stays recognisable regardless of accent colour. -->
|
||||
<SolidColorBrush x:Key="SelectedRowBackgroundColor" Color="#FFE5F1FB" />
|
||||
<SolidColorBrush x:Key="MismatchColor" Color="#FFC42B1C"/>
|
||||
|
||||
<!-- Selection highlight, as the SystemColors keys rather than as a settable
|
||||
property: DataGridCell, TreeViewItem and ListBoxItem all bind their selected
|
||||
state to these in their default templates, so a theme that does not override
|
||||
them paints the OS accent no matter what the row style says.
|
||||
|
||||
They belong to the THEME because their whole job is to carry the theme's
|
||||
selection colours. They used to be redefined inside each DataGridRow style
|
||||
(Themes/Styles.xaml plus three window XAML files), hardcoded to the DARK
|
||||
palette, which is how a selected row in Light rendered as a dark grey band
|
||||
with dark text on it - the cell painted #FF555555 while the row's own trigger
|
||||
set the foreground to this theme's near-black TextColor. -->
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#FFE5F1FB"/>
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="#FF1A1A1A"/>
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="#FFE5F1FB"/>
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}" Color="#FF1A1A1A"/>
|
||||
|
||||
<SolidColorBrush x:Key="WindowBackgroundColor" Color="#FFFFFFFF"/>
|
||||
<!-- Panels are a light layer over the white window, not a distinct grey slab. -->
|
||||
<SolidColorBrush x:Key="PanelBackgroundColor" Color="#FFF3F3F3"/>
|
||||
<SolidColorBrush x:Key="ControlBackgroundColor" Color="#FFFFFFFF"/>
|
||||
<!-- Hairline separators; #FFCCCCCC was heavy enough to read as a drawn box. -->
|
||||
<SolidColorBrush x:Key="BorderColor" Color="#FFE1E1E1"/>
|
||||
<!-- Foreground color for disabled controls. Light enough to stay visible against
|
||||
the white window background while reading as "muted / non-interactive". -->
|
||||
<SolidColorBrush x:Key="DisabledForegroundColor" Color="#FF9A9A9A"/>
|
||||
|
||||
<SolidColorBrush x:Key="PersonPictureForegroundThemeBrush" Color="#cccccc"/>
|
||||
<SolidColorBrush x:Key="PersonPictureEllipseBadgeForegroundThemeBrush" Color="#cccccc"/>
|
||||
<SolidColorBrush x:Key="PersonPictureEllipseBadgeFillThemeBrush" Color="#cccccc"/>
|
||||
<SolidColorBrush x:Key="PersonPictureEllipseBadgeStrokeThemeBrush" Color="#cccccc"/>
|
||||
<SolidColorBrush x:Key="PersonPictureEllipseFillThemeBrush" Color="#cccccc"/>
|
||||
<x:Double x:Key="PersonPictureEllipseBadgeStrokeOpacity">0.8</x:Double>
|
||||
<x:Double x:Key="PersonPictureEllipseBadgeImageSourceStrokeOpacity">1.0</x:Double>
|
||||
<x:Double x:Key="PersonPictureEllipseStrokeThickness">0</x:Double>
|
||||
<x:Double x:Key="PersonPictureEllipseBadgeStrokeThickness">2</x:Double>
|
||||
|
||||
<!-- Default control styles -->
|
||||
<Style TargetType="{x:Type Window}">
|
||||
<Setter Property="Background" Value="{StaticResource WindowBackgroundColor}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type Label}">
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Background" Value="{StaticResource ControlBackgroundColor}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}"/>
|
||||
<Setter Property="CaretBrush" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="Padding" Value="2,1"/>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type PasswordBox}">
|
||||
<Setter Property="Background" Value="{StaticResource ControlBackgroundColor}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}"/>
|
||||
<Setter Property="CaretBrush" Value="{StaticResource TextColor}"/>
|
||||
</Style>
|
||||
<!-- TreeView / TreeViewItem: WPF ships no themed default for these, so a
|
||||
bare TreeView rendered with the OS colours - a white panel inside the
|
||||
dark window (the ADMX Import category tree). Item selection uses the
|
||||
SystemColors keys because the default TreeViewItem template binds the
|
||||
highlight to them rather than to a settable property. -->
|
||||
<Style TargetType="{x:Type TreeView}">
|
||||
<Setter Property="Background" Value="{StaticResource ControlBackgroundColor}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type TreeViewItem}">
|
||||
<Style.Resources>
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#FFE5F1FB"/>
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="#FF1A1A1A"/>
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="#FFE5F1FB"/>
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}" Color="#FF1A1A1A"/>
|
||||
</Style.Resources>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="{x:Type ComboBoxItem}">
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="Padding" Value="4,2"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ComboBoxItem}">
|
||||
<Border x:Name="border" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}">
|
||||
<ContentPresenter/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsHighlighted" Value="True">
|
||||
<Setter TargetName="border" Property="Background" Value="{StaticResource SelectedRowBackgroundColor}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Foreground" Value="#FF888888"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type ComboBox}">
|
||||
<Setter Property="Background" Value="{StaticResource ControlBackgroundColor}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="Padding" Value="4,2"/>
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ComboBox}">
|
||||
<Grid x:Name="root">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="20"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border x:Name="mainBorder"
|
||||
Grid.ColumnSpan="2"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"/>
|
||||
<ContentPresenter Grid.Column="0"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
Content="{TemplateBinding SelectionBoxItem}"
|
||||
ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}"
|
||||
ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
|
||||
VerticalAlignment="Center"
|
||||
IsHitTestVisible="False"/>
|
||||
<Path Grid.Column="1"
|
||||
Data="M0,0 L4,4 L8,0"
|
||||
Stroke="{StaticResource TextColor}"
|
||||
StrokeThickness="1.5"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
IsHitTestVisible="False"/>
|
||||
<ToggleButton Grid.ColumnSpan="2"
|
||||
Focusable="False"
|
||||
IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}">
|
||||
<ToggleButton.Style>
|
||||
<Style TargetType="ToggleButton">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ToggleButton">
|
||||
<Border Background="Transparent"/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ToggleButton.Style>
|
||||
</ToggleButton>
|
||||
<Popup x:Name="PART_Popup"
|
||||
Grid.ColumnSpan="2"
|
||||
IsOpen="{TemplateBinding IsDropDownOpen}"
|
||||
Placement="Bottom"
|
||||
AllowsTransparency="True"
|
||||
Focusable="False">
|
||||
<Border Background="{StaticResource ControlBackgroundColor}"
|
||||
BorderBrush="{StaticResource BorderColor}"
|
||||
BorderThickness="1"
|
||||
MaxHeight="{TemplateBinding MaxDropDownHeight}"
|
||||
MinWidth="{Binding ActualWidth, ElementName=root}">
|
||||
<ScrollViewer>
|
||||
<ItemsPresenter/>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
</Popup>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="mainBorder" Property="BorderBrush" Value="{StaticResource TextColor}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsDropDownOpen" Value="True">
|
||||
<Setter TargetName="mainBorder" Property="BorderBrush" Value="{StaticResource TextColor}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type CheckBox}">
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="Background" Value="{StaticResource ControlBackgroundColor}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type CheckBox}">
|
||||
<BulletDecorator Background="Transparent">
|
||||
<BulletDecorator.Bullet>
|
||||
<Border x:Name="checkBorder"
|
||||
Width="13" Height="13"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="1">
|
||||
<Path x:Name="checkMark"
|
||||
Data="M 1,5 L 4,8 L 8,1"
|
||||
Stroke="{StaticResource TextColor}"
|
||||
StrokeThickness="1.5"
|
||||
Visibility="Collapsed"
|
||||
SnapsToDevicePixels="False"/>
|
||||
</Border>
|
||||
</BulletDecorator.Bullet>
|
||||
<ContentPresenter Margin="4,0,0,0" VerticalAlignment="Center" RecognizesAccessKey="True"/>
|
||||
</BulletDecorator>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter TargetName="checkMark" Property="Visibility" Value="Visible"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsChecked" Value="{x:Null}">
|
||||
<Setter TargetName="checkMark" Property="Visibility" Value="Visible"/>
|
||||
<Setter TargetName="checkMark" Property="Opacity" Value="0.5"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="checkBorder" Property="BorderBrush" Value="{StaticResource TextColor}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter TargetName="checkBorder" Property="Opacity" Value="0.5"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type RadioButton}">
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="Background" Value="{StaticResource ControlBackgroundColor}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type RadioButton}">
|
||||
<BulletDecorator Background="Transparent">
|
||||
<BulletDecorator.Bullet>
|
||||
<Border x:Name="outerBorder"
|
||||
Width="13" Height="13"
|
||||
CornerRadius="6.5"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="1">
|
||||
<Ellipse x:Name="checkMark"
|
||||
Width="5" Height="5"
|
||||
Fill="{StaticResource TextColor}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Visibility="Collapsed"/>
|
||||
</Border>
|
||||
</BulletDecorator.Bullet>
|
||||
<ContentPresenter Margin="4,0,0,0" VerticalAlignment="Center" RecognizesAccessKey="True"/>
|
||||
</BulletDecorator>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter TargetName="checkMark" Property="Visibility" Value="Visible"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="outerBorder" Property="BorderBrush" Value="{StaticResource TextColor}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter TargetName="outerBorder" Property="Opacity" Value="0.5"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type Button}">
|
||||
<Setter Property="Background" Value="{StaticResource ControlBackgroundColor}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="Padding" Value="5,2"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Border Name="border"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Padding="{TemplateBinding Padding}">
|
||||
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
RecognizesAccessKey="True"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="border" Property="Background" Value="#FFD0D0D0"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter TargetName="border" Property="Background" Value="#FFBEBEBE"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter TargetName="border" Property="Opacity" Value="0.5"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type ListBox}">
|
||||
<Setter Property="Background" Value="{StaticResource ControlBackgroundColor}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}"/>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type ListView}">
|
||||
<Setter Property="Background" Value="{StaticResource ControlBackgroundColor}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}"/>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type GridViewColumnHeader}">
|
||||
<Setter Property="Background" Value="{StaticResource PanelBackgroundColor}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}"/>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type Menu}">
|
||||
<Setter Property="Background" Value="{StaticResource WindowBackgroundColor}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type MenuItem}">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="Padding" Value="6,3"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type MenuItem}">
|
||||
<Grid>
|
||||
<Border x:Name="border"
|
||||
Background="{TemplateBinding Background}"
|
||||
Padding="{TemplateBinding Padding}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<!-- MinWidth=18 reserves a consistent left gutter for
|
||||
icons + check marks so all rows in a context menu
|
||||
line up even when only some carry a tick. -->
|
||||
<ColumnDefinition Width="Auto" MinWidth="18"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Grid.Column="0" Margin="0,0,6,0">
|
||||
<ContentPresenter x:Name="iconPresenter"
|
||||
ContentSource="Icon"
|
||||
VerticalAlignment="Center"/>
|
||||
<!-- Tick glyph for IsCheckable items. Stroke matches
|
||||
the row Foreground so it picks up disabled colour
|
||||
automatically. -->
|
||||
<Path x:Name="checkMark"
|
||||
Data="M 0 4 L 3 7 L 8 1"
|
||||
Stroke="{TemplateBinding Foreground}"
|
||||
StrokeThickness="1.5"
|
||||
Width="10" Height="8"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Center"
|
||||
Visibility="Collapsed"/>
|
||||
</Grid>
|
||||
<ContentPresenter Grid.Column="1"
|
||||
ContentSource="Header"
|
||||
RecognizesAccessKey="True"
|
||||
VerticalAlignment="Center"/>
|
||||
<TextBlock Grid.Column="2"
|
||||
Text="{TemplateBinding InputGestureText}"
|
||||
VerticalAlignment="Center"
|
||||
Margin="12,0,0,0"
|
||||
Opacity="0.7"/>
|
||||
<Path x:Name="arrow"
|
||||
Grid.Column="3"
|
||||
Data="M 0 0 L 4 3.5 L 0 7 Z"
|
||||
Fill="{StaticResource TextColor}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Margin="8,0,0,0"
|
||||
Visibility="Collapsed"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
<Popup x:Name="PART_Popup"
|
||||
AllowsTransparency="True"
|
||||
Focusable="False"
|
||||
IsOpen="{Binding IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
Placement="Bottom"
|
||||
PopupAnimation="Fade">
|
||||
<Border Background="{StaticResource ControlBackgroundColor}"
|
||||
BorderBrush="{StaticResource BorderColor}"
|
||||
BorderThickness="1"
|
||||
Padding="0,2">
|
||||
<ItemsPresenter/>
|
||||
</Border>
|
||||
</Popup>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="Role" Value="TopLevelHeader">
|
||||
<Setter Property="Padding" Value="8,2"/>
|
||||
</Trigger>
|
||||
<Trigger Property="Role" Value="TopLevelItem">
|
||||
<Setter Property="Padding" Value="8,2"/>
|
||||
</Trigger>
|
||||
<Trigger Property="Role" Value="SubmenuHeader">
|
||||
<Setter TargetName="arrow" Property="Visibility" Value="Visible"/>
|
||||
<Setter TargetName="PART_Popup" Property="Placement" Value="Right"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsHighlighted" Value="True">
|
||||
<Setter TargetName="border" Property="Background" Value="{StaticResource SelectedRowBackgroundColor}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsSubmenuOpen" Value="True">
|
||||
<Setter TargetName="border" Property="Background" Value="{StaticResource SelectedRowBackgroundColor}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Foreground" Value="{StaticResource DisabledForegroundColor}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="Icon" Value="{x:Null}">
|
||||
<Setter TargetName="iconPresenter" Property="Visibility" Value="Collapsed"/>
|
||||
</Trigger>
|
||||
<!-- Show the tick whenever the item is checked. We also force
|
||||
the icon presenter Collapsed in the same trigger so an item
|
||||
with both an Icon and IsChecked doesn't render them on top
|
||||
of each other. -->
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter TargetName="checkMark" Property="Visibility" Value="Visible"/>
|
||||
<Setter TargetName="iconPresenter" Property="Visibility" Value="Collapsed"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type Separator}">
|
||||
<Setter Property="Background" Value="{StaticResource BorderColor}"/>
|
||||
<Setter Property="Margin" Value="0,2"/>
|
||||
<Setter Property="Height" Value="1"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Separator}">
|
||||
<Rectangle Height="1" Fill="{TemplateBinding Background}"/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="{x:Static MenuItem.SeparatorStyleKey}" TargetType="{x:Type Separator}">
|
||||
<Setter Property="Background" Value="{StaticResource BorderColor}"/>
|
||||
<Setter Property="Margin" Value="6,2"/>
|
||||
<Setter Property="Height" Value="1"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Separator}">
|
||||
<Rectangle Height="1" Fill="{TemplateBinding Background}"/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type ContextMenu}">
|
||||
<Setter Property="Background" Value="{StaticResource ControlBackgroundColor}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}"/>
|
||||
<!-- Replace the default Aero2 template to drop the hardcoded
|
||||
#F1F1F1 icon-gutter Rectangle on the left, matching Dark.xaml so
|
||||
both themes render context menus consistently. -->
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ContextMenu}">
|
||||
<Border Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="1"
|
||||
Padding="0,2">
|
||||
<ItemsPresenter Grid.IsSharedSizeScope="True"
|
||||
KeyboardNavigation.DirectionalNavigation="Cycle"/>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type TabControl}">
|
||||
<Setter Property="Background" Value="{StaticResource WindowBackgroundColor}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}"/>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type TabItem}">
|
||||
<Setter Property="Background" Value="{StaticResource PanelBackgroundColor}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}"/>
|
||||
<Setter Property="Padding" Value="8,3"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type TabItem}">
|
||||
<Border Name="border"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="1,1,1,0"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Margin="0,2,2,0">
|
||||
<ContentPresenter ContentSource="Header"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter TargetName="border" Property="Background" Value="{StaticResource ControlBackgroundColor}"/>
|
||||
<Setter TargetName="border" Property="Margin" Value="0,0,2,-1"/>
|
||||
</Trigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsMouseOver" Value="True"/>
|
||||
<Condition Property="IsSelected" Value="False"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter TargetName="border" Property="Background" Value="#FFD0D0D0"/>
|
||||
</MultiTrigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type DataGrid}">
|
||||
<Setter Property="Background" Value="{StaticResource ControlBackgroundColor}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="RowBackground" Value="{StaticResource ControlBackgroundColor}"/>
|
||||
<Setter Property="AlternatingRowBackground" Value="{StaticResource PanelBackgroundColor}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}"/>
|
||||
<Setter Property="HorizontalGridLinesBrush" Value="{StaticResource BorderColor}"/>
|
||||
<Setter Property="VerticalGridLinesBrush" Value="{StaticResource BorderColor}"/>
|
||||
<Setter Property="RowHeaderWidth" Value="0"/>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type DataGridColumnHeader}">
|
||||
<Setter Property="Background" Value="{StaticResource PanelBackgroundColor}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}"/>
|
||||
<Setter Property="SeparatorBrush" Value="{StaticResource BorderColor}"/>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type DataGridCell}">
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type ScrollViewer}">
|
||||
<Setter Property="Background" Value="{StaticResource WindowBackgroundColor}"/>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type ScrollBar}">
|
||||
<Setter Property="Background" Value="{StaticResource PanelBackgroundColor}"/>
|
||||
<Setter Property="Width" Value="14"/>
|
||||
<Setter Property="MinWidth" Value="14"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ScrollBar}">
|
||||
<Border Background="{TemplateBinding Background}">
|
||||
<Track x:Name="PART_Track" IsDirectionReversed="True">
|
||||
<Track.DecreaseRepeatButton>
|
||||
<RepeatButton Command="ScrollBar.PageUpCommand">
|
||||
<RepeatButton.Template>
|
||||
<ControlTemplate TargetType="RepeatButton">
|
||||
<Border Background="Transparent"/>
|
||||
</ControlTemplate>
|
||||
</RepeatButton.Template>
|
||||
</RepeatButton>
|
||||
</Track.DecreaseRepeatButton>
|
||||
<Track.Thumb>
|
||||
<Thumb>
|
||||
<Thumb.Template>
|
||||
<ControlTemplate TargetType="Thumb">
|
||||
<Border x:Name="tb" Background="#FFBBBBBB" CornerRadius="3" Margin="2,0"/>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="tb" Property="Background" Value="#FF999999"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsDragging" Value="True">
|
||||
<Setter TargetName="tb" Property="Background" Value="#FF888888"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Thumb.Template>
|
||||
</Thumb>
|
||||
</Track.Thumb>
|
||||
<Track.IncreaseRepeatButton>
|
||||
<RepeatButton Command="ScrollBar.PageDownCommand">
|
||||
<RepeatButton.Template>
|
||||
<ControlTemplate TargetType="RepeatButton">
|
||||
<Border Background="Transparent"/>
|
||||
</ControlTemplate>
|
||||
</RepeatButton.Template>
|
||||
</RepeatButton>
|
||||
</Track.IncreaseRepeatButton>
|
||||
</Track>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="Orientation" Value="Horizontal">
|
||||
<Setter Property="Height" Value="14"/>
|
||||
<Setter Property="MinHeight" Value="14"/>
|
||||
<Setter Property="Width" Value="Auto"/>
|
||||
<Setter Property="MinWidth" Value="0"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ScrollBar}">
|
||||
<Border Background="{TemplateBinding Background}">
|
||||
<Track x:Name="PART_Track" IsDirectionReversed="False">
|
||||
<Track.DecreaseRepeatButton>
|
||||
<RepeatButton Command="ScrollBar.PageLeftCommand">
|
||||
<RepeatButton.Template>
|
||||
<ControlTemplate TargetType="RepeatButton">
|
||||
<Border Background="Transparent"/>
|
||||
</ControlTemplate>
|
||||
</RepeatButton.Template>
|
||||
</RepeatButton>
|
||||
</Track.DecreaseRepeatButton>
|
||||
<Track.Thumb>
|
||||
<Thumb>
|
||||
<Thumb.Template>
|
||||
<ControlTemplate TargetType="Thumb">
|
||||
<Border x:Name="tb" Background="#FFBBBBBB" CornerRadius="3" Margin="0,2"/>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="tb" Property="Background" Value="#FF999999"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsDragging" Value="True">
|
||||
<Setter TargetName="tb" Property="Background" Value="#FF888888"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Thumb.Template>
|
||||
</Thumb>
|
||||
</Track.Thumb>
|
||||
<Track.IncreaseRepeatButton>
|
||||
<RepeatButton Command="ScrollBar.PageRightCommand">
|
||||
<RepeatButton.Template>
|
||||
<ControlTemplate TargetType="RepeatButton">
|
||||
<Border Background="Transparent"/>
|
||||
</ControlTemplate>
|
||||
</RepeatButton.Template>
|
||||
</RepeatButton>
|
||||
</Track.IncreaseRepeatButton>
|
||||
</Track>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type GroupBox}">
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}"/>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type ToolTip}">
|
||||
<Setter Property="Background" Value="{StaticResource ControlBackgroundColor}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource TextColor}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderColor}"/>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type Hyperlink}">
|
||||
<Setter Property="Foreground" Value="#FF0066CC"/>
|
||||
<Setter Property="TextDecorations" Value="None"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Foreground" Value="#FF004499"/>
|
||||
<Setter Property="TextDecorations" Value="Underline"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,179 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<Style x:Key="InfoIcon" TargetType="{x:Type Rectangle}">
|
||||
<Setter Property="Width" Value="12"/>
|
||||
<Setter Property="Height" Value="12"/>
|
||||
<Setter Property="Fill">
|
||||
<Setter.Value>
|
||||
<DrawingBrush>
|
||||
<DrawingBrush.Drawing>
|
||||
<DrawingGroup>
|
||||
<DrawingGroup.Children>
|
||||
<GeometryDrawing Brush="#FFF6F6F6" Geometry="F1M4,7.5C4,5.015 6.015,3 8.5,3 10.985,3 13,5.015 13,7.5 13,9.985 10.985,12 8.5,12 6.015,12 4,9.985 4,7.5" />
|
||||
<GeometryDrawing Brush="#FF414141" Geometry="F1M9,6L8,6 8,5 9,5z M9,10L8,10 8,7 9,7z M8.5,4C6.567,4 5,5.567 5,7.5 5,9.433 6.567,11 8.5,11 10.433,11 12,9.433 12,7.5 12,5.567 10.433,4 8.5,4" />
|
||||
<GeometryDrawing Brush="#FFF0EFF1" Geometry="F1M8,6L9,6 9,5 8,5z M8,10L9,10 9,7 8,7z" />
|
||||
</DrawingGroup.Children>
|
||||
</DrawingGroup>
|
||||
</DrawingBrush.Drawing>
|
||||
</DrawingBrush>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="HoverUnderlineStyle" TargetType="TextBlock">
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="TextBlock.TextDecorations" Value="Underline" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="HoverUnderlineStyleWithBackground" TargetType="TextBlock">
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="TextBlock.TextDecorations" Value="Underline" />
|
||||
<Setter Property="TextBlock.Background" Value="LightGray" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key='ErrorControl' TargetType='ContentControl'>
|
||||
<Setter Property='Template'>
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType='ContentControl'>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Rectangle Width="16" Height="16" ToolTip="{Binding ToolTip}" Name="errorIcon" Visibility="Collapsed">
|
||||
<Rectangle.Fill>
|
||||
<DrawingBrush>
|
||||
<DrawingBrush.Drawing>
|
||||
<DrawingGroup>
|
||||
<DrawingGroup.Children>
|
||||
<GeometryDrawing Brush="#00FFFFFF" Geometry="F1M16,16L0,16 0,0 16,0z" />
|
||||
<GeometryDrawing Brush="#FFF6F6F6" Geometry="F1M8,16C3.589,16 0,12.411 0,8 0,3.589 3.589,0 8,0 12.411,0 16,3.589 16,8 16,12.411 12.411,16 8,16" />
|
||||
<GeometryDrawing Brush="#FFE41400" Geometry="F1M9,10L7,10 7,3 9,3z M9,13L7,13 7,11 9,11z M8,1C4.134,1 1,4.134 1,8 1,11.865 4.134,15 8,15 11.865,15 15,11.865 15,8 15,4.134 11.865,1 8,1" />
|
||||
<GeometryDrawing Brush="#FFEFEFF0" Geometry="F1M9,11L7,11 7,13 9,13z M9,10L7,10 7,3 9,3z" />
|
||||
</DrawingGroup.Children>
|
||||
</DrawingGroup>
|
||||
</DrawingBrush.Drawing>
|
||||
</DrawingBrush>
|
||||
</Rectangle.Fill>
|
||||
</Rectangle>
|
||||
<ContentPresenter Grid.Column="1" Name="errorControl" />
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<DataTrigger Binding="{Binding RelativeSource={RelativeSource self},Path=Tag}" Value="True">
|
||||
<Setter TargetName="errorIcon" Property="Visibility" Value="Visible" />
|
||||
</DataTrigger>
|
||||
</ControlTemplate.Triggers>
|
||||
<ControlTemplate.Resources>
|
||||
<Style TargetType="TextBox">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Path=Tag, RelativeSource={RelativeSource AncestorType={x:Type ContentControl}}}" Value="True">
|
||||
<Setter Property="Border.BorderBrush" Value="Red" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ControlTemplate.Resources>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ErrorBorder" TargetType="Control">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding HasErrors}" Value="True">
|
||||
<Setter Property="Border.BorderBrush" Value="Red"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="LinkButton" TargetType="Button">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<TextBlock Style="{DynamicResource HoverUnderlineStyle}" HorizontalAlignment="Left">
|
||||
<ContentPresenter />
|
||||
</TextBlock>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextColor}" />
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter Property="Background" Value="{DynamicResource SelectedRowBackgroundColor}" />
|
||||
</Trigger>
|
||||
<!-- Visually gray-out when the button is disabled; the default
|
||||
IsEnabled=False handling on Button doesn't propagate to the
|
||||
templated TextBlock, so the text color has to be set explicitly.
|
||||
Uses the per-theme DisabledForegroundColor so it reads correctly
|
||||
in both Default (light) and Dark themes. -->
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Foreground" Value="{DynamicResource DisabledForegroundColor}" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="Cursor" Value="Arrow" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ContentButton" TargetType="Button">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<ContentPresenter />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextColor}" />
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter Property="Background" Value="{DynamicResource SelectedRowBackgroundColor}" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextColor}"/>
|
||||
<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 SelectedRowBackgroundColor}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="UIElement.IsMouseOver" Value="True">
|
||||
<Setter Property="Panel.Background" TargetName="Border" Value="{DynamicResource SelectedRowBackgroundColor}"/>
|
||||
<Setter Property="Border.BorderBrush" TargetName="Border" Value="{DynamicResource SelectedRowBackgroundColor}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- The selection highlight brushes this style used to redefine now live in the
|
||||
theme dictionaries (Themes/Light.xaml, Themes/Dark.xaml). They were hardcoded
|
||||
to the dark palette here, so a selected row in the Light theme painted a dark
|
||||
grey cell background under this style's near-black Foreground. This file is
|
||||
shared by both themes and cannot hold a colour. -->
|
||||
<Style TargetType="{x:Type DataGridRow}">
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="{DynamicResource SelectedRowBackgroundColor}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextColor}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter Property="Background" Value="{DynamicResource SelectedRowBackgroundColor}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextColor}" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user