Compare commits

...

36 Commits

Author SHA1 Message Date
Zhang Dian
5742412cb9 misc: add Version markup to TreeDataGrid.csproj. 2024-11-15 21:29:38 +08:00
Zhang Dian
7cf453343a misc: add pack TreeDataGrid GitHub Action file. 2024-11-15 21:21:31 +08:00
Zhang Dian
99d928ea15 feat: add pack&publish scripts to workflow. 2024-11-15 20:59:46 +08:00
Zhang Dian
b31b622a2e fix: fix font issue in WASM demo. 2024-11-15 18:51:37 +08:00
Zhang Dian
5f199d728e misc: bump 11.2.1 version. 2024-11-15 14:19:06 +08:00
Dong Bin
b6e458b81c Merge pull request #462 from irihitech/shadow
Add `BoxShadows` Tokens to Palette and Fix Related Issues
2024-11-15 13:49:18 +08:00
Zhang Dian
8cdac330a4 misc: unify BoxShadows resources. 2024-11-15 02:22:03 +08:00
Zhang Dian
8484d6ad86 feat: add Shadow part to PaletteDemo. 2024-11-15 02:20:32 +08:00
Zhang Dian
d1d235a120 misc: format codes. 2024-11-15 01:00:59 +08:00
Zhang Dian
3a31924c6b fix: fix popup BoxShadow and unclosed corner issues. 2024-11-14 18:07:34 +08:00
Zhang Dian
252da729bb Merge branch 'refs/heads/main' into shadow 2024-11-14 15:54:22 +08:00
Dong Bin
7f6a5615e6 Merge pull request #460 from irihitech/popup
Adjust Padding for ComboBox, ListBox, DatePicker, and TimePicker Items
2024-11-13 18:37:36 +08:00
Dong Bin
1ee19246a1 Merge pull request #461 from irihitech/issue/449
Resolve TreeDataGrid AOT issue
2024-11-13 18:05:02 +08:00
Zhang Dian
46b1c5d1cc fix: fix BoxShadows. 2024-11-13 16:42:25 +08:00
Zhang Dian
2437df392b feat: resolve AOT issue. 2024-11-13 01:24:19 +08:00
Zhang Dian
580e780e58 feat: extract CommunityToolkit version. 2024-11-13 01:21:40 +08:00
Zhang Dian
3ce4067c3f feat: extract ComboBox resources. 2024-11-12 17:10:35 +08:00
Zhang Dian
d3f297730b feat: adjust ComboBox, ListBox, DatePicker & TimePicker item Padding. 2024-11-12 16:59:49 +08:00
Zhang Dian
dfcb3579b4 misc: Restore > to >. 2024-11-12 13:00:01 +08:00
Zhang Dian
90ba261638 fix: fix SeparatorBorder RowDefinition in HeaderedContentControl. 2024-11-09 18:52:01 +08:00
Dong Bin
793d63a454 Merge pull request #459 from irihitech/headered
Redesign GroupBox theme for HeaderedContentControl
2024-11-09 17:38:57 +08:00
Zhang Dian
a4ee27778e feat: add basic BoxShadows. 2024-11-09 05:29:31 +08:00
Zhang Dian
021ca97865 feat: redesign GroupBox theme for HeaderedContentControl.
Header & Content are now invisible when set to null.
SeparatorBorder is now influenced by BorderThickness.
Background is no longer transparent.
2024-11-09 04:13:00 +08:00
Dong Bin
d271b7e26c Merge pull request #458 from irihitech/hyperlink
Redesign HyperlinkButton
2024-11-08 20:14:57 +08:00
Dong Bin
a38d4bdf55 Merge pull request #457 from irihitech/adorner
Design an AdornerLayer for Solid Button
2024-11-08 20:08:16 +08:00
Dong Bin
30ac27d34a Merge pull request #456 from irihitech/listbox
Unify RadioButton & CheckBox themes of ListBox
2024-11-08 19:16:51 +08:00
Zhang Dian
5451495c5c feat: redesign HyperlinkButton.
add OnlyIcon & Underline Classes to HyperlinkButton.
2024-11-08 17:42:34 +08:00
Zhang Dian
450fd5edbb misc: add Default ThemeVariant to demo. 2024-11-08 05:27:57 +08:00
Zhang Dian
1250d45ad8 feat: design an AdornerLayer for Solid Button. 2024-11-08 05:12:52 +08:00
Zhang Dian
f277c7c574 Merge branch 'main' into listbox 2024-11-08 02:55:22 +08:00
Dong Bin
90dfa3ba8a Merge pull request #455 from irihitech/clean
Replace x:Name to Name
2024-11-08 00:00:00 +08:00
Zhang Dian
8ba8ec69ca feat: using RadioButton & CheckBox Resources instead of creating newly ListBox resources. 2024-11-07 20:44:07 +08:00
Zhang Dian
4b53300909 fix: unify RadioButton & CheckBox themes of ListBox. 2024-11-07 20:44:06 +08:00
Zhang Dian
0858f01fec misc: replace x:Name to Name. 2024-11-07 17:56:29 +08:00
Dong Bin
c5623faab1 Merge pull request #453 from irihitech/clean
Clean prefix Control
2024-11-06 20:02:41 +08:00
Zhang Dian
fd68cad375 misc: clean prefix Control. 2024-11-06 16:35:53 +08:00
127 changed files with 1703 additions and 1688 deletions

26
.github/workflows/pack-tree.yml vendored Normal file
View File

@@ -0,0 +1,26 @@
name: Pack TreeDataGrid Nuget
on:
push:
branches: [ "action/pack-tree" ]
pull_request:
branches: [ "action/pack-tree" ]
jobs:
nuget:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Nuget Semi.Avalonia.TreeDataGrid
run: dotnet pack ./src/Semi.Avalonia.TreeDataGrid -o ./nugets
- name: Publish NuGet package
run: dotnet nuget push "./nugets/*.nupkg" --api-key ${{ secrets.NUGET_ORG_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.3.1
with:
name: nugets
path: ./nugets

View File

@@ -22,8 +22,8 @@ jobs:
- name: Nuget Semi.Avalonia.DataGrid - name: Nuget Semi.Avalonia.DataGrid
run: dotnet pack ./src/Semi.Avalonia.DataGrid -o ./nugets run: dotnet pack ./src/Semi.Avalonia.DataGrid -o ./nugets
- name: Nuget Semi.Avalonia.TreeDataGrid - name: Publish NuGet package
run: dotnet pack ./src/Semi.Avalonia.TreeDataGrid -o ./nugets run: dotnet nuget push "./nugets/*.nupkg" --api-key ${{ secrets.NUGET_ORG_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
- name: Upload a Build Artifact - name: Upload a Build Artifact
uses: actions/upload-artifact@v4.3.1 uses: actions/upload-artifact@v4.3.1

View File

@@ -68,6 +68,8 @@ We offer limited free community support for Semi Avalonia and Ursa. If you have
| Semi Design Version | Avalonia Version | | Semi Design Version | Avalonia Version |
|:--------------------|:-----------------| |:--------------------|:-----------------|
| 11.2.1 | 11.2.1 |
| 11.2.0 | 11.2.0 |
| 11.1.0 | >=11.1.0 | | 11.1.0 | >=11.1.0 |
| 11.0.7 | >=11.0.7 | | 11.0.7 | >=11.0.7 |
| 11.0.1 | <=11.0.6 | | 11.0.1 | <=11.0.6 |

View File

@@ -56,7 +56,6 @@ dotnet add package Semi.Avalonia.TreeDataGrid
## 示例 ## 示例
您可以从 Semi Avalonia 的 release 页下载并试用 Semi Avalonia 的展示应用。 您可以从 Semi Avalonia 的 release 页下载并试用 Semi Avalonia 的展示应用。
<https://github.com/irihitech/Semi.Avalonia/releases> <https://github.com/irihitech/Semi.Avalonia/releases>
## 社区支持 ## 社区支持
@@ -65,11 +64,12 @@ dotnet add package Semi.Avalonia.TreeDataGrid
![FeiShu](./docs/community-support.png) ![FeiShu](./docs/community-support.png)
## 版本兼容性 ## 版本兼容性
| Semi Design Version | Avalonia Version | | Semi Design Version | Avalonia Version |
|:--------------------|:-----------------| |:--------------------|:-----------------|
| 11.2.1 | 11.2.1 |
| 11.2.0 | 11.2.0 |
| 11.1.0 | >=11.1.0 | | 11.1.0 | >=11.1.0 |
| 11.0.7 | >=11.0.7 | | 11.0.7 | >=11.0.7 |
| 11.0.1 | <=11.0.6 | | 11.0.1 | <=11.0.6 |

View File

@@ -12,6 +12,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Files", "Solution
src\Package.props = src\Package.props src\Package.props = src\Package.props
EndProjectSection EndProjectSection
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GitHub Action", "GitHub Action", "{318534A1-1CC3-40FB-B4AE-736F94465232}"
ProjectSection(SolutionItems) = preProject
.github\workflows\deploy.yml = .github\workflows\deploy.yml
.github\workflows\pack.yml = .github\workflows\pack.yml
.github\workflows\pack-tree.yml = .github\workflows\pack-tree.yml
.github\workflows\publish.yml = .github\workflows\publish.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Demo", "Demo", "{43091528-9509-43CB-A003-9C5C11E96DD6}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Demo", "Demo", "{43091528-9509-43CB-A003-9C5C11E96DD6}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Semi.Avalonia.Demo.Desktop", "demo\Semi.Avalonia.Demo.Desktop\Semi.Avalonia.Demo.Desktop.csproj", "{2ADCA724-2B6D-46EC-87F7-604D7918B89A}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Semi.Avalonia.Demo.Desktop", "demo\Semi.Avalonia.Demo.Desktop\Semi.Avalonia.Demo.Desktop.csproj", "{2ADCA724-2B6D-46EC-87F7-604D7918B89A}"

View File

@@ -1,6 +1,7 @@
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<AvaloniaVersion>11.2.0</AvaloniaVersion> <AvaloniaVersion>11.2.1</AvaloniaVersion>
<CommunityToolkitVersion>8.3.2</CommunityToolkitVersion>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@@ -16,13 +16,13 @@ class Program
public static void Main(string[] args) => BuildAvaloniaApp() public static void Main(string[] args) => BuildAvaloniaApp()
.With(new FontManagerOptions .With(new FontManagerOptions
{ {
FontFallbacks = new[] FontFallbacks =
{ [
new FontFallback new FontFallback
{ {
FontFamily = new FontFamily("Microsoft YaHei") FontFamily = new FontFamily("Microsoft YaHei")
} }
} ]
}) })
.StartWithClassicDesktopLifetime(args); .StartWithClassicDesktopLifetime(args);

View File

@@ -11,6 +11,6 @@ public static class AvaloniaAppBuilderExtensions
builder.With(new FontManagerOptions builder.With(new FontManagerOptions
{ {
DefaultFamilyName = DefaultFontFamily, DefaultFamilyName = DefaultFontFamily,
FontFallbacks = new[] { new FontFallback { FontFamily = new FontFamily(DefaultFontFamily) } } FontFallbacks = [new FontFallback { FontFamily = new FontFamily(DefaultFontFamily) }]
}); });
} }

View File

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

View File

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

@@ -101,7 +101,7 @@
</DataGrid.Columns> </DataGrid.Columns>
</DataGrid> </DataGrid>
</TabItem> </TabItem>
<TabItem x:Name="EditableTab" Header="Editable"> <TabItem Name="EditableTab" Header="Editable">
<Grid Margin="8" RowDefinitions="Auto,*,Auto"> <Grid Margin="8" RowDefinitions="Auto,*,Auto">
<StackPanel <StackPanel
Grid.Row="0" Grid.Row="0"
@@ -109,14 +109,14 @@
Spacing="4"> Spacing="4">
<TextBlock VerticalAlignment="Center" Text="FontSize:" /> <TextBlock VerticalAlignment="Center" Text="FontSize:" />
<Slider <Slider
x:Name="FontSizeSlider" Name="FontSizeSlider"
Width="100" Width="100"
VerticalAlignment="Center" VerticalAlignment="Center"
Maximum="30" Maximum="30"
Minimum="5" Minimum="5"
Value="14" /> Value="14" />
<CheckBox <CheckBox
x:Name="IsThreeStateCheckBox" Name="IsThreeStateCheckBox"
Content="IsThreeState" Content="IsThreeState"
IsChecked="False" /> IsChecked="False" />
</StackPanel> </StackPanel>

View File

@@ -2,7 +2,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="1450"
x:Class="Semi.Avalonia.Demo.Pages.HeaderedContentControlDemo"> x:Class="Semi.Avalonia.Demo.Pages.HeaderedContentControlDemo">
<ScrollViewer> <ScrollViewer>
<StackPanel HorizontalAlignment="Left" Spacing="20"> <StackPanel HorizontalAlignment="Left" Spacing="20">
@@ -27,12 +27,18 @@
</WrapPanel> </WrapPanel>
<TextBlock>GroupBox Theme</TextBlock> <TextBlock>GroupBox Theme</TextBlock>
<HeaderedContentControl <HeaderedContentControl
HorizontalAlignment="Left"
Theme="{DynamicResource GroupBox}" Theme="{DynamicResource GroupBox}"
Header="Semi Design" HorizontalAlignment="Left"
Width="400" MaxWidth="360">
Height="200"> <HeaderedContentControl.Header>
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统。设计系统包含设计语言以及一整套可复用的前端组件,帮助设计师与开发者更容易地打造高质量的、用户体验一致的、符合设计规范的 Web 应用。</TextBlock> <Panel>
<SelectableTextBlock Text="Semi Design" />
<HyperlinkButton HorizontalAlignment="Right" Content="更多" />
</Panel>
</HeaderedContentControl.Header>
<HeaderedContentControl.Content>
<SelectableTextBlock Text="Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统。设计系统包含设计语言以及一整套可复用的前端组件,帮助设计师与开发者更容易地打造高质量的、用户体验一致的、符合设计规范的 Web 应用。" />
</HeaderedContentControl.Content>
</HeaderedContentControl> </HeaderedContentControl>
</StackPanel> </StackPanel>
</ScrollViewer> </ScrollViewer>

View File

@@ -8,36 +8,22 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StackPanel HorizontalAlignment="Left" Spacing="20"> <StackPanel HorizontalAlignment="Left" Spacing="20">
<HyperlinkButton
NavigateUri="https://www.irihi.tech/"
Content="IRIHI Homepage" />
<HyperlinkButton
Classes="Underline"
IsEnabled="False"
NavigateUri="https://www.irihi.tech/"
Content="Not Enabled" />
<HyperlinkButton
Classes="WithIcon Underline"
Height="20"
NavigateUri="https://www.irihi.tech/"
Content="带下划线的网页链接" />
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<HyperlinkButton Height="20" NavigateUri="http://www.irihi.tech/"> <HyperlinkButton Classes="OnlyIcon" NavigateUri="https://www.irihi.tech/" />
<TextBlock <HyperlinkButton Classes="OnlyIcon" NavigateUri="https://www.irihi.tech/" />
HorizontalAlignment="Center"
Text="iRihi Homepage"
TextDecorations="Underline"
VerticalAlignment="Center" />
</HyperlinkButton>
</StackPanel>
<StackPanel Orientation="Horizontal">
<HyperlinkButton Height="20" IsEnabled="False">
<TextBlock
HorizontalAlignment="Center"
Text="Not Enabled"
TextDecorations="Underline"
VerticalAlignment="Center" />
</HyperlinkButton>
</StackPanel>
<StackPanel Orientation="Horizontal">
<HyperlinkButton
BorderThickness="1"
Classes="WithIcon"
Height="20"
NavigateUri="http://www.irihi.tech/">
<TextBlock
HorizontalAlignment="Center"
Text="Link with Icon"
TextDecorations="Underline"
VerticalAlignment="Center" />
</HyperlinkButton>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</UserControl> </UserControl>

View File

@@ -4,7 +4,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DesignHeight="450" d:DesignHeight="800"
d:DesignWidth="800" d:DesignWidth="800"
mc:Ignorable="d"> mc:Ignorable="d">
<ScrollViewer> <ScrollViewer>
@@ -13,15 +13,13 @@
<Style Selector="Label"> <Style Selector="Label">
<Setter Property="Margin" Value="4" /> <Setter Property="Margin" Value="4" />
</Style> </Style>
<Style Selector="Grid > TextBlock">
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Margin" Value="4" />
</Style>
</StackPanel.Styles> </StackPanel.Styles>
<ScrollViewer HorizontalScrollBarVisibility="Auto"> <ScrollViewer HorizontalScrollBarVisibility="Auto">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<StackPanel.Styles>
<Style Selector="Label, TextBlock">
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Margin" Value="4" />
</Style>
</StackPanel.Styles>
<HeaderedContentControl <HeaderedContentControl
Width="400" Width="400"
Height="400" Height="400"
@@ -32,62 +30,62 @@
<Grid <Grid
VerticalAlignment="Top" VerticalAlignment="Top"
ColumnDefinitions="Auto, *" ColumnDefinitions="Auto, *"
RowDefinitions="*,*,*,*,*,*,*,*,*,*,*,*"> RowDefinitions="*,*,*,*,*,*,*,*,*,*,*">
<TextBlock Grid.Row="1" Grid.Column="0">Classes</TextBlock> <TextBlock Grid.Row="0" Grid.Column="0">Classes</TextBlock>
<TextBlock Grid.Row="2" Grid.Column="0">-</TextBlock> <TextBlock Grid.Row="1" Grid.Column="0">-</TextBlock>
<TextBlock Grid.Row="3" Grid.Column="0">Secondary</TextBlock> <TextBlock Grid.Row="2" Grid.Column="0">Secondary</TextBlock>
<TextBlock Grid.Row="4" Grid.Column="0">Tertiary</TextBlock> <TextBlock Grid.Row="3" Grid.Column="0">Tertiary</TextBlock>
<TextBlock Grid.Row="5" Grid.Column="0">Quaternary</TextBlock> <TextBlock Grid.Row="4" Grid.Column="0">Quaternary</TextBlock>
<TextBlock Grid.Row="6" Grid.Column="0">Success</TextBlock> <TextBlock Grid.Row="5" Grid.Column="0">Success</TextBlock>
<TextBlock Grid.Row="7" Grid.Column="0">Warning</TextBlock> <TextBlock Grid.Row="6" Grid.Column="0">Warning</TextBlock>
<TextBlock Grid.Row="8" Grid.Column="0">Danger</TextBlock> <TextBlock Grid.Row="7" Grid.Column="0">Danger</TextBlock>
<TextBlock Grid.Row="9" Grid.Column="0">Mark</TextBlock> <TextBlock Grid.Row="8" Grid.Column="0">Mark</TextBlock>
<TextBlock Grid.Row="10" Grid.Column="0">Code</TextBlock> <TextBlock Grid.Row="9" Grid.Column="0">Code</TextBlock>
<Label Grid.Row="2" Grid.Column="1">Text</Label> <Label Grid.Row="1" Grid.Column="1">Text</Label>
<Label <Label
Grid.Row="3" Grid.Row="2"
Grid.Column="1" Grid.Column="1"
Classes="Secondary"> Classes="Secondary">
Secondary Secondary
</Label> </Label>
<Label <Label
Grid.Row="4" Grid.Row="3"
Grid.Column="1" Grid.Column="1"
Classes="Tertiary"> Classes="Tertiary">
Tertiary Tertiary
</Label> </Label>
<Label <Label
Grid.Row="5" Grid.Row="4"
Grid.Column="1" Grid.Column="1"
Classes="Quaternary"> Classes="Quaternary">
Quaternary Quaternary
</Label> </Label>
<Label <Label
Grid.Row="6" Grid.Row="5"
Grid.Column="1" Grid.Column="1"
Classes="Success"> Classes="Success">
Success Success
</Label> </Label>
<Label <Label
Grid.Row="7" Grid.Row="6"
Grid.Column="1" Grid.Column="1"
Classes="Warning"> Classes="Warning">
Warning Warning
</Label> </Label>
<Label <Label
Grid.Row="8" Grid.Row="7"
Grid.Column="1" Grid.Column="1"
Classes="Danger"> Classes="Danger">
Danger Danger
</Label> </Label>
<Label <Label
Grid.Row="9" Grid.Row="8"
Grid.Column="1" Grid.Column="1"
Classes="Mark"> Classes="Mark">
Default Mark Default Mark
</Label> </Label>
<Label <Label
Grid.Row="10" Grid.Row="9"
Grid.Column="1" Grid.Column="1"
Classes="Code"> Classes="Code">
Code Code
@@ -104,51 +102,51 @@
<Grid <Grid
VerticalAlignment="Top" VerticalAlignment="Top"
ColumnDefinitions="Auto, *" ColumnDefinitions="Auto, *"
RowDefinitions="*,*,*,*,*,*,*,*"> RowDefinitions="*,*,*,*,*,*,*">
<TextBlock Grid.Row="1" Grid.Column="0">Classes</TextBlock> <TextBlock Grid.Row="0" Grid.Column="0">Classes</TextBlock>
<TextBlock Grid.Row="2" Grid.Column="0">H1</TextBlock> <TextBlock Grid.Row="1" Grid.Column="0">H1</TextBlock>
<TextBlock Grid.Row="3" Grid.Column="0">H2</TextBlock> <TextBlock Grid.Row="2" Grid.Column="0">H2</TextBlock>
<TextBlock Grid.Row="4" Grid.Column="0">H3</TextBlock> <TextBlock Grid.Row="3" Grid.Column="0">H3</TextBlock>
<TextBlock Grid.Row="5" Grid.Column="0">H4</TextBlock> <TextBlock Grid.Row="4" Grid.Column="0">H4</TextBlock>
<TextBlock Grid.Row="6" Grid.Column="0">H5</TextBlock> <TextBlock Grid.Row="5" Grid.Column="0">H5</TextBlock>
<TextBlock Grid.Row="7" Grid.Column="0">H6</TextBlock> <TextBlock Grid.Row="6" Grid.Column="0">H6</TextBlock>
<Label <Label
Grid.Row="2" Grid.Row="1"
Grid.Column="1" Grid.Column="1"
Classes="H1" Classes="H1"
Theme="{StaticResource TitleLabel}"> Theme="{StaticResource TitleLabel}">
Header 1 Header 1
</Label> </Label>
<Label <Label
Grid.Row="3" Grid.Row="2"
Grid.Column="1" Grid.Column="1"
Classes="H2" Classes="H2"
Theme="{StaticResource TitleLabel}"> Theme="{StaticResource TitleLabel}">
Header 2 Header 2
</Label> </Label>
<Label <Label
Grid.Row="4" Grid.Row="3"
Grid.Column="1" Grid.Column="1"
Classes="H3" Classes="H3"
Theme="{StaticResource TitleLabel}"> Theme="{StaticResource TitleLabel}">
Header 3 Header 3
</Label> </Label>
<Label <Label
Grid.Row="5" Grid.Row="4"
Grid.Column="1" Grid.Column="1"
Classes="H4" Classes="H4"
Theme="{StaticResource TitleLabel}"> Theme="{StaticResource TitleLabel}">
Header 4 Header 4
</Label> </Label>
<Label <Label
Grid.Row="6" Grid.Row="5"
Grid.Column="1" Grid.Column="1"
Classes="H5" Classes="H5"
Theme="{StaticResource TitleLabel}"> Theme="{StaticResource TitleLabel}">
Header 5 Header 5
</Label> </Label>
<Label <Label
Grid.Row="7" Grid.Row="6"
Grid.Column="1" Grid.Column="1"
Classes="H6" Classes="H6"
Theme="{StaticResource TitleLabel}"> Theme="{StaticResource TitleLabel}">

View File

@@ -9,7 +9,7 @@ public partial class Overview : UserControl
InitializeComponent(); InitializeComponent();
} }
public string MainInstall { get; set; } = "dotnet add package Semi.Avalonia --version 11.1.0"; public string MainInstall { get; set; } = "dotnet add package Semi.Avalonia --version 11.2.1";
public string MainStyle { get; set; } = public string MainStyle { get; set; } =
""" """
@@ -20,7 +20,7 @@ public partial class Overview : UserControl
</Application.Styles> </Application.Styles>
"""; """;
public string ColorPickerInstall { get; set; } = "dotnet add package Semi.Avalonia.ColorPicker --version 11.1.0"; public string ColorPickerInstall { get; set; } = "dotnet add package Semi.Avalonia.ColorPicker --version 11.2.1";
public string ColorPickerStyle { get; set; } = public string ColorPickerStyle { get; set; } =
""" """
@@ -29,7 +29,7 @@ public partial class Overview : UserControl
</Application.Styles> </Application.Styles>
"""; """;
public string DataGridInstall { get; set; } = "dotnet add package Semi.Avalonia.DataGrid --version 11.1.0"; public string DataGridInstall { get; set; } = "dotnet add package Semi.Avalonia.DataGrid --version 11.2.1";
public string DataGridStyle { get; set; } = public string DataGridStyle { get; set; } =
""" """
@@ -38,7 +38,7 @@ public partial class Overview : UserControl
</Application.Styles> </Application.Styles>
"""; """;
public string TreeDataGridInstall { get; set; } = "dotnet add package Semi.Avalonia.TreeDataGrid --version 11.1.0"; public string TreeDataGridInstall { get; set; } = "dotnet add package Semi.Avalonia.TreeDataGrid --version 11.0.10.1";
public string TreeDataGridStyle { get; set; } = public string TreeDataGridStyle { get; set; } =
""" """

View File

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

View File

