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,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>
|
||||
Reference in New Issue
Block a user