Files
macOS_IntuneManagement/Themes/Styles.xaml
2021-04-13 17:57:12 +10:00

135 lines
6.2 KiB
XML

<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="LinkButton" TargetType="Button">
<Setter
Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<TextBlock Style="{DynamicResource HoverUnderlineStyle}" HorizontalAlignment="Left"> <!--TextDecorations="Underline" -->
<ContentPresenter />
</TextBlock>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Foreground" Value="Black" />
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Background" Value="{DynamicResource SelectedRowBackgroundColor}" />
</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="Black" />
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Background" Value="{DynamicResource SelectedRowBackgroundColor}" />
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="ListBoxItem">
<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>
<Style TargetType="{x:Type DataGridRow}">
<Style.Resources>
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="{DynamicResource SelectedRowBackgroundColor}" />
<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="{DynamicResource SelectedRowBackgroundColor}" />
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="Black" />
<!--<SolidColorBrush x:Key="{x:Static SystemColors.ControlTextBrushKey}" Color="Yellow" /> -->
</Style.Resources>
<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>
<Style x:Key="Test" TargetType="{x:Type MenuItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type MenuItem}">
<Grid Background="{TemplateBinding Background}">
<TextBlock Title="{TemplateBinding Header}" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>