@@ -4,13 +4,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DesignHeight="450" d:DesignHeight="600"
d:DesignWidth="800" d:DesignWidth="800"
mc:Ignorable="d"> mc:Ignorable="d">
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"> <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<StackPanel.Styles> <StackPanel.Styles>
<Style Selector="SelectableTextBlock"> <Style Selector="Grid > SelectableTextBlock">
<Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Margin" Value="4" /> <Setter Property="Margin" Value="4" />
</Style> </Style>
@@ -25,70 +25,76 @@
<Grid <Grid
VerticalAlignment="Top" VerticalAlignment="Top"
ColumnDefinitions="Auto, *" ColumnDefinitions="Auto, *"
RowDefinitions="*,*,*,*,*,*,*,*,*,*,*,*"> RowDefinitions="*,*,*,*,*,*,*,*,*,*,*">
<SelectableTextBlock Grid.Row="1" Grid.Column="0">Classes</SelectableTextBlock> <Grid.Styles>
<SelectableTextBlock Grid.Row="2" Grid.Column="0">-</SelectableTextBlock> <Style Selector="SelectableTextBlock">
<SelectableTextBlock Grid.Row="3" Grid.Column="0">Secondary</SelectableTextBlock> <Setter Property="VerticalAlignment" Value="Center" />
<SelectableTextBlock Grid.Row="4" Grid.Column="0">Tertiary</SelectableTextBlock> <Setter Property="Margin" Value="4" />
<SelectableTextBlock Grid.Row="5" Grid.Column="0">Quaternary</SelectableTextBlock> </Style>
<SelectableTextBlock Grid.Row="6" Grid.Column="0">Success</SelectableTextBlock> </Grid.Styles>
<SelectableTextBlock Grid.Row="7" Grid.Column="0">Warning</SelectableTextBlock> <SelectableTextBlock Grid.Row="0" Grid.Column="0">Classes</SelectableTextBlock>
<SelectableTextBlock Grid.Row="8" Grid.Column="0">Danger</SelectableTextBlock> <SelectableTextBlock Grid.Row="1" Grid.Column="0">-</SelectableTextBlock>
<SelectableTextBlock Grid.Row="9" Grid.Column="0">Mark</SelectableTextBlock> <SelectableTextBlock Grid.Row="2" Grid.Column="0">Secondary</SelectableTextBlock>
<SelectableTextBlock Grid.Row="10" Grid.Column="0">Underline</SelectableTextBlock> <SelectableTextBlock Grid.Row="3" Grid.Column="0">Tertiary</SelectableTextBlock>
<SelectableTextBlock Grid.Row="11" Grid.Column="0">Delete</SelectableTextBlock> <SelectableTextBlock Grid.Row="4" Grid.Column="0">Quaternary</SelectableTextBlock>
<SelectableTextBlock Grid.Row="5" Grid.Column="0">Success</SelectableTextBlock>
<SelectableTextBlock Grid.Row="6" Grid.Column="0">Warning</SelectableTextBlock>
<SelectableTextBlock Grid.Row="7" Grid.Column="0">Danger</SelectableTextBlock>
<SelectableTextBlock Grid.Row="8" Grid.Column="0">Mark</SelectableTextBlock>
<SelectableTextBlock Grid.Row="9" Grid.Column="0">Underline</SelectableTextBlock>
<SelectableTextBlock Grid.Row="10" Grid.Column="0">Delete</SelectableTextBlock>
<SelectableTextBlock Grid.Row="2" Grid.Column="1">Text</SelectableTextBlock> <SelectableTextBlock Grid.Row="1" Grid.Column="1">Text</SelectableTextBlock>
<SelectableTextBlock <SelectableTextBlock
Grid.Row="3" Grid.Row="2"
Grid.Column="1" Grid.Column="1"
Classes="Secondary"> Classes="Secondary">
Secondary Secondary
</SelectableTextBlock> </SelectableTextBlock>
<SelectableTextBlock <SelectableTextBlock
Grid.Row="4" Grid.Row="3"
Grid.Column="1" Grid.Column="1"
Classes="Tertiary"> Classes="Tertiary">
Tertiary Tertiary
</SelectableTextBlock> </SelectableTextBlock>
<SelectableTextBlock <SelectableTextBlock
Grid.Row="5" Grid.Row="4"
Grid.Column="1" Grid.Column="1"
Classes="Quaternary"> Classes="Quaternary">
Quaternary Quaternary
</SelectableTextBlock> </SelectableTextBlock>
<SelectableTextBlock <SelectableTextBlock
Grid.Row="6" Grid.Row="5"
Grid.Column="1" Grid.Column="1"
Classes="Success"> Classes="Success">
Success Success
</SelectableTextBlock> </SelectableTextBlock>
<SelectableTextBlock <SelectableTextBlock
Grid.Row="7" Grid.Row="6"
Grid.Column="1" Grid.Column="1"
Classes="Warning"> Classes="Warning">
Warning Warning
</SelectableTextBlock> </SelectableTextBlock>
<SelectableTextBlock <SelectableTextBlock
Grid.Row="8" Grid.Row="7"
Grid.Column="1" Grid.Column="1"
Classes="Danger"> Classes="Danger">
Danger Danger
</SelectableTextBlock> </SelectableTextBlock>
<SelectableTextBlock <SelectableTextBlock
Grid.Row="9" Grid.Row="8"
Grid.Column="1" Grid.Column="1"
Classes="Mark"> Classes="Mark">
Default Mark Default Mark
</SelectableTextBlock> </SelectableTextBlock>
<SelectableTextBlock <SelectableTextBlock
Grid.Row="10" Grid.Row="9"
Grid.Column="1" Grid.Column="1"
Classes="Underline"> Classes="Underline">
Underline Underline
</SelectableTextBlock> </SelectableTextBlock>
<SelectableTextBlock <SelectableTextBlock
Grid.Row="11" Grid.Row="10"
Grid.Column="1" Grid.Column="1"
Classes="Delete"> Classes="Delete">
Delete Delete
@@ -104,53 +110,52 @@
Theme="{DynamicResource GroupBox}"> Theme="{DynamicResource GroupBox}">
<Grid <Grid
VerticalAlignment="Top" VerticalAlignment="Top"
Background="{Binding}"
ColumnDefinitions="Auto, *" ColumnDefinitions="Auto, *"
RowDefinitions="*,*,*,*,*,*,*,*"> RowDefinitions="*,*,*,*,*,*,*">
<SelectableTextBlock Grid.Row="1" Grid.Column="0">Classes</SelectableTextBlock> <SelectableTextBlock Grid.Row="0" Grid.Column="0">Classes</SelectableTextBlock>
<SelectableTextBlock Grid.Row="2" Grid.Column="0">H1</SelectableTextBlock> <SelectableTextBlock Grid.Row="1" Grid.Column="0">H1</SelectableTextBlock>
<SelectableTextBlock Grid.Row="3" Grid.Column="0">H2</SelectableTextBlock> <SelectableTextBlock Grid.Row="2" Grid.Column="0">H2</SelectableTextBlock>
<SelectableTextBlock Grid.Row="4" Grid.Column="0">H3</SelectableTextBlock> <SelectableTextBlock Grid.Row="3" Grid.Column="0">H3</SelectableTextBlock>
<SelectableTextBlock Grid.Row="5" Grid.Column="0">H4</SelectableTextBlock> <SelectableTextBlock Grid.Row="4" Grid.Column="0">H4</SelectableTextBlock>
<SelectableTextBlock Grid.Row="6" Grid.Column="0">H5</SelectableTextBlock> <SelectableTextBlock Grid.Row="5" Grid.Column="0">H5</SelectableTextBlock>
<SelectableTextBlock Grid.Row="7" Grid.Column="0">H6</SelectableTextBlock> <SelectableTextBlock Grid.Row="6" Grid.Column="0">H6</SelectableTextBlock>
<SelectableTextBlock <SelectableTextBlock
Grid.Row="2" Grid.Row="1"
Grid.Column="1" Grid.Column="1"
Classes="H1" Classes="H1"
Theme="{StaticResource TitleSelectableTextBlock}"> Theme="{StaticResource TitleSelectableTextBlock}">
Header 1 Header 1
</SelectableTextBlock> </SelectableTextBlock>
<SelectableTextBlock <SelectableTextBlock
Grid.Row="3" Grid.Row="2"
Grid.Column="1" Grid.Column="1"
Classes="H2" Classes="H2"
Theme="{StaticResource TitleSelectableTextBlock}"> Theme="{StaticResource TitleSelectableTextBlock}">
Header 2 Header 2
</SelectableTextBlock> </SelectableTextBlock>
<SelectableTextBlock <SelectableTextBlock
Grid.Row="4" Grid.Row="3"
Grid.Column="1" Grid.Column="1"
Classes="H3" Classes="H3"
Theme="{StaticResource TitleSelectableTextBlock}"> Theme="{StaticResource TitleSelectableTextBlock}">
Header 3 Header 3
</SelectableTextBlock> </SelectableTextBlock>
<SelectableTextBlock <SelectableTextBlock
Grid.Row="5" Grid.Row="4"
Grid.Column="1" Grid.Column="1"
Classes="H4" Classes="H4"
Theme="{StaticResource TitleSelectableTextBlock}"> Theme="{StaticResource TitleSelectableTextBlock}">
Header 4 Header 4
</SelectableTextBlock> </SelectableTextBlock>
<SelectableTextBlock <SelectableTextBlock
Grid.Row="6" Grid.Row="5"
Grid.Column="1" Grid.Column="1"
Classes="H5" Classes="H5"
Theme="{StaticResource TitleSelectableTextBlock}"> Theme="{StaticResource TitleSelectableTextBlock}">
Header 5 Header 5
</SelectableTextBlock> </SelectableTextBlock>
<SelectableTextBlock <SelectableTextBlock
Grid.Row="7" Grid.Row="6"
Grid.Column="1" Grid.Column="1"
Classes="H6" Classes="H6"
Theme="{StaticResource TitleSelectableTextBlock}"> Theme="{StaticResource TitleSelectableTextBlock}">

View File

@@ -10,7 +10,7 @@
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"> <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<StackPanel.Styles> <StackPanel.Styles>
<Style Selector="TextBlock"> <Style Selector="Grid > TextBlock">
<Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Margin" Value="4" /> <Setter Property="Margin" Value="4" />
</Style> </Style>
@@ -25,70 +25,70 @@
<Grid <Grid
VerticalAlignment="Top" VerticalAlignment="Top"
ColumnDefinitions="Auto, *" ColumnDefinitions="Auto, *"
RowDefinitions="*,*,*,*,*,*,*,*,*,*,*,*"> RowDefinitions="*,*,*,*,*,*,*,*,*,*,*">
<TextBlock Grid.Row="1" Grid.Column="0">Classes</TextBlock> <TextBlock Grid.Row="0" Grid.Column="0">Classes</TextBlock>
<TextBlock Grid.Row="2" Grid.Column="0">-</TextBlock> <TextBlock Grid.Row="1" Grid.Column="0">-</TextBlock>
<TextBlock Grid.Row="3" Grid.Column="0">Secondary</TextBlock> <TextBlock Grid.Row="2" Grid.Column="0">Secondary</TextBlock>
<TextBlock Grid.Row="4" Grid.Column="0">Tertiary</TextBlock> <TextBlock Grid.Row="3" Grid.Column="0">Tertiary</TextBlock>
<TextBlock Grid.Row="5" Grid.Column="0">Quaternary</TextBlock> <TextBlock Grid.Row="4" Grid.Column="0">Quaternary</TextBlock>
<TextBlock Grid.Row="6" Grid.Column="0">Success</TextBlock> <TextBlock Grid.Row="5" Grid.Column="0">Success</TextBlock>
<TextBlock Grid.Row="7" Grid.Column="0">Warning</TextBlock> <TextBlock Grid.Row="6" Grid.Column="0">Warning</TextBlock>
<TextBlock Grid.Row="8" Grid.Column="0">Danger</TextBlock> <TextBlock Grid.Row="7" Grid.Column="0">Danger</TextBlock>
<TextBlock Grid.Row="9" Grid.Column="0">Mark</TextBlock> <TextBlock Grid.Row="8" Grid.Column="0">Mark</TextBlock>
<TextBlock Grid.Row="10" Grid.Column="0">Underline</TextBlock> <TextBlock Grid.Row="9" Grid.Column="0">Underline</TextBlock>
<TextBlock Grid.Row="11" Grid.Column="0">Delete</TextBlock> <TextBlock Grid.Row="10" Grid.Column="0">Delete</TextBlock>
<TextBlock Grid.Row="2" Grid.Column="1">Text</TextBlock> <TextBlock Grid.Row="1" Grid.Column="1">Text</TextBlock>
<TextBlock <TextBlock
Grid.Row="3" Grid.Row="2"
Grid.Column="1" Grid.Column="1"
Classes="Secondary"> Classes="Secondary">
Secondary Secondary
</TextBlock> </TextBlock>
<TextBlock <TextBlock
Grid.Row="4" Grid.Row="3"
Grid.Column="1" Grid.Column="1"
Classes="Tertiary"> Classes="Tertiary">
Tertiary Tertiary
</TextBlock> </TextBlock>
<TextBlock <TextBlock
Grid.Row="5" Grid.Row="4"
Grid.Column="1" Grid.Column="1"
Classes="Quaternary"> Classes="Quaternary">
Quaternary Quaternary
</TextBlock> </TextBlock>
<TextBlock <TextBlock
Grid.Row="6" Grid.Row="5"
Grid.Column="1" Grid.Column="1"
Classes="Success"> Classes="Success">
Success Success
</TextBlock> </TextBlock>
<TextBlock <TextBlock
Grid.Row="7" Grid.Row="6"
Grid.Column="1" Grid.Column="1"
Classes="Warning"> Classes="Warning">
Warning Warning
</TextBlock> </TextBlock>
<TextBlock <TextBlock
Grid.Row="8" Grid.Row="7"
Grid.Column="1" Grid.Column="1"
Classes="Danger"> Classes="Danger">
Danger Danger
</TextBlock> </TextBlock>
<TextBlock <TextBlock
Grid.Row="9" Grid.Row="8"
Grid.Column="1" Grid.Column="1"
Classes="Mark"> Classes="Mark">
Default Mark Default Mark
</TextBlock> </TextBlock>
<TextBlock <TextBlock
Grid.Row="10" Grid.Row="9"
Grid.Column="1" Grid.Column="1"
Classes="Underline"> Classes="Underline">
Underline Underline
</TextBlock> </TextBlock>
<TextBlock <TextBlock
Grid.Row="11" Grid.Row="10"
Grid.Column="1" Grid.Column="1"
Classes="Delete"> Classes="Delete">
Delete Delete
@@ -105,58 +105,57 @@
<Grid <Grid
VerticalAlignment="Top" VerticalAlignment="Top"
ColumnDefinitions="Auto, *" ColumnDefinitions="Auto, *"
RowDefinitions="*,*,*,*,*,*,*,*"> RowDefinitions="*,*,*,*,*,*,*">
<TextBlock Grid.Row="1" Grid.Column="0">Classes</TextBlock> <TextBlock Grid.Row="0" Grid.Column="0">Classes</TextBlock>
<TextBlock Grid.Row="2" Grid.Column="0">H1</TextBlock> <TextBlock Grid.Row="1" Grid.Column="0">H1</TextBlock>
<TextBlock Grid.Row="3" Grid.Column="0">H2</TextBlock> <TextBlock Grid.Row="2" Grid.Column="0">H2</TextBlock>
<TextBlock Grid.Row="4" Grid.Column="0">H3</TextBlock> <TextBlock Grid.Row="3" Grid.Column="0">H3</TextBlock>
<TextBlock Grid.Row="5" Grid.Column="0">H4</TextBlock> <TextBlock Grid.Row="4" Grid.Column="0">H4</TextBlock>
<TextBlock Grid.Row="6" Grid.Column="0">H5</TextBlock> <TextBlock Grid.Row="5" Grid.Column="0">H5</TextBlock>
<TextBlock Grid.Row="7" Grid.Column="0">H6</TextBlock> <TextBlock Grid.Row="6" Grid.Column="0">H6</TextBlock>
<TextBlock <TextBlock
Grid.Row="2" Grid.Row="1"
Grid.Column="1" Grid.Column="1"
Classes="H1" Classes="H1"
Theme="{StaticResource TitleTextBlock}"> Theme="{StaticResource TitleTextBlock}">
Header 1 Header 1
</TextBlock> </TextBlock>
<TextBlock <TextBlock
Grid.Row="3" Grid.Row="2"
Grid.Column="1" Grid.Column="1"
Classes="H2" Classes="H2"
Theme="{StaticResource TitleTextBlock}"> Theme="{StaticResource TitleTextBlock}">
Header 2 Header 2
</TextBlock> </TextBlock>
<TextBlock <TextBlock
Grid.Row="4" Grid.Row="3"
Grid.Column="1" Grid.Column="1"
Classes="H3" Classes="H3"
Theme="{StaticResource TitleTextBlock}"> Theme="{StaticResource TitleTextBlock}">
Header 3 Header 3
</TextBlock> </TextBlock>
<TextBlock <TextBlock
Grid.Row="5" Grid.Row="4"
Grid.Column="1" Grid.Column="1"
Classes="H4" Classes="H4"
Theme="{StaticResource TitleTextBlock}"> Theme="{StaticResource TitleTextBlock}">
Header 4 Header 4
</TextBlock> </TextBlock>
<TextBlock <TextBlock
Grid.Row="6" Grid.Row="5"
Grid.Column="1" Grid.Column="1"
Classes="H5" Classes="H5"
Theme="{StaticResource TitleTextBlock}"> Theme="{StaticResource TitleTextBlock}">
Header 5 Header 5
</TextBlock> </TextBlock>
<TextBlock <TextBlock
Grid.Row="7" Grid.Row="6"
Grid.Column="1" Grid.Column="1"
Classes="H6" Classes="H6"
Theme="{StaticResource TitleTextBlock}"> Theme="{StaticResource TitleTextBlock}">
Header 6 Header 6
</TextBlock> </TextBlock>
</Grid> </Grid>
</HeaderedContentControl> </HeaderedContentControl>
</StackPanel> </StackPanel>
</ScrollViewer> </ScrollViewer>

View File

@@ -14,7 +14,7 @@
<PackageReference Include="Avalonia.Controls.DataGrid" Version="$(AvaloniaVersion)" /> <PackageReference Include="Avalonia.Controls.DataGrid" Version="$(AvaloniaVersion)" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.--> <!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)" /> <PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" /> <PackageReference Include="CommunityToolkit.Mvvm" Version="$(CommunityToolkitVersion)" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

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

@@ -43,20 +43,21 @@ public partial class MainView : UserControl
} }
} }
public partial class MainViewModel: ObservableObject public partial class MainViewModel : ObservableObject
{ {
public ObservableCollection<ThemeItem> Themes { get; } = new() public ObservableCollection<ThemeItem> Themes { get; } =
{ [
new ThemeItem("Light", ThemeVariant.Light), new("Default", ThemeVariant.Default),
new ThemeItem("Dark", ThemeVariant.Dark), new("Light", ThemeVariant.Light),
new ThemeItem("Aquatic", SemiTheme.Aquatic), new("Dark", ThemeVariant.Dark),
new ThemeItem("Desert", SemiTheme.Desert), new("Aquatic", SemiTheme.Aquatic),
new ThemeItem("Dust", SemiTheme.Dust), new("Desert", SemiTheme.Desert),
new ThemeItem("NightSky", SemiTheme.NightSky), new("Dust", SemiTheme.Dust),
}; new("NightSky", SemiTheme.NightSky)
];
[ObservableProperty] private ThemeItem? _selectedTheme; [ObservableProperty] private ThemeItem? _selectedTheme;
partial void OnSelectedThemeChanged(ThemeItem? oldValue, ThemeItem? newValue) partial void OnSelectedThemeChanged(ThemeItem? oldValue, ThemeItem? newValue)
{ {
if (newValue is null) return; if (newValue is null) return;
@@ -66,7 +67,6 @@ public partial class MainViewModel: ObservableObject
app.RequestedThemeVariant = newValue.Theme; app.RequestedThemeVariant = newValue.Theme;
} }
} }
} }
public class ThemeItem(string name, ThemeVariant theme) public class ThemeItem(string name, ThemeVariant theme)

View File

@@ -1,5 +1,6 @@
using Avalonia; using Avalonia;
using System; using System;
using Avalonia.Media;
namespace Semi.Avalonia.TreeDataGrid.Demo; namespace Semi.Avalonia.TreeDataGrid.Demo;
@@ -10,12 +11,21 @@ class Program
// yet and stuff might break. // yet and stuff might break.
[STAThread] [STAThread]
public static void Main(string[] args) => BuildAvaloniaApp() public static void Main(string[] args) => BuildAvaloniaApp()
.With(new FontManagerOptions
{
FontFallbacks =
[
new FontFallback
{
FontFamily = new FontFamily("Microsoft YaHei")
}
]
})
.StartWithClassicDesktopLifetime(args); .StartWithClassicDesktopLifetime(args);
// Avalonia configuration, don't remove; also used by visual designer. // Avalonia configuration, don't remove; also used by visual designer.
public static AppBuilder BuildAvaloniaApp() public static AppBuilder BuildAvaloniaApp()
=> AppBuilder.Configure<App>() => AppBuilder.Configure<App>()
.UsePlatformDetect() .UsePlatformDetect()
.WithInterFont()
.LogToTrace(); .LogToTrace();
} }

View File

@@ -1,28 +1,29 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport> <BuiltInComInteropSupport>true</BuiltInComInteropSupport>
<LangVersion>latest</LangVersion>
<ApplicationManifest>app.manifest</ApplicationManifest> <ApplicationManifest>app.manifest</ApplicationManifest>
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault> <AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
<!-- Uncomment below to enable Native AOT compilation-->
<!--<PublishAot>true</PublishAot>-->
<!--<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>-->
</PropertyGroup> </PropertyGroup>
<Import Project="../Directory.Build.props" /> <Import Project="../Directory.Build.props" />
<ItemGroup> <ItemGroup>
<PackageReference Include="Avalonia" Version="$(AvaloniaVersion)" /> <PackageReference Include="Avalonia" Version="$(AvaloniaVersion)" />
<PackageReference Include="Avalonia.Desktop" Version="$(AvaloniaVersion)" /> <PackageReference Include="Avalonia.Desktop" Version="$(AvaloniaVersion)" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="$(AvaloniaVersion)" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="$(AvaloniaVersion)" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.--> <!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)" /> <PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.1" /> <PackageReference Include="CommunityToolkit.Mvvm" Version="$(CommunityToolkitVersion)" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\src\Semi.Avalonia.TreeDataGrid\Semi.Avalonia.TreeDataGrid.csproj" /> <ProjectReference Include="..\..\src\Semi.Avalonia.TreeDataGrid\Semi.Avalonia.TreeDataGrid.csproj" />
<ProjectReference Include="..\..\src\Semi.Avalonia\Semi.Avalonia.csproj" /> <ProjectReference Include="..\..\src\Semi.Avalonia\Semi.Avalonia.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -3,14 +3,14 @@
<TargetFrameworks>net6.0;net8.0;netstandard2.0</TargetFrameworks> <TargetFrameworks>net6.0;net8.0;netstandard2.0</TargetFrameworks>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<LangVersion>latest</LangVersion> <LangVersion>latest</LangVersion>
<Version>11.2.0</Version> <Version>11.2.1</Version>
<Authors>IRIHI Technology Co., Ltd.</Authors> <Authors>IRIHI Technology Co., Ltd.</Authors>
<Description>Avalonia Theme inspired by Semi Design.</Description> <Description>Avalonia Theme inspired by Semi Design.</Description>
<RepositoryUrl>https://github.com/irihitech/Semi.Avalonia</RepositoryUrl> <RepositoryUrl>https://github.com/irihitech/Semi.Avalonia</RepositoryUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression> <PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIcon>irihi.png</PackageIcon> <PackageIcon>irihi.png</PackageIcon>
<PackageProjectUrl>https://github.com/irihitech/Semi.Avalonia</PackageProjectUrl> <PackageProjectUrl>https://github.com/irihitech/Semi.Avalonia</PackageProjectUrl>
<AvaloniaVersion>11.2.0</AvaloniaVersion> <AvaloniaVersion>11.2.1</AvaloniaVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@@ -80,7 +80,7 @@
<!-- Backgrounds --> <!-- Backgrounds -->
<!-- TODO: Background="{DynamicResource ColorViewTabBackgroundBrush}" --> <!-- TODO: Background="{DynamicResource ColorViewTabBackgroundBrush}" -->
<Border <Border
x:Name="ContentBackgroundBorder" Name="ContentBackgroundBorder"
Grid.Row="0" Grid.Row="0"
Grid.RowSpan="2" Grid.RowSpan="2"
Height="{TemplateBinding Height}" Height="{TemplateBinding Height}"
@@ -92,7 +92,7 @@
CornerRadius="{TemplateBinding CornerRadius}" /> CornerRadius="{TemplateBinding CornerRadius}" />
<TabControl <TabControl
x:Name="PART_TabControl" Name="PART_TabControl"
Grid.Row="0" Grid.Row="0"
Padding="0" Padding="0"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
@@ -129,7 +129,7 @@
<ColumnDefinition Width="Auto" MinWidth="32" /> <ColumnDefinition Width="Auto" MinWidth="32" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<primitives:ColorSlider <primitives:ColorSlider
x:Name="ColorSpectrumThirdComponentSlider" Name="ColorSpectrumThirdComponentSlider"
Grid.Column="0" Grid.Column="0"
Margin="0,0,12,0" Margin="0,0,12,0"
HorizontalAlignment="Center" HorizontalAlignment="Center"
@@ -143,7 +143,7 @@
IsVisible="{TemplateBinding IsColorSpectrumSliderVisible}" IsVisible="{TemplateBinding IsColorSpectrumSliderVisible}"
Orientation="Vertical" /> Orientation="Vertical" />
<primitives:ColorSpectrum <primitives:ColorSpectrum
x:Name="ColorSpectrum" Name="ColorSpectrum"
Grid.Column="1" Grid.Column="1"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
@@ -157,7 +157,7 @@
MinValue="{TemplateBinding MinValue}" MinValue="{TemplateBinding MinValue}"
Shape="{TemplateBinding ColorSpectrumShape}" /> Shape="{TemplateBinding ColorSpectrumShape}" />
<primitives:ColorSlider <primitives:ColorSlider
x:Name="ColorSpectrumAlphaSlider" Name="ColorSpectrumAlphaSlider"
Grid.Column="2" Grid.Column="2"
Margin="12,0,0,0" Margin="12,0,0,0"
HorizontalAlignment="Center" HorizontalAlignment="Center"
@@ -281,7 +281,7 @@
CornerRadius="3"> CornerRadius="3">
<Grid ColumnDefinitions="1*,1*" IsVisible="{TemplateBinding IsColorModelVisible}"> <Grid ColumnDefinitions="1*,1*" IsVisible="{TemplateBinding IsColorModelVisible}">
<RadioButton <RadioButton
x:Name="RgbRadioButton" Name="RgbRadioButton"
Grid.Column="0" Grid.Column="0"
HorizontalContentAlignment="Center" HorizontalContentAlignment="Center"
VerticalContentAlignment="Center" VerticalContentAlignment="Center"
@@ -293,7 +293,7 @@
Mode=TwoWay}" Mode=TwoWay}"
Theme="{DynamicResource ColorViewRadioButton}" /> Theme="{DynamicResource ColorViewRadioButton}" />
<RadioButton <RadioButton
x:Name="HsvRadioButton" Name="HsvRadioButton"
Grid.Column="1" Grid.Column="1"
HorizontalContentAlignment="Center" HorizontalContentAlignment="Center"
VerticalContentAlignment="Center" VerticalContentAlignment="Center"
@@ -307,7 +307,7 @@
</Grid> </Grid>
</Border> </Border>
<TextBox <TextBox
x:Name="PART_HexTextBox" Name="PART_HexTextBox"
Grid.Column="2" Grid.Column="2"
Height="32" Height="32"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
@@ -319,7 +319,7 @@
<!-- Color component editing controls --> <!-- Color component editing controls -->
<!-- Component 1 RGB:Red HSV:Hue --> <!-- Component 1 RGB:Red HSV:Hue -->
<NumericUpDown <NumericUpDown
x:Name="Component1NumericUpDown" Name="Component1NumericUpDown"
Grid.Row="2" Grid.Row="2"
Grid.Column="0" Grid.Column="0"
Width="{DynamicResource ColorViewNumericUpDownWidth}" Width="{DynamicResource ColorViewNumericUpDownWidth}"
@@ -334,7 +334,7 @@
ShowButtonSpinner="False" ShowButtonSpinner="False"
Value="{Binding Value, ElementName=Component1Slider}" /> Value="{Binding Value, ElementName=Component1Slider}" />
<primitives:ColorSlider <primitives:ColorSlider
x:Name="Component1Slider" Name="Component1Slider"
Grid.Row="2" Grid.Row="2"
Grid.Column="1" Grid.Column="1"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
@@ -350,7 +350,7 @@
TickFrequency="1" /> TickFrequency="1" />
<!-- Component 2 RGB:Green HSV:Saturation --> <!-- Component 2 RGB:Green HSV:Saturation -->
<NumericUpDown <NumericUpDown
x:Name="Component2NumericUpDown" Name="Component2NumericUpDown"
Grid.Row="3" Grid.Row="3"
Grid.Column="0" Grid.Column="0"
Width="{DynamicResource ColorViewNumericUpDownWidth}" Width="{DynamicResource ColorViewNumericUpDownWidth}"
@@ -365,7 +365,7 @@
ShowButtonSpinner="False" ShowButtonSpinner="False"
Value="{Binding Value, ElementName=Component2Slider}" /> Value="{Binding Value, ElementName=Component2Slider}" />
<primitives:ColorSlider <primitives:ColorSlider
x:Name="Component2Slider" Name="Component2Slider"
Grid.Row="3" Grid.Row="3"
Grid.Column="1" Grid.Column="1"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
@@ -381,7 +381,7 @@
TickFrequency="1" /> TickFrequency="1" />
<!-- Component 3 RGB:Blue HSV:Value --> <!-- Component 3 RGB:Blue HSV:Value -->
<NumericUpDown <NumericUpDown
x:Name="Component3NumericUpDown" Name="Component3NumericUpDown"
Grid.Row="4" Grid.Row="4"
Grid.Column="0" Grid.Column="0"
Width="{DynamicResource ColorViewNumericUpDownWidth}" Width="{DynamicResource ColorViewNumericUpDownWidth}"
@@ -396,7 +396,7 @@
ShowButtonSpinner="False" ShowButtonSpinner="False"
Value="{Binding Value, ElementName=Component3Slider}" /> Value="{Binding Value, ElementName=Component3Slider}" />
<primitives:ColorSlider <primitives:ColorSlider
x:Name="Component3Slider" Name="Component3Slider"
Grid.Row="4" Grid.Row="4"
Grid.Column="1" Grid.Column="1"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
@@ -412,7 +412,7 @@
TickFrequency="1" /> TickFrequency="1" />
<!-- Alpha Component --> <!-- Alpha Component -->
<NumericUpDown <NumericUpDown
x:Name="AlphaComponentNumericUpDown" Name="AlphaComponentNumericUpDown"
Grid.Row="5" Grid.Row="5"
Grid.Column="0" Grid.Column="0"
Width="{DynamicResource ColorViewNumericUpDownWidth}" Width="{DynamicResource ColorViewNumericUpDownWidth}"
@@ -434,7 +434,7 @@
</NumericUpDown.IsVisible> </NumericUpDown.IsVisible>
</NumericUpDown> </NumericUpDown>
<primitives:ColorSlider <primitives:ColorSlider
x:Name="AlphaComponentSlider" Name="AlphaComponentSlider"
Grid.Row="5" Grid.Row="5"
Grid.Column="1" Grid.Column="1"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
@@ -559,7 +559,7 @@
CornerRadius="8 8 0 0" CornerRadius="8 8 0 0"
ClipToBounds="True"> ClipToBounds="True">
<primitives:ColorSpectrum <primitives:ColorSpectrum
x:Name="ColorSpectrum" Name="ColorSpectrum"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
Components="{TemplateBinding ColorSpectrumComponents}" Components="{TemplateBinding ColorSpectrumComponents}"
@@ -573,7 +573,7 @@
Shape="{TemplateBinding ColorSpectrumShape}" /> Shape="{TemplateBinding ColorSpectrumShape}" />
</Border> </Border>
<primitives:ColorSlider <primitives:ColorSlider
x:Name="ColorSpectrumThirdComponentSlider" Name="ColorSpectrumThirdComponentSlider"
Grid.Row="1" Grid.Row="1"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Center" VerticalAlignment="Center"
@@ -585,7 +585,7 @@
Orientation="Horizontal" /> Orientation="Horizontal" />
<primitives:ColorSlider <primitives:ColorSlider
x:Name="ColorSpectrumAlphaSlider" Name="ColorSpectrumAlphaSlider"
Grid.Row="2" Grid.Row="2"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Center" VerticalAlignment="Center"
@@ -612,32 +612,32 @@
Height="20" Height="20"
CornerRadius="4" /> CornerRadius="4" />
<Panel <Panel
x:Name="PART_TextBoxPanel" Name="PART_TextBoxPanel"
Width="106" Width="106"
Margin="4 0 0 0" Margin="4 0 0 0"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Center"> VerticalAlignment="Center">
<TextBox <TextBox
x:Name="PART_HexTextBox" Name="PART_HexTextBox"
Classes="Small" Classes="Small"
InnerLeftContent="#" InnerLeftContent="#"
IsVisible="{Binding #ColorModelComboBox.SelectedValue, Converter={StaticResource ToColorModel}, ConverterParameter=Hex}" IsVisible="{Binding #ColorModelComboBox.SelectedValue, Converter={StaticResource ToColorModel}, ConverterParameter=Hex}"
Text="{TemplateBinding Color, Converter={StaticResource ColorToHexConverter}, Mode=TwoWay}" Text="{TemplateBinding Color, Converter={StaticResource ColorToHexConverter}, Mode=TwoWay}"
MaxLength="8" /> MaxLength="8" />
<TextBox <TextBox
x:Name="PART_RgbaTextBox" Name="PART_RgbaTextBox"
Classes="Small" Classes="Small"
IsVisible="{Binding #ColorModelComboBox.SelectedValue, Converter={StaticResource ToColorModel}, ConverterParameter=Rgba}" IsVisible="{Binding #ColorModelComboBox.SelectedValue, Converter={StaticResource ToColorModel}, ConverterParameter=Rgba}"
Text="{TemplateBinding Color, Converter={StaticResource ColorToTextConverter}, Mode=TwoWay}" /> Text="{TemplateBinding Color, Converter={StaticResource ColorToTextConverter}, Mode=TwoWay}" />
<TextBox <TextBox
x:Name="PART_HsvaTextBox" Name="PART_HsvaTextBox"
Classes="Small" Classes="Small"
IsVisible="{Binding #ColorModelComboBox.SelectedValue, Converter={StaticResource ToColorModel}, ConverterParameter=Hsva}" IsVisible="{Binding #ColorModelComboBox.SelectedValue, Converter={StaticResource ToColorModel}, ConverterParameter=Hsva}"
Text="{TemplateBinding HsvColor, Converter={StaticResource HsvColorToTextConverter}, Mode=TwoWay}" /> Text="{TemplateBinding HsvColor, Converter={StaticResource HsvColorToTextConverter}, Mode=TwoWay}" />
</Panel> </Panel>
<NumericUpDown <NumericUpDown
x:Name="AlphaComponentNumericUpDown" Name="AlphaComponentNumericUpDown"
Width="70" Width="70"
HorizontalAlignment="Right" HorizontalAlignment="Right"
VerticalAlignment="Center" VerticalAlignment="Center"
@@ -652,7 +652,7 @@
IsVisible="{TemplateBinding IsAlphaVisible}" IsVisible="{TemplateBinding IsAlphaVisible}"
Value="{Binding #ColorSpectrumAlphaSlider.Value}" /> Value="{Binding #ColorSpectrumAlphaSlider.Value}" />
<ComboBox <ComboBox
x:Name="ColorModelComboBox" Name="ColorModelComboBox"
Width="80" Width="80"
VerticalAlignment="Center" VerticalAlignment="Center"
Classes="Small" Classes="Small"

