Merge pull request #462 from irihitech/shadow

Add `BoxShadows` Tokens to Palette and Fix Related Issues
This commit is contained in:
Dong Bin 2024-11-15 13:49:18 +08:00 committed by GitHub
commit b6e458b81c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
35 changed files with 647 additions and 371 deletions

View File

@ -6,15 +6,15 @@
x:CompileBindings="True"
x:DataType="viewModels:FunctionalColorGroupViewModel">
<ControlTheme x:Key="{x:Type controls:FunctionalColorGroupControl}" TargetType="controls:FunctionalColorGroupControl">
<Setter Property="controls:FunctionalColorGroupControl.Template">
<ControlTemplate x:DataType="viewModels:FunctionalColorGroupViewModel" TargetType="controls:FunctionalColorGroupControl">
<Setter Property="Template">
<ControlTemplate TargetType="controls:FunctionalColorGroupControl">
<Grid RowDefinitions="Auto, *">
<TextBlock
<SelectableTextBlock
Grid.Row="0"
Margin="0,16,0,0"
Classes="H3"
Text="{TemplateBinding Title}"
Theme="{DynamicResource TitleTextBlock}" />
Theme="{DynamicResource TitleSelectableTextBlock}" />
<TabControl Grid.Row="1">
<TabItem Header="Light">
<DataGrid IsReadOnly="True" ItemsSource="{TemplateBinding LightColors}">
@ -129,4 +129,4 @@
</ControlTemplate>
</Setter>
</ControlTheme>
</ResourceDictionary>
</ResourceDictionary>

View File

@ -4,33 +4,38 @@ using Avalonia.Controls.Primitives;
namespace Semi.Avalonia.Demo.Controls;
public class FunctionalColorGroupControl: TemplatedControl
public class FunctionalColorGroupControl : TemplatedControl
{
public static readonly StyledProperty<string?> TitleProperty = AvaloniaProperty.Register<FunctionalColorGroupControl, string?>(
nameof(Title));
public static readonly StyledProperty<string?> TitleProperty =
AvaloniaProperty.Register<FunctionalColorGroupControl, string?>(nameof(Title));
public string? Title
{
get => GetValue(TitleProperty);
set => SetValue(TitleProperty, value);
}
public static readonly DirectProperty<FunctionalColorGroupControl, IEnumerable?> LightColorsProperty = AvaloniaProperty.RegisterDirect<FunctionalColorGroupControl, IEnumerable?>(
nameof(LightColors), o => o.LightColors, (o, v) => o.LightColors = v);
public static readonly DirectProperty<FunctionalColorGroupControl, IEnumerable?> LightColorsProperty =
AvaloniaProperty.RegisterDirect<FunctionalColorGroupControl, IEnumerable?>(nameof(LightColors),
o => o.LightColors, (o, v) => o.LightColors = v);
private IEnumerable? _lightColors;
public IEnumerable? LightColors
{
get => _lightColors;
set => SetAndRaise(LightColorsProperty, ref _lightColors, value);
}
public static readonly DirectProperty<FunctionalColorGroupControl, IEnumerable?> DarkColorsProperty = AvaloniaProperty.RegisterDirect<FunctionalColorGroupControl, IEnumerable?>(
nameof(DarkColors), o => o.DarkColors, (o, v) => o.DarkColors = v);
public static readonly DirectProperty<FunctionalColorGroupControl, IEnumerable?> DarkColorsProperty =
AvaloniaProperty.RegisterDirect<FunctionalColorGroupControl, IEnumerable?>(nameof(DarkColors),
o => o.DarkColors, (o, v) => o.DarkColors = v);
private IEnumerable? _darkColors;
public IEnumerable? DarkColors
{
get => _darkColors;
set => SetAndRaise(DarkColorsProperty, ref _darkColors, value);
}
}

View File

@ -0,0 +1,88 @@
<ResourceDictionary
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:Semi.Avalonia.Demo.Controls"
xmlns:viewModels="clr-namespace:Semi.Avalonia.Demo.ViewModels"
x:CompileBindings="True"
x:DataType="viewModels:ShadowGroupViewModel">
<ControlTheme x:Key="{x:Type controls:ShadowGroupControl}" TargetType="controls:ShadowGroupControl">
<Setter Property="Template">
<ControlTemplate TargetType="controls:ShadowGroupControl">
<Grid RowDefinitions="Auto, *">
<SelectableTextBlock
Grid.Row="0"
Margin="0,16,0,0"
Classes="H3"
Text="{TemplateBinding Title}"
Theme="{DynamicResource TitleSelectableTextBlock}" />
<TabControl Grid.Row="1">
<TabItem Header="Light">
<DataGrid IsReadOnly="True" ItemsSource="{TemplateBinding LightShadows}">
<DataGrid.Columns>
<DataGridTemplateColumn Width="*" Header="ResourceKey">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate DataType="viewModels:ShadowItemViewModel">
<SelectableTextBlock
Margin="12,0,12,0"
VerticalAlignment="Center"
Text="{Binding ResourceKey}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn
Width="*"
x:DataType="viewModels:ShadowItemViewModel"
Binding="{Binding ShadowDisplayName}"
CanUserSort="False"
Header="Name" />
<DataGridTemplateColumn Width="300" Header="BoxShadows">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate DataType="viewModels:ShadowItemViewModel">
<SelectableTextBlock
Margin="12,0,12,0"
VerticalAlignment="Center"
Text="{Binding BoxShadowValue}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</TabItem>
<TabItem Header="Dark">
<DataGrid IsReadOnly="True" ItemsSource="{TemplateBinding DarkShadows}">
<DataGrid.Columns>
<DataGridTemplateColumn Width="*" Header="ResourceKey">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate DataType="viewModels:ShadowItemViewModel">
<SelectableTextBlock
Margin="12,0,12,0"
VerticalAlignment="Center"
Text="{Binding ResourceKey}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn
Width="*"
x:DataType="viewModels:ShadowItemViewModel"
Binding="{Binding ShadowDisplayName}"
CanUserSort="False"
Header="Name" />
<DataGridTemplateColumn Width="300" Header="BoxShadows">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate DataType="viewModels:ShadowItemViewModel">
<SelectableTextBlock
Margin="12,0,12,0"
VerticalAlignment="Center"
Text="{Binding BoxShadowValue}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</TabItem>
</TabControl>
</Grid>
</ControlTemplate>
</Setter>
</ControlTheme>
</ResourceDictionary>

View File

@ -0,0 +1,41 @@
using System.Collections;
using Avalonia;
using Avalonia.Controls.Primitives;
namespace Semi.Avalonia.Demo.Controls;
public class ShadowGroupControl : TemplatedControl
{
public static readonly StyledProperty<string?> TitleProperty =
AvaloniaProperty.Register<ShadowGroupControl, string?>(nameof(Title));
public string? Title
{
get => GetValue(TitleProperty);
set => SetValue(TitleProperty, value);
}
private IEnumerable? _lightShadows;
public static readonly DirectProperty<ShadowGroupControl, IEnumerable?> LightShadowsProperty =
AvaloniaProperty.RegisterDirect<ShadowGroupControl, IEnumerable?>(nameof(LightShadows),
o => o.LightShadows, (o, v) => o.LightShadows = v);
public IEnumerable? LightShadows
{
get => _lightShadows;
set => SetAndRaise(LightShadowsProperty, ref _lightShadows, value);
}
private IEnumerable? _darkShadows;
public static readonly DirectProperty<ShadowGroupControl, IEnumerable?> DarkShadowsProperty =
AvaloniaProperty.RegisterDirect<ShadowGroupControl, IEnumerable?>(nameof(DarkShadows),
o => o.DarkShadows, (o, v) => o.DarkShadows = v);
public IEnumerable? DarkShadows
{
get => _darkShadows;
set => SetAndRaise(DarkShadowsProperty, ref _darkShadows, value);
}
}