View File

@@ -30,7 +30,7 @@
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
Background="{DynamicResource ColorControlCheckeredBackgroundBrush}" /> Background="{DynamicResource ColorControlCheckeredBackgroundBrush}" />
<Border <Border
x:Name="PART_AccentDecrement2Border" Name="PART_AccentDecrement2Border"
Grid.Column="0" Grid.Column="0"
Background="{TemplateBinding HsvColor, Background="{TemplateBinding HsvColor,
Converter={StaticResource AccentColorConverter}, Converter={StaticResource AccentColorConverter},
@@ -39,7 +39,7 @@
Converter={StaticResource LeftCornerRadiusFilterConverter}}" Converter={StaticResource LeftCornerRadiusFilterConverter}}"
Tag="-2" /> Tag="-2" />
<Border <Border
x:Name="PART_AccentDecrement1Border" Name="PART_AccentDecrement1Border"
Grid.Column="1" Grid.Column="1"
Background="{TemplateBinding HsvColor, Background="{TemplateBinding HsvColor,
Converter={StaticResource AccentColorConverter}, Converter={StaticResource AccentColorConverter},
@@ -60,14 +60,14 @@
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
Background="{DynamicResource ColorControlCheckeredBackgroundBrush}" /> Background="{DynamicResource ColorControlCheckeredBackgroundBrush}" />
<Border <Border
x:Name="PART_AccentIncrement1Border" Name="PART_AccentIncrement1Border"
Grid.Column="0" Grid.Column="0"
Background="{TemplateBinding HsvColor, Background="{TemplateBinding HsvColor,
Converter={StaticResource AccentColorConverter}, Converter={StaticResource AccentColorConverter},
ConverterParameter='1'}" ConverterParameter='1'}"
Tag="1" /> Tag="1" />
<Border <Border
x:Name="PART_AccentIncrement2Border" Name="PART_AccentIncrement2Border"
Grid.Column="1" Grid.Column="1"
Background="{TemplateBinding HsvColor, Background="{TemplateBinding HsvColor,
Converter={StaticResource AccentColorConverter}, Converter={StaticResource AccentColorConverter},

View File

@@ -15,16 +15,16 @@
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="{x:Type ColorSpectrum}"> <ControlTemplate TargetType="{x:Type ColorSpectrum}">
<Panel <Panel
x:Name="PART_LayoutRoot" Name="PART_LayoutRoot"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"> VerticalAlignment="Stretch">
<Panel <Panel
x:Name="PART_SizingPanel" Name="PART_SizingPanel"
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center" VerticalAlignment="Center"
ClipToBounds="True"> ClipToBounds="True">
<Rectangle <Rectangle
x:Name="PART_SpectrumRectangle" Name="PART_SpectrumRectangle"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
IsHitTestVisible="False" IsHitTestVisible="False"
@@ -36,7 +36,7 @@
RadiusY="{TemplateBinding CornerRadius, RadiusY="{TemplateBinding CornerRadius,
Converter={StaticResource BottomRightCornerRadiusConverter}}" /> Converter={StaticResource BottomRightCornerRadiusConverter}}" />
<Rectangle <Rectangle
x:Name="PART_SpectrumOverlayRectangle" Name="PART_SpectrumOverlayRectangle"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
IsHitTestVisible="False" IsHitTestVisible="False"
@@ -48,7 +48,7 @@
RadiusY="{TemplateBinding CornerRadius, RadiusY="{TemplateBinding CornerRadius,
Converter={StaticResource BottomRightCornerRadiusConverter}}" /> Converter={StaticResource BottomRightCornerRadiusConverter}}" />
<Ellipse <Ellipse
x:Name="PART_SpectrumEllipse" Name="PART_SpectrumEllipse"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
IsHitTestVisible="False" IsHitTestVisible="False"
@@ -56,7 +56,7 @@
Converter={StaticResource EnumToBoolConverter}, Converter={StaticResource EnumToBoolConverter},
ConverterParameter={x:Static controls:ColorSpectrumShape.Ring}}" /> ConverterParameter={x:Static controls:ColorSpectrumShape.Ring}}" />
<Ellipse <Ellipse
x:Name="PART_SpectrumOverlayEllipse" Name="PART_SpectrumOverlayEllipse"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
IsHitTestVisible="False" IsHitTestVisible="False"
@@ -64,24 +64,24 @@
Converter={StaticResource EnumToBoolConverter}, Converter={StaticResource EnumToBoolConverter},
ConverterParameter={x:Static controls:ColorSpectrumShape.Ring}}" /> ConverterParameter={x:Static controls:ColorSpectrumShape.Ring}}" />
<Canvas <Canvas
x:Name="PART_InputTarget" Name="PART_InputTarget"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
Background="Transparent"> Background="Transparent">
<!-- Note: ToolTip.VerticalOffset is for touch devices to keep the tip above fingers --> <!-- Note: ToolTip.VerticalOffset is for touch devices to keep the tip above fingers -->
<Panel <Panel
x:Name="PART_SelectionEllipsePanel" Name="PART_SelectionEllipsePanel"
ToolTip.Placement="Top" ToolTip.Placement="Top"
ToolTip.VerticalOffset="-10"> ToolTip.VerticalOffset="-10">
<Ellipse <Ellipse
x:Name="FocusEllipse" Name="FocusEllipse"
Margin="-2" Margin="-2"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
IsHitTestVisible="False" IsHitTestVisible="False"
StrokeThickness="2" /> StrokeThickness="2" />
<Ellipse <Ellipse
x:Name="SelectionEllipse" Name="SelectionEllipse"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
IsHitTestVisible="False" IsHitTestVisible="False"
@@ -92,7 +92,7 @@
</Panel> </Panel>
</Canvas> </Canvas>
<Rectangle <Rectangle
x:Name="BorderRectangle" Name="BorderRectangle"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
IsHitTestVisible="False" IsHitTestVisible="False"
@@ -104,7 +104,7 @@
RadiusY="{TemplateBinding CornerRadius, RadiusY="{TemplateBinding CornerRadius,
Converter={StaticResource BottomRightCornerRadiusConverter}}" /> Converter={StaticResource BottomRightCornerRadiusConverter}}" />
<Ellipse <Ellipse
x:Name="BorderEllipse" Name="BorderEllipse"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
IsHitTestVisible="False" IsHitTestVisible="False"

View File

@@ -90,7 +90,7 @@
ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplate="{TemplateBinding ContentTemplate}"
CornerRadius="{TemplateBinding CornerRadius}" /> CornerRadius="{TemplateBinding CornerRadius}" />
<Rectangle <Rectangle
x:Name="BorderRectangle" Name="BorderRectangle"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
IsHitTestVisible="False" IsHitTestVisible="False"
@@ -124,7 +124,7 @@
<Setter Property="RadioButton.Template"> <Setter Property="RadioButton.Template">
<ControlTemplate TargetType="RadioButton"> <ControlTemplate TargetType="RadioButton">
<ContentPresenter <ContentPresenter
x:Name="PART_ContentPresenter" Name="PART_ContentPresenter"
Margin="{TemplateBinding Margin}" Margin="{TemplateBinding Margin}"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
@@ -174,7 +174,7 @@
<!-- Backgrounds --> <!-- Backgrounds -->
<!-- TODO: Background="{DynamicResource ColorViewTabBackgroundBrush}" --> <!-- TODO: Background="{DynamicResource ColorViewTabBackgroundBrush}" -->
<Border <Border
x:Name="ContentBackgroundBorder" Name="ContentBackgroundBorder"
Grid.Row="0" Grid.Row="0"
Grid.RowSpan="2" Grid.RowSpan="2"
Height="{TemplateBinding Height}" Height="{TemplateBinding Height}"
@@ -186,7 +186,7 @@
CornerRadius="{TemplateBinding CornerRadius}" /> CornerRadius="{TemplateBinding CornerRadius}" />
<TabControl <TabControl
x:Name="PART_TabControl" Name="PART_TabControl"
Grid.Row="0" Grid.Row="0"
Padding="0" Padding="0"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
@@ -223,7 +223,7 @@
<ColumnDefinition Width="Auto" MinWidth="32" /> <ColumnDefinition Width="Auto" MinWidth="32" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<primitives:ColorSlider <primitives:ColorSlider
x:Name="ColorSpectrumThirdComponentSlider" Name="ColorSpectrumThirdComponentSlider"
Grid.Column="0" Grid.Column="0"
Margin="0,0,12,0" Margin="0,0,12,0"
HorizontalAlignment="Center" HorizontalAlignment="Center"
@@ -237,7 +237,7 @@
IsVisible="{TemplateBinding IsColorSpectrumSliderVisible}" IsVisible="{TemplateBinding IsColorSpectrumSliderVisible}"
Orientation="Vertical" /> Orientation="Vertical" />
<primitives:ColorSpectrum <primitives:ColorSpectrum
x:Name="ColorSpectrum" Name="ColorSpectrum"
Grid.Column="1" Grid.Column="1"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
@@ -251,7 +251,7 @@
MinValue="{TemplateBinding MinValue}" MinValue="{TemplateBinding MinValue}"
Shape="{TemplateBinding ColorSpectrumShape}" /> Shape="{TemplateBinding ColorSpectrumShape}" />
<primitives:ColorSlider <primitives:ColorSlider
x:Name="ColorSpectrumAlphaSlider" Name="ColorSpectrumAlphaSlider"
Grid.Column="2" Grid.Column="2"
Margin="12,0,0,0" Margin="12,0,0,0"
HorizontalAlignment="Center" HorizontalAlignment="Center"
@@ -347,7 +347,7 @@
CornerRadius="3"> CornerRadius="3">
<Grid ColumnDefinitions="1*,1*" IsVisible="{TemplateBinding IsColorModelVisible}"> <Grid ColumnDefinitions="1*,1*" IsVisible="{TemplateBinding IsColorModelVisible}">
<RadioButton <RadioButton
x:Name="RgbRadioButton" Name="RgbRadioButton"
Grid.Column="0" Grid.Column="0"
HorizontalContentAlignment="Center" HorizontalContentAlignment="Center"
VerticalContentAlignment="Center" VerticalContentAlignment="Center"
@@ -359,7 +359,7 @@
Mode=TwoWay}" Mode=TwoWay}"
Theme="{DynamicResource ColorViewRadioButton}" /> Theme="{DynamicResource ColorViewRadioButton}" />
<RadioButton <RadioButton
x:Name="HsvRadioButton" Name="HsvRadioButton"
Grid.Column="1" Grid.Column="1"
HorizontalContentAlignment="Center" HorizontalContentAlignment="Center"
VerticalContentAlignment="Center" VerticalContentAlignment="Center"
@@ -373,7 +373,7 @@
</Grid> </Grid>
</Border> </Border>
<TextBox <TextBox
x:Name="PART_HexTextBox" Name="PART_HexTextBox"
Grid.Column="2" Grid.Column="2"
Height="32" Height="32"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
@@ -385,7 +385,7 @@
<!-- Color component editing controls --> <!-- Color component editing controls -->
<!-- Component 1 RGB:Red HSV:Hue --> <!-- Component 1 RGB:Red HSV:Hue -->
<NumericUpDown <NumericUpDown
x:Name="Component1NumericUpDown" Name="Component1NumericUpDown"
Grid.Row="2" Grid.Row="2"
Grid.Column="0" Grid.Column="0"
Width="{DynamicResource ColorViewNumericUpDownWidth}" Width="{DynamicResource ColorViewNumericUpDownWidth}"
@@ -400,7 +400,7 @@
ShowButtonSpinner="False" ShowButtonSpinner="False"
Value="{Binding Value, ElementName=Component1Slider}" /> Value="{Binding Value, ElementName=Component1Slider}" />
<primitives:ColorSlider <primitives:ColorSlider
x:Name="Component1Slider" Name="Component1Slider"
Grid.Row="2" Grid.Row="2"
Grid.Column="1" Grid.Column="1"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
@@ -416,7 +416,7 @@
TickFrequency="1" /> TickFrequency="1" />
<!-- Component 2 RGB:Green HSV:Saturation --> <!-- Component 2 RGB:Green HSV:Saturation -->
<NumericUpDown <NumericUpDown
x:Name="Component2NumericUpDown" Name="Component2NumericUpDown"
Grid.Row="3" Grid.Row="3"
Grid.Column="0" Grid.Column="0"
Width="{DynamicResource ColorViewNumericUpDownWidth}" Width="{DynamicResource ColorViewNumericUpDownWidth}"
@@ -431,7 +431,7 @@
ShowButtonSpinner="False" ShowButtonSpinner="False"
Value="{Binding Value, ElementName=Component2Slider}" /> Value="{Binding Value, ElementName=Component2Slider}" />
<primitives:ColorSlider <primitives:ColorSlider
x:Name="Component2Slider" Name="Component2Slider"
Grid.Row="3" Grid.Row="3"
Grid.Column="1" Grid.Column="1"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
@@ -447,7 +447,7 @@
TickFrequency="1" /> TickFrequency="1" />
<!-- Component 3 RGB:Blue HSV:Value --> <!-- Component 3 RGB:Blue HSV:Value -->
<NumericUpDown <NumericUpDown
x:Name="Component3NumericUpDown" Name="Component3NumericUpDown"
Grid.Row="4" Grid.Row="4"
Grid.Column="0" Grid.Column="0"
Width="{DynamicResource ColorViewNumericUpDownWidth}" Width="{DynamicResource ColorViewNumericUpDownWidth}"
@@ -462,7 +462,7 @@
ShowButtonSpinner="False" ShowButtonSpinner="False"
Value="{Binding Value, ElementName=Component3Slider}" /> Value="{Binding Value, ElementName=Component3Slider}" />
<primitives:ColorSlider <primitives:ColorSlider
x:Name="Component3Slider" Name="Component3Slider"
Grid.Row="4" Grid.Row="4"
Grid.Column="1" Grid.Column="1"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
@@ -478,7 +478,7 @@
TickFrequency="1" /> TickFrequency="1" />
<!-- Alpha Component --> <!-- Alpha Component -->
<NumericUpDown <NumericUpDown
x:Name="AlphaComponentNumericUpDown" Name="AlphaComponentNumericUpDown"
Grid.Row="5" Grid.Row="5"
Grid.Column="0" Grid.Column="0"
Width="{DynamicResource ColorViewNumericUpDownWidth}" Width="{DynamicResource ColorViewNumericUpDownWidth}"
@@ -500,7 +500,7 @@
</NumericUpDown.IsVisible> </NumericUpDown.IsVisible>
</NumericUpDown> </NumericUpDown>
<primitives:ColorSlider <primitives:ColorSlider
x:Name="AlphaComponentSlider" Name="AlphaComponentSlider"
Grid.Row="5" Grid.Row="5"
Grid.Column="1" Grid.Column="1"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
@@ -584,7 +584,7 @@
CornerRadius="8 8 0 0" CornerRadius="8 8 0 0"
ClipToBounds="True"> ClipToBounds="True">
<primitives:ColorSpectrum <primitives:ColorSpectrum
x:Name="ColorSpectrum" Name="ColorSpectrum"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
Components="{TemplateBinding ColorSpectrumComponents}" Components="{TemplateBinding ColorSpectrumComponents}"
@@ -598,7 +598,7 @@
Shape="{TemplateBinding ColorSpectrumShape}" /> Shape="{TemplateBinding ColorSpectrumShape}" />
</Border> </Border>
<primitives:ColorSlider <primitives:ColorSlider
x:Name="ColorSpectrumThirdComponentSlider" Name="ColorSpectrumThirdComponentSlider"
Grid.Row="1" Grid.Row="1"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Center" VerticalAlignment="Center"
@@ -610,7 +610,7 @@
Orientation="Horizontal" /> Orientation="Horizontal" />
<primitives:ColorSlider <primitives:ColorSlider
x:Name="ColorSpectrumAlphaSlider" Name="ColorSpectrumAlphaSlider"
Grid.Row="2" Grid.Row="2"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Center" VerticalAlignment="Center"
@@ -637,32 +637,32 @@
Height="20" Height="20"
CornerRadius="4" /> CornerRadius="4" />
<Panel <Panel
x:Name="PART_TextBoxPanel" Name="PART_TextBoxPanel"
Width="106" Width="106"
Margin="4 0 0 0" Margin="4 0 0 0"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Center"> VerticalAlignment="Center">
<TextBox <TextBox
x:Name="PART_HexTextBox" Name="PART_HexTextBox"
Classes="Small" Classes="Small"
InnerLeftContent="#" InnerLeftContent="#"
IsVisible="{Binding #ColorModelComboBox.SelectedValue, Converter={StaticResource ToColorModel}, ConverterParameter=Hex}" IsVisible="{Binding #ColorModelComboBox.SelectedValue, Converter={StaticResource ToColorModel}, ConverterParameter=Hex}"
Text="{TemplateBinding Color, Converter={StaticResource ColorToHexConverter}, Mode=TwoWay}" Text="{TemplateBinding Color, Converter={StaticResource ColorToHexConverter}, Mode=TwoWay}"
MaxLength="8" /> MaxLength="8" />
<TextBox <TextBox
x:Name="PART_RgbaTextBox" Name="PART_RgbaTextBox"
Classes="Small" Classes="Small"
IsVisible="{Binding #ColorModelComboBox.SelectedValue, Converter={StaticResource ToColorModel}, ConverterParameter=Rgba}" IsVisible="{Binding #ColorModelComboBox.SelectedValue, Converter={StaticResource ToColorModel}, ConverterParameter=Rgba}"
Text="{TemplateBinding Color, Converter={StaticResource ColorToTextConverter}, Mode=TwoWay}" /> Text="{TemplateBinding Color, Converter={StaticResource ColorToTextConverter}, Mode=TwoWay}" />
<TextBox <TextBox
x:Name="PART_HsvaTextBox" Name="PART_HsvaTextBox"
Classes="Small" Classes="Small"
IsVisible="{Binding #ColorModelComboBox.SelectedValue, Converter={StaticResource ToColorModel}, ConverterParameter=Hsva}" IsVisible="{Binding #ColorModelComboBox.SelectedValue, Converter={StaticResource ToColorModel}, ConverterParameter=Hsva}"
Text="{TemplateBinding HsvColor, Converter={StaticResource HsvColorToTextConverter}, Mode=TwoWay}" /> Text="{TemplateBinding HsvColor, Converter={StaticResource HsvColorToTextConverter}, Mode=TwoWay}" />
</Panel> </Panel>
<NumericUpDown <NumericUpDown
x:Name="AlphaComponentNumericUpDown" Name="AlphaComponentNumericUpDown"
Width="70" Width="70"
HorizontalAlignment="Right" HorizontalAlignment="Right"
VerticalAlignment="Center" VerticalAlignment="Center"
@@ -677,7 +677,7 @@
IsVisible="{TemplateBinding IsAlphaVisible}" IsVisible="{TemplateBinding IsAlphaVisible}"
Value="{Binding #ColorSpectrumAlphaSlider.Value}" /> Value="{Binding #ColorSpectrumAlphaSlider.Value}" />
<ComboBox <ComboBox
x:Name="ColorModelComboBox" Name="ColorModelComboBox"
Width="80" Width="80"
VerticalAlignment="Center" VerticalAlignment="Center"
Classes="Small" Classes="Small"

View File

@@ -17,5 +17,5 @@
<SolidColorBrush x:Key="ColorSpectrumBorderBrush" Opacity="0.08" Color="#1C1F23" /> <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> </ResourceDictionary>

View File

@@ -17,5 +17,5 @@
<SolidColorBrush x:Key="ColorSpectrumBorderBrush" Opacity="0.08" Color="#1C1F23" /> <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> </ResourceDictionary>

View File

@@ -4,7 +4,7 @@
<PropertyGroup> <PropertyGroup>
<Title>Semi.Avalonia.ColorPicker</Title> <Title>Semi.Avalonia.ColorPicker</Title>
<PackageReleaseNotes>Update to Avalonia 11.2.0</PackageReleaseNotes> <PackageReleaseNotes>Update to Avalonia 11.2.1</PackageReleaseNotes>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))"> <PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">

View File

@@ -34,14 +34,14 @@
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate> <ControlTemplate>
<Border <Border
x:Name="CellBorder" Name="CellBorder"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}"> CornerRadius="{TemplateBinding CornerRadius}">
<Grid x:Name="PART_CellRoot" ColumnDefinitions="*,Auto"> <Grid Name="PART_CellRoot" ColumnDefinitions="*,Auto">
<Rectangle <Rectangle
x:Name="CurrencyVisual" Name="CurrencyVisual"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
Fill="Transparent" Fill="Transparent"
@@ -50,7 +50,7 @@
Stroke="{DynamicResource DataGridCellCurrentBorderBrush}" Stroke="{DynamicResource DataGridCellCurrentBorderBrush}"
StrokeThickness="{DynamicResource DataGridCellVisualStrokeThickness}" /> StrokeThickness="{DynamicResource DataGridCellVisualStrokeThickness}" />
<Panel <Panel
x:Name="FocusVisual" Name="FocusVisual"
Grid.Column="0" Grid.Column="0"
IsHitTestVisible="False" IsHitTestVisible="False"
IsVisible="False"> IsVisible="False">
@@ -74,7 +74,7 @@
Foreground="{TemplateBinding Foreground}" /> Foreground="{TemplateBinding Foreground}" />
<Rectangle <Rectangle
x:Name="InvalidVisualElement" Name="InvalidVisualElement"
Grid.Column="0" Grid.Column="0"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
@@ -116,7 +116,7 @@
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="DataGridColumnHeader"> <ControlTemplate TargetType="DataGridColumnHeader">
<Border <Border
x:Name="HeaderBorder" Name="HeaderBorder"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
@@ -152,7 +152,7 @@
Fill="{TemplateBinding SeparatorBrush}" Fill="{TemplateBinding SeparatorBrush}"
IsVisible="{TemplateBinding AreSeparatorsVisible}" /> IsVisible="{TemplateBinding AreSeparatorsVisible}" />
<Panel <Panel
x:Name="FocusVisual" Name="FocusVisual"
Grid.Column="0" Grid.Column="0"
IsHitTestVisible="False" IsHitTestVisible="False"
IsVisible="False"> IsVisible="False">
@@ -203,7 +203,7 @@
TargetType="DataGridColumnHeader"> TargetType="DataGridColumnHeader">
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate> <ControlTemplate>
<Grid x:Name="TopLeftHeaderRoot" RowDefinitions="*,*,Auto"> <Grid Name="TopLeftHeaderRoot" RowDefinitions="*,*,Auto">
<Border <Border
Grid.RowSpan="2" Grid.RowSpan="2"
BorderBrush="{DynamicResource DataGridLineBrush}" BorderBrush="{DynamicResource DataGridLineBrush}"
@@ -227,7 +227,7 @@
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate> <ControlTemplate>
<Grid <Grid
x:Name="PART_Root" Name="PART_Root"
ColumnDefinitions="Auto,*" ColumnDefinitions="Auto,*"
RowDefinitions="*,*,Auto"> RowDefinitions="*,*,Auto">
<Border <Border
@@ -237,18 +237,18 @@
BorderThickness="0,0,1,0"> BorderThickness="0,0,1,0">
<Grid Background="{TemplateBinding Background}"> <Grid Background="{TemplateBinding Background}">
<Rectangle <Rectangle
x:Name="RowInvalidVisualElement" Name="RowInvalidVisualElement"
Fill="{DynamicResource DataGridCellErrorBrush}" Fill="{DynamicResource DataGridCellErrorBrush}"
Opacity="0" Opacity="0"
Stretch="Fill" /> Stretch="Fill" />
<Rectangle <Rectangle
x:Name="BackgroundRectangle" Name="BackgroundRectangle"
Fill="{DynamicResource DataGridRowBackground}" Fill="{DynamicResource DataGridRowBackground}"
Stretch="Fill" /> Stretch="Fill" />
</Grid> </Grid>
</Border> </Border>
<Rectangle <Rectangle
x:Name="HorizontalSeparator" Name="HorizontalSeparator"
Grid.Row="2" Grid.Row="2"
Grid.Column="0" Grid.Column="0"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
@@ -277,7 +277,7 @@
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="DataGridRow"> <ControlTemplate TargetType="DataGridRow">
<Border <Border
x:Name="RowBorder" Name="RowBorder"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
@@ -295,7 +295,7 @@
Background="{DynamicResource DataGridRowBackground}" Background="{DynamicResource DataGridRowBackground}"
CornerRadius="3" /> CornerRadius="3" />
<Rectangle <Rectangle
x:Name="InvalidVisualElement" Name="InvalidVisualElement"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
Fill="{DynamicResource DataGridRowErrorBackground}" Fill="{DynamicResource DataGridRowErrorBackground}"
Opacity="0" /> Opacity="0" />
@@ -419,7 +419,7 @@
</StackPanel> </StackPanel>
<Rectangle <Rectangle
x:Name="CurrencyVisual" Name="CurrencyVisual"
Grid.Row="0" Grid.Row="0"
Grid.Column="0" Grid.Column="0"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
@@ -430,7 +430,7 @@
Stroke="{DynamicResource DataGridRowGroupHeaderCurrentBorderBrush}" Stroke="{DynamicResource DataGridRowGroupHeaderCurrentBorderBrush}"
StrokeThickness="{DynamicResource DataGridRowGroupHeaderVisualStrokeThickness}" /> StrokeThickness="{DynamicResource DataGridRowGroupHeaderVisualStrokeThickness}" />
<Panel <Panel
x:Name="FocusVisual" Name="FocusVisual"
Grid.Row="0" Grid.Row="0"
Grid.Column="0" Grid.Column="0"
IsHitTestVisible="False" IsHitTestVisible="False"
@@ -453,7 +453,7 @@
DataGridFrozenGrid.IsFrozen="True" /> DataGridFrozenGrid.IsFrozen="True" />
<Rectangle <Rectangle
x:Name="PART_BottomGridLine" Name="PART_BottomGridLine"
Grid.Row="1" Grid.Row="1"
Grid.Column="0" Grid.Column="0"
Grid.ColumnSpan="5" Grid.ColumnSpan="5"
@@ -482,7 +482,7 @@
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="DataGrid"> <ControlTemplate TargetType="DataGrid">
<Border <Border
x:Name="DataGridBorder" Name="DataGridBorder"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
@@ -544,7 +544,7 @@
Orientation="Horizontal" /> Orientation="Horizontal" />
</Grid> </Grid>
<Border <Border
x:Name="PART_DisabledVisualElement" Name="PART_DisabledVisualElement"
Grid.Row="0" Grid.Row="0"
Grid.RowSpan="4" Grid.RowSpan="4"
Grid.Column="0" Grid.Column="0"

View File

@@ -4,7 +4,7 @@
<PropertyGroup> <PropertyGroup>
<Title>Semi.Avalonia.DataGrid</Title> <Title>Semi.Avalonia.DataGrid</Title>
<PackageReleaseNotes>Update to Avalonia 11.2.0</PackageReleaseNotes> <PackageReleaseNotes>Update to Avalonia 11.2.1</PackageReleaseNotes>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))"> <PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">

View File

@@ -2,8 +2,8 @@
<Styles.Resources> <Styles.Resources>
<ResourceDictionary> <ResourceDictionary>
<ResourceDictionary.ThemeDictionaries> <ResourceDictionary.ThemeDictionaries>
<MergeResourceInclude x:Key="Default" Source="avares://Semi.Avalonia.TreeDataGrid/Light.axaml" /> <ResourceInclude x:Key="Default" Source="avares://Semi.Avalonia.TreeDataGrid/Light.axaml" />
<MergeResourceInclude x:Key="Dark" Source="avares://Semi.Avalonia.TreeDataGrid/Dark.axaml" /> <ResourceInclude x:Key="Dark" Source="avares://Semi.Avalonia.TreeDataGrid/Dark.axaml" />
</ResourceDictionary.ThemeDictionaries> </ResourceDictionary.ThemeDictionaries>
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<ResourceInclude Source="avares://Semi.Avalonia.TreeDataGrid/TreeDataGrid.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia.TreeDataGrid/TreeDataGrid.axaml" />

View File

@@ -4,14 +4,14 @@
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<LangVersion>latest</LangVersion> <LangVersion>latest</LangVersion>
<PackageReleaseNotes>Update to Avalonia 11.1-rc1</PackageReleaseNotes> <Version>11.0.10.1</Version>
<PackageReleaseNotes>Update to 11.0.10.1</PackageReleaseNotes>
<Authors>IRIHI Technology Co., Ltd.</Authors> <Authors>IRIHI Technology Co., Ltd.</Authors>
<Description>Avalonia Theme inspired by Semi Design.</Description> <Description>Avalonia Theme inspired by Semi Design.</Description>
<RepositoryUrl>https://github.com/irihitech/Semi.Avalonia</RepositoryUrl> <RepositoryUrl>https://github.com/irihitech/Semi.Avalonia</RepositoryUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression> <PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIcon>irihi.png</PackageIcon> <PackageIcon>irihi.png</PackageIcon>
<PackageProjectUrl>https://github.com/irihitech/Semi.Avalonia</PackageProjectUrl> <PackageProjectUrl>https://github.com/irihitech/Semi.Avalonia</PackageProjectUrl>
<AvaloniaVersion>11.0.0</AvaloniaVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))"> <PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
@@ -19,7 +19,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Avalonia.Controls.TreeDataGrid" Version="$(AvaloniaVersion)"/> <PackageReference Include="Avalonia.Controls.TreeDataGrid" Version="11.0.10"/>
<None Include="irihi.png" Pack="true" PackagePath=""/> <None Include="irihi.png" Pack="true" PackagePath=""/>
</ItemGroup> </ItemGroup>

View File

@@ -11,7 +11,7 @@
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="TreeDataGrid"> <ControlTemplate TargetType="TreeDataGrid">
<Border <Border
x:Name="RootBorder" Name="RootBorder"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
@@ -23,7 +23,7 @@
HorizontalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Hidden"
IsVisible="{TemplateBinding ShowColumnHeaders}" IsVisible="{TemplateBinding ShowColumnHeaders}"
VerticalScrollBarVisibility="Disabled"> VerticalScrollBarVisibility="Disabled">
<Border x:Name="ColumnHeadersPresenterBorder"> <Border Name="ColumnHeadersPresenterBorder">
<TreeDataGridColumnHeadersPresenter <TreeDataGridColumnHeadersPresenter
Name="PART_ColumnHeadersPresenter" Name="PART_ColumnHeadersPresenter"
ElementFactory="{TemplateBinding ElementFactory}" ElementFactory="{TemplateBinding ElementFactory}"
@@ -173,7 +173,7 @@
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate> <ControlTemplate>
<Border <Border
x:Name="CellBorder" Name="CellBorder"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
@@ -205,7 +205,7 @@
VerticalAlignment="Center" VerticalAlignment="Center"
Background="Transparent"> Background="Transparent">
<PathIcon <PathIcon
x:Name="ChevronPath" Name="ChevronPath"
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center" VerticalAlignment="Center"
Data="{DynamicResource TreeDataGridItemCollapsedChevronPathData}" Data="{DynamicResource TreeDataGridItemCollapsedChevronPathData}"
@@ -222,7 +222,7 @@
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate> <ControlTemplate>
<Border <Border
x:Name="CellBorder" Name="CellBorder"
Padding="{TemplateBinding Indent, Padding="{TemplateBinding Indent,
Converter={x:Static conv:IndentConverter.Instance}}" Converter={x:Static conv:IndentConverter.Instance}}"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
@@ -253,7 +253,7 @@
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate> <ControlTemplate>
<Border <Border
x:Name="CellBorder" Name="CellBorder"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
@@ -275,7 +275,7 @@
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate> <ControlTemplate>
<Border <Border
x:Name="CellBorder" Name="CellBorder"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"

View File

@@ -5,9 +5,17 @@
<ControlTheme x:Key="{x:Type AdornerLayer}" TargetType="AdornerLayer"> <ControlTheme x:Key="{x:Type AdornerLayer}" TargetType="AdornerLayer">
<Setter Property="DefaultFocusAdorner"> <Setter Property="DefaultFocusAdorner">
<FocusAdornerTemplate> <FocusAdornerTemplate>
<Border BorderThickness="{DynamicResource AdornerLayerBorderThickness}" <Border Theme="{DynamicResource AdornerLayerBorder}" />
BorderBrush="{DynamicResource AdornerLayerStroke}" />
</FocusAdornerTemplate> </FocusAdornerTemplate>
</Setter> </Setter>
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="AdornerLayerBorder" TargetType="Border">
<Setter Property="BorderThickness" Value="{DynamicResource AdornerLayerBorderThickness}" />
<Setter Property="BorderBrush" Value="{DynamicResource AdornerLayerBorderBrush}" />
<Setter Property="CornerRadius" Value="{DynamicResource AdornerLayerCornerRadius}" />
<Style Selector="^.Solid">
<Setter Property="BorderBrush" Value="{DynamicResource AdornerLayerSolidBorderBrush}" />
</Style>
</ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

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

View File

@@ -17,12 +17,12 @@
</Design.PreviewWith> </Design.PreviewWith>
<ControlTheme x:Key="CardBorder" TargetType="Border"> <ControlTheme x:Key="CardBorder" TargetType="Border">
<Setter Property="Border.Padding" Value="{DynamicResource ThicknessCardPadding}" /> <Setter Property="Padding" Value="{DynamicResource ThicknessCardPadding}" />
<Setter Property="Border.BorderBrush" Value="{DynamicResource BorderCardBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource BorderCardBorderBrush}" />
<Setter Property="Border.CornerRadius" Value="{DynamicResource RadiusCardCornerRadius}" /> <Setter Property="CornerRadius" Value="{DynamicResource RadiusCardCornerRadius}" />
<Setter Property="Border.Background" Value="{DynamicResource BorderCardBackground}" /> <Setter Property="Background" Value="{DynamicResource BorderCardBackground}" />
<Setter Property="Border.BorderThickness" Value="{DynamicResource ThicknessCardBorderThickness}" /> <Setter Property="BorderThickness" Value="{DynamicResource ThicknessCardBorderThickness}" />
<Setter Property="Border.Margin" Value="{DynamicResource ThicknessCardMargin}" /> <Setter Property="Margin" Value="{DynamicResource ThicknessCardMargin}" />
<Style Selector="^.Shadow"> <Style Selector="^.Shadow">
<Setter Property="BoxShadow" Value="{DynamicResource BorderCardBoxShadow}" /> <Setter Property="BoxShadow" Value="{DynamicResource BorderCardBoxShadow}" />
</Style> </Style>

View File

@@ -27,7 +27,7 @@
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="Button"> <ControlTemplate TargetType="Button">
<ContentPresenter <ContentPresenter
x:Name="PART_ContentPresenter" Name="PART_ContentPresenter"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
@@ -102,6 +102,12 @@
x:Key="SolidButton" x:Key="SolidButton"
BasedOn="{StaticResource {x:Type Button}}" BasedOn="{StaticResource {x:Type Button}}"
TargetType="Button"> TargetType="Button">
<Setter Property="FocusAdorner">
<FocusAdornerTemplate>
<Border Theme="{DynamicResource AdornerLayerBorder}"
Classes="Solid" />
</FocusAdornerTemplate>
</Setter>
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter"> <Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" /> <Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" /> <Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" />

View File

@@ -13,7 +13,7 @@
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate> <ControlTemplate>
<ContentPresenter <ContentPresenter
x:Name="PART_ContentPresenter" Name="PART_ContentPresenter"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"

View File

@@ -20,11 +20,11 @@
<ControlTemplate TargetType="CalendarDatePicker"> <ControlTemplate TargetType="CalendarDatePicker">
<DataValidationErrors> <DataValidationErrors>
<Panel <Panel
x:Name="LayoutRoot" Name="LayoutRoot"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"> VerticalAlignment="Stretch">
<Border <Border
x:Name="Background" Name="Background"
BackgroundSizing="{TemplateBinding BackgroundSizing}" BackgroundSizing="{TemplateBinding BackgroundSizing}"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"

View File

@@ -43,7 +43,7 @@
Orientation="Horizontal" Orientation="Horizontal"
Spacing="2" Spacing="2"
TextElement.FontSize="10"> TextElement.FontSize="10">
<Button x:Name="PART_FullScreenButton" Theme="{StaticResource CaptionButton}"> <Button Name="PART_FullScreenButton" Theme="{StaticResource CaptionButton}">
<PathIcon <PathIcon
Name="PART_FullScreenButtonIcon" Name="PART_FullScreenButtonIcon"
Width="12" Width="12"
@@ -51,14 +51,14 @@
Data="{DynamicResource WindowExpandGlyph}" Data="{DynamicResource WindowExpandGlyph}"
Foreground="{Binding $parent[Button].Foreground}" /> Foreground="{Binding $parent[Button].Foreground}" />
</Button> </Button>
<Button x:Name="PART_MinimizeButton" Theme="{StaticResource CaptionButton}"> <Button Name="PART_MinimizeButton" Theme="{StaticResource CaptionButton}">
<PathIcon <PathIcon
Width="12" Width="12"
Height="12" Height="12"
Data="{DynamicResource WindowMinimizeGlyph}" Data="{DynamicResource WindowMinimizeGlyph}"
Foreground="{Binding $parent[Button].Foreground}" /> Foreground="{Binding $parent[Button].Foreground}" />
</Button> </Button>
<Button x:Name="PART_RestoreButton" Theme="{StaticResource CaptionButton}"> <Button Name="PART_RestoreButton" Theme="{StaticResource CaptionButton}">
<PathIcon <PathIcon
Name="PART_RestoreButtonIcon" Name="PART_RestoreButtonIcon"
Width="12" Width="12"
@@ -67,7 +67,7 @@
Foreground="{Binding $parent[Button].Foreground}" /> Foreground="{Binding $parent[Button].Foreground}" />
</Button> </Button>
<Button <Button
x:Name="PART_CloseButton" Name="PART_CloseButton"
Background="{DynamicResource CaptionButtonClosePointeroverBackground}" Background="{DynamicResource CaptionButtonClosePointeroverBackground}"
BorderBrush="{DynamicResource CaptionButtonClosePressedBackground}" BorderBrush="{DynamicResource CaptionButtonClosePressedBackground}"
Theme="{StaticResource CaptionButton}"> Theme="{StaticResource CaptionButton}">

View File

@@ -26,9 +26,9 @@
<ControlTheme x:Key="CarouselIndicatorDotListBoxItem" TargetType="ListBoxItem"> <ControlTheme x:Key="CarouselIndicatorDotListBoxItem" TargetType="ListBoxItem">
<!-- Use fit in different color themes, Use Foreground to normal, Background to hover, BorderBrush to Selected --> <!-- Use fit in different color themes, Use Foreground to normal, Background to hover, BorderBrush to Selected -->
<Setter Property="ListBoxItem.Cursor" Value="Hand" /> <Setter Property="Cursor" Value="Hand" />
<Setter Property="ListBoxItem.Foreground" Value="{DynamicResource CarouselIndicatorForeground}" /> <Setter Property="Foreground" Value="{DynamicResource CarouselIndicatorForeground}" />
<Setter Property="ListBoxItem.Template"> <Setter Property="Template">
<ControlTemplate TargetType="ListBoxItem"> <ControlTemplate TargetType="ListBoxItem">
<Panel> <Panel>
<Border Padding="4" Background="Transparent"> <Border Padding="4" Background="Transparent">
@@ -56,9 +56,9 @@
<ControlTheme x:Key="CarouselIndicatorLineListBoxItem" TargetType="ListBoxItem"> <ControlTheme x:Key="CarouselIndicatorLineListBoxItem" TargetType="ListBoxItem">
<!-- Use fit in different color themes, Use Foreground to normal, Background to hover, BorderBrush to Selected --> <!-- Use fit in different color themes, Use Foreground to normal, Background to hover, BorderBrush to Selected -->
<Setter Property="ListBoxItem.Cursor" Value="Hand" /> <Setter Property="Cursor" Value="Hand" />
<Setter Property="ListBoxItem.Background" Value="{DynamicResource CarouselIndicatorForeground}" /> <Setter Property="Background" Value="{DynamicResource CarouselIndicatorForeground}" />
<Setter Property="ListBoxItem.Template"> <Setter Property="Template">
<ControlTemplate TargetType="ListBoxItem"> <ControlTemplate TargetType="ListBoxItem">
<Panel Background="Transparent"> <Panel Background="Transparent">
<Border Padding="2,0" Background="Transparent"> <Border Padding="2,0" Background="Transparent">
@@ -83,9 +83,9 @@
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="CarouselIndicatorColumnarListBoxItem" TargetType="ListBoxItem"> <ControlTheme x:Key="CarouselIndicatorColumnarListBoxItem" TargetType="ListBoxItem">
<Setter Property="ListBoxItem.Cursor" Value="Hand" /> <Setter Property="Cursor" Value="Hand" />
<Setter Property="ListBoxItem.Background" Value="{DynamicResource CarouselIndicatorForeground}" /> <Setter Property="Background" Value="{DynamicResource CarouselIndicatorForeground}" />
<Setter Property="ListBoxItem.Template"> <Setter Property="Template">
<ControlTemplate TargetType="ListBoxItem"> <ControlTemplate TargetType="ListBoxItem">
<Panel Background="Transparent"> <Panel Background="Transparent">
<Border Padding="2,0" Background="Transparent"> <Border Padding="2,0" Background="Transparent">
@@ -120,9 +120,9 @@
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="CarouselButton" TargetType="Button"> <ControlTheme x:Key="CarouselButton" TargetType="Button">
<Setter Property="Button.Cursor" Value="Hand" /> <Setter Property="Cursor" Value="Hand" />
<Setter Property="Button.Foreground" Value="{DynamicResource CarouselButtonForeground}" /> <Setter Property="Foreground" Value="{DynamicResource CarouselButtonForeground}" />
<Setter Property="Button.Template"> <Setter Property="Template">
<ControlTemplate TargetType="Button"> <ControlTemplate TargetType="Button">
<Grid Background="Transparent"> <Grid Background="Transparent">
<PathIcon <PathIcon

View File

@@ -26,7 +26,7 @@
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="CheckBox"> <ControlTemplate TargetType="CheckBox">
<Border <Border
x:Name="RootBorder" Name="RootBorder"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
@@ -37,7 +37,7 @@
TemplatedControl.IsTemplateFocusTarget="True" TemplatedControl.IsTemplateFocusTarget="True"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
<Border <Border
x:Name="NormalRectangle" Name="NormalRectangle"
Width="{DynamicResource CheckBoxBoxWidth}" Width="{DynamicResource CheckBoxBoxWidth}"
Height="{DynamicResource CheckBoxBoxHeight}" Height="{DynamicResource CheckBoxBoxHeight}"
Background="{DynamicResource CheckBoxDefaultBackground}" Background="{DynamicResource CheckBoxDefaultBackground}"
@@ -46,13 +46,13 @@
CornerRadius="{TemplateBinding CornerRadius}" CornerRadius="{TemplateBinding CornerRadius}"
UseLayoutRounding="False" /> UseLayoutRounding="False" />
<PathIcon <PathIcon
x:Name="CheckGlyph" Name="CheckGlyph"
Width="{DynamicResource CheckBoxBoxGlyphWidth}" Width="{DynamicResource CheckBoxBoxGlyphWidth}"
Height="{DynamicResource CheckBoxBoxGlyphHeight}" Height="{DynamicResource CheckBoxBoxGlyphHeight}"
Foreground="{DynamicResource CheckBoxGlyphFill}" /> Foreground="{DynamicResource CheckBoxGlyphFill}" />
</Panel> </Panel>
<ContentPresenter <ContentPresenter
x:Name="PART_ContentPresenter" Name="PART_ContentPresenter"
Grid.Column="1" Grid.Column="1"
Margin="{DynamicResource CheckBoxContentMargin}" Margin="{DynamicResource CheckBoxContentMargin}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
@@ -196,7 +196,7 @@
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="CheckBox"> <ControlTemplate TargetType="CheckBox">
<Border <Border
x:Name="RootBorder" Name="RootBorder"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
@@ -207,7 +207,7 @@
TemplatedControl.IsTemplateFocusTarget="True" TemplatedControl.IsTemplateFocusTarget="True"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
<Border <Border
x:Name="NormalRectangle" Name="NormalRectangle"
Width="{DynamicResource CheckBoxBoxWidth}" Width="{DynamicResource CheckBoxBoxWidth}"
Height="{DynamicResource CheckBoxBoxHeight}" Height="{DynamicResource CheckBoxBoxHeight}"
Background="{DynamicResource CheckBoxDefaultBackground}" Background="{DynamicResource CheckBoxDefaultBackground}"
@@ -216,7 +216,7 @@
CornerRadius="{TemplateBinding CornerRadius}" CornerRadius="{TemplateBinding CornerRadius}"
UseLayoutRounding="False" /> UseLayoutRounding="False" />
<PathIcon <PathIcon
x:Name="CheckGlyph" Name="CheckGlyph"
Width="{DynamicResource CheckBoxBoxGlyphWidth}" Width="{DynamicResource CheckBoxBoxGlyphWidth}"
Height="{DynamicResource CheckBoxBoxGlyphHeight}" Height="{DynamicResource CheckBoxBoxGlyphHeight}"
Foreground="{DynamicResource CheckBoxGlyphFill}" /> Foreground="{DynamicResource CheckBoxGlyphFill}" />
@@ -343,7 +343,7 @@
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="CheckBox"> <ControlTemplate TargetType="CheckBox">
<Border <Border
x:Name="RootBorder" Name="RootBorder"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
@@ -358,7 +358,7 @@
VerticalAlignment="Top" VerticalAlignment="Top"
Margin="{DynamicResource CheckBoxBoxMargin}"> Margin="{DynamicResource CheckBoxBoxMargin}">
<Border <Border
x:Name="NormalRectangle" Name="NormalRectangle"
Width="{DynamicResource CheckBoxBoxWidth}" Width="{DynamicResource CheckBoxBoxWidth}"
Height="{DynamicResource CheckBoxBoxHeight}" Height="{DynamicResource CheckBoxBoxHeight}"
Background="{DynamicResource CheckBoxDefaultBackground}" Background="{DynamicResource CheckBoxDefaultBackground}"
@@ -367,14 +367,14 @@
CornerRadius="{DynamicResource CheckBoxBoxCornerRadius}" CornerRadius="{DynamicResource CheckBoxBoxCornerRadius}"
UseLayoutRounding="False" /> UseLayoutRounding="False" />
<PathIcon <PathIcon
x:Name="CheckGlyph" Name="CheckGlyph"
Width="{DynamicResource CheckBoxBoxGlyphWidth}" Width="{DynamicResource CheckBoxBoxGlyphWidth}"
Height="{DynamicResource CheckBoxBoxGlyphHeight}" Height="{DynamicResource CheckBoxBoxGlyphHeight}"
Foreground="{DynamicResource CheckBoxGlyphFill}" /> Foreground="{DynamicResource CheckBoxGlyphFill}" />
</Panel> </Panel>
<ContentPresenter <ContentPresenter
x:Name="PART_ContentPresenter" Name="PART_ContentPresenter"
Grid.Column="1" Grid.Column="1"
Margin="{DynamicResource CheckBoxContentMargin}" Margin="{DynamicResource CheckBoxContentMargin}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
@@ -546,7 +546,7 @@
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="CheckBox"> <ControlTemplate TargetType="CheckBox">
<ContentPresenter <ContentPresenter
x:Name="PART_ContentPresenter" Name="PART_ContentPresenter"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"

View File