View File

@ -21,6 +21,7 @@
<ResourceInclude Source="../Controls/ColorItemControl.axaml" />
<ResourceInclude Source="../Controls/ColorDetailControl.axaml" />
<ResourceInclude Source="../Controls/FunctionalColorGroupControl.axaml" />
<ResourceInclude Source="../Controls/ShadowGroupControl.axaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
@ -115,7 +116,6 @@
<ItemsControl ItemsSource="{Binding FunctionalColors}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<!-- -->
<controls:FunctionalColorGroupControl
Title="{Binding Title}"
DarkColors="{Binding DarkColors}"
@ -123,8 +123,20 @@
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<ItemsControl ItemsSource="{Binding Shadows}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<controls:ShadowGroupControl
Title="{Binding Title}"
DarkShadows="{Binding DarkShadows}"
LightShadows="{Binding LightShadows}" />
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</ScrollViewer>
</SplitView.Content>
</SplitView>
</UserControl>
</UserControl>

View File

@ -2,25 +2,25 @@ using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using Avalonia.Media;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Messaging;
namespace Semi.Avalonia.Demo.ViewModels;
public class PaletteDemoViewModel: ObservableObject
public class PaletteDemoViewModel : ObservableObject
{
private readonly string[] _predefinedColorNames =
{
[
"Red", "Pink", "Purple", "Violet", "Indigo",
"Blue", "LightBlue", "Cyan", "Teal", "Green",
"LightGreen", "Lime", "Yellow", "Amber", "Orange",
"Grey"
};
];
private readonly IResourceDictionary? _lightResourceDictionary;
private readonly IResourceDictionary? _darkResourceDictionary;
private ColorItemViewModel _selectedColor = null!;
public ColorItemViewModel SelectedColor
@ -28,26 +28,30 @@ public class PaletteDemoViewModel: ObservableObject
get => _selectedColor;
set => SetProperty(ref _selectedColor, value);
}
private ObservableCollection<ColorListViewModel>? _lightLists;
public ObservableCollection<ColorListViewModel>? LightLists
{
get => _lightLists;
set => SetProperty(ref _lightLists, value);
}
private ObservableCollection<ColorListViewModel>? _darkLists;
public ObservableCollection<ColorListViewModel>? DarkLists
{
get => _darkLists;
set => SetProperty(ref _darkLists, value);
}
public ObservableCollection<FunctionalColorGroupViewModel> FunctionalColors { get; set; } = new();
public ObservableCollection<FunctionalColorGroupViewModel> FunctionalColors { get; set; } = [];
public ObservableCollection<ShadowGroupViewModel> Shadows { get; set; } = [];
public PaletteDemoViewModel()
{
_lightResourceDictionary = new Light.Palette();
_lightResourceDictionary = new Light.Palette();
_darkResourceDictionary = new Dark.Palette();
WeakReferenceMessenger.Default.Register<PaletteDemoViewModel, ColorItemViewModel>(this, OnClickColorItem);
}
@ -56,18 +60,20 @@ public class PaletteDemoViewModel: ObservableObject
{
InitializePalette();
InitializeFunctionalColors();
InitializeShadows();
}
private void InitializePalette()
{
LightLists = new ObservableCollection<ColorListViewModel>();
LightLists = [];
foreach (var color in _predefinedColorNames)
{
ColorListViewModel s = new ColorListViewModel();
s.Initialize(_lightResourceDictionary, color, true);
LightLists.Add(s);
}
DarkLists = new ObservableCollection<ColorListViewModel>();
DarkLists = [];
foreach (var color in _predefinedColorNames)
{
ColorListViewModel s = new ColorListViewModel();
@ -92,13 +98,19 @@ public class PaletteDemoViewModel: ObservableObject
FunctionalColors.Add(new FunctionalColorGroupViewModel("Border", _lightResourceDictionary, _darkResourceDictionary, ColorTokens.BorderTokens));
FunctionalColors.Add(new FunctionalColorGroupViewModel("Disabled", _lightResourceDictionary, _darkResourceDictionary, ColorTokens.DisabledTokens));
}
private void InitializeShadows()
{
Shadows.Add(new ShadowGroupViewModel("Shadow", _lightResourceDictionary, _darkResourceDictionary, ColorTokens.ShadowTokens));
}
private void OnClickColorItem(PaletteDemoViewModel vm, ColorItemViewModel item)
{
SelectedColor = item;
}
}
public class ColorListViewModel: ObservableObject
public class ColorListViewModel : ObservableObject
{
private ObservableCollection<ColorItemViewModel>? _colors;
@ -115,17 +127,18 @@ public class ColorListViewModel: ObservableObject
get => _seriesName;
set => SetProperty(ref _seriesName, value);
}
internal void Initialize(IResourceDictionary? resourceDictionary, string color, bool light)
{
if (resourceDictionary is null)
{
return;
}
SeriesName = color;
Color = new ObservableCollection<ColorItemViewModel>();
for (int i = 0; i < 10; i++)
Color = [];
for (var i = 0; i < 10; i++)
{
var key = "Semi" + color + i;
if (resourceDictionary.TryGetValue(key, out var value))
@ -136,7 +149,7 @@ public class ColorListViewModel: ObservableObject
var item = new ColorItemViewModel(name, brush, key, light, i);
item.ColorResourceKey = item.ResourceKey + "Color";
Color.Add(item);
}
}
}
}
}
@ -144,15 +157,16 @@ public class ColorListViewModel: ObservableObject
public class ColorItemViewModel : ObservableObject
{
private IBrush _brush = null!;
public IBrush Brush
{
get => _brush;
set => SetProperty(ref _brush, value);
}
private IBrush _textBrush = null!;
public IBrush TextBrush
{
get => _textBrush;
@ -160,6 +174,7 @@ public class ColorItemViewModel : ObservableObject
}
private string _colorDisplayName = null!;
public string ColorDisplayName
{
get => _colorDisplayName;
@ -189,8 +204,9 @@ public class ColorItemViewModel : ObservableObject
get => _hex;
set => SetProperty(ref _hex, value);
}
public ColorItemViewModel(string colorDisplayName, ISolidColorBrush brush, string resourceKey, bool light, int index)
public ColorItemViewModel(string colorDisplayName, ISolidColorBrush brush, string resourceKey, bool light,
int index)
{
ColorDisplayName = colorDisplayName;
Brush = brush;
@ -210,22 +226,22 @@ public class ColorItemViewModel : ObservableObject
public class FunctionalColorGroupViewModel : ObservableObject
{
private string _title = null!;
public string Title
{
get => _title;
set => SetProperty(ref _title, value);
}
public ObservableCollection<ColorItemViewModel> LightColors { get; set; } = new();
public ObservableCollection<ColorItemViewModel> DarkColors { get; set; } = new();
public ObservableCollection<ColorItemViewModel> LightColors { get; set; } = [];
public ObservableCollection<ColorItemViewModel> DarkColors { get; set; } = [];
public FunctionalColorGroupViewModel(string title, IResourceDictionary? lightDictionary, IResourceDictionary? darkDictionary, IReadOnlyList<Tuple<string, string>> tokens)
public FunctionalColorGroupViewModel(string title, IResourceDictionary? lightDictionary,
IResourceDictionary? darkDictionary, IReadOnlyList<Tuple<string, string>> tokens)
{
Title = title;
foreach (var token in tokens)
foreach (var (key, name) in tokens)
{
string key = token.Item1;
string name = token.Item2;
if (lightDictionary?.TryGetValue(key, out var lightValue) ?? false)
{
if (lightValue is ISolidColorBrush lightBrush)
@ -245,125 +261,203 @@ public class FunctionalColorGroupViewModel : ObservableObject
}
}
public class ShadowItemViewModel : ObservableObject
{
private string _shadowDisplayName = null!;
public string ShadowDisplayName
{
get => _shadowDisplayName;
set => SetProperty(ref _shadowDisplayName, value);
}
private string _resourceKey = null!;
public string ResourceKey
{
get => _resourceKey;
set => SetProperty(ref _resourceKey, value);
}
private string _boxShadowValue = null!;
public string BoxShadowValue
{
get => _boxShadowValue;
set => SetProperty(ref _boxShadowValue, value);
}
public ShadowItemViewModel(string shadowDisplayName, BoxShadows boxShadows, string resourceKey)
{
ShadowDisplayName = shadowDisplayName;
ResourceKey = resourceKey;
BoxShadowValue = boxShadows.ToString();
}
}
public class ShadowGroupViewModel : ObservableObject
{
private string _title = null!;
public string Title
{
get => _title;
set => SetProperty(ref _title, value);
}
public ObservableCollection<ShadowItemViewModel> LightShadows { get; set; } = [];
public ObservableCollection<ShadowItemViewModel> DarkShadows { get; set; } = [];
public ShadowGroupViewModel(string title, IResourceDictionary? lightDictionary,
IResourceDictionary? darkDictionary, IReadOnlyList<Tuple<string, string>> tokens)
{
Title = title;
foreach (var (key, name) in tokens)
{
if (lightDictionary?.TryGetValue(key, out var lightValue) ?? false)
{
if (lightValue is BoxShadows lightShadow)
{
LightShadows.Add(new ShadowItemViewModel(name, lightShadow, key));
}
}
if (darkDictionary?.TryGetValue(key, out var darkValue) ?? false)
{
if (darkValue is BoxShadows darkShadow)
{
DarkShadows.Add(new ShadowItemViewModel(name, darkShadow, key));
}
}
}
}
}
public static class ColorTokens
{
public static IReadOnlyList<Tuple<string, string>> PrimaryTokens { get; } = new List<Tuple<string, string>>
{
new ("SemiColorPrimary", "Primary"),
new ("SemiColorPrimaryPointerover", "Primary Pointerover"),
new ("SemiColorPrimaryActive", "Primary Active"),
new ("SemiColorPrimaryDisabled", "Primary Disabled"),
new ("SemiColorPrimaryLight", "Primary Light"),
new ("SemiColorPrimaryLightPointerover", "Primary Light Pointerover"),
new ("SemiColorPrimaryLightActive", "Primary Light Active"),
new("SemiColorPrimary", "Primary"),
new("SemiColorPrimaryPointerover", "Primary Pointerover"),
new("SemiColorPrimaryActive", "Primary Active"),
new("SemiColorPrimaryDisabled", "Primary Disabled"),
new("SemiColorPrimaryLight", "Primary Light"),
new("SemiColorPrimaryLightPointerover", "Primary Light Pointerover"),
new("SemiColorPrimaryLightActive", "Primary Light Active"),
};
public static IReadOnlyList<Tuple<string, string>> SecondaryTokens { get; } = new List<Tuple<string, string>>
{
new ("SemiColorSecondary", "Secondary"),
new ("SemiColorSecondaryPointerover", "Secondary Pointerover"),
new ("SemiColorSecondaryActive", "Secondary Active"),
new ("SemiColorSecondaryDisabled", "Secondary Disabled"),
new ("SemiColorSecondaryLight", "Secondary Light"),
new ("SemiColorSecondaryLightPointerover", "Secondary Light Pointerover"),
new ("SemiColorSecondaryLightActive", "Secondary Light Active"),
new("SemiColorSecondary", "Secondary"),
new("SemiColorSecondaryPointerover", "Secondary Pointerover"),
new("SemiColorSecondaryActive", "Secondary Active"),
new("SemiColorSecondaryDisabled", "Secondary Disabled"),
new("SemiColorSecondaryLight", "Secondary Light"),
new("SemiColorSecondaryLightPointerover", "Secondary Light Pointerover"),
new("SemiColorSecondaryLightActive", "Secondary Light Active"),
};
public static IReadOnlyList<Tuple<string, string>> TertiaryTokens { get; } = new List<Tuple<string, string>>
{
new ("SemiColorTertiary", "Tertiary"),
new ("SemiColorTertiaryPointerover", "Tertiary Pointerover"),
new ("SemiColorTertiaryActive", "Tertiary Active"),
new ("SemiColorTertiaryLight", "Tertiary Light"),
new ("SemiColorTertiaryLightPointerover", "Tertiary Light Pointerover"),
new ("SemiColorTertiaryLightActive", "Tertiary Light Active"),
new("SemiColorTertiary", "Tertiary"),
new("SemiColorTertiaryPointerover", "Tertiary Pointerover"),
new("SemiColorTertiaryActive", "Tertiary Active"),
new("SemiColorTertiaryLight", "Tertiary Light"),
new("SemiColorTertiaryLightPointerover", "Tertiary Light Pointerover"),
new("SemiColorTertiaryLightActive", "Tertiary Light Active"),
};
public static IReadOnlyList<Tuple<string, string>> InformationTokens { get; } = new List<Tuple<string, string>>
{
new ("SemiColorInformation", "Information"),
new ("SemiColorInformationPointerover", "Information Pointerover"),
new ("SemiColorInformationActive", "Information Active"),
new ("SemiColorInformationDisabled", "Information Disabled"),
new ("SemiColorInformationLight", "Information Light"),
new ("SemiColorInformationLightPointerover", "Information Light Pointerover"),
new ("SemiColorInformationLightActive", "Information Light Active"),
new("SemiColorInformation", "Information"),
new("SemiColorInformationPointerover", "Information Pointerover"),
new("SemiColorInformationActive", "Information Active"),
new("SemiColorInformationDisabled", "Information Disabled"),
new("SemiColorInformationLight", "Information Light"),
new("SemiColorInformationLightPointerover", "Information Light Pointerover"),
new("SemiColorInformationLightActive", "Information Light Active"),
};
public static IReadOnlyList<Tuple<string, string>> SuccessTokens { get; } = new List<Tuple<string, string>>
{
new ("SemiColorSuccess", "Success"),
new ("SemiColorSuccessPointerover", "Success Pointerover"),
new ("SemiColorSuccessActive", "Success Active"),
new ("SemiColorSuccessDisabled", "Success Disabled"),
new ("SemiColorSuccessLight", "Success Light"),
new ("SemiColorSuccessLightPointerover", "Success Light Pointerover"),
new ("SemiColorSuccessLightActive", "Success Light Active"),
new("SemiColorSuccess", "Success"),
new("SemiColorSuccessPointerover", "Success Pointerover"),
new("SemiColorSuccessActive", "Success Active"),
new("SemiColorSuccessDisabled", "Success Disabled"),
new("SemiColorSuccessLight", "Success Light"),
new("SemiColorSuccessLightPointerover", "Success Light Pointerover"),
new("SemiColorSuccessLightActive", "Success Light Active"),
};
public static IReadOnlyList<Tuple<string, string>> WarningTokens { get; } = new List<Tuple<string, string>>
{
new ("SemiColorWarning", "Warning"),
new ("SemiColorWarningPointerover", "Warning Pointerover"),
new ("SemiColorWarningActive", "Warning Active"),
new ("SemiColorWarningLight", "Warning Light"),
new ("SemiColorWarningLightPointerover", "Warning Light Pointerover"),
new ("SemiColorWarningLightActive", "Warning Light Active"),
new("SemiColorWarning", "Warning"),
new("SemiColorWarningPointerover", "Warning Pointerover"),
new("SemiColorWarningActive", "Warning Active"),
new("SemiColorWarningLight", "Warning Light"),
new("SemiColorWarningLightPointerover", "Warning Light Pointerover"),
new("SemiColorWarningLightActive", "Warning Light Active"),
};
public static IReadOnlyList<Tuple<string, string>> DangerTokens { get; } = new List<Tuple<string, string>>
{
new ("SemiColorDanger", "Danger"),
new ("SemiColorDangerPointerover", "Danger Pointerover"),
new ("SemiColorDangerActive", "Danger Active"),
new ("SemiColorDangerLight", "Danger Light"),
new ("SemiColorDangerLightPointerover", "Danger Light Pointerover"),
new ("SemiColorDangerLightActive", "Danger Light Active"),
new("SemiColorDanger", "Danger"),
new("SemiColorDangerPointerover", "Danger Pointerover"),
new("SemiColorDangerActive", "Danger Active"),
new("SemiColorDangerLight", "Danger Light"),
new("SemiColorDangerLightPointerover", "Danger Light Pointerover"),
new("SemiColorDangerLightActive", "Danger Light Active"),
};
public static IReadOnlyList<Tuple<string, string>> TextTokens { get; } = new List<Tuple<string, string>>
{
new ("SemiColorText0", "Text 0"),
new ("SemiColorText1", "Text 1"),
new ("SemiColorText2", "Text 2"),
new ("SemiColorText3", "Text 3"),
new("SemiColorText0", "Text 0"),
new("SemiColorText1", "Text 1"),
new("SemiColorText2", "Text 2"),
new("SemiColorText3", "Text 3"),
};
public static IReadOnlyList<Tuple<string, string>> LinkTokens { get; } = new List<Tuple<string, string>>
{
new ("SemiColorLink", "Link"),
new ("SemiColorLinkPointerover", "Link Pointerover"),
new ("SemiColorLinkActive", "Link Active"),
new ("SemiColorLinkVisited", "Link Visited"),
new("SemiColorLink", "Link"),
new("SemiColorLinkPointerover", "Link Pointerover"),
new("SemiColorLinkActive", "Link Active"),
new("SemiColorLinkVisited", "Link Visited"),
};
public static IReadOnlyList<Tuple<string, string>> BackgroundTokens { get; } = new List<Tuple<string, string>>
{
new ("SemiColorBackground0", "Background 0"),
new ("SemiColorBackground1", "Background 1"),
new ("SemiColorBackground2", "Background 2"),
new ("SemiColorBackground3", "Background 3"),
new ("SemiColorBackground4", "Background 4"),
new("SemiColorBackground0", "Background 0"),
new("SemiColorBackground1", "Background 1"),
new("SemiColorBackground2", "Background 2"),
new("SemiColorBackground3", "Background 3"),
new("SemiColorBackground4", "Background 4"),
};
public static IReadOnlyList<Tuple<string, string>> FillTokens { get; } = new List<Tuple<string, string>>
{
new ("SemiColorFill0", "Fill 0"),
new ("SemiColorFill1", "Fill 1"),
new ("SemiColorFill2", "Fill 2"),
new("SemiColorFill0", "Fill 0"),
new("SemiColorFill1", "Fill 1"),
new("SemiColorFill2", "Fill 2"),
};
public static IReadOnlyList<Tuple<string, string>> BorderTokens { get; } = new List<Tuple<string, string>>
{
new ("SemiColorBorder", "Border"),
new("SemiColorBorder", "Border"),
};
public static IReadOnlyList<Tuple<string, string>> DisabledTokens { get; } = new List<Tuple<string, string>>
{
new ("SemiColorDisabledText", "Disabled Text"),
new ("SemiColorDisabledBorder", "Disabled Border"),
new ("SemiColorDisabledBackground", "Disabled Background"),
new ("SemiColorDisabledFill", "Disabled Fill"),
new("SemiColorDisabledText", "Disabled Text"),
new("SemiColorDisabledBorder", "Disabled Border"),
new("SemiColorDisabledBackground", "Disabled Background"),
new("SemiColorDisabledFill", "Disabled Fill"),
};
public static IReadOnlyList<Tuple<string, string>> ShadowTokens { get; } = new List<Tuple<string, string>>
{
new("SemiColorShadow", "Shadow"),
new("SemiShadowElevated", "Shadow Elevated"),
};
}

View File

@ -17,5 +17,5 @@
<SolidColorBrush x:Key="ColorSpectrumBorderBrush" Opacity="0.08" Color="#1C1F23" />
<BoxShadows x:Key="ColorPreviewerMainBoxShadow">0 0 14 0 #1AFFFFFF</BoxShadows>
<BoxShadows x:Key="ColorPreviewerMainBoxShadow">inset 0 0 0 1 #1AFFFFFF, 0 4 14 #40000000</BoxShadows>
</ResourceDictionary>

View File

@ -17,5 +17,5 @@
<SolidColorBrush x:Key="ColorSpectrumBorderBrush" Opacity="0.08" Color="#1C1F23" />
<BoxShadows x:Key="ColorPreviewerMainBoxShadow">0 0 14 0 #1A000000</BoxShadows>
<BoxShadows x:Key="ColorPreviewerMainBoxShadow">0 0 1 #4A000000, 0 4 14 #1A000000</BoxShadows>
</ResourceDictionary>

View File

@ -39,12 +39,16 @@
BorderThickness="{DynamicResource AutoCompleteBoxPopupBorderThickness}"
BoxShadow="{DynamicResource AutoCompleteBoxPopupBoxShadow}"
CornerRadius="{DynamicResource AutoCompleteBoxPopupCornerRadius}">
<ListBox
Name="PART_SelectingItemsControl"
Foreground="{TemplateBinding Foreground}"
ItemTemplate="{TemplateBinding ItemTemplate}"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto" />
<Border
CornerRadius="{DynamicResource AutoCompleteBoxPopupCornerRadius}"
ClipToBounds="True">
<ListBox
Name="PART_SelectingItemsControl"
Foreground="{TemplateBinding Foreground}"
ItemTemplate="{TemplateBinding ItemTemplate}"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto" />
</Border>
</Border>
</Popup>
</Panel>
@ -77,12 +81,16 @@
BorderThickness="{DynamicResource AutoCompleteBoxPopupBorderThickness}"
BoxShadow="{DynamicResource AutoCompleteBoxPopupBoxShadow}"
CornerRadius="{DynamicResource AutoCompleteBoxPopupCornerRadius}">
<ListBox
Name="PART_SelectingItemsControl"
Foreground="{TemplateBinding Foreground}"
ItemTemplate="{TemplateBinding ItemTemplate}"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto" />
<Border
CornerRadius="{DynamicResource AutoCompleteBoxPopupCornerRadius}"
ClipToBounds="True">
<ListBox
Name="PART_SelectingItemsControl"
Foreground="{TemplateBinding Foreground}"
ItemTemplate="{TemplateBinding ItemTemplate}"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto" />
</Border>
</Border>
</Popup>
</Panel>

View File

@ -117,16 +117,19 @@
BorderBrush="{DynamicResource ComboBoxPopupBorderBrush}"
BorderThickness="{DynamicResource ComboBoxPopupBorderThickness}"
BoxShadow="{DynamicResource ComboBoxPopupBoxShadow}"
CornerRadius="{DynamicResource ComboBoxPopupBoxCornerRadius}"
ClipToBounds="True">
<ScrollViewer
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
<ItemsPresenter
Name="PART_ItemsPresenter"
ItemsPanel="{TemplateBinding ItemsPanel}" />
</ScrollViewer>
CornerRadius="{DynamicResource ComboBoxPopupBoxCornerRadius}">
<Border
CornerRadius="{DynamicResource ComboBoxPopupBoxCornerRadius}"
ClipToBounds="True">
<ScrollViewer
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
<ItemsPresenter
Name="PART_ItemsPresenter"
ItemsPanel="{TemplateBinding ItemsPanel}" />
</ScrollViewer>
</Border>
</Border>
</Popup>
</Grid>

View File

@ -22,100 +22,107 @@
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
BoxShadow="{DynamicResource DateTimePickerFlyoutBoxShadow}"
CornerRadius="{TemplateBinding CornerRadius}"
ClipToBounds="True">
<Grid Name="ContentPanel" RowDefinitions="*,Auto">
<Grid Name="PART_PickerContainer">
<Grid.Styles>
<Style Selector="DateTimePickerPanel > ListBoxItem">
<Setter Property="Theme" Value="{StaticResource DateTimePickerItem}" />
</Style>
</Grid.Styles>
<!-- Column Definitions set in code, ignore here -->
<Panel Name="PART_MonthHost">
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden">
<DateTimePickerPanel
Name="PART_MonthSelector"
ItemHeight="{DynamicResource DateTimePickerListBoxItemHeight}"
PanelType="Month"
ShouldLoop="True" />
</ScrollViewer>
<RepeatButton Name="PART_MonthUpButton" Theme="{StaticResource DateTimePickerUpButton}" />
<RepeatButton Name="PART_MonthDownButton" Theme="{StaticResource DateTimePickerDownButton}" />
</Panel>
<Panel Name="PART_DayHost">
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden">
<DateTimePickerPanel
Name="PART_DaySelector"
ItemHeight="{DynamicResource DateTimePickerListBoxItemHeight}"
PanelType="Day"
ShouldLoop="True" />
</ScrollViewer>
<RepeatButton Name="PART_DayUpButton" Theme="{StaticResource DateTimePickerUpButton}" />
<RepeatButton Name="PART_DayDownButton" Theme="{StaticResource DateTimePickerDownButton}" />
</Panel>
<Panel Name="PART_YearHost">
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden">
<DateTimePickerPanel
Name="PART_YearSelector"
ItemHeight="{DynamicResource DateTimePickerListBoxItemHeight}"
PanelType="Year"
ShouldLoop="False" />
</ScrollViewer>
<RepeatButton Name="PART_YearUpButton" Theme="{StaticResource DateTimePickerUpButton}" />
<RepeatButton Name="PART_YearDownButton" Theme="{StaticResource DateTimePickerDownButton}" />
</Panel>
<Rectangle
Name="PART_FirstSpacer"
Grid.Column="1"
Width="1"
Margin="0,4"
HorizontalAlignment="Center"
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
<Rectangle
Name="PART_SecondSpacer"
Grid.Column="3"
Width="1"
Margin="0,4"
HorizontalAlignment="Center"
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
</Grid>
CornerRadius="{TemplateBinding CornerRadius}">
<Border
CornerRadius="{TemplateBinding CornerRadius}"
ClipToBounds="True">
<Grid Name="ContentPanel" RowDefinitions="*,Auto">
<Grid Name="PART_PickerContainer">
<Grid.Styles>
<Style Selector="DateTimePickerPanel > ListBoxItem">
<Setter Property="Theme" Value="{StaticResource DateTimePickerItem}" />
</Style>
</Grid.Styles>
<!-- Column Definitions set in code, ignore here -->
<Panel Name="PART_MonthHost">
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden">
<DateTimePickerPanel
Name="PART_MonthSelector"
ItemHeight="{DynamicResource DateTimePickerListBoxItemHeight}"
PanelType="Month"
ShouldLoop="True" />
</ScrollViewer>
<RepeatButton Name="PART_MonthUpButton" Theme="{StaticResource DateTimePickerUpButton}" />
<RepeatButton Name="PART_MonthDownButton" Theme="{StaticResource DateTimePickerDownButton}" />
</Panel>
<Panel Name="PART_DayHost">
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden">
<DateTimePickerPanel
Name="PART_DaySelector"
ItemHeight="{DynamicResource DateTimePickerListBoxItemHeight}"
PanelType="Day"
ShouldLoop="True" />
</ScrollViewer>
<RepeatButton Name="PART_DayUpButton" Theme="{StaticResource DateTimePickerUpButton}" />
<RepeatButton Name="PART_DayDownButton" Theme="{StaticResource DateTimePickerDownButton}" />
</Panel>
<Panel Name="PART_YearHost">
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden">
<DateTimePickerPanel
Name="PART_YearSelector"
ItemHeight="{DynamicResource DateTimePickerListBoxItemHeight}"
PanelType="Year"
ShouldLoop="False" />
</ScrollViewer>
<RepeatButton Name="PART_YearUpButton" Theme="{StaticResource DateTimePickerUpButton}" />
<RepeatButton Name="PART_YearDownButton" Theme="{StaticResource DateTimePickerDownButton}" />
</Panel>
<Rectangle
Name="PART_FirstSpacer"
Grid.Column="1"
Width="1"
Margin="0,4"
HorizontalAlignment="Center"
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
<Rectangle
Name="PART_SecondSpacer"
Grid.Column="3"
Width="1"
Margin="0,4"
HorizontalAlignment="Center"
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
</Grid>
<Grid
Name="AcceptDismissGrid"
Grid.Row="1"
ColumnDefinitions="*,*">
<Button
Name="PART_AcceptButton"
Grid.Column="0"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Theme="{StaticResource DateTimePickerButton}">
<PathIcon
Width="12"
Height="12"
Data="{DynamicResource DateTimePickerAcceptGlyph}" />
</Button>
<Button
Name="PART_DismissButton"
Grid.Column="1"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
FontSize="16"
Theme="{StaticResource DateTimePickerButton}">
<PathIcon
Width="12"
Height="12"
Data="{DynamicResource DateTimePickerDismissGlyph}" />
</Button>
<Rectangle
Grid.Column="0"
Grid.ColumnSpan="2"
Height="1"
VerticalAlignment="Top"
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
<Grid
Name="AcceptDismissGrid"
Grid.Row="1"
ColumnDefinitions="*,Auto,*">
<Button
Name="PART_AcceptButton"
Grid.Column="0"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Theme="{StaticResource DateTimePickerButton}">
<PathIcon
Width="12"
Height="12"
Data="{DynamicResource DateTimePickerAcceptGlyph}" />
</Button>
<Rectangle
Grid.Column="1"
Width="1"
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
<Button
Name="PART_DismissButton"
Grid.Column="2"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
FontSize="16"
Theme="{StaticResource DateTimePickerButton}">
<PathIcon
Width="12"
Height="12"
Data="{DynamicResource DateTimePickerDismissGlyph}" />
</Button>
<Rectangle
Grid.Column="0"
Grid.ColumnSpan="3"
Height="1"
VerticalAlignment="Top"
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
</Grid>
</Grid>
</Grid>
</Border>
</Border>
</ControlTemplate>
</Setter>

View File

@ -37,7 +37,6 @@
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
BoxShadow="{DynamicResource MenuFlyoutBorderBoxShadow}"
ClipToBounds="True"
CornerRadius="{TemplateBinding CornerRadius}"
UseLayoutRounding="False">
<ScrollViewer

View File

@ -22,122 +22,129 @@
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
BoxShadow="{DynamicResource DateTimePickerFlyoutBoxShadow}"
CornerRadius="{TemplateBinding CornerRadius}"
ClipToBounds="True">
<Grid Name="ContentPanel" RowDefinitions="*,Auto">
<Grid Name="PART_PickerContainer">
<Grid.Styles>
<Style Selector="DateTimePickerPanel > ListBoxItem">
<Setter Property="Theme" Value="{StaticResource DateTimePickerItem}" />
</Style>
</Grid.Styles>
<!-- Ignore col defs here, set in code -->
<Panel Name="PART_HourHost" Grid.Column="0">
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden">
<DateTimePickerPanel
Name="PART_HourSelector"
ItemHeight="{DynamicResource DateTimePickerListBoxItemHeight}"
PanelType="Hour"
ShouldLoop="True" />
</ScrollViewer>
<RepeatButton Name="PART_HourUpButton" Theme="{StaticResource DateTimePickerUpButton}" />
<RepeatButton Name="PART_HourDownButton" Theme="{StaticResource DateTimePickerDownButton}" />
</Panel>
CornerRadius="{TemplateBinding CornerRadius}">
<Border
CornerRadius="{TemplateBinding CornerRadius}"
ClipToBounds="True">
<Grid Name="ContentPanel" RowDefinitions="*,Auto">
<Grid Name="PART_PickerContainer">
<Grid.Styles>
<Style Selector="DateTimePickerPanel > ListBoxItem">
<Setter Property="Theme" Value="{StaticResource DateTimePickerItem}" />
</Style>
</Grid.Styles>
<!-- Ignore col defs here, set in code -->
<Panel Name="PART_HourHost" Grid.Column="0">
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden">
<DateTimePickerPanel
Name="PART_HourSelector"
ItemHeight="{DynamicResource DateTimePickerListBoxItemHeight}"
PanelType="Hour"
ShouldLoop="True" />
</ScrollViewer>
<RepeatButton Name="PART_HourUpButton" Theme="{StaticResource DateTimePickerUpButton}" />
<RepeatButton Name="PART_HourDownButton" Theme="{StaticResource DateTimePickerDownButton}" />
</Panel>
<Panel Name="PART_MinuteHost" Grid.Column="2">
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden">
<DateTimePickerPanel
Name="PART_MinuteSelector"
ItemHeight="{DynamicResource DateTimePickerListBoxItemHeight}"
PanelType="Minute"
ShouldLoop="True" />
</ScrollViewer>
<RepeatButton Name="PART_MinuteUpButton" Theme="{StaticResource DateTimePickerUpButton}" />
<RepeatButton Name="PART_MinuteDownButton" Theme="{StaticResource DateTimePickerDownButton}" />
</Panel>
<Panel Name="PART_SecondHost" Grid.Column="4">
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden">
<DateTimePickerPanel
Name="PART_SecondSelector"
ItemHeight="{DynamicResource DateTimePickerListBoxItemHeight}"
PanelType="Second"
ShouldLoop="True" />
</ScrollViewer>
<RepeatButton Name="PART_SecondUpButton" Theme="{StaticResource DateTimePickerUpButton}" />
<RepeatButton Name="PART_SecondDownButton" Theme="{StaticResource DateTimePickerDownButton}" />
</Panel>
<Panel Name="PART_MinuteHost" Grid.Column="2">
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden">
<DateTimePickerPanel
Name="PART_MinuteSelector"
ItemHeight="{DynamicResource DateTimePickerListBoxItemHeight}"
PanelType="Minute"
ShouldLoop="True" />
</ScrollViewer>
<RepeatButton Name="PART_MinuteUpButton" Theme="{StaticResource DateTimePickerUpButton}" />
<RepeatButton Name="PART_MinuteDownButton" Theme="{StaticResource DateTimePickerDownButton}" />
</Panel>
<Panel Name="PART_PeriodHost" Grid.Column="6">
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden">
<DateTimePickerPanel
Name="PART_PeriodSelector"
ItemHeight="{DynamicResource DateTimePickerListBoxItemHeight}"
PanelType="TimePeriod"
ShouldLoop="False" />
</ScrollViewer>
<RepeatButton Name="PART_PeriodUpButton" Theme="{StaticResource DateTimePickerUpButton}" />
<RepeatButton Name="PART_PeriodDownButton" Theme="{StaticResource DateTimePickerDownButton}" />
</Panel>
<Panel Name="PART_SecondHost" Grid.Column="4">
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden">
<DateTimePickerPanel
Name="PART_SecondSelector"
ItemHeight="{DynamicResource DateTimePickerListBoxItemHeight}"
PanelType="Second"
ShouldLoop="True" />
</ScrollViewer>
<RepeatButton Name="PART_SecondUpButton" Theme="{StaticResource DateTimePickerUpButton}" />
<RepeatButton Name="PART_SecondDownButton" Theme="{StaticResource DateTimePickerDownButton}" />
</Panel>
<Rectangle
Name="PART_FirstSpacer"
Grid.Column="1"
Width="1"
Margin="0,4"
HorizontalAlignment="Center"
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
<Rectangle
Name="PART_SecondSpacer"
Grid.Column="3"
Width="1"
Margin="0,4"
HorizontalAlignment="Center"
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
<Rectangle
Name="PART_ThirdSpacer"
Grid.Column="5"
Width="1"
Margin="0,4"
HorizontalAlignment="Center"
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
<Panel Name="PART_PeriodHost" Grid.Column="6">
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden">
<DateTimePickerPanel
Name="PART_PeriodSelector"
ItemHeight="{DynamicResource DateTimePickerListBoxItemHeight}"
PanelType="TimePeriod"
ShouldLoop="False" />
</ScrollViewer>
<RepeatButton Name="PART_PeriodUpButton" Theme="{StaticResource DateTimePickerUpButton}" />
<RepeatButton Name="PART_PeriodDownButton" Theme="{StaticResource DateTimePickerDownButton}" />
</Panel>
<Rectangle
Name="PART_FirstSpacer"
Grid.Column="1"
Width="1"
Margin="0,4"
HorizontalAlignment="Center"
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
<Rectangle
Name="PART_SecondSpacer"
Grid.Column="3"
Width="1"
Margin="0,4"
HorizontalAlignment="Center"
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
<Rectangle
Name="PART_ThirdSpacer"
Grid.Column="5"
Width="1"
Margin="0,4"
HorizontalAlignment="Center"
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
</Grid>
<Grid
Name="AcceptDismissGrid"
Grid.Row="1"
ColumnDefinitions="*,Auto,*">
<Button
Name="PART_AcceptButton"
Grid.Column="0"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Theme="{StaticResource DateTimePickerButton}">
<PathIcon
Width="12"
Height="12"
Data="{DynamicResource DateTimePickerAcceptGlyph}" />
</Button>
<Rectangle
Grid.Column="1"
Width="1"
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
<Button
Name="PART_DismissButton"
Grid.Column="2"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
FontSize="16"
Theme="{StaticResource DateTimePickerButton}">
<PathIcon
Width="12"
Height="12"
Data="{DynamicResource DateTimePickerDismissGlyph}" />
</Button>
<Rectangle
Grid.Column="0"
Grid.ColumnSpan="3"
Height="1"
VerticalAlignment="Top"
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
</Grid>
</Grid>
<Grid
Name="AcceptDismissGrid"
Grid.Row="1"
ColumnDefinitions="*,*">
<Button
Name="PART_AcceptButton"
Grid.Column="0"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Theme="{StaticResource DateTimePickerButton}">
<PathIcon
Width="12"
Height="12"
Data="{DynamicResource DateTimePickerAcceptGlyph}" />
</Button>
<Button
Name="PART_DismissButton"
Grid.Column="1"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
FontSize="16"
Theme="{StaticResource DateTimePickerButton}">
<PathIcon
Width="12"
Height="12"
Data="{DynamicResource DateTimePickerDismissGlyph}" />
</Button>
<Rectangle
Grid.Column="0"
Grid.ColumnSpan="2"
Height="1"
VerticalAlignment="Top"
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
</Grid>
</Grid>
</Border>
</Border>
</ControlTemplate>
</Setter>

View File

@ -74,7 +74,7 @@
<Border
Name="SwitchKnobIndicator"
Background="White"
BoxShadow="0 0 1 1 #222E3238"
BoxShadow="{DynamicResource ToggleSwitchIndicatorBoxShadow}"
CornerRadius="{DynamicResource ToggleSwitchIndicatorCornerRadius}" />
<Arc
Name="SwitchKnobLoadingIndicator"
@ -319,7 +319,7 @@
<Border
Name="SwitchKnobIndicator"
Background="White"
BoxShadow="0 0 1 1 #222E3238"
BoxShadow="{DynamicResource ToggleSwitchIndicatorBoxShadow}"
CornerRadius="{DynamicResource ToggleSwitchIndicatorCornerRadius}" />
<Arc
Name="SwitchKnobLoadingIndicator"

View File

@ -1,5 +1,5 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<BoxShadows x:Key="AutoCompleteBoxPopupBoxShadow">0 0 8 0 #1AFFFFFF</BoxShadows>
<BoxShadows x:Key="AutoCompleteBoxPopupBoxShadow">inset 0 0 0 1 #1AFFFFFF, 0 4 14 #40000000</BoxShadows>
<SolidColorBrush x:Key="AutoCompleteBoxPopupBackground" Color="#43444A" />
<SolidColorBrush x:Key="AutoCompleteBoxPopupBorderBrush" Opacity="0.08" Color="White" />
</ResourceDictionary>

View File

@ -1,5 +1,5 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<BoxShadows x:Key="BorderCardBoxShadow">0 0 14 0 #1AFFFFFF</BoxShadows>
<BoxShadows x:Key="BorderCardBoxShadow">inset 0 0 0 1 #1AFFFFFF, 0 4 14 #40000000</BoxShadows>
<SolidColorBrush x:Key="BorderCardBackground" Color="#232429" />
<SolidColorBrush x:Key="BorderCardBorderBrush" Opacity="0.08" Color="White" />
</ResourceDictionary>

View File

@ -9,7 +9,7 @@
<SolidColorBrush x:Key="CalendarDatePickerFocusBorderBrush" Color="#54A9FF" />
<SolidColorBrush x:Key="CalendarDatePickerDisabledBackground" Opacity="0.04" Color="#E6E8EA" />
<SolidColorBrush x:Key="CalendarDatePickerDisabledIconForeground" Opacity="0.4" Color="#E6E8EA" />
<BoxShadows x:Key="CalendarDatePickerPopupBoxShadows">0 0 8 0 #1AFFFFFF</BoxShadows>
<BoxShadows x:Key="CalendarDatePickerPopupBoxShadows">inset 0 0 0 1 #1AFFFFFF, 0 4 14 #40000000</BoxShadows>
<SolidColorBrush x:Key="CalendarDatePickerBorderedDefaultBackground" Color="Transparent" />
<SolidColorBrush x:Key="CalendarDatePickerBorderedDefaultBorderBrush" Opacity="0.08" Color="White" />

View File

@ -18,7 +18,7 @@
<SolidColorBrush x:Key="ComboBoxDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
<BoxShadows x:Key="ComboBoxPopupBoxShadow">0 0 8 0 #1AFFFFFF</BoxShadows>
<BoxShadows x:Key="ComboBoxPopupBoxShadow">inset 0 0 0 1 #1AFFFFFF, 0 4 14 #40000000</BoxShadows>
<SolidColorBrush x:Key="ComboBoxPopupBackground" Color="#43444A" />
<SolidColorBrush x:Key="ComboBoxPopupBorderBrush" Opacity="0.08" Color="White" />

View File

@ -26,5 +26,5 @@
<SolidColorBrush x:Key="DateTimePickerButtonDisabledBackground" Opacity="0.04" Color="#E6E8EA" />
<SolidColorBrush x:Key="DateTimePickerButtonDisabledIconForeground" Opacity="0.4" Color="#E6E8EA" />
<BoxShadows x:Key="DateTimePickerFlyoutBoxShadow">0 0 8 0 #1AFFFFFF</BoxShadows>
<BoxShadows x:Key="DateTimePickerFlyoutBoxShadow">inset 0 0 0 1 #1AFFFFFF, 0 4 14 #40000000</BoxShadows>
</ResourceDictionary>

View File

@ -2,5 +2,5 @@
<SolidColorBrush x:Key="FlyoutBackground" Color="#43444A" />
<SolidColorBrush x:Key="FlyoutForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="FlyoutBorderBrush" Opacity="0.08" Color="White" />
<BoxShadows x:Key="FlyoutBorderBoxShadow">0 0 8 0 #1AFFFFFF</BoxShadows>
<BoxShadows x:Key="FlyoutBorderBoxShadow">inset 0 0 0 1 #1AFFFFFF, 0 4 14 #40000000</BoxShadows>
</ResourceDictionary>

View File

@ -5,7 +5,7 @@
<!-- MenuFlyout -->
<SolidColorBrush x:Key="MenuFlyoutBackground" Color="#43444A" />
<SolidColorBrush x:Key="MenuFlyoutBorderBrush" Opacity="0.08" Color="White" />
<BoxShadows x:Key="MenuFlyoutBorderBoxShadow">0 0 8 0 #1AFFFFFF</BoxShadows>
<BoxShadows x:Key="MenuFlyoutBorderBoxShadow">inset 0 0 0 1 #1AFFFFFF, 0 4 14 #40000000</BoxShadows>
<!-- MenuItem -->
<SolidColorBrush x:Key="MenuItemBackground" Color="Transparent" />

View File

@ -5,7 +5,7 @@
<SolidColorBrush x:Key="NotificationCardSuccessIconForeground" Color="#5DC264" />
<SolidColorBrush x:Key="NotificationCardWarningIconForeground" Color="#FFAE43" />
<SolidColorBrush x:Key="NotificationCardErrorIconForeground" Color="#FC725A" />
<BoxShadows x:Key="NotificationCardBoxShadows">inset 0 0 0 1 #1AFFFFFF, 0 4 14 0 #40000000</BoxShadows>
<BoxShadows x:Key="NotificationCardBoxShadows">inset 0 0 0 1 #1AFFFFFF, 0 4 14 #40000000</BoxShadows>
<SolidColorBrush x:Key="NotificationCardTitleForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="NotificationCardMessageForeground" Opacity="0.8" Color="#F9F9F9" />

View File

@ -421,4 +421,8 @@
<SolidColorBrush x:Key="SemiColorDisabledBackground" Color="{StaticResource SemiGrey1Color}" />
<SolidColorBrush x:Key="SemiColorDisabledFill" Opacity="0.04" Color="{StaticResource SemiGrey8Color}" />
<!-- Shadow -->
<BoxShadows x:Key="SemiColorShadow">0 0 #0A000000</BoxShadows>
<BoxShadows x:Key="SemiShadowElevated">inset 0 0 0 1 #1AFFFFFF, 0 4 14 #40000000</BoxShadows>
</ResourceDictionary>

View File

@ -15,4 +15,6 @@
<SolidColorBrush x:Key="SimpleToggleSwitchContainerUnCheckedForeground" Opacity="0.6" Color="#F9F9F9" />
<SolidColorBrush x:Key="SimpleToggleSwitchContainerCheckedForeground" Color="White" />
<BoxShadows x:Key="ToggleSwitchIndicatorBoxShadow">0 4 6 0 #1A000000, 0 0 1 0 #4D000000</BoxShadows>
</ResourceDictionary>

View File

@ -1,5 +1,5 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<BoxShadows x:Key="AutoCompleteBoxPopupBoxShadow">0 0 8 0 #1A000000</BoxShadows>
<BoxShadows x:Key="AutoCompleteBoxPopupBoxShadow">0 0 1 #4A000000, 0 4 14 #1A000000</BoxShadows>
<SolidColorBrush x:Key="AutoCompleteBoxPopupBackground" Color="White" />
<SolidColorBrush x:Key="AutoCompleteBoxPopupBorderBrush" Opacity="0.08" Color="#1C1F23" />
</ResourceDictionary>

View File

@ -1,5 +1,5 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<BoxShadows x:Key="BorderCardBoxShadow">0 0 14 0 #1A000000</BoxShadows>
<BoxShadows x:Key="BorderCardBoxShadow">0 0 1 #4A000000, 0 4 14 #1A000000</BoxShadows>
<SolidColorBrush x:Key="BorderCardBackground" Color="White" />
<SolidColorBrush x:Key="BorderCardBorderBrush" Opacity="0.08" Color="#1C1F23" />
</ResourceDictionary>

View File

@ -9,7 +9,7 @@
<SolidColorBrush x:Key="CalendarDatePickerFocusBorderBrush" Color="#0077FA" />
<SolidColorBrush x:Key="CalendarDatePickerDisabledBackground" Opacity="0.02" Color="#2E3238" />
<SolidColorBrush x:Key="CalendarDatePickerDisabledIconForeground" Opacity="0.4" Color="#2E3238" />
<BoxShadows x:Key="CalendarDatePickerPopupBoxShadows">0 0 8 0 #1A000000</BoxShadows>
<BoxShadows x:Key="CalendarDatePickerPopupBoxShadows">0 0 1 #4A000000, 0 4 14 #1A000000</BoxShadows>
<SolidColorBrush x:Key="CalendarDatePickerBorderedDefaultBackground" Color="Transparent" />
<SolidColorBrush x:Key="CalendarDatePickerBorderedDefaultBorderBrush" Opacity="0.08" Color="#1C1F23" />

View File

@ -17,7 +17,7 @@
<SolidColorBrush x:Key="ComboBoxDisabledForeground" Opacity="0.35" Color="#1C1F23" />
<BoxShadows x:Key="ComboBoxPopupBoxShadow">0 0 8 0 #1A000000</BoxShadows>
<BoxShadows x:Key="ComboBoxPopupBoxShadow">0 0 1 #4A000000, 0 4 14 #1A000000</BoxShadows>
<SolidColorBrush x:Key="ComboBoxPopupBackground" Color="White" />
<SolidColorBrush x:Key="ComboBoxPopupBorderBrush" Opacity="0.08" Color="#1C1F23" />

View File

@ -28,5 +28,5 @@
<SolidColorBrush x:Key="DateTimePickerButtonDisabledBackground" Opacity="0.02" Color="#2E3238" />
<SolidColorBrush x:Key="DateTimePickerButtonDisabledIconForeground" Opacity="0.4" Color="#2E3238" />
<BoxShadows x:Key="DateTimePickerFlyoutBoxShadow">0 0 8 0 #1A000000</BoxShadows>
<BoxShadows x:Key="DateTimePickerFlyoutBoxShadow">0 0 1 #4A000000, 0 4 14 #1A000000</BoxShadows>
</ResourceDictionary>

View File

@ -2,5 +2,5 @@
<SolidColorBrush x:Key="FlyoutBackground" Color="White" />
<SolidColorBrush x:Key="FlyoutForeground" Color="#1C1F23" />
<SolidColorBrush x:Key="FlyoutBorderBrush" Opacity="0.08" Color="#1C1F23" />
<BoxShadows x:Key="FlyoutBorderBoxShadow">0 0 8 0 #1A000000</BoxShadows>
<BoxShadows x:Key="FlyoutBorderBoxShadow">0 0 1 #4A000000, 0 4 14 #1A000000</BoxShadows>
</ResourceDictionary>

View File

@ -5,7 +5,7 @@
<!-- MenuFlyout -->
<SolidColorBrush x:Key="MenuFlyoutBackground" Color="White" />
<SolidColorBrush x:Key="MenuFlyoutBorderBrush" Opacity="0.08" Color="#1C1F23" />
<BoxShadows x:Key="MenuFlyoutBorderBoxShadow">0 0 8 0 #1A000000</BoxShadows>
<BoxShadows x:Key="MenuFlyoutBorderBoxShadow">0 0 1 #4A000000, 0 4 14 #1A000000</BoxShadows>
<!-- MenuItem -->
<SolidColorBrush x:Key="MenuItemBackground" Color="Transparent" />

View File

@ -5,7 +5,7 @@
<SolidColorBrush x:Key="NotificationCardSuccessIconForeground" Color="#3BB346" />
<SolidColorBrush x:Key="NotificationCardWarningIconForeground" Color="#FC8800" />
<SolidColorBrush x:Key="NotificationCardErrorIconForeground" Color="#F93920" />
<BoxShadows x:Key="NotificationCardBoxShadows">0 0 1 0 #4A000000, 0 4 14 0 #1A000000</BoxShadows>
<BoxShadows x:Key="NotificationCardBoxShadows">0 0 1 #4A000000, 0 4 14 #1A000000</BoxShadows>
<SolidColorBrush x:Key="NotificationCardTitleForeground" Color="#1C1F23" />
<SolidColorBrush x:Key="NotificationCardMessageForeground" Opacity="0.8" Color="#1C1F23" />

View File

@ -421,4 +421,8 @@
<SolidColorBrush x:Key="SemiColorDisabledBackground" Color="{StaticResource SemiGrey1Color}" />
<!-- Official Opacity=0.04 -->
<SolidColorBrush x:Key="SemiColorDisabledFill" Opacity="0.02" Color="{StaticResource SemiGrey8Color}" />
<!-- Shadow -->
<BoxShadows x:Key="SemiColorShadow">0 0 #0A000000</BoxShadows>
<BoxShadows x:Key="SemiShadowElevated">0 0 1 #4A000000, 0 4 14 #1A000000</BoxShadows>
</ResourceDictionary>

View File

@ -15,4 +15,6 @@
<SolidColorBrush x:Key="SimpleToggleSwitchContainerUnCheckedForeground" Opacity="0.62" Color="#1C1F23" />
<SolidColorBrush x:Key="SimpleToggleSwitchContainerCheckedForeground" Color="White" />
<BoxShadows x:Key="ToggleSwitchIndicatorBoxShadow">0 4 6 0 #1A000000, 0 0 1 0 #4D000000</BoxShadows>
</ResourceDictionary>

View File

@ -16,7 +16,7 @@
<StreamGeometry x:Key="ComboBoxIcon">
M4.08045 7.59809C4.66624 7.01231 5.61599 7.01231 6.20177 7.59809L11.8586 13.2549L17.5155 7.59809C18.1013 7.01231 19.051 7.01231 19.6368 7.59809C20.2226 8.18388 20.2226 9.13363 19.6368 9.71941L12.9193 16.4369C12.3335 17.0227 11.3838 17.0227 10.798 16.4369L4.08045 9.71941C3.49467 9.13363 3.49467 8.18388 4.08045 7.59809Z
</StreamGeometry>
<Thickness x:Key="ComboBoxPopupBorderMargin">0 4</Thickness>
<Thickness x:Key="ComboBoxPopupBorderMargin">4</Thickness>
<x:Double x:Key="ComboBoxDefaultHeight">32</x:Double>
<x:Double x:Key="ComboBoxSmallHeight">24</x:Double>