@@ -30,11 +30,11 @@
<ControlTheme x:Key="{x:Type ComboBox}" TargetType="ComboBox"> <ControlTheme x:Key="{x:Type ComboBox}" TargetType="ComboBox">
<Setter Property="Padding" Value="{DynamicResource ComboBoxSelectorDefaultPadding}" /> <Setter Property="Padding" Value="{DynamicResource ComboBoxSelectorDefaultPadding}" />
<Setter Property="FocusAdorner" Value="{x:Null}" /> <Setter Property="FocusAdorner" Value="{x:Null}" />
<Setter Property="MaxDropDownHeight" Value="504" /> <Setter Property="MaxDropDownHeight" Value="{DynamicResource ComboBoxPopupMaxDropDownHeight}" />
<Setter Property="Background" Value="{DynamicResource ComboBoxSelectorBackground}" /> <Setter Property="Background" Value="{DynamicResource ComboBoxSelectorBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource ComboBoxSelectorBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource ComboBoxSelectorBorderBrush}" />
<Setter Property="BackgroundSizing" Value="OuterBorderEdge" /> <Setter Property="BackgroundSizing" Value="OuterBorderEdge" />
<Setter Property="BorderThickness" Value="1" /> <Setter Property="BorderThickness" Value="{DynamicResource ComboBoxSelectorThickness}" />
<Setter Property="Cursor" Value="Hand" /> <Setter Property="Cursor" Value="Hand" />
<Setter Property="CornerRadius" Value="{DynamicResource ComboBoxSelectorCornerRadius}" /> <Setter Property="CornerRadius" Value="{DynamicResource ComboBoxSelectorCornerRadius}" />
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" /> <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
@@ -49,7 +49,7 @@
<DataValidationErrors> <DataValidationErrors>
<Grid ColumnDefinitions="*, Auto"> <Grid ColumnDefinitions="*, Auto">
<Border <Border
x:Name="Background" Name="Background"
Grid.Column="0" Grid.Column="0"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
@@ -59,19 +59,18 @@
CornerRadius="{TemplateBinding CornerRadius}" CornerRadius="{TemplateBinding CornerRadius}"
MinHeight="{TemplateBinding MinHeight}" /> MinHeight="{TemplateBinding MinHeight}" />
<TextBlock <TextBlock
x:Name="PlaceholderTextBlock" Name="PlaceholderTextBlock"
Grid.Column="0" Grid.Column="0"
Margin="{TemplateBinding Padding}" Margin="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
TextTrimming="CharacterEllipsis" TextTrimming="CharacterEllipsis"
Foreground="{TemplateBinding Foreground}" Foreground="{TemplateBinding Foreground}"
IsVisible="{TemplateBinding SelectionBoxItem, IsVisible="{TemplateBinding SelectionBoxItem,Converter={x:Static ObjectConverters.IsNull}}"
Converter={x:Static ObjectConverters.IsNull}}"
Opacity="0.3" Opacity="0.3"
Text="{TemplateBinding PlaceholderText}" /> Text="{TemplateBinding PlaceholderText}" />
<ContentPresenter <ContentPresenter
x:Name="ContentPresenter" Name="ContentPresenter"
Grid.Column="0" Grid.Column="0"
Margin="{TemplateBinding Padding}" Margin="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
@@ -81,27 +80,19 @@
<Button <Button
Name="ClearButton" Name="ClearButton"
Grid.Column="1" Grid.Column="1"
Margin="0,0,8,0" Margin="{DynamicResource ComboBoxClearButtonMargin}"
Command="{Binding $parent[ComboBox].Clear}" Command="{Binding $parent[ComboBox].Clear}"
Content="{DynamicResource IconButtonClearData}" Content="{DynamicResource IconButtonClearData}"
Focusable="False" Focusable="False"
IsVisible="False" IsVisible="False"
Theme="{DynamicResource InnerIconButton}" /> Theme="{DynamicResource InnerIconButton}" />
<Border
x:Name="DropDownOverlay"
Grid.Column="1"
Width="30"
Margin="0,1,1,1"
HorizontalAlignment="Right"
Background="Transparent"
IsVisible="False" />
<PathIcon <PathIcon
x:Name="DropDownGlyph" Name="DropDownGlyph"
Grid.Column="1" Grid.Column="1"
Width="12" Width="{DynamicResource ComboBoxIconWidth}"
Height="12" Height="{DynamicResource ComboBoxIconHeight}"
Margin="0,0,12,0" Margin="{DynamicResource ComboBoxIconMargin}"
Data="{DynamicResource ComboBoxIcon}" Data="{DynamicResource ComboBoxIcon}"
Foreground="{DynamicResource ComboBoxIconDefaultForeground}" Foreground="{DynamicResource ComboBoxIconDefaultForeground}"
IsHitTestVisible="False" IsHitTestVisible="False"
@@ -119,24 +110,26 @@
PlacementTarget="Background" PlacementTarget="Background"
WindowManagerAddShadowHint="False"> WindowManagerAddShadowHint="False">
<Border <Border
x:Name="PopupBorder" Name="PopupBorder"
Margin="0,4"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
Margin="{DynamicResource ComboBoxPopupBorderMargin}"
Background="{DynamicResource ComboBoxPopupBackground}" Background="{DynamicResource ComboBoxPopupBackground}"
BorderBrush="{DynamicResource ComboBoxPopupBorderBrush}" BorderBrush="{DynamicResource ComboBoxPopupBorderBrush}"
BorderThickness="{DynamicResource ComboBoxPopupBorderThickness}" BorderThickness="{DynamicResource ComboBoxPopupBorderThickness}"
BoxShadow="{DynamicResource ComboBoxPopupBoxShadow}" BoxShadow="{DynamicResource ComboBoxPopupBoxShadow}"
ClipToBounds="True" CornerRadius="{DynamicResource ComboBoxPopupBoxCornerRadius}">
CornerRadius="6"> <Border
<ScrollViewer CornerRadius="{DynamicResource ComboBoxPopupBoxCornerRadius}"
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" ClipToBounds="True">
IsDeferredScrollingEnabled="{TemplateBinding (ScrollViewer.IsDeferredScrollingEnabled)}" <ScrollViewer
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"> HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
<ItemsPresenter IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
Name="PART_ItemsPresenter" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
Margin="{DynamicResource ComboBoxDropdownContentMargin}" <ItemsPresenter
ItemsPanel="{TemplateBinding ItemsPanel}" /> Name="PART_ItemsPresenter"
</ScrollViewer> ItemsPanel="{TemplateBinding ItemsPanel}" />
</ScrollViewer>
</Border>
</Border> </Border>
</Popup> </Popup>
</Grid> </Grid>

View File

@@ -3,18 +3,18 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:CompileBindings="True"> x:CompileBindings="True">
<ControlTheme x:Key="{x:Type ContextMenu}" TargetType="ContextMenu"> <ControlTheme x:Key="{x:Type ContextMenu}" TargetType="ContextMenu">
<Setter Property="ContextMenu.Background" Value="{DynamicResource MenuFlyoutBackground}" /> <Setter Property="Background" Value="{DynamicResource MenuFlyoutBackground}" />
<Setter Property="ContextMenu.BorderBrush" Value="{DynamicResource MenuFlyoutBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource MenuFlyoutBorderBrush}" />
<Setter Property="ContextMenu.BorderThickness" Value="{DynamicResource MenuFlyoutBorderThickness}" /> <Setter Property="BorderThickness" Value="{DynamicResource MenuFlyoutBorderThickness}" />
<Setter Property="ContextMenu.CornerRadius" Value="{DynamicResource MenuFlyoutCornerRadius}" /> <Setter Property="CornerRadius" Value="{DynamicResource MenuFlyoutCornerRadius}" />
<Setter Property="ContextMenu.MaxWidth" Value="{DynamicResource MenuFlyoutMaxWidth}" /> <Setter Property="MaxWidth" Value="{DynamicResource MenuFlyoutMaxWidth}" />
<Setter Property="ContextMenu.MinHeight" Value="{DynamicResource MenuFlyoutMinHeight}" /> <Setter Property="MinHeight" Value="{DynamicResource MenuFlyoutMinHeight}" />
<Setter Property="ContextMenu.Padding" Value="{DynamicResource MenuFlyoutPadding}" /> <Setter Property="Padding" Value="{DynamicResource MenuFlyoutPadding}" />
<Setter Property="Focusable" Value="True"></Setter> <Setter Property="Focusable" Value="True"></Setter>
<Setter Property="ContextMenu.HorizontalAlignment" Value="Stretch" /> <Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="TextBlock.FontWeight" Value="Normal" /> <Setter Property="FontWeight" Value="Normal" />
<Setter Property="ContextMenu.WindowManagerAddShadowHint" Value="False" /> <Setter Property="WindowManagerAddShadowHint" Value="False" />
<Setter Property="ContextMenu.Template"> <Setter Property="Template">
<ControlTemplate TargetType="ContextMenu"> <ControlTemplate TargetType="ContextMenu">
<Border <Border
MinHeight="{TemplateBinding MinHeight}" MinHeight="{TemplateBinding MinHeight}"

View File

@@ -7,7 +7,7 @@
<ControlTemplate TargetType="DataValidationErrors"> <ControlTemplate TargetType="DataValidationErrors">
<DockPanel LastChildFill="True"> <DockPanel LastChildFill="True">
<ContentControl <ContentControl
x:Name="InlineDataValidationContentControl" Name="InlineDataValidationContentControl"
Margin="0,4,0,0" Margin="0,4,0,0"
Content="{Binding (DataValidationErrors.Errors)}" Content="{Binding (DataValidationErrors.Errors)}"
ContentTemplate="{TemplateBinding ErrorTemplate}" ContentTemplate="{TemplateBinding ErrorTemplate}"

View File

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

View File

@@ -57,7 +57,7 @@
x:Key="DateTimePickerItem" x:Key="DateTimePickerItem"
BasedOn="{StaticResource {x:Type ListBoxItem}}" BasedOn="{StaticResource {x:Type ListBoxItem}}"
TargetType="ListBoxItem"> TargetType="ListBoxItem">
<Setter Property="ListBoxItem.CornerRadius" Value="0" /> <Setter Property="CornerRadius" Value="0" />
<Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="HorizontalContentAlignment" Value="Center" /> <Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="Background" Value="{DynamicResource DateTimePickerListItemBackground}" /> <Setter Property="Background" Value="{DynamicResource DateTimePickerListItemBackground}" />
@@ -65,10 +65,6 @@
<Style Selector="^:selected"> <Style Selector="^:selected">
<Setter Property="IsHitTestVisible" Value="False" /> <Setter Property="IsHitTestVisible" Value="False" />
</Style> </Style>
<Style Selector="^.MonthItem">
<Setter Property="Padding" Value="{DynamicResource DatePickerFlyoutPresenterMonthPadding}" />
<Setter Property="HorizontalContentAlignment" Value="Left" />
</Style>
</ControlTheme> </ControlTheme>
<!-- This is used for both the accept/dismiss & buttons in the presenter --> <!-- This is used for both the accept/dismiss & buttons in the presenter -->
@@ -83,7 +79,7 @@
<ControlTemplate TargetType="Button"> <ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}"> <Border Background="{TemplateBinding Background}">
<ContentPresenter <ContentPresenter
x:Name="ContentPresenter" Name="ContentPresenter"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"

View File

@@ -22,16 +22,16 @@
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="DropDownButton"> <ControlTemplate TargetType="DropDownButton">
<Border <Border
x:Name="RootBorder" Name="RootBorder"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
BackgroundSizing="{TemplateBinding BackgroundSizing}" BackgroundSizing="{TemplateBinding BackgroundSizing}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
ClipToBounds="True" ClipToBounds="True"
CornerRadius="{TemplateBinding CornerRadius}"> CornerRadius="{TemplateBinding CornerRadius}">
<Grid x:Name="InnerGrid" ColumnDefinitions="*,Auto"> <Grid Name="InnerGrid" ColumnDefinitions="*,Auto">
<ContentPresenter <ContentPresenter
x:Name="PART_ContentPresenter" Name="PART_ContentPresenter"
Grid.Column="0" Grid.Column="0"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
@@ -41,7 +41,7 @@
Foreground="{TemplateBinding Foreground}" Foreground="{TemplateBinding Foreground}"
RecognizesAccessKey="True" /> RecognizesAccessKey="True" />
<PathIcon <PathIcon
x:Name="DropDownGlyph" Name="DropDownGlyph"
Grid.Column="1" Grid.Column="1"
Width="12" Width="12"
Height="12" Height="12"
@@ -125,6 +125,12 @@
x:Key="SolidDropDownButton" x:Key="SolidDropDownButton"
BasedOn="{StaticResource {x:Type DropDownButton}}" BasedOn="{StaticResource {x:Type DropDownButton}}"
TargetType="DropDownButton"> TargetType="DropDownButton">
<Setter Property="FocusAdorner">
<FocusAdornerTemplate>
<Border Theme="{DynamicResource AdornerLayerBorder}"
Classes="Solid" />
</FocusAdornerTemplate>
</Setter>
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" /> <Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
<Style Selector="^ /template/ Border#RootBorder"> <Style Selector="^ /template/ Border#RootBorder">
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" /> <Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" />

View File

@@ -28,9 +28,9 @@
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="Expander"> <ControlTemplate TargetType="Expander">
<DockPanel> <DockPanel>
<LayoutTransformControl x:Name="ExpanderHeaderLayoutContainer" Margin="{DynamicResource ExpanderHeaderMargin}"> <LayoutTransformControl Name="ExpanderHeaderLayoutContainer" Margin="{DynamicResource ExpanderHeaderMargin}">
<ToggleButton <ToggleButton
x:Name="ExpanderHeader" Name="ExpanderHeader"
Padding="{DynamicResource ExpanderHeaderPadding}" Padding="{DynamicResource ExpanderHeaderPadding}"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
HorizontalContentAlignment="Stretch" HorizontalContentAlignment="Stretch"
@@ -64,12 +64,12 @@
</LayoutTransformControl> </LayoutTransformControl>
<LayoutTransformControl Name="ExpanderContentLayoutContainer" MinHeight="1"> <LayoutTransformControl Name="ExpanderContentLayoutContainer" MinHeight="1">
<Border <Border
x:Name="ExpanderContent" Name="ExpanderContent"
MinHeight="2" MinHeight="2"
BorderBrush="{DynamicResource ExpanderSeparatorBorderBrush}" BorderBrush="{DynamicResource ExpanderSeparatorBorderBrush}"
BorderThickness="0,0,0,1"> BorderThickness="0,0,0,1">
<ContentPresenter <ContentPresenter
x:Name="PART_ContentPresenter" Name="PART_ContentPresenter"
Margin="{DynamicResource ExpanderContentMargin}" Margin="{DynamicResource ExpanderContentMargin}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"

View File

@@ -3,24 +3,24 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:CompileBindings="True"> x:CompileBindings="True">
<ControlTheme x:Key="{x:Type FlyoutPresenter}" TargetType="FlyoutPresenter"> <ControlTheme x:Key="{x:Type FlyoutPresenter}" TargetType="FlyoutPresenter">
<Setter Property="FlyoutPresenter.HorizontalContentAlignment" Value="Stretch" /> <Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="FlyoutPresenter.VerticalContentAlignment" Value="Stretch" /> <Setter Property="VerticalContentAlignment" Value="Stretch" />
<Setter Property="FlyoutPresenter.UseLayoutRounding" Value="False" /> <Setter Property="UseLayoutRounding" Value="False" />
<Setter Property="FlyoutPresenter.FontWeight" Value="{DynamicResource FlyoutFontWeight}" /> <Setter Property="FontWeight" Value="{DynamicResource FlyoutFontWeight}" />
<Setter Property="FlyoutPresenter.Background" Value="{DynamicResource FlyoutBackground}" /> <Setter Property="Background" Value="{DynamicResource FlyoutBackground}" />
<Setter Property="FlyoutPresenter.BorderBrush" Value="{DynamicResource FlyoutBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource FlyoutBorderBrush}" />
<Setter Property="FlyoutPresenter.BorderThickness" Value="{DynamicResource FlyoutBorderThickness}" /> <Setter Property="BorderThickness" Value="{DynamicResource FlyoutBorderThickness}" />
<Setter Property="FlyoutPresenter.Padding" Value="{DynamicResource FlyoutPadding}" /> <Setter Property="Padding" Value="{DynamicResource FlyoutPadding}" />
<Setter Property="FlyoutPresenter.MinWidth" Value="{DynamicResource FlyoutMinWidth}" /> <Setter Property="MinWidth" Value="{DynamicResource FlyoutMinWidth}" />
<Setter Property="FlyoutPresenter.MaxWidth" Value="{DynamicResource FlyoutMaxWidth}" /> <Setter Property="MaxWidth" Value="{DynamicResource FlyoutMaxWidth}" />
<Setter Property="FlyoutPresenter.MinHeight" Value="{DynamicResource FlyoutMinHeight}" /> <Setter Property="MinHeight" Value="{DynamicResource FlyoutMinHeight}" />
<Setter Property="FlyoutPresenter.MaxHeight" Value="{DynamicResource FlyoutMaxHeight}" /> <Setter Property="MaxHeight" Value="{DynamicResource FlyoutMaxHeight}" />
<Setter Property="FlyoutPresenter.Foreground" Value="{DynamicResource FlyoutForeground}" /> <Setter Property="Foreground" Value="{DynamicResource FlyoutForeground}" />
<Setter Property="FlyoutPresenter.ClipToBounds" Value="False" /> <Setter Property="ClipToBounds" Value="False" />
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" /> <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" /> <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
<Setter Property="FlyoutPresenter.CornerRadius" Value="{DynamicResource FlyoutCornerRadius}" /> <Setter Property="CornerRadius" Value="{DynamicResource FlyoutCornerRadius}" />
<Setter Property="FlyoutPresenter.Template"> <Setter Property="Template">
<ControlTemplate TargetType="FlyoutPresenter"> <ControlTemplate TargetType="FlyoutPresenter">
<Border <Border
Name="LayoutRoot" Name="LayoutRoot"
@@ -48,25 +48,25 @@
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="LightFlyout" TargetType="FlyoutPresenter"> <ControlTheme x:Key="LightFlyout" TargetType="FlyoutPresenter">
<Setter Property="FlyoutPresenter.HorizontalContentAlignment" Value="Stretch" /> <Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="FlyoutPresenter.VerticalContentAlignment" Value="Stretch" /> <Setter Property="VerticalContentAlignment" Value="Stretch" />
<Setter Property="FlyoutPresenter.UseLayoutRounding" Value="False" /> <Setter Property="UseLayoutRounding" Value="False" />
<Setter Property="FlyoutPresenter.FontWeight" Value="{DynamicResource FlyoutFontWeight}" /> <Setter Property="FontWeight" Value="{DynamicResource FlyoutFontWeight}" />
<Setter Property="FlyoutPresenter.Background" Value="Transparent" /> <Setter Property="Background" Value="Transparent" />
<Setter Property="FlyoutPresenter.BorderBrush" Value="Transparent" /> <Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="FlyoutPresenter.BorderThickness" Value="0" /> <Setter Property="BorderThickness" Value="0" />
<Setter Property="FlyoutPresenter.Padding" Value="{DynamicResource FlyoutPadding}" /> <Setter Property="Padding" Value="{DynamicResource FlyoutPadding}" />
<Setter Property="FlyoutPresenter.MinWidth" Value="{DynamicResource FlyoutMinWidth}" /> <Setter Property="MinWidth" Value="{DynamicResource FlyoutMinWidth}" />
<Setter Property="FlyoutPresenter.MaxWidth" Value="{DynamicResource FlyoutMaxWidth}" /> <Setter Property="MaxWidth" Value="{DynamicResource FlyoutMaxWidth}" />
<Setter Property="FlyoutPresenter.MinHeight" Value="{DynamicResource FlyoutMinHeight}" /> <Setter Property="MinHeight" Value="{DynamicResource FlyoutMinHeight}" />
<Setter Property="FlyoutPresenter.MaxHeight" Value="{DynamicResource FlyoutMaxHeight}" /> <Setter Property="MaxHeight" Value="{DynamicResource FlyoutMaxHeight}" />
<Setter Property="FlyoutPresenter.Foreground" Value="{DynamicResource FlyoutForeground}" /> <Setter Property="Foreground" Value="{DynamicResource FlyoutForeground}" />
<Setter Property="FlyoutPresenter.ClipToBounds" Value="False" /> <Setter Property="ClipToBounds" Value="False" />
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" /> <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" /> <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
<Setter Property="FlyoutPresenter.CornerRadius" Value="{DynamicResource FlyoutCornerRadius}" /> <Setter Property="CornerRadius" Value="{DynamicResource FlyoutCornerRadius}" />
<Setter Property="FlyoutPresenter.Margin" Value="4" /> <Setter Property="Margin" Value="4" />
<Setter Property="FlyoutPresenter.Template"> <Setter Property="Template">
<ControlTemplate TargetType="FlyoutPresenter"> <ControlTemplate TargetType="FlyoutPresenter">
<Border <Border
Name="LayoutRoot" Name="LayoutRoot"

View File

@@ -1,7 +1,31 @@
<ResourceDictionary <ResourceDictionary
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="clr-namespace:Avalonia.Controls.Converters;assembly=Avalonia.Controls"
x:CompileBindings="True"> x:CompileBindings="True">
<Design.PreviewWith>
<StackPanel Spacing="20">
<HeaderedContentControl
Theme="{DynamicResource GroupBox}"
Header="Header" />
<HeaderedContentControl
Theme="{DynamicResource GroupBox}"
Content="Content" />
<HeaderedContentControl
Theme="{DynamicResource GroupBox}"
MaxWidth="360"
Content="Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统。设计系统包含设计语言以及一整套可复用的前端组件,帮助设计师与开发者更容易地打造高质量的、用户体验一致的、符合设计规范的 Web 应用。">
<HeaderedContentControl.Header>
<Panel>
<SelectableTextBlock Text="Semi Design" />
<HyperlinkButton HorizontalAlignment="Right" Content="更多" />
</Panel>
</HeaderedContentControl.Header>
</HeaderedContentControl>
</StackPanel>
</Design.PreviewWith>
<converters:MarginMultiplierConverter x:Key="SeparatorBorderMultiplier" Top="True" Indent="1" />
<ControlTheme x:Key="{x:Type HeaderedContentControl}" TargetType="HeaderedContentControl"> <ControlTheme x:Key="{x:Type HeaderedContentControl}" TargetType="HeaderedContentControl">
<Setter Property="Padding" Value="3" /> <Setter Property="Padding" Value="3" />
<Setter Property="Template"> <Setter Property="Template">
@@ -12,31 +36,31 @@
CornerRadius="{TemplateBinding CornerRadius}" CornerRadius="{TemplateBinding CornerRadius}"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
Padding="{TemplateBinding Padding}"> Padding="{TemplateBinding Padding}">
<Grid RowDefinitions="auto *"> <Grid RowDefinitions="Auto,*">
<ContentPresenter <ContentPresenter
Name="PART_HeaderPresenter" Name="PART_HeaderPresenter"
Grid.Row="0"
Content="{TemplateBinding Header}" Content="{TemplateBinding Header}"
RecognizesAccessKey="True"
ContentTemplate="{TemplateBinding HeaderTemplate}" ContentTemplate="{TemplateBinding HeaderTemplate}"
RecognizesAccessKey="True"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
FontSize="{TemplateBinding FontSize}" FontSize="{TemplateBinding FontSize}"
FontWeight="{TemplateBinding FontWeight}" FontWeight="{TemplateBinding FontWeight}"
FontFamily="{TemplateBinding FontFamily}" FontFamily="{TemplateBinding FontFamily}"
FontStyle="{TemplateBinding FontStyle}" FontStyle="{TemplateBinding FontStyle}" />
Grid.Row="0" />
<ContentPresenter <ContentPresenter
Name="PART_ContentPresenter" Name="PART_ContentPresenter"
Grid.Row="1"
ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplate="{TemplateBinding ContentTemplate}"
Content="{TemplateBinding Content}" Content="{TemplateBinding Content}"
RecognizesAccessKey="True" RecognizesAccessKey="True"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
FontSize="{TemplateBinding FontSize}" FontSize="{TemplateBinding FontSize}"
FontWeight="{TemplateBinding FontWeight}" FontWeight="{TemplateBinding FontWeight}"
FontFamily="{TemplateBinding FontFamily}" FontFamily="{TemplateBinding FontFamily}"
FontStyle="{TemplateBinding FontStyle}" FontStyle="{TemplateBinding FontStyle}" />
Grid.Row="1" />
</Grid> </Grid>
</Border> </Border>
</ControlTemplate> </ControlTemplate>
@@ -44,42 +68,46 @@
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="GroupBox" TargetType="HeaderedContentControl"> <ControlTheme x:Key="GroupBox" TargetType="HeaderedContentControl">
<Setter Property="Background" Value="{DynamicResource HeaderedContentControlDefaultBackground}" /> <Setter Property="Background" Value="{DynamicResource HeaderedContentControlBackground}" />
<Setter Property="BorderThickness" Value="1" /> <Setter Property="BorderBrush" Value="{DynamicResource HeaderedContentControlBorderBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource HeaderedContentControlDefaultBorderBrush}" /> <Setter Property="BorderThickness" Value="{DynamicResource HeaderedContentControlBorderThickness}" />
<Setter Property="CornerRadius" Value="{DynamicResource HeaderedContentControlCornerRadius}" /> <Setter Property="CornerRadius" Value="{DynamicResource HeaderedContentControlCornerRadius}" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Stretch" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="HeaderedContentControl"> <ControlTemplate TargetType="HeaderedContentControl">
<Border <Border
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Width="{TemplateBinding Width}"
Height="{TemplateBinding Height}"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
CornerRadius="{TemplateBinding CornerRadius}" BorderThickness="{TemplateBinding BorderThickness}"
BorderThickness="{TemplateBinding BorderThickness}"> CornerRadius="{TemplateBinding CornerRadius}">
<Grid RowDefinitions="Auto,Auto,Auto"> <Grid RowDefinitions="Auto,Auto,Auto">
<ContentPresenter <ContentPresenter
Name="PART_HeaderPresenter"
Grid.Row="0" Grid.Row="0"
FontWeight="Bold" Padding="{DynamicResource HeaderedContentControlHeaderPadding}"
HorizontalAlignment="Left" FontWeight="{DynamicResource HeaderedContentControlHeaderFontWeight}"
VerticalAlignment="Stretch" IsVisible="{TemplateBinding Header,Converter={x:Static ObjectConverters.IsNotNull}}"
Content="{TemplateBinding Header}" Content="{TemplateBinding Header}"
ContentTemplate="{TemplateBinding HeaderTemplate}" ContentTemplate="{TemplateBinding HeaderTemplate}" />
Margin="16" /> <Border
<Rectangle Name="SeparatorBorder"
Grid.Row="1" Grid.Row="1"
Fill="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
Height="1" /> BorderThickness="{TemplateBinding BorderThickness, Converter={StaticResource SeparatorBorderMultiplier}}">
<Border.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<TemplateBinding Property="Header" Converter="{x:Static ObjectConverters.IsNotNull}" />
<TemplateBinding Property="Content" Converter="{x:Static ObjectConverters.IsNotNull}" />
</MultiBinding>
</Border.IsVisible>
</Border>
<ContentPresenter <ContentPresenter
Name="PART_ContentPresenter"
Grid.Row="2" Grid.Row="2"
IsVisible="{TemplateBinding Content,Converter={x:Static ObjectConverters.IsNotNull}}"
Padding="{DynamicResource HeaderedContentControlContentPadding}"
Content="{TemplateBinding Content}" Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplate="{TemplateBinding ContentTemplate}"
Margin="16" /> TextWrapping="Wrap" />
</Grid> </Grid>
</Border> </Border>
</ControlTemplate> </ControlTemplate>

View File

@@ -1,118 +1,100 @@
<ResourceDictionary <ResourceDictionary
x:CompileBindings="True"
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:CompileBindings="True">
<Design.PreviewWith>
<StackPanel>
<HyperlinkButton NavigateUri="http://www.irihi.tech/">
链接文本
</HyperlinkButton>
<HyperlinkButton NavigateUri="http://www.irihi.tech/" Classes="WithIcon Underline">
网页链接
</HyperlinkButton>
<HyperlinkButton NavigateUri="http://www.irihi.tech/" Classes="OnlyIcon">
OnlyIcon
</HyperlinkButton>
</StackPanel>
</Design.PreviewWith>
<ControlTheme TargetType="HyperlinkButton" x:Key="{x:Type HyperlinkButton}"> <ControlTheme TargetType="HyperlinkButton" x:Key="{x:Type HyperlinkButton}">
<Setter Property="Padding" Value="0,0,0,0" />
<Setter Property="HorizontalAlignment" Value="Left" /> <Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Top" /> <Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="HorizontalContentAlignment" Value="Left" /> <Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="FontSize" Value="{DynamicResource HyperlinkButtonFontSize}" /> <Setter Property="FontSize" Value="{DynamicResource HyperlinkButtonFontSize}" />
<Setter Property="MinHeight" Value="32" /> <Setter Property="FontWeight" Value="{DynamicResource HyperlinkButtonFontWeight}" />
<Setter Property="Foreground" Value="{DynamicResource HyperlinkButtonForeground}" /> <Setter Property="Foreground" Value="{DynamicResource HyperlinkButtonForeground}" />
<Setter Property="Background" Value="{DynamicResource HyperlinkButtonDefaultBackground}" /> <Setter Property="Cursor" Value="Hand" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="HyperlinkButton"> <ControlTemplate TargetType="HyperlinkButton">
<Grid ColumnDefinitions="Auto,*" x:Name="RootGrid"> <DockPanel>
<Grid <PathIcon
Grid.Column="0" Name="PART_LinkGlyph"
Margin="{DynamicResource HyperlinkButtonLinkGlyphMargin}"
IsVisible="False" IsVisible="False"
Margin="0,0,8,0" Data="{DynamicResource HyperlinkButtonLinkGlyph}"
VerticalAlignment="Center" Foreground="{TemplateBinding Foreground}"
x:Name="IconGrid"> Width="{DynamicResource HyperlinkButtonLinkGlyphWidth}"
<Border Height="{DynamicResource HyperlinkButtonLinkGlyphHeight}" />
Background="{DynamicResource HyperlinkButtonDefaultBackground}"
Height="{DynamicResource HyperlinkButtonIconHeight}"
Opacity="0"
UseLayoutRounding="False"
Width="{DynamicResource HyperlinkButtonIconWidth}"
x:Name="BackgroundRectangle" />
<PathIcon
Data="{DynamicResource HyperlinkButtonLinkGlyph}"
Foreground="{DynamicResource HyperlinkButtonForeground}"
Height="{DynamicResource HyperlinkButtonLinkGlyphHeight}"
Name="LinkGlyph"
VerticalAlignment="Center"
Width="{DynamicResource HyperlinkButtonLinkGlyphWidth}" />
</Grid>
<ContentPresenter <ContentPresenter
Name="PART_ContentPresenter"
Content="{TemplateBinding Content}" Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplate="{TemplateBinding ContentTemplate}"
Cursor="{TemplateBinding Cursor}"
Grid.Column="1"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Padding="0,0,0,0" RecognizesAccessKey="True" />
RecognizesAccessKey="True" </DockPanel>
VerticalAlignment="Center"
x:Name="ContentPresenter" />
</Grid>
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
<Style Selector="^:pointerover"> <Style Selector="^:pointerover">
<Style Selector="^ /template/ PathIcon#LinkGlyph"> <Setter Property="Foreground" Value="{DynamicResource HyperlinkButtonPointeroverForeground}" />
<Setter Property="Foreground" Value="{DynamicResource HyperlinkButtonOverForeground}" />
</Style>
<Style Selector="^ /template/ ContentPresenter#ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource HyperlinkButtonOverForeground}" />
</Style>
</Style> </Style>
<!-- Unvisited Pressed State -->
<Style Selector="^:pressed"> <Style Selector="^:pressed">
<Setter Property="Foreground" Value="{DynamicResource HyperlinkButtonPressedForeground}" />
<Setter Property="RenderTransform" Value="scale(0.98)" /> <Setter Property="RenderTransform" Value="scale(0.98)" />
</Style> </Style>
<!-- Unvisited Disabled state -->
<Style Selector="^:disabled"> <Style Selector="^:disabled">
<Style Selector="^ /template/ PathIcon#LinkGlyph"> <Setter Property="Foreground" Value="{DynamicResource HyperlinkButtonDisabledForeground}" />
<Setter Property="Foreground" Value="{DynamicResource HyperlinkButtonDisabledForeground}" />
</Style>
<Style Selector="^ /template/ ContentPresenter#ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource HyperlinkButtonDisabledForeground}" />
</Style>
</Style> </Style>
<Style Selector="^:visited"> <Style Selector="^:visited">
<Style Selector="^ /template/ PathIcon#LinkGlyph"> <Setter Property="Foreground" Value="{DynamicResource HyperlinkButtonVisitedForeground}" />
<Setter Property="Foreground" Value="{DynamicResource HyperlinkButtonVisitedForeground}" />
</Style>
<Style Selector="^ /template/ ContentPresenter#ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource HyperlinkButtonVisitedForeground}" />
</Style>
<!-- Visited Pointerover State -->
<Style Selector="^:pointerover"> <Style Selector="^:pointerover">
<Style Selector="^ /template/ PathIcon#LinkGlyph"> <Setter Property="Foreground" Value="{DynamicResource HyperlinkButtonPointeroverForeground}" />
<Setter Property="Foreground" Value="{DynamicResource HyperlinkButtonOverForeground}" />
</Style>
<Style Selector="^ /template/ ContentPresenter#ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource HyperlinkButtonOverForeground}" />
</Style>
</Style> </Style>
<!-- Visited Pressed State -->
<Style Selector="^:pressed"> <Style Selector="^:pressed">
<Setter Property="Foreground" Value="{DynamicResource HyperlinkButtonPressedForeground}" />
<Setter Property="RenderTransform" Value="scale(0.98)" /> <Setter Property="RenderTransform" Value="scale(0.98)" />
</Style> </Style>
<!-- Visited Disabled State -->
<Style Selector="^:disabled"> <Style Selector="^:disabled">
<Style Selector="^ /template/ PathIcon#LinkGlyph"> <Setter Property="Foreground" Value="{DynamicResource HyperlinkButtonDisabledForeground}" />
<Setter Property="Foreground" Value="{DynamicResource HyperlinkButtonDisabledForeground}" />
</Style>
<Style Selector="^ /template/ ContentPresenter#ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource HyperlinkButtonDisabledForeground}" />
</Style>
</Style> </Style>
</Style> </Style>
<Style Selector="^.WithIcon"> <Style Selector="^.WithIcon">
<Style Selector="^ /template/ Grid#IconGrid"> <Style Selector="^ /template/ PathIcon#PART_LinkGlyph">
<Setter Property="IsVisible" Value="True" /> <Setter Property="IsVisible" Value="True" />
</Style> </Style>
</Style> </Style>
<Style Selector="^.Underline">
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="TextBlock.TextDecorations" Value="Underline" />
</Style>
</Style>
<Style Selector="^.OnlyIcon">
<Style Selector="^ /template/ PathIcon#PART_LinkGlyph">
<Setter Property="Margin" Value="0" />
<Setter Property="IsVisible" Value="True" />
</Style>
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="IsVisible" Value="False" />
</Style>
</Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -80,8 +80,8 @@
</StackPanel> </StackPanel>
</Design.PreviewWith> </Design.PreviewWith>
<ControlTheme x:Key="{x:Type Label}" TargetType="Label"> <ControlTheme x:Key="{x:Type Label}" TargetType="Label">
<Setter Property="Label.Foreground" Value="{DynamicResource TextBlockDefaultForeground}" /> <Setter Property="Foreground" Value="{DynamicResource TextBlockDefaultForeground}" />
<Setter Property="Label.FontSize" Value="{DynamicResource TextBlockFontSize}" /> <Setter Property="FontSize" Value="{DynamicResource TextBlockFontSize}" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="Label"> <ControlTemplate TargetType="Label">
<ContentPresenter <ContentPresenter
@@ -138,7 +138,7 @@
x:Key="TitleLabel" x:Key="TitleLabel"
BasedOn="{StaticResource {x:Type Label}}" BasedOn="{StaticResource {x:Type Label}}"
TargetType="Label"> TargetType="Label">
<Setter Property="Label.FontWeight" Value="{DynamicResource TextBlockTitleFontWeight}" /> <Setter Property="FontWeight" Value="{DynamicResource TextBlockTitleFontWeight}" />
<Style Selector="^.H1"> <Style Selector="^.H1">
<Setter Property="FontSize" Value="{DynamicResource TextBlockTitleH1FontSize}" /> <Setter Property="FontSize" Value="{DynamicResource TextBlockTitleH1FontSize}" />
</Style> </Style>
@@ -164,14 +164,14 @@
<!-- Size: Small, Large. Default is Small --> <!-- Size: Small, Large. Default is Small -->
<!-- Color: Red, Pink, Purple, Violet, Indigo, Blue, LightBlue, Cyan, Teal, Green, LightGreen, Lime, Yellow, Amber, Orange, Grey, White. Default is Grey --> <!-- Color: Red, Pink, Purple, Violet, Indigo, Blue, LightBlue, Cyan, Teal, Green, LightGreen, Lime, Yellow, Amber, Orange, Grey, White. Default is Grey -->
<ControlTheme x:Key="TagLabel" TargetType="Label"> <ControlTheme x:Key="TagLabel" TargetType="Label">
<Setter Property="Label.BorderThickness" Value="{DynamicResource LabelTagBorderThickness}" /> <Setter Property="BorderThickness" Value="{DynamicResource LabelTagBorderThickness}" />
<Setter Property="Label.MinHeight" Value="{DynamicResource LabelTagSmallHeight}" /> <Setter Property="MinHeight" Value="{DynamicResource LabelTagSmallHeight}" />
<Setter Property="Label.CornerRadius" Value="{DynamicResource LabelTagSquareCornerRadius}" /> <Setter Property="CornerRadius" Value="{DynamicResource LabelTagSquareCornerRadius}" />
<Setter Property="Label.HorizontalAlignment" Value="Left" /> <Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="Label.UseLayoutRounding" Value="False" /> <Setter Property="UseLayoutRounding" Value="False" />
<Setter Property="Label.VerticalAlignment" Value="Center" /> <Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Label.Padding" Value="{DynamicResource LabelTagSmallPadding}" /> <Setter Property="Padding" Value="{DynamicResource LabelTagSmallPadding}" />
<Setter Property="Label.FontSize" Value="{DynamicResource LabelTagFontSize}" /> <Setter Property="FontSize" Value="{DynamicResource LabelTagFontSize}" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="Label"> <ControlTemplate TargetType="Label">
<ContentPresenter <ContentPresenter

File diff suppressed because it is too large Load Diff

View File

@@ -21,7 +21,7 @@
<StreamGeometry x:Key="Icon_Volume">M6,2H18A2,2 0 0,1 20,4V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V4A2,2 0 0,1 6,2M12,4A6,6 0 0,0 6,10C6,13.31 8.69,16 12.1,16L11.22,13.77C10.95,13.29 11.11,12.68 11.59,12.4L12.45,11.9C12.93,11.63 13.54,11.79 13.82,12.27L15.74,14.69C17.12,13.59 18,11.9 18,10A6,6 0 0,0 12,4M12,9A1,1 0 0,1 13,10A1,1 0 0,1 12,11A1,1 0 0,1 11,10A1,1 0 0,1 12,9M7,18A1,1 0 0,0 6,19A1,1 0 0,0 7,20A1,1 0 0,0 8,19A1,1 0 0,0 7,18M12.09,13.27L14.58,19.58L17.17,18.08L12.95,12.77L12.09,13.27Z</StreamGeometry> <StreamGeometry x:Key="Icon_Volume">M6,2H18A2,2 0 0,1 20,4V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V4A2,2 0 0,1 6,2M12,4A6,6 0 0,0 6,10C6,13.31 8.69,16 12.1,16L11.22,13.77C10.95,13.29 11.11,12.68 11.59,12.4L12.45,11.9C12.93,11.63 13.54,11.79 13.82,12.27L15.74,14.69C17.12,13.59 18,11.9 18,10A6,6 0 0,0 12,4M12,9A1,1 0 0,1 13,10A1,1 0 0,1 12,11A1,1 0 0,1 11,10A1,1 0 0,1 12,9M7,18A1,1 0 0,0 6,19A1,1 0 0,0 7,20A1,1 0 0,0 8,19A1,1 0 0,0 7,18M12.09,13.27L14.58,19.58L17.17,18.08L12.95,12.77L12.09,13.27Z</StreamGeometry>
</converters:KeyToPathConverter> </converters:KeyToPathConverter>
<ControlTheme x:Key="{x:Type dialogs:ManagedFileChooser}" TargetType="dialogs:ManagedFileChooser"> <ControlTheme x:Key="{x:Type dialogs:ManagedFileChooser}" TargetType="dialogs:ManagedFileChooser">
<Setter Property="dialogs:ManagedFileChooser.Template"> <Setter Property="Template">
<ControlTemplate x:DataType="internal:ManagedFileChooserViewModel" TargetType="dialogs:ManagedFileChooser"> <ControlTemplate x:DataType="internal:ManagedFileChooserViewModel" TargetType="dialogs:ManagedFileChooser">
<DockPanel> <DockPanel>
<Border <Border
@@ -30,7 +30,7 @@
DockPanel.Dock="Left" DockPanel.Dock="Left"
Theme="{DynamicResource CardBorder}"> Theme="{DynamicResource CardBorder}">
<ListBox <ListBox
x:Name="PART_QuickLinks" Name="PART_QuickLinks"
Focusable="False" Focusable="False"
ItemsSource="{Binding QuickLinks}" ItemsSource="{Binding QuickLinks}"
SelectedIndex="{Binding QuickLinksSelectedIndex}"> SelectedIndex="{Binding QuickLinksSelectedIndex}">
@@ -49,7 +49,7 @@
</ListBox> </ListBox>
</Border> </Border>
<DockPanel <DockPanel
x:Name="NavBar" Name="NavBar"
Margin="8,8,8,0" Margin="8,8,8,0"
VerticalAlignment="Center" VerticalAlignment="Center"
DockPanel.Dock="Top"> DockPanel.Dock="Top">
@@ -63,7 +63,7 @@
Data="{DynamicResource ManagedFileChooserUpButtonGlyph}" Data="{DynamicResource ManagedFileChooserUpButtonGlyph}"
Foreground="{DynamicResource ManagedFileChooserIconForeground}" /> Foreground="{DynamicResource ManagedFileChooserIconForeground}" />
</Button> </Button>
<TextBox x:Name="Location" Text="{Binding Location}"> <TextBox Name="Location" Text="{Binding Location}">
<TextBox.KeyBindings> <TextBox.KeyBindings>
<KeyBinding Command="{Binding EnterPressed}" Gesture="Enter" /> <KeyBinding Command="{Binding EnterPressed}" Gesture="Enter" />
</TextBox.KeyBindings> </TextBox.KeyBindings>
@@ -88,7 +88,7 @@
DockPanel.Dock="Left" DockPanel.Dock="Left"
IsChecked="{Binding ShowHiddenFiles}" /> IsChecked="{Binding ShowHiddenFiles}" />
<UniformGrid <UniformGrid
x:Name="Finalize" Name="Finalize"
HorizontalAlignment="Right" HorizontalAlignment="Right"
Rows="1"> Rows="1">
<Button <Button

View File

@@ -173,7 +173,7 @@
ContentTemplate="{TemplateBinding HeaderTemplate}" ContentTemplate="{TemplateBinding HeaderTemplate}"
RecognizesAccessKey="True" /> RecognizesAccessKey="True" />
<TextBlock <TextBlock
x:Name="PART_InputGestureText" Name="PART_InputGestureText"
Grid.Column="3" Grid.Column="3"
Margin="{DynamicResource MenuItemInputGestureTextMargin}" Margin="{DynamicResource MenuItemInputGestureTextMargin}"
HorizontalAlignment="Right" HorizontalAlignment="Right"

View File

@@ -18,17 +18,17 @@
</Design.PreviewWith> </Design.PreviewWith>
<ControlTheme x:Key="{x:Type MenuFlyoutPresenter}" TargetType="MenuFlyoutPresenter"> <ControlTheme x:Key="{x:Type MenuFlyoutPresenter}" TargetType="MenuFlyoutPresenter">
<Setter Property="MenuFlyoutPresenter.Background" Value="{DynamicResource MenuFlyoutBackground}" /> <Setter Property="Background" Value="{DynamicResource MenuFlyoutBackground}" />
<Setter Property="MenuFlyoutPresenter.BorderBrush" Value="{DynamicResource MenuFlyoutBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource MenuFlyoutBorderBrush}" />
<Setter Property="MenuFlyoutPresenter.BorderThickness" Value="{DynamicResource MenuFlyoutBorderThickness}" /> <Setter Property="BorderThickness" Value="{DynamicResource MenuFlyoutBorderThickness}" />
<Setter Property="MenuFlyoutPresenter.Padding" Value="{DynamicResource MenuFlyoutPadding}" /> <Setter Property="Padding" Value="{DynamicResource MenuFlyoutPadding}" />
<Setter Property="MenuFlyoutPresenter.FontSize" Value="{DynamicResource TextBlockFontSize}" /> <Setter Property="FontSize" Value="{DynamicResource TextBlockFontSize}" />
<Setter Property="MenuFlyoutPresenter.FontWeight" Value="{DynamicResource TextBlockFontWeight}" /> <Setter Property="FontWeight" Value="{DynamicResource TextBlockFontWeight}" />
<Setter Property="MenuFlyoutPresenter.Foreground" Value="{DynamicResource TextBlockDefaultForeground}" /> <Setter Property="Foreground" Value="{DynamicResource TextBlockDefaultForeground}" />
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" /> <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" /> <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
<Setter Property="MenuFlyoutPresenter.CornerRadius" Value="{DynamicResource MenuFlyoutCornerRadius}" /> <Setter Property="CornerRadius" Value="{DynamicResource MenuFlyoutCornerRadius}" />
<Setter Property="MenuFlyoutPresenter.Template"> <Setter Property="Template">
<ControlTemplate TargetType="MenuFlyoutPresenter"> <ControlTemplate TargetType="MenuFlyoutPresenter">
<Border <Border
Name="LayoutRoot" Name="LayoutRoot"
@@ -37,7 +37,6 @@
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
BoxShadow="{DynamicResource MenuFlyoutBorderBoxShadow}" BoxShadow="{DynamicResource MenuFlyoutBorderBoxShadow}"
ClipToBounds="True"
CornerRadius="{TemplateBinding CornerRadius}" CornerRadius="{TemplateBinding CornerRadius}"
UseLayoutRounding="False"> UseLayoutRounding="False">
<ScrollViewer <ScrollViewer

View File

@@ -34,7 +34,7 @@
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
CornerRadius="{TemplateBinding CornerRadius}"> CornerRadius="{TemplateBinding CornerRadius}">
<Border <Border
x:Name="PART_RootBorder" Name="PART_RootBorder"
Padding="{DynamicResource NotificationCardPadding}" Padding="{DynamicResource NotificationCardPadding}"
BoxShadow="{DynamicResource NotificationCardBoxShadows}" BoxShadow="{DynamicResource NotificationCardBoxShadows}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"

View File

@@ -3,11 +3,11 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:CompileBindings="True"> x:CompileBindings="True">
<ControlTheme x:Key="{x:Type NumericUpDown}" TargetType="NumericUpDown"> <ControlTheme x:Key="{x:Type NumericUpDown}" TargetType="NumericUpDown">
<Setter Property="NumericUpDown.VerticalAlignment" Value="Center" /> <Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="NumericUpDown.VerticalContentAlignment" Value="Center" /> <Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="NumericUpDown.CornerRadius" Value="{DynamicResource NumericUpDownCornerRadius}" /> <Setter Property="CornerRadius" Value="{DynamicResource NumericUpDownCornerRadius}" />
<Setter Property="NumericUpDown.MinHeight" Value="{DynamicResource NumericUpDownDefaultHeight}" /> <Setter Property="MinHeight" Value="{DynamicResource NumericUpDownDefaultHeight}" />
<Setter Property="NumericUpDown.Template"> <Setter Property="Template">
<ControlTemplate TargetType="NumericUpDown"> <ControlTemplate TargetType="NumericUpDown">
<DataValidationErrors> <DataValidationErrors>
<ButtonSpinner <ButtonSpinner

View File

@@ -3,9 +3,9 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:CompileBindings="True"> x:CompileBindings="True">
<ControlTheme x:Key="{x:Type PathIcon}" TargetType="PathIcon"> <ControlTheme x:Key="{x:Type PathIcon}" TargetType="PathIcon">
<Setter Property="PathIcon.Background" Value="Transparent" /> <Setter Property="Background" Value="Transparent" />
<Setter Property="PathIcon.Height" Value="{DynamicResource IconElementThemeHeight}" /> <Setter Property="Height" Value="{DynamicResource IconElementThemeHeight}" />
<Setter Property="PathIcon.Width" Value="{DynamicResource IconElementThemeWidth}" /> <Setter Property="Width" Value="{DynamicResource IconElementThemeWidth}" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="PathIcon"> <ControlTemplate TargetType="PathIcon">
<Border Background="{TemplateBinding Background}"> <Border Background="{TemplateBinding Background}">

View File

@@ -104,7 +104,7 @@
<ControlTemplate TargetType="ProgressBar"> <ControlTemplate TargetType="ProgressBar">
<Grid ColumnDefinitions="Auto, *, Auto" RowDefinitions="Auto, *, Auto"> <Grid ColumnDefinitions="Auto, *, Auto" RowDefinitions="Auto, *, Auto">
<Border <Border
x:Name="ProgressBarRoot" Name="ProgressBarRoot"
Grid.Row="1" Grid.Row="1"
Grid.Column="1" Grid.Column="1"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
@@ -113,31 +113,31 @@
ClipToBounds="True" ClipToBounds="True"
CornerRadius="{TemplateBinding CornerRadius}"> CornerRadius="{TemplateBinding CornerRadius}">
<Panel> <Panel>
<Panel x:Name="DeterminateRoot" Opacity="1"> <Panel Name="DeterminateRoot" Opacity="1">
<Panel.Transitions> <Panel.Transitions>
<Transitions> <Transitions>
<DoubleTransition Property="Opacity" Duration="0:0:0.197" /> <DoubleTransition Property="Opacity" Duration="0:0:0.197" />
</Transitions> </Transitions>
</Panel.Transitions> </Panel.Transitions>
<Border <Border
x:Name="PART_Indicator" Name="PART_Indicator"
Margin="{TemplateBinding Padding}" Margin="{TemplateBinding Padding}"
Background="{TemplateBinding Foreground}" Background="{TemplateBinding Foreground}"
CornerRadius="{TemplateBinding CornerRadius}" /> CornerRadius="{TemplateBinding CornerRadius}" />
</Panel> </Panel>
<Panel x:Name="IndeterminateRoot" Opacity="0"> <Panel Name="IndeterminateRoot" Opacity="0">
<Panel.Transitions> <Panel.Transitions>
<Transitions> <Transitions>
<DoubleTransition Property="Opacity" Duration="0:0:0.197" /> <DoubleTransition Property="Opacity" Duration="0:0:0.197" />
</Transitions> </Transitions>
</Panel.Transitions> </Panel.Transitions>
<Border <Border
x:Name="IndeterminateProgressBarIndicator" Name="IndeterminateProgressBarIndicator"
Margin="{TemplateBinding Padding}" Margin="{TemplateBinding Padding}"
Background="{TemplateBinding Foreground}" Background="{TemplateBinding Foreground}"
CornerRadius="{TemplateBinding CornerRadius}" /> CornerRadius="{TemplateBinding CornerRadius}" />
<Border <Border
x:Name="IndeterminateProgressBarIndicator2" Name="IndeterminateProgressBarIndicator2"
Margin="{TemplateBinding Padding}" Margin="{TemplateBinding Padding}"
Background="{TemplateBinding Foreground}" Background="{TemplateBinding Foreground}"
CornerRadius="{TemplateBinding CornerRadius}" /> CornerRadius="{TemplateBinding CornerRadius}" />
@@ -145,7 +145,7 @@
</Panel> </Panel>
</Border> </Border>
<LayoutTransformControl <LayoutTransformControl
x:Name="PART_LayoutTransformControl" Name="PART_LayoutTransformControl"
Grid.Row="1" Grid.Row="1"
Grid.Column="1" Grid.Column="1"
Margin="0" Margin="0"

View File

@@ -27,7 +27,7 @@
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="RadioButton"> <ControlTemplate TargetType="RadioButton">
<Border <Border
x:Name="RootBorder" Name="RootBorder"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
@@ -38,7 +38,7 @@
TemplatedControl.IsTemplateFocusTarget="True" TemplatedControl.IsTemplateFocusTarget="True"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
<Ellipse <Ellipse
x:Name="OuterEllipse" Name="OuterEllipse"
Width="{DynamicResource RadioButtonIconRadius}" Width="{DynamicResource RadioButtonIconRadius}"
Height="{DynamicResource RadioButtonIconRadius}" Height="{DynamicResource RadioButtonIconRadius}"
Fill="{DynamicResource RadioButtonUncheckIconDefaultBackground}" Fill="{DynamicResource RadioButtonUncheckIconDefaultBackground}"
@@ -47,7 +47,7 @@
UseLayoutRounding="False" /> UseLayoutRounding="False" />
<Ellipse <Ellipse
x:Name="CheckGlyph" Name="CheckGlyph"
Width="{DynamicResource RadioButtonGlyphRadius}" Width="{DynamicResource RadioButtonGlyphRadius}"
Height="{DynamicResource RadioButtonGlyphRadius}" Height="{DynamicResource RadioButtonGlyphRadius}"
Fill="{DynamicResource RadioButtonCheckGlyphFill}" Fill="{DynamicResource RadioButtonCheckGlyphFill}"
@@ -55,7 +55,7 @@
UseLayoutRounding="False" /> UseLayoutRounding="False" />
</Panel> </Panel>
<ContentPresenter <ContentPresenter
x:Name="PART_ContentPresenter" Name="PART_ContentPresenter"
Grid.Column="1" Grid.Column="1"
Margin="{DynamicResource RadioButtonContentMargin}" Margin="{DynamicResource RadioButtonContentMargin}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
@@ -166,7 +166,7 @@
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="RadioButton"> <ControlTemplate TargetType="RadioButton">
<ContentPresenter <ContentPresenter
x:Name="PART_ContentPresenter" Name="PART_ContentPresenter"
Margin="{TemplateBinding Margin}" Margin="{TemplateBinding Margin}"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
@@ -221,7 +221,7 @@
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="RadioButton"> <ControlTemplate TargetType="RadioButton">
<Border <Border
x:Name="RootBorder" Name="RootBorder"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
@@ -236,7 +236,7 @@
VerticalAlignment="Top" VerticalAlignment="Top"
Margin="{DynamicResource RadioButtonIconMargin}"> Margin="{DynamicResource RadioButtonIconMargin}">
<Ellipse <Ellipse
x:Name="OuterEllipse" Name="OuterEllipse"
Width="{DynamicResource RadioButtonIconRadius}" Width="{DynamicResource RadioButtonIconRadius}"
Height="{DynamicResource RadioButtonIconRadius}" Height="{DynamicResource RadioButtonIconRadius}"
Fill="{DynamicResource RadioButtonUncheckIconDefaultBackground}" Fill="{DynamicResource RadioButtonUncheckIconDefaultBackground}"
@@ -245,7 +245,7 @@
UseLayoutRounding="False" /> UseLayoutRounding="False" />
<Ellipse <Ellipse
x:Name="CheckGlyph" Name="CheckGlyph"
Width="{DynamicResource RadioButtonGlyphRadius}" Width="{DynamicResource RadioButtonGlyphRadius}"
Height="{DynamicResource RadioButtonGlyphRadius}" Height="{DynamicResource RadioButtonGlyphRadius}"
Fill="{DynamicResource RadioButtonCheckGlyphFill}" Fill="{DynamicResource RadioButtonCheckGlyphFill}"
@@ -254,7 +254,7 @@
</Panel> </Panel>
<ContentPresenter <ContentPresenter
x:Name="PART_ContentPresenter" Name="PART_ContentPresenter"
Grid.Column="1" Grid.Column="1"
Margin="{DynamicResource RadioButtonContentMargin}" Margin="{DynamicResource RadioButtonContentMargin}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
@@ -372,7 +372,7 @@
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="RadioButton"> <ControlTemplate TargetType="RadioButton">
<ContentPresenter <ContentPresenter
x:Name="PART_ContentPresenter" Name="PART_ContentPresenter"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"

View File

@@ -22,7 +22,7 @@
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="RepeatButton"> <ControlTemplate TargetType="RepeatButton">
<ContentPresenter <ContentPresenter
x:Name="PART_ContentPresenter" Name="PART_ContentPresenter"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
@@ -97,6 +97,12 @@
x:Key="SolidRepeatButton" x:Key="SolidRepeatButton"
BasedOn="{StaticResource {x:Type RepeatButton}}" BasedOn="{StaticResource {x:Type RepeatButton}}"
TargetType="RepeatButton"> TargetType="RepeatButton">
<Setter Property="FocusAdorner">
<FocusAdornerTemplate>
<Border Theme="{DynamicResource AdornerLayerBorder}"
Classes="Solid" />
</FocusAdornerTemplate>
</Setter>
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter"> <Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" /> <Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" /> <Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" />

View File

@@ -205,13 +205,13 @@
<Setter Property="MinHeight" Value="{DynamicResource ScrollBarThickness}" /> <Setter Property="MinHeight" Value="{DynamicResource ScrollBarThickness}" />
<Setter Property="Width" Value="{DynamicResource ScrollBarThumbThickness}" /> <Setter Property="Width" Value="{DynamicResource ScrollBarThumbThickness}" />
</Style> </Style>
<Style Selector="^ /template/ RepeatButton &gt; PathIcon"> <Style Selector="^ /template/ RepeatButton > PathIcon">
<Setter Property="Foreground" Value="{DynamicResource ScrollBarButtonDefaultForeground}" /> <Setter Property="Foreground" Value="{DynamicResource ScrollBarButtonDefaultForeground}" />
</Style> </Style>
<Style Selector="^ /template/ RepeatButton:pointerover &gt; PathIcon"> <Style Selector="^ /template/ RepeatButton:pointerover > PathIcon">
<Setter Property="Foreground" Value="{DynamicResource ScrollBarButtonPointeroverForeground}" /> <Setter Property="Foreground" Value="{DynamicResource ScrollBarButtonPointeroverForeground}" />
</Style> </Style>
<Style Selector="^ /template/ RepeatButton:pressed &gt; PathIcon"> <Style Selector="^ /template/ RepeatButton:pressed > PathIcon">
<Setter Property="RenderTransform" Value="scale(0.92)" /> <Setter Property="RenderTransform" Value="scale(0.92)" />
</Style> </Style>
@@ -346,11 +346,11 @@
</DockPanel> </DockPanel>
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
<Style Selector="^ /template/ RepeatButton &gt; Path"> <Style Selector="^ /template/ RepeatButton > Path">
<Setter Property="Fill" Value="{DynamicResource ColorScrollBarButtonDefaultForeground}" /> <Setter Property="Fill" Value="{DynamicResource ColorScrollBarButtonDefaultForeground}" />
</Style> </Style>
<Style Selector="^ /template/ RepeatButton:pointerover &gt; Path"> <Style Selector="^ /template/ RepeatButton:pointerover > Path">
<Setter Property="Fill" Value="{DynamicResource ColorScrollBarButtonPointeroverForeground}" /> <Setter Property="Fill" Value="{DynamicResource ColorScrollBarButtonPointeroverForeground}" />
</Style> </Style>
</ControlTheme> </ControlTheme>

View File

@@ -12,11 +12,11 @@
</MenuFlyout> </MenuFlyout>
<ControlTheme x:Key="{x:Type SelectableTextBlock}" TargetType="SelectableTextBlock"> <ControlTheme x:Key="{x:Type SelectableTextBlock}" TargetType="SelectableTextBlock">
<Setter Property="SelectableTextBlock.Foreground" Value="{DynamicResource TextBlockDefaultForeground}" /> <Setter Property="Foreground" Value="{DynamicResource TextBlockDefaultForeground}" />
<Setter Property="SelectableTextBlock.FontSize" Value="{DynamicResource TextBlockFontSize}" /> <Setter Property="FontSize" Value="{DynamicResource TextBlockFontSize}" />
<Setter Property="SelectableTextBlock.Cursor" Value="Ibeam" /> <Setter Property="Cursor" Value="Ibeam" />
<Setter Property="SelectableTextBlock.SelectionBrush" Value="{DynamicResource TextBlockSelectionBackground}" /> <Setter Property="SelectionBrush" Value="{DynamicResource TextBlockSelectionBackground}" />
<Setter Property="SelectableTextBlock.SelectionForegroundBrush" Value="{DynamicResource TextBlockSelectionForeground}" /> <Setter Property="SelectionForegroundBrush" Value="{DynamicResource TextBlockSelectionForeground}" />
<Style Selector="^.Secondary"> <Style Selector="^.Secondary">
<Setter Property="Foreground" Value="{DynamicResource TextBlockSecondaryForeground}" /> <Setter Property="Foreground" Value="{DynamicResource TextBlockSecondaryForeground}" />
</Style> </Style>

View File

@@ -43,11 +43,11 @@
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="SliderThumbTheme" TargetType="Thumb"> <ControlTheme x:Key="SliderThumbTheme" TargetType="Thumb">
<Setter Property="Thumb.CornerRadius" Value="{DynamicResource SliderThumbCornerRadius}" /> <Setter Property="CornerRadius" Value="{DynamicResource SliderThumbCornerRadius}" />
<Setter Property="Thumb.Cursor" Value="Hand" /> <Setter Property="Cursor" Value="Hand" />
<Setter Property="Thumb.Background" Value="{DynamicResource SliderThumbBackground}" /> <Setter Property="Background" Value="{DynamicResource SliderThumbBackground}" />
<Setter Property="Thumb.BorderBrush" Value="{DynamicResource SliderThumbBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource SliderThumbBorderBrush}" />
<Setter Property="Thumb.BorderThickness" Value="{DynamicResource SliderThumbBorderThickness}" /> <Setter Property="BorderThickness" Value="{DynamicResource SliderThumbBorderThickness}" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="Thumb"> <ControlTemplate TargetType="Thumb">
<Border <Border
@@ -76,7 +76,7 @@
<ControlTemplate TargetType="Slider"> <ControlTemplate TargetType="Slider">
<DataValidationErrors> <DataValidationErrors>
<Grid <Grid
x:Name="SliderContainer" Name="SliderContainer"
Margin="{TemplateBinding Padding}" Margin="{TemplateBinding Padding}"
Background="Transparent" Background="Transparent"
RowDefinitions="Auto,Auto,Auto"> RowDefinitions="Auto,Auto,Auto">
@@ -153,7 +153,7 @@
<ControlTemplate> <ControlTemplate>
<DataValidationErrors> <DataValidationErrors>
<Grid <Grid
x:Name="SliderContainer" Name="SliderContainer"
Margin="{TemplateBinding Padding}" Margin="{TemplateBinding Padding}"
Background="{DynamicResource SliderContainerBackground}" Background="{DynamicResource SliderContainerBackground}"
ColumnDefinitions="Auto,Auto,Auto"> ColumnDefinitions="Auto,Auto,Auto">

View File

@@ -25,7 +25,7 @@
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="Button"> <ControlTemplate TargetType="Button">
<ContentPresenter <ContentPresenter
x:Name="PART_ContentPresenter" Name="PART_ContentPresenter"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
@@ -69,32 +69,7 @@
CornerRadius="{TemplateBinding CornerRadius}"> CornerRadius="{TemplateBinding CornerRadius}">
<DockPanel> <DockPanel>
<Button <Button
x:Name="PART_SecondaryButton" Name="PART_PrimaryButton"
Padding="4,0"
VerticalAlignment="Stretch"
HorizontalContentAlignment="Center"
VerticalContentAlignment="Center"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="0"
DockPanel.Dock="Right"
Focusable="False"
KeyboardNavigation.IsTabStop="False"
Theme="{DynamicResource SemiSplitButtonElement}">
<PathIcon
Width="12"
Height="12"
Data="{DynamicResource SplitButtonIconGlyph}"
Foreground="{Binding $parent[Button].Foreground}" />
</Button>
<Rectangle
x:Name="SeparatorBorder"
Width="{DynamicResource SplitButtonSeparatorWidth}"
VerticalAlignment="Stretch"
DockPanel.Dock="Right"
Fill="{TemplateBinding BorderBrush}"
StrokeThickness="0" />
<Button
x:Name="PART_PrimaryButton"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
@@ -106,12 +81,33 @@
Content="{TemplateBinding Content}" Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplate="{TemplateBinding ContentTemplate}"
CornerRadius="0" CornerRadius="0"
Focusable="False"
FontFamily="{TemplateBinding FontFamily}" FontFamily="{TemplateBinding FontFamily}"
FontSize="{TemplateBinding FontSize}" FontSize="{TemplateBinding FontSize}"
FontWeight="{TemplateBinding FontWeight}" FontWeight="{TemplateBinding FontWeight}"
KeyboardNavigation.IsTabStop="False" DockPanel.Dock="Left"
Theme="{DynamicResource SemiSplitButtonElement}" /> Theme="{DynamicResource SemiSplitButtonElement}" />
<Rectangle
Name="SeparatorBorder"
Width="{DynamicResource SplitButtonSeparatorWidth}"
VerticalAlignment="Stretch"
DockPanel.Dock="Left"
Fill="{TemplateBinding BorderBrush}"
StrokeThickness="0" />
<Button
Name="PART_SecondaryButton"
Padding="4,0"
VerticalAlignment="Stretch"
HorizontalContentAlignment="Center"
VerticalContentAlignment="Center"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="0"
Theme="{DynamicResource SemiSplitButtonElement}">
<PathIcon
Width="12"
Height="12"
Data="{DynamicResource SplitButtonIconGlyph}"
Foreground="{Binding $parent[Button].Foreground}" />
</Button>
</DockPanel> </DockPanel>
</Border> </Border>
</ControlTemplate> </ControlTemplate>
@@ -149,6 +145,12 @@
</Style> </Style>
<Style Selector="^:checked"> <Style Selector="^:checked">
<Style Selector="^ /template/ Button"> <Style Selector="^ /template/ Button">
<Setter Property="FocusAdorner">
<FocusAdornerTemplate>
<Border Theme="{DynamicResource AdornerLayerBorder}"
Classes="Solid" />
</FocusAdornerTemplate>
</Setter>
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" /> <Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" />
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" /> <Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
<Style Selector="^:pointerover"> <Style Selector="^:pointerover">
@@ -233,6 +235,12 @@
BasedOn="{StaticResource {x:Type SplitButton}}" BasedOn="{StaticResource {x:Type SplitButton}}"
TargetType="SplitButton"> TargetType="SplitButton">
<Style Selector="^ /template/ Button"> <Style Selector="^ /template/ Button">
<Setter Property="FocusAdorner">
<FocusAdornerTemplate>
<Border Theme="{DynamicResource AdornerLayerBorder}"
Classes="Solid" />
</FocusAdornerTemplate>
</Setter>
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" /> <Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" /> <Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" />

View File

@@ -21,7 +21,7 @@
ClipToBounds="True" ClipToBounds="True"
ZIndex="100"> ZIndex="100">
<ContentPresenter <ContentPresenter
x:Name="PART_PanePresenter" Name="PART_PanePresenter"
Content="{TemplateBinding Pane}" Content="{TemplateBinding Pane}"
ContentTemplate="{TemplateBinding PaneTemplate}" /> ContentTemplate="{TemplateBinding PaneTemplate}" />
<Rectangle <Rectangle
@@ -33,7 +33,7 @@
<Panel Name="ContentRoot"> <Panel Name="ContentRoot">
<ContentPresenter <ContentPresenter
x:Name="PART_ContentPresenter" Name="PART_ContentPresenter"
Content="{TemplateBinding Content}" Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}" /> ContentTemplate="{TemplateBinding ContentTemplate}" />
<Rectangle <Rectangle
@@ -112,7 +112,7 @@
ClipToBounds="True" ClipToBounds="True"
ZIndex="100"> ZIndex="100">
<ContentPresenter <ContentPresenter
x:Name="PART_PanePresenter" Name="PART_PanePresenter"
Content="{TemplateBinding Pane}" Content="{TemplateBinding Pane}"
ContentTemplate="{TemplateBinding PaneTemplate}" /> ContentTemplate="{TemplateBinding PaneTemplate}" />
<Rectangle <Rectangle
@@ -124,7 +124,7 @@
<Panel Name="ContentRoot"> <Panel Name="ContentRoot">
<ContentPresenter <ContentPresenter
x:Name="PART_ContentPresenter" Name="PART_ContentPresenter"
Content="{TemplateBinding Content}" Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}" /> ContentTemplate="{TemplateBinding ContentTemplate}" />
<Rectangle Name="LightDismissLayer" IsVisible="False" /> <Rectangle Name="LightDismissLayer" IsVisible="False" />

View File

@@ -32,10 +32,10 @@
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
<Style Selector="^[TabStripPlacement=Left] /template/ ItemsPresenter#PART_ItemsPresenter &gt; WrapPanel"> <Style Selector="^[TabStripPlacement=Left] /template/ ItemsPresenter#PART_ItemsPresenter > WrapPanel">
<Setter Property="Orientation" Value="Vertical" /> <Setter Property="Orientation" Value="Vertical" />
</Style> </Style>
<Style Selector="^[TabStripPlacement=Right] /template/ ItemsPresenter#PART_ItemsPresenter &gt; WrapPanel"> <Style Selector="^[TabStripPlacement=Right] /template/ ItemsPresenter#PART_ItemsPresenter > WrapPanel">
<Setter Property="Orientation" Value="Vertical" /> <Setter Property="Orientation" Value="Vertical" />
</Style> </Style>
<Style Selector="^[TabStripPlacement=Left] /template/ Border#PART_BorderSeparator"> <Style Selector="^[TabStripPlacement=Left] /template/ Border#PART_BorderSeparator">

View File

@@ -12,13 +12,13 @@
</Design.PreviewWith> </Design.PreviewWith>
<ControlTheme x:Key="{x:Type TabItem}" TargetType="TabItem"> <ControlTheme x:Key="{x:Type TabItem}" TargetType="TabItem">
<Setter Property="TabItem.Background" Value="{DynamicResource TabItemLinePipeBackground}" /> <Setter Property="Background" Value="{DynamicResource TabItemLinePipeBackground}" />
<Setter Property="TabItem.Foreground" Value="{DynamicResource TabItemLineHeaderForeground}" /> <Setter Property="Foreground" Value="{DynamicResource TabItemLineHeaderForeground}" />
<Setter Property="TabItem.Margin" Value="0" /> <Setter Property="Margin" Value="0" />
<Setter Property="TabItem.Padding" Value="8 4" /> <Setter Property="Padding" Value="8 4" />
<Setter Property="TabItem.MinHeight" Value="5" /> <Setter Property="MinHeight" Value="5" />
<Setter Property="TabItem.VerticalContentAlignment" Value="Center" /> <Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="TabItem.Template"> <Setter Property="Template">
<ControlTemplate TargetType="TabItem"> <ControlTemplate TargetType="TabItem">
<Border <Border
Name="PART_LayoutRoot" Name="PART_LayoutRoot"

View File

@@ -31,13 +31,13 @@
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="{x:Type TabStripItem}" TargetType="TabStripItem"> <ControlTheme x:Key="{x:Type TabStripItem}" TargetType="TabStripItem">
<Setter Property="TabStripItem.Background" Value="{DynamicResource TabItemLinePipeBackground}" /> <Setter Property="Background" Value="{DynamicResource TabItemLinePipeBackground}" />
<Setter Property="TabStripItem.Foreground" Value="{DynamicResource TabItemLineHeaderForeground}" /> <Setter Property="Foreground" Value="{DynamicResource TabItemLineHeaderForeground}" />
<Setter Property="TabStripItem.Margin" Value="0" /> <Setter Property="Margin" Value="0" />
<Setter Property="TabStripItem.Padding" Value="8 4" /> <Setter Property="Padding" Value="8 4" />
<Setter Property="TabStripItem.MinHeight" Value="5" /> <Setter Property="MinHeight" Value="5" />
<Setter Property="TabStripItem.VerticalContentAlignment" Value="Center" /> <Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="TabStripItem.Template"> <Setter Property="Template">
<ControlTemplate TargetType="TabStripItem"> <ControlTemplate TargetType="TabStripItem">
<Border <Border
Name="PART_LayoutRoot" Name="PART_LayoutRoot"

View File

@@ -52,7 +52,7 @@
x:Key="TitleTextBlock" x:Key="TitleTextBlock"
BasedOn="{StaticResource {x:Type TextBlock}}" BasedOn="{StaticResource {x:Type TextBlock}}"
TargetType="TextBlock"> TargetType="TextBlock">
<Setter Property="TextBlock.FontWeight" Value="{DynamicResource TextBlockTitleFontWeight}" /> <Setter Property="FontWeight" Value="{DynamicResource TextBlockTitleFontWeight}" />
<Style Selector="^.H1"> <Style Selector="^.H1">
<Setter Property="FontSize" Value="{DynamicResource TextBlockTitleH1FontSize}" /> <Setter Property="FontSize" Value="{DynamicResource TextBlockTitleH1FontSize}" />
</Style> </Style>

View File

@@ -510,9 +510,9 @@
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="InputToggleButton" TargetType="ToggleButton"> <ControlTheme x:Key="InputToggleButton" TargetType="ToggleButton">
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource ButtonInputInnerForeground}" /> <Setter Property="Foreground" Value="{DynamicResource ButtonInputInnerForeground}" />
<Setter Property="ToggleButton.Cursor" Value="Hand" /> <Setter Property="Cursor" Value="Hand" />
<Setter Property="ToggleButton.Template"> <Setter Property="Template">
<ControlTemplate TargetType="ToggleButton"> <ControlTemplate TargetType="ToggleButton">
<!-- Background must be transparent or hit test will fail --> <!-- Background must be transparent or hit test will fail -->
<Panel Background="Transparent"> <Panel Background="Transparent">

View File

@@ -23,119 +23,128 @@
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
BoxShadow="{DynamicResource DateTimePickerFlyoutBoxShadow}" BoxShadow="{DynamicResource DateTimePickerFlyoutBoxShadow}"
CornerRadius="{TemplateBinding CornerRadius}"> CornerRadius="{TemplateBinding CornerRadius}">
<Grid Name="ContentPanel" RowDefinitions="*,Auto"> <Border
<Grid Name="PART_PickerContainer"> CornerRadius="{TemplateBinding CornerRadius}"
<Grid.Styles> ClipToBounds="True">
<Style Selector="DateTimePickerPanel &gt; ListBoxItem"> <Grid Name="ContentPanel" RowDefinitions="*,Auto">
<Setter Property="Theme" Value="{StaticResource DateTimePickerItem}" /> <Grid Name="PART_PickerContainer">
</Style> <Grid.Styles>
</Grid.Styles> <Style Selector="DateTimePickerPanel > ListBoxItem">
<!-- Ignore col defs here, set in code --> <Setter Property="Theme" Value="{StaticResource DateTimePickerItem}" />
<Panel Name="PART_HourHost" Grid.Column="0"> </Style>
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden"> </Grid.Styles>
<DateTimePickerPanel <!-- Ignore col defs here, set in code -->
Name="PART_HourSelector" <Panel Name="PART_HourHost" Grid.Column="0">
ItemHeight="{DynamicResource DateTimePickerListBoxItemHeight}" <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden">
PanelType="Hour" <DateTimePickerPanel
ShouldLoop="True" /> Name="PART_HourSelector"
</ScrollViewer> ItemHeight="{DynamicResource DateTimePickerListBoxItemHeight}"
<RepeatButton Name="PART_HourUpButton" Theme="{StaticResource DateTimePickerUpButton}" /> PanelType="Hour"
<RepeatButton Name="PART_HourDownButton" Theme="{StaticResource DateTimePickerDownButton}" /> ShouldLoop="True" />
</Panel> </ScrollViewer>
<RepeatButton Name="PART_HourUpButton" Theme="{StaticResource DateTimePickerUpButton}" />
<RepeatButton Name="PART_HourDownButton" Theme="{StaticResource DateTimePickerDownButton}" />
</Panel>
<Panel Name="PART_MinuteHost" Grid.Column="2"> <Panel Name="PART_MinuteHost" Grid.Column="2">
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden"> <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden">
<DateTimePickerPanel <DateTimePickerPanel
Name="PART_MinuteSelector" Name="PART_MinuteSelector"
ItemHeight="{DynamicResource DateTimePickerListBoxItemHeight}" ItemHeight="{DynamicResource DateTimePickerListBoxItemHeight}"
PanelType="Minute" PanelType="Minute"
ShouldLoop="True" /> ShouldLoop="True" />
</ScrollViewer> </ScrollViewer>
<RepeatButton Name="PART_MinuteUpButton" Theme="{StaticResource DateTimePickerUpButton}" /> <RepeatButton Name="PART_MinuteUpButton" Theme="{StaticResource DateTimePickerUpButton}" />
<RepeatButton Name="PART_MinuteDownButton" Theme="{StaticResource DateTimePickerDownButton}" /> <RepeatButton Name="PART_MinuteDownButton" Theme="{StaticResource DateTimePickerDownButton}" />
</Panel> </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_PeriodHost" Grid.Column="6"> <Panel Name="PART_SecondHost" Grid.Column="4">
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden"> <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden">
<DateTimePickerPanel <DateTimePickerPanel
Name="PART_PeriodSelector" Name="PART_SecondSelector"
ItemHeight="{DynamicResource DateTimePickerListBoxItemHeight}" ItemHeight="{DynamicResource DateTimePickerListBoxItemHeight}"
PanelType="TimePeriod" PanelType="Second"
ShouldLoop="False" /> ShouldLoop="True" />
</ScrollViewer> </ScrollViewer>
<RepeatButton Name="PART_PeriodUpButton" Theme="{StaticResource DateTimePickerUpButton}" /> <RepeatButton Name="PART_SecondUpButton" Theme="{StaticResource DateTimePickerUpButton}" />
<RepeatButton Name="PART_PeriodDownButton" Theme="{StaticResource DateTimePickerDownButton}" /> <RepeatButton Name="PART_SecondDownButton" Theme="{StaticResource DateTimePickerDownButton}" />
</Panel> </Panel>
<Rectangle <Panel Name="PART_PeriodHost" Grid.Column="6">
Name="PART_FirstSpacer" <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden">
Grid.Column="1" <DateTimePickerPanel
Width="1" Name="PART_PeriodSelector"
Margin="0,4" ItemHeight="{DynamicResource DateTimePickerListBoxItemHeight}"
HorizontalAlignment="Center" PanelType="TimePeriod"
Fill="{DynamicResource DateTimePickerSeparatorBackground}" /> ShouldLoop="False" />
<Rectangle </ScrollViewer>
Name="PART_SecondSpacer" <RepeatButton Name="PART_PeriodUpButton" Theme="{StaticResource DateTimePickerUpButton}" />
Grid.Column="3" <RepeatButton Name="PART_PeriodDownButton" Theme="{StaticResource DateTimePickerDownButton}" />
Width="1" </Panel>
Margin="0,4"
HorizontalAlignment="Center" <Rectangle
Fill="{DynamicResource DateTimePickerSeparatorBackground}" /> Name="PART_FirstSpacer"
<Rectangle Grid.Column="1"
Name="PART_ThirdSpacer" Width="1"
Grid.Column="5" Margin="0,4"
Width="1" HorizontalAlignment="Center"
Margin="0,4" Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
HorizontalAlignment="Center" <Rectangle
Fill="{DynamicResource DateTimePickerSeparatorBackground}" /> 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>
</Border>
<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.ColumnSpan="2"
Height="1"
VerticalAlignment="Top"
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
</Grid>
</Grid>
</Border> </Border>
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
@@ -164,7 +173,7 @@
Margin="{TemplateBinding Padding}" Margin="{TemplateBinding Padding}"
ColumnDefinitions="*, Auto"> ColumnDefinitions="*, Auto">
<Button <Button
x:Name="PART_FlyoutButton" Name="PART_FlyoutButton"
Grid.Column="0" Grid.Column="0"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
Width="242" Width="242"
@@ -185,12 +194,12 @@
<Grid Name="PART_FlyoutButtonContentGrid" Grid.Column="0"> <Grid Name="PART_FlyoutButtonContentGrid" Grid.Column="0">
<!-- Ignore col defs here, set in code --> <!-- Ignore col defs here, set in code -->
<Border <Border
x:Name="PART_FirstPickerHost" Name="PART_FirstPickerHost"
Grid.Column="0" Grid.Column="0"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"> VerticalAlignment="Stretch">
<TextBlock <TextBlock
x:Name="PART_HourTextBlock" Name="PART_HourTextBlock"
Padding="12,0" Padding="12,0"
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center" VerticalAlignment="Center"
@@ -208,12 +217,12 @@
Fill="{DynamicResource DateTimePickerSeparatorBackground}" /> Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
<Border <Border
x:Name="PART_SecondPickerHost" Name="PART_SecondPickerHost"
Grid.Column="2" Grid.Column="2"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"> VerticalAlignment="Stretch">
<TextBlock <TextBlock
x:Name="PART_MinuteTextBlock" Name="PART_MinuteTextBlock"
Padding="12,0" Padding="12,0"
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center" VerticalAlignment="Center"
@@ -231,12 +240,12 @@
Fill="{DynamicResource DateTimePickerSeparatorBackground}" /> Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
<Border <Border
x:Name="PART_ThirdPickerHost" Name="PART_ThirdPickerHost"
Grid.Column="4" Grid.Column="4"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"> VerticalAlignment="Stretch">
<TextBlock <TextBlock
x:Name="PART_SecondTextBlock" Name="PART_SecondTextBlock"
Padding="12,0" Padding="12,0"
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center" VerticalAlignment="Center"
@@ -254,12 +263,12 @@
Fill="{DynamicResource DateTimePickerSeparatorBackground}" /> Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
<Border <Border
x:Name="PART_FourthPickerHost" Name="PART_FourthPickerHost"
Grid.Column="6" Grid.Column="6"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"> VerticalAlignment="Stretch">
<TextBlock <TextBlock
x:Name="PART_PeriodTextBlock" Name="PART_PeriodTextBlock"
Padding="12,0" Padding="12,0"
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center" VerticalAlignment="Center"

View File

@@ -10,16 +10,16 @@
<ControlTemplate> <ControlTemplate>
<Panel HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="Stretch"> <Panel HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="Stretch">
<Panel <Panel
x:Name="PART_MouseTracker" Name="PART_MouseTracker"
Height="1" Height="1"
VerticalAlignment="Top" /> VerticalAlignment="Top" />
<Panel x:Name="PART_Container"> <Panel Name="PART_Container">
<Border <Border
x:Name="PART_Background" Name="PART_Background"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
IsHitTestVisible="False" /> IsHitTestVisible="False" />
<CaptionButtons <CaptionButtons
x:Name="PART_CaptionButtons" Name="PART_CaptionButtons"
HorizontalAlignment="Right" HorizontalAlignment="Right"
VerticalAlignment="Top" VerticalAlignment="Top"
Foreground="{TemplateBinding Foreground}" /> Foreground="{TemplateBinding Foreground}" />

View File

@@ -39,7 +39,7 @@
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="ToggleButton"> <ControlTemplate TargetType="ToggleButton">
<ContentPresenter <ContentPresenter
x:Name="PART_ContentPresenter" Name="PART_ContentPresenter"
BackgroundSizing="{TemplateBinding BackgroundSizing}" BackgroundSizing="{TemplateBinding BackgroundSizing}"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
@@ -96,6 +96,12 @@
</Style> </Style>
<Style Selector="^:checked"> <Style Selector="^:checked">
<Setter Property="FocusAdorner">
<FocusAdornerTemplate>
<Border Theme="{DynamicResource AdornerLayerBorder}"
Classes="Solid" />
</FocusAdornerTemplate>
</Setter>
<Setter Property="Foreground" Value="{DynamicResource ToggleButtonCheckedForeground}" /> <Setter Property="Foreground" Value="{DynamicResource ToggleButtonCheckedForeground}" />
<Setter Property="Background" Value="{DynamicResource ToggleButtonPrimaryCheckedBackground}" /> <Setter Property="Background" Value="{DynamicResource ToggleButtonPrimaryCheckedBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource ToggleButtonPrimaryCheckedBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource ToggleButtonPrimaryCheckedBorderBrush}" />

View File

@@ -17,9 +17,8 @@
<Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="FocusAdorner"> <Setter Property="FocusAdorner">
<FocusAdornerTemplate> <FocusAdornerTemplate>
<Border BorderThickness="{DynamicResource AdornerLayerBorderThickness}" <Border Theme="{DynamicResource AdornerLayerBorder}"
BorderBrush="{DynamicResource AdornerLayerStroke}" CornerRadius="{DynamicResource ToggleSwitchIndicatorCornerRadius}"/>
CornerRadius="100"/>
</FocusAdornerTemplate> </FocusAdornerTemplate>
</Setter> </Setter>
<Setter Property="KnobTransitions"> <Setter Property="KnobTransitions">
@@ -38,7 +37,7 @@
RowDefinitions="Auto,*" RowDefinitions="Auto,*"
ColumnDefinitions="Auto, *"> ColumnDefinitions="Auto, *">
<ContentPresenter <ContentPresenter
x:Name="PART_ContentPresenter" Name="PART_ContentPresenter"
Grid.Row="0" Grid.Column="0" Grid.Row="0" Grid.Column="0"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
Margin="{DynamicResource ToggleSwitchHeaderMargin}" Margin="{DynamicResource ToggleSwitchHeaderMargin}"
@@ -49,36 +48,36 @@
RecognizesAccessKey="True" /> RecognizesAccessKey="True" />
<Border <Border
x:Name="SwitchBackgroundBorder" Name="SwitchBackgroundBorder"
Grid.Row="1" Grid.Column="0" Grid.Row="1" Grid.Column="0"
TemplatedControl.IsTemplateFocusTarget="True" TemplatedControl.IsTemplateFocusTarget="True"
Width="{DynamicResource ToggleSwitchDefaultWidth}" Width="{DynamicResource ToggleSwitchDefaultWidth}"
Height="{DynamicResource ToggleSwitchDefaultHeight}" Height="{DynamicResource ToggleSwitchDefaultHeight}"
BorderBrush="{DynamicResource ToggleSwitchDefaultBorderBrush}" BorderBrush="{DynamicResource ToggleSwitchDefaultBorderBrush}"
BorderThickness="1" BorderThickness="1"
CornerRadius="100"> CornerRadius="{DynamicResource ToggleSwitchIndicatorCornerRadius}">
<Border.Transitions> <Border.Transitions>
<Transitions> <Transitions>
<BrushTransition Property="Background" Duration="0:0:0.2" /> <BrushTransition Property="Background" Duration="0:0:0.2" />
</Transitions> </Transitions>
</Border.Transitions> </Border.Transitions>
<Canvas <Canvas
x:Name="PART_SwitchKnob" Name="PART_SwitchKnob"
Width="{DynamicResource ToggleSwitchIndicatorDefaultWidth}" Width="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
Height="{DynamicResource ToggleSwitchIndicatorDefaultWidth}" Height="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
HorizontalAlignment="Left"> HorizontalAlignment="Left">
<Grid <Grid
x:Name="PART_MovingKnobs" Name="PART_MovingKnobs"
Width="{DynamicResource ToggleSwitchIndicatorDefaultWidth}" Width="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
Height="{DynamicResource ToggleSwitchIndicatorDefaultWidth}" Height="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
Margin="{DynamicResource ToggleSwitchIndicatorDefaultMargin}"> Margin="{DynamicResource ToggleSwitchIndicatorDefaultMargin}">
<Border <Border
x:Name="SwitchKnobIndicator" Name="SwitchKnobIndicator"
Background="White" Background="White"
BoxShadow="0 0 1 1 #222E3238" BoxShadow="{DynamicResource ToggleSwitchIndicatorBoxShadow}"
CornerRadius="100" /> CornerRadius="{DynamicResource ToggleSwitchIndicatorCornerRadius}" />
<Arc <Arc
x:Name="SwitchKnobLoadingIndicator" Name="SwitchKnobLoadingIndicator"
IsVisible="False" IsVisible="False"
StrokeThickness="2" StrokeThickness="2"
StartAngle="0" StartAngle="0"
@@ -113,7 +112,7 @@
</Border> </Border>
<ContentPresenter <ContentPresenter
x:Name="PART_OnContentPresenter" Name="PART_OnContentPresenter"
Grid.Row="1" Grid.Column="1" Grid.Row="1" Grid.Column="1"
Margin="{DynamicResource ToggleSwitchOnContentMargin}" Margin="{DynamicResource ToggleSwitchOnContentMargin}"
HorizontalAlignment="Left" HorizontalAlignment="Left"
@@ -122,7 +121,7 @@
Content="{TemplateBinding OnContent}" Content="{TemplateBinding OnContent}"
ContentTemplate="{TemplateBinding OnContentTemplate}" /> ContentTemplate="{TemplateBinding OnContentTemplate}" />
<ContentPresenter <ContentPresenter
x:Name="PART_OffContentPresenter" Name="PART_OffContentPresenter"
Grid.Row="1" Grid.Column="1" Grid.Row="1" Grid.Column="1"
Margin="{DynamicResource ToggleSwitchOnContentMargin}" Margin="{DynamicResource ToggleSwitchOnContentMargin}"
HorizontalAlignment="Left" HorizontalAlignment="Left"
@@ -244,8 +243,7 @@
<Setter Property="Background" Value="Transparent" /> <Setter Property="Background" Value="Transparent" />
<Setter Property="FocusAdorner"> <Setter Property="FocusAdorner">
<FocusAdornerTemplate> <FocusAdornerTemplate>
<Border BorderThickness="{DynamicResource AdornerLayerBorderThickness}" <Border Theme="{StaticResource AdornerLayerBorder}" />
BorderBrush="{DynamicResource AdornerLayerStroke}" />
</FocusAdornerTemplate> </FocusAdornerTemplate>
</Setter> </Setter>
<Setter Property="Template"> <Setter Property="Template">
@@ -257,15 +255,15 @@
CornerRadius="{TemplateBinding CornerRadius}" CornerRadius="{TemplateBinding CornerRadius}"
Cursor="Hand"> Cursor="Hand">
<Panel> <Panel>
<Panel x:Name="PART_SwitchKnob" /> <Panel Name="PART_SwitchKnob" />
<Panel x:Name="PART_MovingKnobs" /> <Panel Name="PART_MovingKnobs" />
<ContentPresenter <ContentPresenter
x:Name="PART_OnContentPresenter" Name="PART_OnContentPresenter"
Margin="{DynamicResource ToggleSwitchOnContentMargin}" Margin="{DynamicResource ToggleSwitchOnContentMargin}"
Content="{TemplateBinding OnContent}" Content="{TemplateBinding OnContent}"
ContentTemplate="{TemplateBinding OnContentTemplate}" /> ContentTemplate="{TemplateBinding OnContentTemplate}" />
<ContentPresenter <ContentPresenter
x:Name="PART_OffContentPresenter" Name="PART_OffContentPresenter"
Margin="{DynamicResource ToggleSwitchOnContentMargin}" Margin="{DynamicResource ToggleSwitchOnContentMargin}"
Content="{TemplateBinding OffContent}" Content="{TemplateBinding OffContent}"
ContentTemplate="{TemplateBinding OffContentTemplate}" /> ContentTemplate="{TemplateBinding OffContentTemplate}" />
@@ -291,14 +289,14 @@
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="ToggleSwitch"> <ControlTemplate TargetType="ToggleSwitch">
<Border <Border
x:Name="SwitchBackgroundBorder" Name="SwitchBackgroundBorder"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
Cursor="Hand" Cursor="Hand"
Width="{DynamicResource ToggleSwitchDefaultWidth}" Width="{DynamicResource ToggleSwitchDefaultWidth}"
Height="{DynamicResource ToggleSwitchDefaultHeight}" Height="{DynamicResource ToggleSwitchDefaultHeight}"
BorderBrush="{DynamicResource ToggleSwitchDefaultBorderBrush}" BorderBrush="{DynamicResource ToggleSwitchDefaultBorderBrush}"
BorderThickness="1" BorderThickness="1"
CornerRadius="100"> CornerRadius="{DynamicResource ToggleSwitchIndicatorCornerRadius}">
<Border.Transitions> <Border.Transitions>
<Transitions> <Transitions>
<BrushTransition Property="Background" Duration="0:0:0.2" /> <BrushTransition Property="Background" Duration="0:0:0.2" />
@@ -307,24 +305,24 @@
<Grid <Grid
ColumnDefinitions="*,*"> ColumnDefinitions="*,*">
<Canvas <Canvas
x:Name="PART_SwitchKnob" Name="PART_SwitchKnob"
Grid.Column="0" Grid.Column="0"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
Width="{DynamicResource ToggleSwitchIndicatorDefaultWidth}" Width="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
Height="{DynamicResource ToggleSwitchIndicatorDefaultWidth}" Height="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
HorizontalAlignment="Left"> HorizontalAlignment="Left">
<Grid <Grid
x:Name="PART_MovingKnobs" Name="PART_MovingKnobs"
Width="{DynamicResource ToggleSwitchIndicatorDefaultWidth}" Width="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
Height="{DynamicResource ToggleSwitchIndicatorDefaultWidth}" Height="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
Margin="{DynamicResource ToggleSwitchIndicatorDefaultMargin}"> Margin="{DynamicResource ToggleSwitchIndicatorDefaultMargin}">
<Border <Border
x:Name="SwitchKnobIndicator" Name="SwitchKnobIndicator"
Background="White" Background="White"
BoxShadow="0 0 1 1 #222E3238" BoxShadow="{DynamicResource ToggleSwitchIndicatorBoxShadow}"
CornerRadius="100" /> CornerRadius="{DynamicResource ToggleSwitchIndicatorCornerRadius}" />
<Arc <Arc
x:Name="SwitchKnobLoadingIndicator" Name="SwitchKnobLoadingIndicator"
IsVisible="False" IsVisible="False"
StrokeThickness="2" StrokeThickness="2"
StartAngle="0" StartAngle="0"
@@ -357,7 +355,7 @@
</Grid> </Grid>
</Canvas> </Canvas>
<ContentPresenter <ContentPresenter
x:Name="PART_OnContentPresenter" Name="PART_OnContentPresenter"
Grid.Column="0" Grid.Column="0"
VerticalAlignment="Center" VerticalAlignment="Center"
HorizontalAlignment="Center" HorizontalAlignment="Center"
@@ -366,7 +364,7 @@
Content="{TemplateBinding OnContent}" Content="{TemplateBinding OnContent}"
ContentTemplate="{TemplateBinding OnContentTemplate}" /> ContentTemplate="{TemplateBinding OnContentTemplate}" />
<ContentPresenter <ContentPresenter
x:Name="PART_OffContentPresenter" Name="PART_OffContentPresenter"
Grid.Column="1" Grid.Column="1"
VerticalAlignment="Center" VerticalAlignment="Center"
HorizontalAlignment="Center" HorizontalAlignment="Center"

View File

@@ -59,7 +59,7 @@
Left="True" /> Left="True" />
<ControlTheme x:Key="ToggleButtonTreeViewItemIconButton" TargetType="ToggleButton"> <ControlTheme x:Key="ToggleButtonTreeViewItemIconButton" TargetType="ToggleButton">
<Setter Property="Margin" Value="0" /> <Setter Property="Margin" Value="0" />
<Setter Property="ToggleButton.Cursor" Value="Hand" /> <Setter Property="Cursor" Value="Hand" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="ToggleButton"> <ControlTemplate TargetType="ToggleButton">
<Border <Border

View File

@@ -4,7 +4,7 @@
<PropertyGroup> <PropertyGroup>
<Title>Semi.Avalonia</Title> <Title>Semi.Avalonia</Title>
<PackageReleaseNotes>Update to Avalonia 11.2.0</PackageReleaseNotes> <PackageReleaseNotes>Update to Avalonia 11.2.1</PackageReleaseNotes>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))"> <PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">

View File

@@ -1,3 +1,4 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SolidColorBrush x:Key="AdornerLayerStroke" Opacity="0.4" Color="#54A9FF" /> <SolidColorBrush x:Key="AdornerLayerBorderBrush" Opacity="0.4" Color="#54A9FF" />
<SolidColorBrush x:Key="AdornerLayerSolidBorderBrush" Color="#F9F9F9" />
</ResourceDictionary> </ResourceDictionary>

View File

@@ -1,5 +1,5 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <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="AutoCompleteBoxPopupBackground" Color="#43444A" />
<SolidColorBrush x:Key="AutoCompleteBoxPopupBorderBrush" Opacity="0.08" Color="White" /> <SolidColorBrush x:Key="AutoCompleteBoxPopupBorderBrush" Opacity="0.08" Color="White" />
</ResourceDictionary> </ResourceDictionary>

View File

@@ -1,5 +1,5 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <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="BorderCardBackground" Color="#232429" />
<SolidColorBrush x:Key="BorderCardBorderBrush" Opacity="0.08" Color="White" /> <SolidColorBrush x:Key="BorderCardBorderBrush" Opacity="0.08" Color="White" />
</ResourceDictionary> </ResourceDictionary>

View File

@@ -9,7 +9,7 @@
<SolidColorBrush x:Key="CalendarDatePickerFocusBorderBrush" Color="#54A9FF" /> <SolidColorBrush x:Key="CalendarDatePickerFocusBorderBrush" Color="#54A9FF" />
<SolidColorBrush x:Key="CalendarDatePickerDisabledBackground" Opacity="0.04" Color="#E6E8EA" /> <SolidColorBrush x:Key="CalendarDatePickerDisabledBackground" Opacity="0.04" Color="#E6E8EA" />
<SolidColorBrush x:Key="CalendarDatePickerDisabledIconForeground" Opacity="0.4" 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="CalendarDatePickerBorderedDefaultBackground" Color="Transparent" />
<SolidColorBrush x:Key="CalendarDatePickerBorderedDefaultBorderBrush" Opacity="0.08" Color="White" /> <SolidColorBrush x:Key="CalendarDatePickerBorderedDefaultBorderBrush" Opacity="0.08" Color="White" />

View File

@@ -18,7 +18,7 @@
<SolidColorBrush x:Key="ComboBoxDisabledForeground" Opacity="0.35" Color="#F9F9F9" /> <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="ComboBoxPopupBackground" Color="#43444A" />
<SolidColorBrush x:Key="ComboBoxPopupBorderBrush" Opacity="0.08" Color="White" /> <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="DateTimePickerButtonDisabledBackground" Opacity="0.04" Color="#E6E8EA" />
<SolidColorBrush x:Key="DateTimePickerButtonDisabledIconForeground" Opacity="0.4" 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> </ResourceDictionary>

View File

@@ -2,5 +2,5 @@
<SolidColorBrush x:Key="FlyoutBackground" Color="#43444A" /> <SolidColorBrush x:Key="FlyoutBackground" Color="#43444A" />
<SolidColorBrush x:Key="FlyoutForeground" Color="#F9F9F9" /> <SolidColorBrush x:Key="FlyoutForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="FlyoutBorderBrush" Opacity="0.08" Color="White" /> <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> </ResourceDictionary>

View File

@@ -1,4 +1,4 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SolidColorBrush x:Key="HeaderedContentControlDefaultBackground" Color="Transparent" /> <SolidColorBrush x:Key="HeaderedContentControlBackground" Color="#16161A" />
<SolidColorBrush x:Key="HeaderedContentControlDefaultBorderBrush" Opacity="0.08" Color="White" /> <SolidColorBrush x:Key="HeaderedContentControlBorderBrush" Opacity="0.08" Color="White" />
</ResourceDictionary> </ResourceDictionary>

View File

@@ -1,7 +1,7 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SolidColorBrush x:Key="HyperlinkButtonForeground" Color="#F9F9F9" /> <SolidColorBrush x:Key="HyperlinkButtonForeground" Color="#54A9FF" />
<SolidColorBrush x:Key="HyperlinkButtonDefaultBackground" Color="Transparent" /> <SolidColorBrush x:Key="HyperlinkButtonPointeroverForeground" Color="#7FC1FF" />
<SolidColorBrush x:Key="HyperlinkButtonOverForeground" Color="#54A9FF" /> <SolidColorBrush x:Key="HyperlinkButtonPressedForeground" Color="#A9D7FF" />
<SolidColorBrush x:Key="HyperlinkButtonDisabledForeground" Opacity="0.35" Color="#F9F9F9" /> <SolidColorBrush x:Key="HyperlinkButtonDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
<SolidColorBrush x:Key="HyperlinkButtonVisitedForeground" Color="#681DA8" /> <SolidColorBrush x:Key="HyperlinkButtonVisitedForeground" Color="#B553C2" />
</ResourceDictionary> </ResourceDictionary>

View File

@@ -12,86 +12,4 @@
<SolidColorBrush x:Key="ListBoxItemSelectedPointeroverBackground" Opacity="0.3" Color="#54A9FF" /> <SolidColorBrush x:Key="ListBoxItemSelectedPointeroverBackground" Opacity="0.3" Color="#54A9FF" />
<SolidColorBrush x:Key="ListBoxItemDisabledBackground" Color="Transparent" /> <SolidColorBrush x:Key="ListBoxItemDisabledBackground" Color="Transparent" />
<SolidColorBrush x:Key="ListBoxItemSelectedDisabledBackground" Opacity="0.04" Color="#E6E8EA" /> <SolidColorBrush x:Key="ListBoxItemSelectedDisabledBackground" Opacity="0.04" Color="#E6E8EA" />
<!-- RadioGroupListBox -->
<SolidColorBrush x:Key="ListBoxItemRadioGroupDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
<SolidColorBrush x:Key="ListBoxItemRadioGroupUncheckIconDefaultBackground" Color="Transparent" />
<SolidColorBrush x:Key="ListBoxItemRadioGroupUncheckIconPointeroverBackground" Opacity="0.12" Color="White" />
<SolidColorBrush x:Key="ListBoxItemRadioGroupUncheckIconPressedBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="ListBoxItemRadioGroupUncheckIconDisabledBackground" Opacity="0.12" Color="White" />
<SolidColorBrush x:Key="ListBoxItemRadioGroupUncheckIconDefaultBorderBrush" Opacity="0.35" Color="#F9F9F9" />
<SolidColorBrush x:Key="ListBoxItemRadioGroupUncheckIconPointeroverBorderBrush" Color="#7FC1FF" />
<SolidColorBrush x:Key="ListBoxItemRadioGroupUncheckIconPressedBorderBrush" Color="#A9D7FF" />
<SolidColorBrush x:Key="ListBoxItemRadioGroupUncheckIconDisabledBorderBrush" Opacity="0.08" Color="White" />
<SolidColorBrush x:Key="ListBoxItemRadioGroupCheckIconDefaultBackground" Color="#54A9FF" />
<SolidColorBrush x:Key="ListBoxItemRadioGroupCheckIconPointeroverBackground" Color="#7FC1FF" />
<SolidColorBrush x:Key="ListBoxItemRadioGroupCheckIconPressedBackground" Color="#A9D7FF" />
<SolidColorBrush x:Key="ListBoxItemRadioGroupCheckIconDisabledBackground" Color="#135CB8" />
<SolidColorBrush x:Key="ListBoxItemRadioGroupCheckIconDefaultBorderBrush" Color="#54A9FF" />
<SolidColorBrush x:Key="ListBoxItemRadioGroupCheckIconPointeroverBorderBrush" Color="#7FC1FF" />
<SolidColorBrush x:Key="ListBoxItemRadioGroupCheckIconPressedBorderBrush" Color="#A9D7FF" />
<SolidColorBrush x:Key="ListBoxItemRadioGroupCheckIconDisabledBorderBrush" Color="#135CB8" />
<SolidColorBrush x:Key="ListBoxItemRadioGroupCheckGlyphFill" Color="White" />
<SolidColorBrush x:Key="ListBoxItemRadioGroupForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="ListBoxItemRadioGroupDefaultBackground" Color="Transparent" />
<SolidColorBrush x:Key="ListBoxItemRadioGroupDefaultBorderBrush" Opacity="0.35" Color="#F9F9F9" />
<!-- ButtonRadioGroupListBox -->
<SolidColorBrush x:Key="ListBoxItemRadioGroupButtonUncheckedForeground" Opacity="0.8" Color="#F9F9F9" />
<SolidColorBrush x:Key="ListBoxItemRadioGroupButtonUncheckedPointeroverBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="ListBoxItemRadioGroupButtonUncheckedDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
<SolidColorBrush x:Key="ListBoxItemRadioGroupButtonCheckedBackground" Color="#43444A" />
<SolidColorBrush x:Key="ListBoxItemRadioGroupButtonCheckedForeground" Color="#54A9FF" />
<SolidColorBrush x:Key="ListBoxItemRadioGroupButtonCheckedDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
<!-- CardRadioGroupListBox -->
<SolidColorBrush x:Key="ListBoxItemRadioGroupCardDefaultBackground" Color="Transparent" />
<SolidColorBrush x:Key="ListBoxItemRadioGroupCardDefaultBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="ListBoxItemRadioGroupCardCheckedBackground" Opacity="0.2" Color="#54A9FF" />
<SolidColorBrush x:Key="ListBoxItemRadioGroupCardCheckDefaultBorderBrush" Color="#54A9FF" />
<SolidColorBrush x:Key="ListBoxItemRadioGroupCardCheckPointeroverBorderBrush" Color="#7FC1FF" />
<SolidColorBrush x:Key="ListBoxItemRadioGroupCardCheckPressedBorderBrush" Color="#A9D7FF" />
<SolidColorBrush x:Key="ListBoxItemRadioGroupCardUncheckPointeroverBackground" Opacity="0.12" Color="White" />
<SolidColorBrush x:Key="ListBoxItemRadioGroupCardUncheckPressedBackground" Opacity="0.16" Color="White" />
<!-- CheckGroupListBox -->
<SolidColorBrush x:Key="ListBoxItemCheckForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="ListBoxItemCheckDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
<SolidColorBrush x:Key="ListBoxItemCheckGlyphFill" Color="White" />
<SolidColorBrush x:Key="ListBoxItemCheckGlyphDisabledFill" Color="White" />
<SolidColorBrush x:Key="ListBoxItemCheckDefaultBackground" Color="Transparent" />
<SolidColorBrush x:Key="ListBoxItemCheckDefaultBorderBrush" Opacity="0.35" Color="#F9F9F9" />
<SolidColorBrush x:Key="ListBoxItemCheckPointeroverBackground" Opacity="0.12" Color="White" />
<SolidColorBrush x:Key="ListBoxItemCheckPointeroverBorderBrush" Color="#54A9FF" />
<SolidColorBrush x:Key="ListBoxItemCheckPressedBackground" Color="#A9D7FF" />
<SolidColorBrush x:Key="ListBoxItemCheckPressedBorderBrush" Color="#A9D7FF" />
<SolidColorBrush x:Key="ListBoxItemCheckCheckedDefaultBackground" Color="#54A9FF" />
<SolidColorBrush x:Key="ListBoxItemCheckCheckedDefaultBorderBrush" Color="#54A9FF" />
<SolidColorBrush x:Key="ListBoxItemCheckCheckedPointeroverBackground" Color="#7FC1FF" />
<SolidColorBrush x:Key="ListBoxItemCheckCheckedPointeroverBorderBrush" Color="#7FC1FF" />
<SolidColorBrush x:Key="ListBoxItemCheckCheckedPressedBackground" Color="#A9D7FF" />
<SolidColorBrush x:Key="ListBoxItemCheckCheckedPressedBorderBrush" Color="#A9D7FF" />
<SolidColorBrush x:Key="ListBoxItemCheckDefaultDisabledBackground" Opacity="0.04" Color="#E6E8EA" />
<SolidColorBrush x:Key="ListBoxItemCheckDefaultDisabledBorderBrush" Opacity="0.08" Color="White" />
<SolidColorBrush x:Key="ListBoxItemCheckCheckedDisabledBackground" Color="#135CB8" />
<SolidColorBrush x:Key="ListBoxItemCheckCheckedDisabledBorderBrush" Color="#135CB8" />
<!-- CardCheckGroupListBox -->
<SolidColorBrush x:Key="ListBoxItemCheckCardCheckedBackground" Opacity="0.2" Color="#54A9FF" />
<SolidColorBrush x:Key="ListBoxItemCheckCardCheckedBorderBrush" Color="#54A9FF" />
<SolidColorBrush x:Key="ListBoxItemCheckCardCheckedDisabledBorderBrush" Color="#135CB8" />
<SolidColorBrush x:Key="ListBoxItemCheckCardPointeroverBackground" Opacity="0.12" Color="White" />
<SolidColorBrush x:Key="ListBoxItemCheckCardPressedBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="ListBoxItemCheckCardCheckedPointeroverBorderBrush" Color="#7FC1FF" />
<SolidColorBrush x:Key="ListBoxItemCheckCardCheckedPressedBorderBrush" Color="#A9D7FF" />
</ResourceDictionary> </ResourceDictionary>

View File

@@ -5,7 +5,7 @@
<!-- MenuFlyout --> <!-- MenuFlyout -->
<SolidColorBrush x:Key="MenuFlyoutBackground" Color="#43444A" /> <SolidColorBrush x:Key="MenuFlyoutBackground" Color="#43444A" />
<SolidColorBrush x:Key="MenuFlyoutBorderBrush" Opacity="0.08" Color="White" /> <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 --> <!-- MenuItem -->
<SolidColorBrush x:Key="MenuItemBackground" Color="Transparent" /> <SolidColorBrush x:Key="MenuItemBackground" Color="Transparent" />

View File

@@ -5,7 +5,7 @@
<SolidColorBrush x:Key="NotificationCardSuccessIconForeground" Color="#5DC264" /> <SolidColorBrush x:Key="NotificationCardSuccessIconForeground" Color="#5DC264" />
<SolidColorBrush x:Key="NotificationCardWarningIconForeground" Color="#FFAE43" /> <SolidColorBrush x:Key="NotificationCardWarningIconForeground" Color="#FFAE43" />
<SolidColorBrush x:Key="NotificationCardErrorIconForeground" Color="#FC725A" /> <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="NotificationCardTitleForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="NotificationCardMessageForeground" Opacity="0.8" 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="SemiColorDisabledBackground" Color="{StaticResource SemiGrey1Color}" />
<SolidColorBrush x:Key="SemiColorDisabledFill" Opacity="0.04" Color="{StaticResource SemiGrey8Color}" /> <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> </ResourceDictionary>

View File

@@ -42,16 +42,16 @@
<SolidColorBrush x:Key="ToggleButtonCheckedForeground" Color="White" /> <SolidColorBrush x:Key="ToggleButtonCheckedForeground" Color="White" />
<SolidColorBrush x:Key="ToggleButtonCheckedDisabledBackground" Color="#2E3238" /> <SolidColorBrush x:Key="ToggleButtonCheckedDisabledBackground" Color="#2E3238" />
<SolidColorBrush x:Key="ToggleButtonPrimaryIndeterminateBackground" Color="#053170" /> <SolidColorBrush x:Key="ToggleButtonPrimaryIndeterminateBackground" Opacity="0.2" Color="#54A9FF" />
<SolidColorBrush x:Key="ToggleButtonSecondaryIndeterminateBackground" Color="#003761" /> <SolidColorBrush x:Key="ToggleButtonSecondaryIndeterminateBackground" Opacity="0.2" Color="#40B4F3" />
<SolidColorBrush x:Key="ToggleButtonTertiaryIndeterminateBackground" Color="#1C1F23" /> <SolidColorBrush x:Key="ToggleButtonTertiaryIndeterminateBackground" Opacity="0.2" Color="#888D92" />
<SolidColorBrush x:Key="ToggleButtonSuccessIndeterminateBackground" Color="#123C19" /> <SolidColorBrush x:Key="ToggleButtonSuccessIndeterminateBackground" Opacity="0.2" Color="#5DC264" />
<SolidColorBrush x:Key="ToggleButtonWarningIndeterminateBackground" Color="#551F03" /> <SolidColorBrush x:Key="ToggleButtonWarningIndeterminateBackground" Opacity="0.2" Color="#FFAE43" />
<SolidColorBrush x:Key="ToggleButtonDangerIndeterminateBackground" Color="#6C090B" /> <SolidColorBrush x:Key="ToggleButtonDangerIndeterminateBackground" Opacity="0.2" Color="#FC725A" />
<SolidColorBrush x:Key="ToggleButtonPrimaryIndeterminateBorderBrush" Color="#54A9FF" /> <SolidColorBrush x:Key="ToggleButtonPrimaryIndeterminateBorderBrush" Color="#54A9FF" />
<SolidColorBrush x:Key="ToggleButtonSecondaryIndeterminateBorderBrush" Color="#40B4F3" /> <SolidColorBrush x:Key="ToggleButtonSecondaryIndeterminateBorderBrush" Color="#40B4F3" />
<SolidColorBrush x:Key="ToggleButtonTertiaryIndeterminateBorderBrush" Color="#888D92" /> <SolidColorBrush x:Key="ToggleButtonTertiaryIndeterminateBorderBrush" Opacity="0.8" Color="#F9F9F9" />
<SolidColorBrush x:Key="ToggleButtonSuccessIndeterminateBorderBrush" Color="#5DC264" /> <SolidColorBrush x:Key="ToggleButtonSuccessIndeterminateBorderBrush" Color="#5DC264" />
<SolidColorBrush x:Key="ToggleButtonWarningIndeterminateBorderBrush" Color="#FFAE43" /> <SolidColorBrush x:Key="ToggleButtonWarningIndeterminateBorderBrush" Color="#FFAE43" />
<SolidColorBrush x:Key="ToggleButtonDangerIndeterminateBorderBrush" Color="#FC725A" /> <SolidColorBrush x:Key="ToggleButtonDangerIndeterminateBorderBrush" Color="#FC725A" />

Some files were not shown because too many files have changed in this diff Show More