Compare commits

...

106 Commits

Author SHA1 Message Date
Zhang Dian
6591f9a26d Merge branch 'main' into release 2023-05-09 22:55:26 +08:00
Zhang Dian
503af76f0c Merge pull request #184 from irihitech/preview8
Preview 8
2023-05-09 22:53:12 +08:00
rabbitism
a4b9d8724e docs: update readme and package release note. 2023-05-09 22:39:38 +08:00
rabbitism
b5a9c8f53e fix: add carousel indicator back. 2023-05-09 22:24:51 +08:00
rabbitism
b3737bfee6 fix: fix color picker display issue. fix various binding error (although they still compile) 2023-05-09 22:01:43 +08:00
rabbitism
f68985eb92 feat: update version, fix progress bar binding. 2023-05-09 21:24:51 +08:00
Dong Bin
e556c8ed3f Merge pull request #182 from irihitech/168-margin
fix: MenuFlyoutPresenter margin.
2023-05-09 21:19:05 +08:00
rabbitism
7e0d85f25f fix: align context menu and menu flyout. 2023-05-09 21:17:41 +08:00
rabbitism
983e7461c1 fix: fix border shadow display. 2023-05-09 21:12:24 +08:00
Dong Bin
66e1bf1439 Merge pull request #183 from irihitech/159-lightflyout
feat: add LightFlyout theme.
2023-05-09 20:54:54 +08:00
rabbitism
5d47829b6c feat: remove border and shadow. 2023-05-09 20:53:57 +08:00
Dong Bin
df103bc972 Merge pull request #181 from irihitech/91-successbutton
feat: add Success Button style.
2023-05-09 20:44:51 +08:00
Zhang Dian
a36a088983 feat: add LightFlyout theme. 2023-05-09 19:13:56 +08:00
Zhang Dian
28ecabdbbc fix: MenuFlyoutPresenter margin. 2023-05-09 17:56:22 +08:00
Zhang Dian
e40bc531e4 feat: add Success Button style. 2023-05-09 17:42:08 +08:00
Dong Bin
37746e38f7 Merge pull request #180 from irihitech/178-datavalidationerror
Add DataValidationError to Input Control
2023-05-08 23:26:08 +08:00
rabbitism
97b5eb7a04 feat: add tooltip error theme. 2023-05-08 22:53:51 +08:00
rabbitism
6eb405abe2 feat: add textbox internal style, fix various internal textbox styles. 2023-05-08 22:15:17 +08:00
Zhang Dian
4ba6ea324d fix: fix DatePicker&TimePicker MinHeight property. 2023-05-08 17:57:43 +08:00
Zhang Dian
e8ef024d59 feat: DatePicker&TimePicker validations. 2023-05-08 10:19:58 +08:00
Zhang Dian
cece722496 feat: add validation errors to CalendarDatePicker. 2023-05-07 00:11:52 +08:00
rabbitism
ae0994aa93 feat: add hacks for internal textbox error display. 2023-05-06 23:17:55 +08:00
Zhang Dian
d75a4c549e feat: add validation errors to NumericUpDown. 2023-05-06 23:17:53 +08:00
Zhang Dian
45f3470d76 feat: add validation errors to ComboBox. 2023-05-06 17:30:26 +08:00
rabbitism
bac20dbdbf feat: simplify slider template, add error. 2023-05-05 10:52:08 +08:00
Zhang Dian
7f89b6104c Merge pull request #177 from irihitech/176-managedfilechooser
Fix ManagedFileChooser crash issue
2023-05-05 09:54:25 +08:00
rabbitism
5f7e1510f1 feat: move validation errors demo to individual page. 2023-05-05 02:31:25 +08:00
rabbitism
127bd1446a feat: add validation errors to textbox. 2023-05-05 02:21:33 +08:00
rabbitism
aee8042af8 feat: add resources. 2023-05-05 01:44:38 +08:00
rabbitism
64a9f9e25a feat: change to new converter to avoid resource dictionary key issue. 2023-05-05 01:07:00 +08:00
Dong Bin
bbedbdccd3 Merge pull request #175 from irihitech/scroll
ScrollViewer Update
2023-04-27 10:50:54 +08:00
rabbitism
4758fc6547 feat: fix scrollviewer theme, add new theme, add demo. 2023-04-27 10:25:39 +08:00
Dong Bin
0f6aed9baa Merge pull request #170 from irihitech/main
Preview 7 release
2023-04-25 13:46:02 +08:00
Dong Bin
17676823ff Merge pull request #169 from irihitech/nightly
Update to Avalonia preview 7
2023-04-25 12:05:31 +08:00
rabbitism
bd0d0f261a docs: update docs. 2023-04-25 12:03:35 +08:00
rabbitism
8cb67d94e2 feat: migrate to preview7 2023-04-25 11:04:37 +08:00
rabbitism
29f7af5bd0 feat: move to props file. 2023-04-23 01:41:42 +08:00
rabbitism
39b17f52d1 feat: update to latest nightly. 2023-04-23 01:10:23 +08:00
Dong Bin
95df47eeba Merge pull request #167 from irihitech/165-splitbutton-theme
SplitButton Styles
2023-04-04 23:01:57 +08:00
Zhang Dian
2c41fe862b feat: add SolidSplitButton and BorderlessSplitButton themes. 2023-04-04 15:59:42 +08:00
Zhang Dian
593d0d3fa2 feat: add size classes. 2023-04-04 15:58:47 +08:00
Dong Bin
a425bceddb Merge pull request #166 from irihitech/CICD
GitHub Actions
2023-04-04 13:56:42 +08:00
Zhang Dian
80c6380ce9 feat: CI package. 2023-04-04 02:19:13 +08:00
Zhang Dian
0ae04b69f5 fix: fix index typo. 2023-03-30 23:04:16 +08:00
rabbitism
d952f901f2 doc: update docs for version preview6.1 2023-03-28 23:55:11 +08:00
Dong Bin
566cec65be Merge pull request #161 from irihitech/160-togglebutton-foreground
Togglebutton disabled Foreground
2023-03-28 23:30:02 +08:00
Zhang Dian
0af182680f Merge pull request #162 from irihitech/150-radiobutton
RadioButton and CheckBox alignment issue
2023-03-28 23:27:35 +08:00
rabbitism
efe00ebcf4 fix: fix checkbox card default vertical alignment. 2023-03-28 23:14:27 +08:00
rabbitism
2662059c6d fix: fix template and foreground. 2023-03-28 23:04:44 +08:00
rabbitism
04dbe2d9ce fix: fix checkbox vertical alignment issue. 2023-03-28 22:06:47 +08:00
rabbitism
4db7bbf522 fix: fix radiobutton vertical alignment. 2023-03-28 22:00:32 +08:00
Zhang Dian
97a0f21186 mix: move disabled Foreground resources. 2023-03-28 22:00:15 +08:00
Zhang Dian
698866ab43 feat: ToggleButton Foreground should the same as BorderBrush. 2023-03-28 21:27:14 +08:00
Zhang Dian
6cafdd6e1c Merge pull request #158 from irihitech/numeric
Additional Fix of Numeric Height fix
2023-03-27 23:54:50 +08:00
Dong Bin
fd49eef668 Merge pull request #157 from irihitech/144-radiobutton-styles
Synchronize Styles for RadioButton and CheckBox
2023-03-27 23:45:03 +08:00
rabbitism
2cf623ddf9 fix: update colors. 2023-03-27 23:42:02 +08:00
rabbitism
7a89d503d7 fix: add more fix. 2023-03-27 23:35:33 +08:00
rabbitism
31ba4c9fbe fix: fix card disabled style. 2023-03-27 23:32:24 +08:00
rabbitism
f30e027a19 fix: fix card disabled foreground 2023-03-27 23:26:44 +08:00
rabbitism
ffd1c7d89a fix: fix height issue. 2023-03-27 23:03:27 +08:00
Zhang Dian
2bb175bb16 feat: checked ButtonRadioButton disable style. 2023-03-27 19:55:54 +08:00
Zhang Dian
3124c5e2cc feat: disabled ButtonRadioButton style. 2023-03-27 19:43:11 +08:00
Zhang Dian
e79044b040 feat: ButtonRadioButton demo. 2023-03-27 19:20:17 +08:00
Zhang Dian
f63abf6901 mix: format Card pseudoclass styles. 2023-03-27 18:54:35 +08:00
Zhang Dian
fa9250540b mix: format pseudoclass styles. 2023-03-27 18:44:27 +08:00
Zhang Dian
08c06199ae feat: card RadioButton colors. 2023-03-27 18:25:07 +08:00
Zhang Dian
a4713ca21b feat: original RadioButton disabled style. 2023-03-27 17:26:31 +08:00
Zhang Dian
cc2ab6ee9a feat: relayout RadioButtonDemo. 2023-03-27 16:08:58 +08:00
Zhang Dian
0cee18f507 feat: relayout CheckBoxDemo. 2023-03-27 16:00:27 +08:00
Zhang Dian
a015bbe3e0 fix: split buttons. 2023-03-27 15:35:43 +08:00
Zhang Dian
afb0fbcea6 feat: add CheckBox and RadioButton overview. 2023-03-27 15:31:26 +08:00
Zhang Dian
5f7e84bf08 Merge pull request #154 from irihitech/0326
0326 release fixes.
2023-03-27 14:53:42 +08:00
Zhang Dian
2ad76cd737 fix: fix PointOver spell. 2023-03-27 14:49:37 +08:00
Zhang Dian
60a3fb6019 Merge pull request #156 from irihitech/color
Color Palette and ColorPicker update
2023-03-27 14:33:06 +08:00
Zhang Dian
6d338fa31c Merge pull request #155 from irihitech/153-timepicker
Fix TimePicker PeriodPanel crush issue.
2023-03-27 14:03:33 +08:00
rabbitism
f026431ca9 feat: update readme. 2023-03-27 11:38:35 +08:00
rabbitism
e6531d89eb feat: add color resource copy. 2023-03-27 11:25:47 +08:00
rabbitism
fd33972dda feat: grouped as 2d array. 2023-03-26 22:13:31 +08:00
Zhang Dian
0e76c09b8e feat: split colors. 2023-03-26 22:04:23 +08:00
Zhang Dian
d1739cc88f feat: copy colors. 2023-03-26 21:46:14 +08:00
Zhang Dian
6f4c0dd5cd feat: color order. 2023-03-26 21:37:32 +08:00
rabbitism
1a512e589d feat: Add Dark/Light color palette. 2023-03-26 20:57:03 +08:00
rabbitism
43305be6bf feat: update dark palette reference. 2023-03-26 20:32:55 +08:00
rabbitism
15ce60bcdb feat: change functional brushes to use color resource. 2023-03-26 20:23:22 +08:00
rabbitism
3639239dfe feat: add color resources, change brush definition to color reference. 2023-03-26 20:04:04 +08:00
rabbitism
9f43baa039 fix: improve nullable annotation. 2023-03-26 19:38:12 +08:00
rabbitism
c34d240874 feat: update date/time panel item height to avoid crush. 2023-03-26 18:33:54 +08:00
rabbitism
a3571192a9 fix: fix numeric height issue. 2023-03-26 18:27:04 +08:00
rabbitism
c1a9a49cd7 feat: fix PointerOver spell. 2023-03-26 18:22:38 +08:00
rabbitism
016160dee8 feat: improve TreeViewItem padding. 2023-03-26 18:15:59 +08:00
rabbitism
6885575c85 misc: add license expression in project props. 2023-03-26 14:19:17 +08:00
rabbitism
2ce3dd7445 fix: fix calendar datepicker border corner issue. 2023-03-26 14:16:27 +08:00
rabbitism
28e70736b2 fix: change IBeam to Ibeam 2023-03-26 14:07:32 +08:00
Dong Bin
e193bfc697 Merge pull request #148 from irihitech/146-togglebutton-styles
DropDownButton typo
2023-03-25 23:43:46 +08:00
Zhang Dian
41e57b5034 fix: use DropDownButton instead of DropdownButton. 2023-03-25 21:34:55 +08:00
Zhang Dian
117fce4a61 feat: DropDownButton and hand Cursor. 2023-03-25 21:30:01 +08:00
Dong Bin
c852219f39 Merge pull request #147 from irihitech/146-togglebutton-styles
ToggleButton Styles
2023-03-25 20:52:24 +08:00
Zhang Dian
f9ae36b7e1 feat: add Hand Cursor. 2023-03-25 19:50:36 +08:00
Zhang Dian
48ea283c65 fix: disabled Styles. 2023-03-25 17:51:10 +08:00
Zhang Dian
318f9fb510 fix: pressed ToggleButton BorderBrush Styles. 2023-03-25 17:50:43 +08:00
Zhang Dian
153109c0ca fix: increase disabled Style priority. 2023-03-25 12:14:50 +08:00
Zhang Dian
3afa528cac fix: add missing Primary Classes. 2023-03-25 11:44:57 +08:00
Zhang Dian
799875e38b fix: use Danger Classes instead of Error. 2023-03-25 11:33:22 +08:00
Dong Bin
49e234bf30 Merge pull request #145 from irihitech/enhancement
Protect Eyesight
2023-03-24 09:26:51 +08:00
Zhang Dian
1ddf35b25b fix: specify Foreground. 2023-03-24 01:06:14 +08:00
Zhang Dian
c90f541228 fix: use CardBorder theme instead of yellow Background. 2023-03-24 01:05:26 +08:00
115 changed files with 3980 additions and 1731 deletions

55
.github/workflows/Pack.yml vendored Normal file
View File

@@ -0,0 +1,55 @@
name: Pack
on:
push:
branches: [ "release" ]
pull_request:
branches: [ "release" ]
jobs:
nuget_desktop:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Nuget Semi.Avalonia
run: dotnet pack ./src/Semi.Avalonia -o ./nugets
- name: Nuget Semi.Avalonia.DataGrid
run: dotnet pack ./src/Semi.Avalonia.DataGrid -o ./nugets
- name: Nuget Semi.Avalonia.ColorPicker
run: dotnet pack ./src/Semi.Avalonia.ColorPicker -o ./nugets
- name: Desktop
run: dotnet publish ./demo/Semi.Avalonia.Demo.Desktop -r win-x64 -c Release /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true --self-contained true
- name: Upload
uses: actions/upload-artifact@v3.1.2
with:
name: nuget_desktop
path: |
./nugets
./**/publish/*.exe
android:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: CD Android
run: cd ./demo/Semi.Avalonia.Demo.Android
- name: Restore Dependencies
run: dotnet restore
- name: Build
run: dotnet publish ./demo/Semi.Avalonia.Demo.Android -c Release -f net7.0-android --no-restore
- name: Upload a Build Artifact
uses: actions/upload-artifact@v3.1.2
with:
name: android
path: ./**/publish/*Signed.apk

6
.run/SC-Single.run.xml Normal file
View File

@@ -0,0 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="SC-Single" type="DotNetFolderPublish" factoryName="Publish to folder">
<riderPublish configuration="Release" include_native_libs_for_self_extract="true" platform="Any CPU" produce_single_file="true" runtime="win-x64" self_contained="true" target_folder="$PROJECT_DIR$/demo/Semi.Avalonia.Demo.Desktop/bin/Release/net7.0/win-x64/publish" target_framework="net7.0" uuid_high="3088527218258560748" uuid_low="-8649338673481336678" />
<method v="2" />
</configuration>
</component>

View File

@@ -11,7 +11,7 @@ Avalonia Theme inspired by Semi Design
## Installation ## Installation
```bash ```bash
dotnet add package Semi.Avalonia --version 0.1.0-preview6 dotnet add package Semi.Avalonia --version 0.1.0-preview8
``` ```
Include Semi Design Styles in application: Include Semi Design Styles in application:
@@ -25,8 +25,8 @@ That's all.
DataGrid and ColorPicker are distributed in separated packages. Please install if you need. DataGrid and ColorPicker are distributed in separated packages. Please install if you need.
```bash ```bash
dotnet add package Semi.Avalonia.ColorPicker --version 0.1.0-preview6 dotnet add package Semi.Avalonia.ColorPicker --version 0.1.0-preview8
dotnet add package Semi.Avalonia.DataGrid --version 0.1.0-preview6 dotnet add package Semi.Avalonia.DataGrid --version 0.1.0-preview8
``` ```
```xaml ```xaml
<Application.Styles> <Application.Styles>
@@ -47,6 +47,13 @@ https://github.com/irihitech/Semi.Avalonia/releases
| 0.1.0-preview3 | 11.0-preview4 | | 0.1.0-preview3 | 11.0-preview4 |
| 0.1.0-preview5.x | 11.0-preview5 | | 0.1.0-preview5.x | 11.0-preview5 |
| 0.1.0-preview6.x | 11.0-preview6 | | 0.1.0-preview6.x | 11.0-preview6 |
| 0.1.0-preview7.x | 11.0-preview7 |
| 0.1.0-preview8.x | 11.0-preview8 |
**NOTE**
Semi Avalonia theme is moving forward together with Avalonia preview versions now. So new feature/fixes are not backported to previous preview versions. If you need a feature/fix for outdated avalonia preview version, please raise an issue so we can do that for you.
## TODO ## TODO
* DataValidationErrors * DataValidationErrors

View File

@@ -1,6 +1,6 @@
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<AvaloniaVersion>11.0.0-preview4</AvaloniaVersion> <AvaloniaVersion>11.0.0-preview8</AvaloniaVersion>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@@ -12,8 +12,10 @@
<RootNamespace>Semi.Avalonia.Demo.Android</RootNamespace> <RootNamespace>Semi.Avalonia.Demo.Android</RootNamespace>
</PropertyGroup> </PropertyGroup>
<Import Project="../Directory.Build.props" />
<ItemGroup> <ItemGroup>
<PackageReference Include="Avalonia.Android" Version="11.0.0-preview6" /> <PackageReference Include="Avalonia.Android" Version="$(AvaloniaVersion)" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@@ -16,13 +16,13 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<RdXmlFile Include="rd.xml"/> <RdXmlFile Include="rd.xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Avalonia.Desktop" Version="11.0.0-preview6" /> <PackageReference Include="Avalonia.Desktop" 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="11.0.0-preview6" /> <PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@@ -19,8 +19,8 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Avalonia.Browser" Version="11.0.0-preview6" /> <PackageReference Include="Avalonia.Browser" Version="$(AvaloniaVersion)" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.0-preview6" /> <PackageReference Include="Avalonia.Themes.Fluent" Version="$(AvaloniaVersion)" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@@ -21,8 +21,8 @@
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
CornerRadius="6" /> CornerRadius="6" />
<Grid ColumnDefinitions="*, Auto" RowDefinitions="*, *, *, *, *, *"> <Grid ColumnDefinitions="*, Auto" RowDefinitions="*, *, *, *, *, *, *">
<!-- Row 0-1 ResourceKey --> <!-- Row 0-1-2 ResourceKey -->
<TextBlock <TextBlock
Grid.Column="0" Grid.Column="0"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
@@ -48,23 +48,43 @@
Data="{StaticResource CopyIcon}" Data="{StaticResource CopyIcon}"
Foreground="{Binding $parent[Button].Foreground}" /> Foreground="{Binding $parent[Button].Foreground}" />
</Button> </Button>
<SelectableTextBlock
<!-- Row 2-3 HEX -->
<TextBlock
Grid.Row="2" Grid.Row="2"
Grid.Column="0" Grid.Column="0"
VerticalAlignment="Center"
IsVisible="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ColorResourceKey, Converter={x:Static ObjectConverters.IsNotNull}}"
Text="{TemplateBinding ColorResourceKey}" />
<Button
Grid.Row="2"
Grid.Column="1"
Classes="Tertiary"
Command="{Binding $parent[controls:ColorDetailControl].Copy}"
CommandParameter="{x:Static controls:ColorDetailControl.KEY_ColorResourceKey}"
IsVisible="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ColorResourceKey, Converter={x:Static ObjectConverters.IsNotNull}}"
Theme="{DynamicResource BorderlessButton}">
<PathIcon
Width="12"
Height="12"
Data="{StaticResource CopyIcon}"
Foreground="{Binding $parent[Button].Foreground}" />
</Button>
<!-- Row 3-4 HEX -->
<TextBlock
Grid.Row="3"
Grid.Column="0"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
Margin="4,8,0,0" Margin="4,8,0,0"
VerticalAlignment="Center" VerticalAlignment="Center"
Classes="Tertiary" Classes="Tertiary"
Text="ARGB" /> Text="ARGB" />
<SelectableTextBlock <SelectableTextBlock
Grid.Row="3" Grid.Row="4"
Grid.Column="0" Grid.Column="0"
VerticalAlignment="Center" VerticalAlignment="Center"
Text="{TemplateBinding Hex}" /> Text="{TemplateBinding Hex}" />
<Button <Button
Grid.Row="3" Grid.Row="4"
Grid.Column="1" Grid.Column="1"
Classes="Tertiary" Classes="Tertiary"
Command="{Binding $parent[controls:ColorDetailControl].Copy}" Command="{Binding $parent[controls:ColorDetailControl].Copy}"
@@ -77,9 +97,9 @@
Foreground="{Binding $parent[Button].Foreground}" /> Foreground="{Binding $parent[Button].Foreground}" />
</Button> </Button>
<!-- Row 4-5 Opacity --> <!-- Row 5-6 Opacity -->
<TextBlock <TextBlock
Grid.Row="4" Grid.Row="5"
Grid.Column="0" Grid.Column="0"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
Margin="4,8,0,0" Margin="4,8,0,0"
@@ -87,12 +107,12 @@
Classes="Tertiary" Classes="Tertiary"
Text="Opacity" /> Text="Opacity" />
<SelectableTextBlock <SelectableTextBlock
Grid.Row="5" Grid.Row="6"
Grid.Column="0" Grid.Column="0"
VerticalAlignment="Center" VerticalAlignment="Center"
Text="{TemplateBinding OpacityNumber}" /> Text="{TemplateBinding OpacityNumber}" />
<Button <Button
Grid.Row="5" Grid.Row="6"
Grid.Column="1" Grid.Column="1"
Classes="Tertiary" Classes="Tertiary"
Command="{Binding $parent[controls:ColorDetailControl].Copy}" Command="{Binding $parent[controls:ColorDetailControl].Copy}"

View File

@@ -1,5 +1,6 @@
using System.Globalization; using System.Globalization;
using Avalonia; using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Primitives; using Avalonia.Controls.Primitives;
using Avalonia.Input.Platform; using Avalonia.Input.Platform;
using Avalonia.Media; using Avalonia.Media;
@@ -12,6 +13,7 @@ public class ColorDetailControl: TemplatedControl
public const string KEY_ResourceKey = "ResourceKey"; public const string KEY_ResourceKey = "ResourceKey";
public const string KEY_Hex = "Hex"; public const string KEY_Hex = "Hex";
public const string KEY_Opacity = "Opacity"; public const string KEY_Opacity = "Opacity";
public const string KEY_ColorResourceKey = "ColorResourceKey";
public static readonly StyledProperty<string?> ResourceKeyProperty = AvaloniaProperty.Register<ColorDetailControl, string?>( public static readonly StyledProperty<string?> ResourceKeyProperty = AvaloniaProperty.Register<ColorDetailControl, string?>(
nameof(ResourceKey)); nameof(ResourceKey));
@@ -30,6 +32,15 @@ public class ColorDetailControl: TemplatedControl
set => SetValue(ResourceNameProperty, value); set => SetValue(ResourceNameProperty, value);
} }
public static readonly StyledProperty<string?> ColorResourceKeyProperty = AvaloniaProperty.Register<ColorDetailControl, string?>(
nameof(ColorResourceKey));
public string? ColorResourceKey
{
get => GetValue(ColorResourceKeyProperty);
set => SetValue(ColorResourceKeyProperty, value);
}
public static readonly DirectProperty<ColorDetailControl, string?> HexProperty = AvaloniaProperty.RegisterDirect<ColorDetailControl, string?>( public static readonly DirectProperty<ColorDetailControl, string?> HexProperty = AvaloniaProperty.RegisterDirect<ColorDetailControl, string?>(
nameof(Hex), o => o.Hex); nameof(Hex), o => o.Hex);
private string? _hex; private string? _hex;
@@ -49,6 +60,8 @@ public class ColorDetailControl: TemplatedControl
} }
static ColorDetailControl() static ColorDetailControl()
{ {
BackgroundProperty.Changed.AddClassHandler<ColorDetailControl>((o, e) => o.OnBackgroundChanged(e)); BackgroundProperty.Changed.AddClassHandler<ColorDetailControl>((o, e) => o.OnBackgroundChanged(e));
@@ -77,11 +90,14 @@ public class ColorDetailControl: TemplatedControl
break; break;
case KEY_Opacity: text = OpacityNumber; case KEY_Opacity: text = OpacityNumber;
break; break;
case KEY_ColorResourceKey: text = ColorResourceKey;
break;
default: text = string.Empty; break; default: text = string.Empty; break;
} }
} }
if (Application.Current is { Clipboard: { } c }) var toplevel = TopLevel.GetTopLevel(this);
if (toplevel?.Clipboard is { } c)
{ {
await c.SetTextAsync(text??string.Empty); await c.SetTextAsync(text??string.Empty);
} }

View File

@@ -19,15 +19,14 @@
Theme="{DynamicResource TitleTextBlock}" /> Theme="{DynamicResource TitleTextBlock}" />
<TabControl Grid.Row="1"> <TabControl Grid.Row="1">
<TabItem Header="Light"> <TabItem Header="Light">
<DataGrid IsReadOnly="True" Items="{TemplateBinding LightColors}"> <DataGrid IsReadOnly="True" ItemsSource="{TemplateBinding LightColors}">
<DataGrid.Columns> <DataGrid.Columns>
<DataGridTemplateColumn Width="70" Header="Color"> <DataGridTemplateColumn Width="70" Header="Color">
<DataGridTemplateColumn.CellTemplate> <DataGridTemplateColumn.CellTemplate>
<DataTemplate> <DataTemplate DataType="viewModels:ColorItemViewModel">
<controls:ColorItemControl <controls:ColorItemControl
Width="40" Width="40"
Height="20" Height="20"
x:DataType="viewModels:ColorItemViewModel"
Background="{Binding Brush}" Background="{Binding Brush}"
CornerRadius="3" /> CornerRadius="3" />
</DataTemplate> </DataTemplate>
@@ -35,11 +34,10 @@
</DataGridTemplateColumn> </DataGridTemplateColumn>
<DataGridTemplateColumn Width="*" Header="ResourceKey"> <DataGridTemplateColumn Width="*" Header="ResourceKey">
<DataGridTemplateColumn.CellTemplate> <DataGridTemplateColumn.CellTemplate>
<DataTemplate> <DataTemplate DataType="viewModels:ColorItemViewModel">
<SelectableTextBlock <SelectableTextBlock
Margin="12,0,12,0" Margin="12,0,12,0"
VerticalAlignment="Center" VerticalAlignment="Center"
x:DataType="viewModels:ColorItemViewModel"
Text="{Binding ResourceKey}" /> Text="{Binding ResourceKey}" />
</DataTemplate> </DataTemplate>
</DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn.CellTemplate>
@@ -47,28 +45,26 @@
<DataGridTextColumn <DataGridTextColumn
Width="*" Width="*"
x:DataType="viewModels:ColorItemViewModel" x:DataType="viewModels:ColorItemViewModel"
Binding="{Binding ColorDisplayName}" Binding="{ReflectionBinding ColorDisplayName}"
CanUserSort="False" CanUserSort="False"
Header="Name" /> Header="Name" />
<DataGridTemplateColumn Width="100" Header="Hex"> <DataGridTemplateColumn Width="100" Header="Hex">
<DataGridTemplateColumn.CellTemplate> <DataGridTemplateColumn.CellTemplate>
<DataTemplate> <DataTemplate DataType="viewModels:ColorItemViewModel">
<SelectableTextBlock <SelectableTextBlock
Margin="12,0,12,0" Margin="12,0,12,0"
VerticalAlignment="Center" VerticalAlignment="Center"
x:DataType="viewModels:ColorItemViewModel"
Text="{Binding Hex}" /> Text="{Binding Hex}" />
</DataTemplate> </DataTemplate>
</DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn> </DataGridTemplateColumn>
<DataGridTemplateColumn Width="80" Header="Opacity"> <DataGridTemplateColumn Width="80" Header="Opacity">
<DataGridTemplateColumn.CellTemplate> <DataGridTemplateColumn.CellTemplate>
<DataTemplate> <DataTemplate DataType="viewModels:ColorItemViewModel">
<SelectableTextBlock <SelectableTextBlock
Margin="12,0,12,0" Margin="12,0,12,0"
HorizontalAlignment="Right" HorizontalAlignment="Right"
VerticalAlignment="Center" VerticalAlignment="Center"
x:DataType="viewModels:ColorItemViewModel"
Text="{Binding Brush.Opacity}" /> Text="{Binding Brush.Opacity}" />
</DataTemplate> </DataTemplate>
</DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn.CellTemplate>
@@ -77,15 +73,14 @@
</DataGrid> </DataGrid>
</TabItem> </TabItem>
<TabItem Header="Dark"> <TabItem Header="Dark">
<DataGrid IsReadOnly="True" Items="{TemplateBinding DarkColors}"> <DataGrid IsReadOnly="True" ItemsSource="{TemplateBinding DarkColors}">
<DataGrid.Columns> <DataGrid.Columns>
<DataGridTemplateColumn Width="70" Header="Color"> <DataGridTemplateColumn Width="70" Header="Color">
<DataGridTemplateColumn.CellTemplate> <DataGridTemplateColumn.CellTemplate>
<DataTemplate> <DataTemplate DataType="viewModels:ColorItemViewModel">
<controls:ColorItemControl <controls:ColorItemControl
Width="40" Width="40"
Height="20" Height="20"
x:DataType="viewModels:ColorItemViewModel"
Background="{Binding Brush}" Background="{Binding Brush}"
CornerRadius="3" /> CornerRadius="3" />
</DataTemplate> </DataTemplate>
@@ -93,11 +88,10 @@
</DataGridTemplateColumn> </DataGridTemplateColumn>
<DataGridTemplateColumn Width="*" Header="ResourceKey"> <DataGridTemplateColumn Width="*" Header="ResourceKey">
<DataGridTemplateColumn.CellTemplate> <DataGridTemplateColumn.CellTemplate>
<DataTemplate> <DataTemplate DataType="viewModels:ColorItemViewModel">
<SelectableTextBlock <SelectableTextBlock
Margin="12,0,12,0" Margin="12,0,12,0"
VerticalAlignment="Center" VerticalAlignment="Center"
x:DataType="viewModels:ColorItemViewModel"
Text="{Binding ResourceKey}" /> Text="{Binding ResourceKey}" />
</DataTemplate> </DataTemplate>
</DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn.CellTemplate>
@@ -105,28 +99,26 @@
<DataGridTextColumn <DataGridTextColumn
Width="*" Width="*"
x:DataType="viewModels:ColorItemViewModel" x:DataType="viewModels:ColorItemViewModel"
Binding="{Binding ColorDisplayName}" Binding="{ReflectionBinding ColorDisplayName}"
CanUserSort="False" CanUserSort="False"
Header="Name" /> Header="Name" />
<DataGridTemplateColumn Width="100" Header="Hex"> <DataGridTemplateColumn Width="100" Header="Hex">
<DataGridTemplateColumn.CellTemplate> <DataGridTemplateColumn.CellTemplate>
<DataTemplate> <DataTemplate DataType="viewModels:ColorItemViewModel">
<SelectableTextBlock <SelectableTextBlock
Margin="12,0,12,0" Margin="12,0,12,0"
VerticalAlignment="Center" VerticalAlignment="Center"
x:DataType="viewModels:ColorItemViewModel"
Text="{Binding Hex}" /> Text="{Binding Hex}" />
</DataTemplate> </DataTemplate>
</DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn> </DataGridTemplateColumn>
<DataGridTemplateColumn Width="80" Header="Opacity"> <DataGridTemplateColumn Width="80" Header="Opacity">
<DataGridTemplateColumn.CellTemplate> <DataGridTemplateColumn.CellTemplate>
<DataTemplate> <DataTemplate DataType="viewModels:ColorItemViewModel">
<SelectableTextBlock <SelectableTextBlock
Margin="12,0,12,0" Margin="12,0,12,0"
HorizontalAlignment="Right" HorizontalAlignment="Right"
VerticalAlignment="Center" VerticalAlignment="Center"
x:DataType="viewModels:ColorItemViewModel"
Text="{Binding Brush.Opacity}" /> Text="{Binding Brush.Opacity}" />
</DataTemplate> </DataTemplate>
</DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn.CellTemplate>

View File

@@ -14,19 +14,19 @@ public class FunctionalColorGroupControl: TemplatedControl
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 = AvaloniaProperty.RegisterDirect<FunctionalColorGroupControl, IEnumerable?>(
nameof(LightColors), o => o.LightColors, (o, v) => o.LightColors = v); 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 = AvaloniaProperty.RegisterDirect<FunctionalColorGroupControl, IEnumerable?>(
nameof(DarkColors), o => o.DarkColors, (o, v) => o.DarkColors = v); 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

@@ -20,7 +20,7 @@
</Style> </Style>
</StackPanel.Styles> </StackPanel.Styles>
<AutoCompleteBox <AutoCompleteBox
Items="{Binding States}" ItemsSource="{Binding States}"
ValueMemberBinding="{Binding Name}" ValueMemberBinding="{Binding Name}"
Watermark="Please select a State"> Watermark="Please select a State">
<AutoCompleteBox.ItemTemplate> <AutoCompleteBox.ItemTemplate>
@@ -31,7 +31,7 @@
</AutoCompleteBox> </AutoCompleteBox>
<AutoCompleteBox <AutoCompleteBox
Classes="Large" Classes="Large"
Items="{Binding States}" ItemsSource="{Binding States}"
ValueMemberBinding="{ReflectionBinding Name}"> ValueMemberBinding="{ReflectionBinding Name}">
<AutoCompleteBox.ItemTemplate> <AutoCompleteBox.ItemTemplate>
<DataTemplate DataType="local:StateData"> <DataTemplate DataType="local:StateData">
@@ -41,7 +41,7 @@
</AutoCompleteBox> </AutoCompleteBox>
<AutoCompleteBox <AutoCompleteBox
Classes="Small" Classes="Small"
Items="{Binding States}" ItemsSource="{Binding States}"
ValueMemberBinding="{ReflectionBinding Name}"> ValueMemberBinding="{ReflectionBinding Name}">
<AutoCompleteBox.ItemTemplate> <AutoCompleteBox.ItemTemplate>
<DataTemplate DataType="local:StateData"> <DataTemplate DataType="local:StateData">
@@ -51,7 +51,7 @@
</AutoCompleteBox> </AutoCompleteBox>
<AutoCompleteBox <AutoCompleteBox
Classes="Bordered" Classes="Bordered"
Items="{Binding States}" ItemsSource="{Binding States}"
ValueMemberBinding="{ReflectionBinding Name}"> ValueMemberBinding="{ReflectionBinding Name}">
<AutoCompleteBox.ItemTemplate> <AutoCompleteBox.ItemTemplate>
<DataTemplate DataType="local:StateData"> <DataTemplate DataType="local:StateData">
@@ -61,7 +61,7 @@
</AutoCompleteBox> </AutoCompleteBox>
<AutoCompleteBox <AutoCompleteBox
IsEnabled="False" IsEnabled="False"
Items="{Binding States}" ItemsSource="{Binding States}"
ValueMemberBinding="{ReflectionBinding Name}" ValueMemberBinding="{ReflectionBinding Name}"
Watermark="Disabled"> Watermark="Disabled">
<AutoCompleteBox.ItemTemplate> <AutoCompleteBox.ItemTemplate>

View File

@@ -13,6 +13,7 @@
<Button Classes="Primary">Primary</Button> <Button Classes="Primary">Primary</Button>
<Button Classes="Secondary">Secondary</Button> <Button Classes="Secondary">Secondary</Button>
<Button Classes="Tertiary">Tertiary</Button> <Button Classes="Tertiary">Tertiary</Button>
<Button Classes="Success">Success</Button>
<Button Classes="Warning">Warning</Button> <Button Classes="Warning">Warning</Button>
<Button Classes="Danger">Danger</Button> <Button Classes="Danger">Danger</Button>
<Button Classes="Primary" IsEnabled="False">Danger</Button> <Button Classes="Primary" IsEnabled="False">Danger</Button>
@@ -22,6 +23,7 @@
<Button Classes="Primary" Theme="{DynamicResource SolidButton}">Primary</Button> <Button Classes="Primary" Theme="{DynamicResource SolidButton}">Primary</Button>
<Button Classes="Secondary" Theme="{DynamicResource SolidButton}">Secondary</Button> <Button Classes="Secondary" Theme="{DynamicResource SolidButton}">Secondary</Button>
<Button Classes="Tertiary" Theme="{DynamicResource SolidButton}">Tertiary</Button> <Button Classes="Tertiary" Theme="{DynamicResource SolidButton}">Tertiary</Button>
<Button Classes="Success" Theme="{DynamicResource SolidButton}">Success</Button>
<Button Classes="Warning" Theme="{DynamicResource SolidButton}">Warning</Button> <Button Classes="Warning" Theme="{DynamicResource SolidButton}">Warning</Button>
<Button Classes="Danger" Theme="{DynamicResource SolidButton}">Danger</Button> <Button Classes="Danger" Theme="{DynamicResource SolidButton}">Danger</Button>
<Button <Button
@@ -36,6 +38,7 @@
<Button Classes="Primary" Theme="{DynamicResource BorderlessButton}">Primary</Button> <Button Classes="Primary" Theme="{DynamicResource BorderlessButton}">Primary</Button>
<Button Classes="Secondary" Theme="{DynamicResource BorderlessButton}">Secondary</Button> <Button Classes="Secondary" Theme="{DynamicResource BorderlessButton}">Secondary</Button>
<Button Classes="Tertiary" Theme="{DynamicResource BorderlessButton}">Tertiary</Button> <Button Classes="Tertiary" Theme="{DynamicResource BorderlessButton}">Tertiary</Button>
<Button Classes="Success" Theme="{DynamicResource BorderlessButton}">Success</Button>
<Button Classes="Warning" Theme="{DynamicResource BorderlessButton}">Warning</Button> <Button Classes="Warning" Theme="{DynamicResource BorderlessButton}">Warning</Button>
<Button Classes="Danger" Theme="{DynamicResource BorderlessButton}">Danger</Button> <Button Classes="Danger" Theme="{DynamicResource BorderlessButton}">Danger</Button>
<Button <Button
@@ -45,7 +48,7 @@
Danger Danger
</Button> </Button>
</StackPanel> </StackPanel>
<TextBlock>DropdownButton</TextBlock> <TextBlock>DropDownButton</TextBlock>
<StackPanel Orientation="Horizontal" Spacing="8"> <StackPanel Orientation="Horizontal" Spacing="8">
<DropDownButton Content="Submit"> <DropDownButton Content="Submit">
<DropDownButton.Flyout> <DropDownButton.Flyout>
@@ -55,7 +58,7 @@
</MenuFlyout> </MenuFlyout>
</DropDownButton.Flyout> </DropDownButton.Flyout>
</DropDownButton> </DropDownButton>
<DropDownButton Content="Submit" Theme="{DynamicResource SolidDropdownButton}"> <DropDownButton Content="Submit" Theme="{DynamicResource SolidDropDownButton}">
<DropDownButton.Flyout> <DropDownButton.Flyout>
<MenuFlyout Placement="BottomEdgeAlignedRight"> <MenuFlyout Placement="BottomEdgeAlignedRight">
<MenuItem Header="Submit All" /> <MenuItem Header="Submit All" />
@@ -63,7 +66,7 @@
</MenuFlyout> </MenuFlyout>
</DropDownButton.Flyout> </DropDownButton.Flyout>
</DropDownButton> </DropDownButton>
<DropDownButton Content="Submit" Theme="{DynamicResource BorderlessDropdownButton}"> <DropDownButton Content="Submit" Theme="{DynamicResource BorderlessDropDownButton}">
<DropDownButton.Flyout> <DropDownButton.Flyout>
<MenuFlyout Placement="BottomEdgeAlignedRight"> <MenuFlyout Placement="BottomEdgeAlignedRight">
<MenuItem Header="Submit All" /> <MenuItem Header="Submit All" />
@@ -83,6 +86,7 @@
</SplitButton> </SplitButton>
<SplitButton Classes="Secondary" Content="Submit" /> <SplitButton Classes="Secondary" Content="Submit" />
<SplitButton Classes="Tertiary" Content="Submit" /> <SplitButton Classes="Tertiary" Content="Submit" />
<SplitButton Classes="Success" Content="Submit" />
<SplitButton Classes="Warning" Content="Submit" /> <SplitButton Classes="Warning" Content="Submit" />
<SplitButton Classes="Danger" Content="Submit" /> <SplitButton Classes="Danger" Content="Submit" />
<SplitButton <SplitButton
@@ -101,6 +105,7 @@
</ToggleSplitButton> </ToggleSplitButton>
<ToggleSplitButton Classes="Secondary" Content="Submit" /> <ToggleSplitButton Classes="Secondary" Content="Submit" />
<ToggleSplitButton Classes="Tertiary" Content="Submit" /> <ToggleSplitButton Classes="Tertiary" Content="Submit" />
<ToggleSplitButton Classes="Success" Content="Submit" />
<ToggleSplitButton Classes="Warning" Content="Submit" /> <ToggleSplitButton Classes="Warning" Content="Submit" />
<ToggleSplitButton Classes="Danger" Content="Submit" /> <ToggleSplitButton Classes="Danger" Content="Submit" />
<ToggleSplitButton <ToggleSplitButton

View File

@@ -14,6 +14,7 @@
<Style Selector="TextBlock"> <Style Selector="TextBlock">
<Setter Property="HorizontalAlignment" Value="Center" /> <Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Foreground" Value="#1C1F23" />
</Style> </Style>
</UserControl.Styles> </UserControl.Styles>
<StackPanel Spacing="20"> <StackPanel Spacing="20">

View File

@@ -8,21 +8,26 @@
d:DesignWidth="800" d:DesignWidth="800"
mc:Ignorable="d"> mc:Ignorable="d">
<ScrollViewer HorizontalScrollBarVisibility="Auto"> <ScrollViewer HorizontalScrollBarVisibility="Auto">
<StackPanel HorizontalAlignment="Left"> <StackPanel HorizontalAlignment="Left" Spacing="20">
<CheckBox>Unchecked</CheckBox> <TextBlock Text="CheckBox" />
<CheckBox IsEnabled="False">Unchecked</CheckBox> <StackPanel Orientation="Horizontal">
<CheckBox IsChecked="True">Checked</CheckBox> <CheckBox>Unchecked</CheckBox>
<CheckBox IsChecked="True" IsEnabled="False">Checked</CheckBox> <CheckBox IsChecked="True">Checked</CheckBox>
<CheckBox IsChecked="{x:Null}" IsThreeState="True">Indeterminate</CheckBox> <CheckBox IsChecked="{x:Null}" IsThreeState="True">Indeterminate</CheckBox>
<CheckBox </StackPanel>
IsChecked="{x:Null}" <StackPanel Orientation="Horizontal">
IsEnabled="False" <CheckBox IsEnabled="False">Unchecked</CheckBox>
IsThreeState="True"> <CheckBox IsChecked="True" IsEnabled="False">Checked</CheckBox>
Indeterminate <CheckBox
</CheckBox> IsChecked="{x:Null}"
IsEnabled="False"
IsThreeState="True">
Indeterminate
</CheckBox>
</StackPanel>
<CheckBox Width="120" HorizontalAlignment="Left">Checkbox should wrap its text</CheckBox> <CheckBox Width="120" HorizontalAlignment="Left">Checkbox should wrap its text</CheckBox>
<TextBlock Margin="0,16" Text="CardCheckBox" /> <TextBlock Margin="0,16" Text="CardCheckBox" />
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Horizontal">
<CheckBox Width="300" Theme="{DynamicResource CardCheckBox}"> <CheckBox Width="300" Theme="{DynamicResource CardCheckBox}">
<StackPanel> <StackPanel>
<TextBlock FontWeight="Bold">复选框标题</TextBlock> <TextBlock FontWeight="Bold">复选框标题</TextBlock>
@@ -38,6 +43,18 @@
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock> <TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
</StackPanel> </StackPanel>
</CheckBox> </CheckBox>
<CheckBox
Width="300"
IsChecked="{x:Null}"
IsThreeState="True"
Theme="{DynamicResource CardCheckBox}">
<StackPanel>
<TextBlock FontWeight="Bold">复选框标题</TextBlock>
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
</StackPanel>
</CheckBox>
</StackPanel>
<StackPanel Orientation="Horizontal">
<CheckBox <CheckBox
Width="300" Width="300"
IsEnabled="False" IsEnabled="False"
@@ -57,17 +74,6 @@
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock> <TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
</StackPanel> </StackPanel>
</CheckBox> </CheckBox>
<CheckBox
Width="300"
IsChecked="{x:Null}"
IsEnabled="True"
IsThreeState="True"
Theme="{DynamicResource CardCheckBox}">
<StackPanel>
<TextBlock FontWeight="Bold">复选框标题</TextBlock>
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
</StackPanel>
</CheckBox>
<CheckBox <CheckBox
Width="300" Width="300"
IsChecked="{x:Null}" IsChecked="{x:Null}"
@@ -81,7 +87,7 @@
</CheckBox> </CheckBox>
</StackPanel> </StackPanel>
<TextBlock Margin="0,16" Text="PureCardCheckBox" /> <TextBlock Margin="0,16" Text="PureCardCheckBox" />
<StackPanel Orientation="Vertical"> <StackPanel Orientation="Horizontal">
<CheckBox Width="300" Theme="{DynamicResource PureCardCheckBox}"> <CheckBox Width="300" Theme="{DynamicResource PureCardCheckBox}">
<StackPanel> <StackPanel>
<TextBlock FontWeight="Bold">复选框标题</TextBlock> <TextBlock FontWeight="Bold">复选框标题</TextBlock>
@@ -97,6 +103,19 @@
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock> <TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
</StackPanel> </StackPanel>
</CheckBox> </CheckBox>
<CheckBox
Width="300"
IsChecked="{x:Null}"
IsEnabled="True"
IsThreeState="True"
Theme="{DynamicResource PureCardCheckBox}">
<StackPanel>
<TextBlock FontWeight="Bold">复选框标题</TextBlock>
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
</StackPanel>
</CheckBox>
</StackPanel>
<StackPanel Orientation="Horizontal">
<CheckBox <CheckBox
Width="300" Width="300"
IsEnabled="False" IsEnabled="False"
@@ -116,17 +135,6 @@
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock> <TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
</StackPanel> </StackPanel>
</CheckBox> </CheckBox>
<CheckBox
Width="300"
IsChecked="{x:Null}"
IsEnabled="True"
IsThreeState="True"
Theme="{DynamicResource PureCardCheckBox}">
<StackPanel>
<TextBlock FontWeight="Bold">复选框标题</TextBlock>
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
</StackPanel>
</CheckBox>
<CheckBox <CheckBox
Width="300" Width="300"
IsChecked="{x:Null}" IsChecked="{x:Null}"

View File

@@ -2,6 +2,7 @@
x:Class="Semi.Avalonia.Demo.Pages.ColorPickerDemo" x:Class="Semi.Avalonia.Demo.Pages.ColorPickerDemo"
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:colorPicker="clr-namespace:Semi.Avalonia.ColorPicker;assembly=Semi.Avalonia.ColorPicker"
xmlns:controls="using:Avalonia.Controls" xmlns:controls="using:Avalonia.Controls"
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"
@@ -15,11 +16,7 @@
Spacing="20"> Spacing="20">
<ColorView ColorSpectrumShape="Ring" /> <ColorView ColorSpectrumShape="Ring" />
<ColorView ColorSpectrumShape="Box" /> <ColorView ColorSpectrumShape="Box" />
<ColorView> <ColorView Palette="{DynamicResource SemiColorPalette}" />
<ColorView.Palette>
<controls:MaterialColorPalette />
</ColorView.Palette>
</ColorView>
</StackPanel> </StackPanel>
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal"> <StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
<ColorPicker ColorSpectrumShape="Ring"> <ColorPicker ColorSpectrumShape="Ring">
@@ -29,7 +26,7 @@
</ColorPicker> </ColorPicker>
<ColorPicker ColorSpectrumShape="Box"> <ColorPicker ColorSpectrumShape="Box">
<ColorPicker.Palette> <ColorPicker.Palette>
<controls:MaterialColorPalette /> <colorPicker:SemiColorLightPalette />
</ColorPicker.Palette> </ColorPicker.Palette>
</ColorPicker> </ColorPicker>
</StackPanel> </StackPanel>

View File

@@ -143,7 +143,7 @@
Name="dataGridEdit" Name="dataGridEdit"
Grid.Row="1" Grid.Row="1"
Margin="12" Margin="12"
Items="{Binding DataGrid3Source}"> ItemsSource="{Binding DataGrid3Source}">
<DataGrid.Columns> <DataGrid.Columns>
<DataGridTextColumn <DataGridTextColumn
Width="2*" Width="2*"

View File

@@ -38,7 +38,7 @@ public partial class DataGridDemo : UserControl
collectionView1.SortDescriptions.Add(dataGridSortDescription); collectionView1.SortDescriptions.Add(dataGridSortDescription);
} }
}; };
dg1.Items = collectionView1; dg1.ItemsSource = collectionView1;
var dg2 = this.Get<DataGrid>("dataGridGrouping"); var dg2 = this.Get<DataGrid>("dataGridGrouping");
dg2.IsReadOnly = true; dg2.IsReadOnly = true;
@@ -46,7 +46,7 @@ public partial class DataGridDemo : UserControl
var collectionView2 = new DataGridCollectionView(Countries.All); var collectionView2 = new DataGridCollectionView(Countries.All);
collectionView2.GroupDescriptions.Add(new DataGridPathGroupDescription("Region")); collectionView2.GroupDescriptions.Add(new DataGridPathGroupDescription("Region"));
dg2.Items = collectionView2; dg2.ItemsSource = collectionView2;
var dg3 = this.Get<DataGrid>("dataGridEdit"); var dg3 = this.Get<DataGrid>("dataGridEdit");
dg3.IsReadOnly = false; dg3.IsReadOnly = false;

View File

@@ -0,0 +1,83 @@
<UserControl
x:Class="Semi.Avalonia.Demo.Pages.DataValidationErrorsDemo"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:system="clr-namespace:System;assembly=netstandard"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
<ScrollViewer>
<StackPanel HorizontalAlignment="Left" Spacing="20">
<AutoCompleteBox Width="300">
<DataValidationErrors.Error>
<system:Exception />
</DataValidationErrors.Error>
</AutoCompleteBox>
<AutoCompleteBox Width="300" Classes="Large">
<DataValidationErrors.Error>
<system:Exception />
</DataValidationErrors.Error>
</AutoCompleteBox>
<AutoCompleteBox Width="300" Classes="Small">
<DataValidationErrors.Error>
<system:Exception />
</DataValidationErrors.Error>
</AutoCompleteBox>
<CalendarDatePicker Width="300">
<DataValidationErrors.Error>
<system:Exception />
</DataValidationErrors.Error>
</CalendarDatePicker>
<ComboBox Width="300">
<ComboBoxItem>AAA</ComboBoxItem>
<ComboBoxItem>BBB</ComboBoxItem>
<DataValidationErrors.Error>
<system:Exception />
</DataValidationErrors.Error>
</ComboBox>
<DatePicker Width="300">
<DataValidationErrors.Error>
<system:Exception />
</DataValidationErrors.Error>
</DatePicker>
<NumericUpDown Width="300">
<DataValidationErrors.Error>
<system:Exception />
</DataValidationErrors.Error>
</NumericUpDown>
<Slider Width="300">
<DataValidationErrors.Error>
<system:Exception />
</DataValidationErrors.Error>
</Slider>
<TimePicker Width="300">
<DataValidationErrors.Error>
<system:Exception />
</DataValidationErrors.Error>
</TimePicker>
<TextBox
Width="300"
InnerLeftContent="http://"
InnerRightContent=".com">
<DataValidationErrors.Error>
<system:Exception />
</DataValidationErrors.Error>
</TextBox>
<TextBox
Width="300"
InnerLeftContent="http://"
InnerRightContent=".com">
<TextBox.Styles>
<Style Selector="TextBox /template/ DataValidationErrors">
<Setter Property="Theme" Value="{DynamicResource TooltipDataValidationErrors}" />
</Style>
</TextBox.Styles>
<DataValidationErrors.Error>
<system:Exception />
</DataValidationErrors.Error>
</TextBox>
</StackPanel>
</ScrollViewer>
</UserControl>

View File

@@ -0,0 +1,18 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Semi.Avalonia.Demo.Pages;
public partial class DataValidationErrorsDemo : UserControl
{
public DataValidationErrorsDemo()
{
InitializeComponent();
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}

View File

@@ -19,7 +19,7 @@
<Button Content="Hello Avalonia World!" /> <Button Content="Hello Avalonia World!" />
</Expander> </Expander>
</StackPanel> </StackPanel>
<Grid ColumnDefinitions="* *"> <Grid ColumnDefinitions="*, *">
<Expander <Expander
Height="200" Height="200"
ExpandDirection="Right" ExpandDirection="Right"

View File

@@ -15,8 +15,8 @@
<Grid <Grid
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center" VerticalAlignment="Center"
ColumnDefinitions="* * * * *" ColumnDefinitions="*, *, *, *, *"
RowDefinitions="* * * * *"> RowDefinitions="*, *, *, *, *, *">
<Button <Button
Grid.Row="0" Grid.Row="0"
Grid.Column="1" Grid.Column="1"
@@ -113,6 +113,44 @@
<Flyout Content="BottomEdgeAlignedRight" Placement="BottomEdgeAlignedRight" /> <Flyout Content="BottomEdgeAlignedRight" Placement="BottomEdgeAlignedRight" />
</Button.Flyout> </Button.Flyout>
</Button> </Button>
<Button
Grid.Row="2"
Grid.Column="2"
Content="Center">
<Button.Flyout>
<Flyout Content="Center" Placement="Center" />
</Button.Flyout>
</Button>
<Button
Grid.Row="5"
Grid.Column="2" Content="LightFlyout">
<Button.Flyout>
<Flyout FlyoutPresenterTheme="{StaticResource LightFlyout}" Placement="Top">
<StackPanel>
<Label Classes="Amber" Theme="{StaticResource TagLabel}">Amber</Label>
<Label Classes="Blue" Theme="{StaticResource TagLabel}">Blue</Label>
<Label Classes="Cyan" Theme="{StaticResource TagLabel}">Cyan</Label>
<Label Classes="Green" Theme="{StaticResource TagLabel}">Green</Label>
<Label Classes="Grey" Theme="{StaticResource TagLabel}">Grey</Label>
<Label Classes="Indigo" Theme="{StaticResource TagLabel}">Indigo</Label>
<Label Classes="LightBlue" Theme="{StaticResource TagLabel}">LightBlue</Label>
<Label Classes="LightGreen" Theme="{StaticResource TagLabel}">LightGreen</Label>
<Label Classes="Lime" Theme="{StaticResource TagLabel}">Lime</Label>
<Label Classes="Orange" Theme="{StaticResource TagLabel}">Orange</Label>
<Label Classes="Pink" Theme="{StaticResource TagLabel}">Pink</Label>
<Label Classes="Purple" Theme="{StaticResource TagLabel}">Purple</Label>
<Label Classes="Red" Theme="{StaticResource TagLabel}">Red</Label>
<Label Classes="Teal" Theme="{StaticResource TagLabel}">Teal</Label>
<Label Classes="Violet" Theme="{StaticResource TagLabel}">Violet</Label>
<Label Classes="Yellow" Theme="{StaticResource TagLabel}">Yellow</Label>
<Label Classes="White" Theme="{StaticResource TagLabel}">White</Label>
</StackPanel>
</Flyout>
</Button.Flyout>
</Button>
</Grid> </Grid>
</UserControl> </UserControl>

View File

@@ -27,5 +27,15 @@
Maximum="100" Maximum="100"
Minimum="0" Minimum="0"
ShowButtonSpinner="False" /> ShowButtonSpinner="False" />
<NumericUpDown
Width="200"
Classes="Large"
Maximum="100"
Minimum="0" />
<NumericUpDown
Width="200"
Classes="Small"
Maximum="100"
Minimum="0" />
</StackPanel> </StackPanel>
</UserControl> </UserControl>

View File

@@ -13,6 +13,7 @@
<Button Classes="Primary" Theme="{DynamicResource SolidButton}">Primary</Button> <Button Classes="Primary" Theme="{DynamicResource SolidButton}">Primary</Button>
<Button Classes="Secondary" Theme="{DynamicResource SolidButton}">Secondary</Button> <Button Classes="Secondary" Theme="{DynamicResource SolidButton}">Secondary</Button>
<Button Classes="Tertiary" Theme="{DynamicResource SolidButton}">Tertiary</Button> <Button Classes="Tertiary" Theme="{DynamicResource SolidButton}">Tertiary</Button>
<Button Classes="Success" Theme="{DynamicResource SolidButton}">Success</Button>
<Button Classes="Warning" Theme="{DynamicResource SolidButton}">Warning</Button> <Button Classes="Warning" Theme="{DynamicResource SolidButton}">Warning</Button>
<Button Classes="Danger" Theme="{DynamicResource SolidButton}">Danger</Button> <Button Classes="Danger" Theme="{DynamicResource SolidButton}">Danger</Button>
<Button <Button
@@ -47,27 +48,101 @@
<RadioButton Theme="{StaticResource ButtonRadioButton}">选项 2</RadioButton> <RadioButton Theme="{StaticResource ButtonRadioButton}">选项 2</RadioButton>
</StackPanel> </StackPanel>
</Border> </Border>
<RadioButton Margin="4" Theme="{StaticResource CardRadioButton}"> <StackPanel Orientation="Horizontal">
<StackPanel> <RadioButton Margin="4" Theme="{StaticResource CardRadioButton}">
<TextBlock FontWeight="Bold">Option 1</TextBlock> <StackPanel>
<TextBlock Classes="Tertiary">Description 1</TextBlock> <TextBlock FontWeight="Bold">Option 1</TextBlock>
</StackPanel> <TextBlock Classes="Tertiary">Description 1</TextBlock>
</RadioButton> </StackPanel>
<RadioButton </RadioButton>
Margin="4" <RadioButton
IsChecked="True" Margin="4"
Theme="{StaticResource CardRadioButton}"> IsChecked="True"
<StackPanel> Theme="{StaticResource CardRadioButton}">
<TextBlock FontWeight="Bold">Option 2</TextBlock> <StackPanel>
<TextBlock Classes="Tertiary">Description 2</TextBlock> <TextBlock FontWeight="Bold">Option 2</TextBlock>
</StackPanel> <TextBlock Classes="Tertiary">Description 2</TextBlock>
</RadioButton> </StackPanel>
</RadioButton>
</StackPanel>
<StackPanel Orientation="Horizontal">
<RadioButton Margin="4" Theme="{StaticResource PureCardRadioButton}">
<StackPanel>
<TextBlock FontWeight="Bold">Option 1</TextBlock>
<TextBlock Classes="Tertiary">Description 1</TextBlock>
</StackPanel>
</RadioButton>
<RadioButton
Margin="4"
IsChecked="True"
Theme="{StaticResource PureCardRadioButton}">
<StackPanel>
<TextBlock FontWeight="Bold">Option 2</TextBlock>
<TextBlock Classes="Tertiary">Description 2</TextBlock>
</StackPanel>
</RadioButton>
</StackPanel>
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal" />
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<CheckBox Margin="0,0,8,0">Avalonia</CheckBox> <StackPanel Orientation="Horizontal">
<CheckBox Margin="0,0,8,0" IsChecked="True">WPF</CheckBox> <CheckBox Margin="0,0,8,0">Avalonia</CheckBox>
<CheckBox IsChecked="{x:Null}" IsThreeState="True">UWP</CheckBox> <CheckBox Margin="0,0,8,0" IsChecked="True">WPF</CheckBox>
<CheckBox IsChecked="{x:Null}" IsThreeState="True">UWP</CheckBox>
</StackPanel>
<StackPanel Orientation="Horizontal">
<CheckBox Margin="4" Theme="{StaticResource CardCheckBox}">
<StackPanel>
<TextBlock FontWeight="Bold">Option 1</TextBlock>
<TextBlock Classes="Tertiary">Description 1</TextBlock>
</StackPanel>
</CheckBox>
<CheckBox
Margin="4"
IsChecked="True"
Theme="{StaticResource CardCheckBox}">
<StackPanel>
<TextBlock FontWeight="Bold">Option 2</TextBlock>
<TextBlock Classes="Tertiary">Description 2</TextBlock>
</StackPanel>
</CheckBox>
<CheckBox
Margin="4"
IsChecked="{x:Null}"
IsThreeState="True"
Theme="{StaticResource CardCheckBox}">
<StackPanel>
<TextBlock FontWeight="Bold">Option 3</TextBlock>
<TextBlock Classes="Tertiary">Description 3</TextBlock>
</StackPanel>
</CheckBox>
</StackPanel>
<StackPanel Orientation="Horizontal">
<CheckBox Margin="4" Theme="{StaticResource PureCardCheckBox}">
<StackPanel>
<TextBlock FontWeight="Bold">Option 1</TextBlock>
<TextBlock Classes="Tertiary">Description 1</TextBlock>
</StackPanel>
</CheckBox>
<CheckBox
Margin="4"
IsChecked="True"
Theme="{StaticResource PureCardCheckBox}">
<StackPanel>
<TextBlock FontWeight="Bold">Option 2</TextBlock>
<TextBlock Classes="Tertiary">Description 2</TextBlock>
</StackPanel>
</CheckBox>
<CheckBox
Margin="4"
IsChecked="{x:Null}"
IsThreeState="True"
Theme="{StaticResource PureCardCheckBox}">
<StackPanel>
<TextBlock FontWeight="Bold">Option 3</TextBlock>
<TextBlock Classes="Tertiary">Description 3</TextBlock>
</StackPanel>
</CheckBox>
</StackPanel>
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<ToggleSwitch <ToggleSwitch
@@ -96,7 +171,7 @@
</TabItem> </TabItem>
</TabControl> </TabControl>
<StackPanel Orientation="Horizontal" Spacing="20"> <StackPanel Orientation="Horizontal" Spacing="20">
<ComboBox Width="200" PlaceholderText="Please Select" > <ComboBox Width="200" PlaceholderText="Please Select">
<ComboBoxItem>Item 1</ComboBoxItem> <ComboBoxItem>Item 1</ComboBoxItem>
<ComboBoxItem>Item 2</ComboBoxItem> <ComboBoxItem>Item 2</ComboBoxItem>
<ComboBoxItem>Item 3</ComboBoxItem> <ComboBoxItem>Item 3</ComboBoxItem>
@@ -105,7 +180,7 @@
<TimePicker /> <TimePicker />
<CalendarDatePicker /> <CalendarDatePicker />
</StackPanel> </StackPanel>
<Grid ColumnDefinitions="* * *"> <Grid ColumnDefinitions="*, *, *">
<Border Theme="{StaticResource CardBorder}"> <Border Theme="{StaticResource CardBorder}">
<TextBlock>Card</TextBlock> <TextBlock>Card</TextBlock>
</Border> </Border>

View File

@@ -46,6 +46,7 @@
TextWrapping="Wrap" /> TextWrapping="Wrap" />
<controls:ColorDetailControl <controls:ColorDetailControl
Background="{Binding SelectedColor.Brush}" Background="{Binding SelectedColor.Brush}"
ColorResourceKey="{Binding SelectedColor.ColorResourceKey}"
IsVisible="{Binding SelectedColor, Converter={x:Static ObjectConverters.IsNotNull}}" IsVisible="{Binding SelectedColor, Converter={x:Static ObjectConverters.IsNotNull}}"
ResourceKey="{Binding SelectedColor.ResourceKey}" ResourceKey="{Binding SelectedColor.ResourceKey}"
ResourceName="{Binding SelectedColor.ColorDisplayName}" /> ResourceName="{Binding SelectedColor.ColorDisplayName}" />
@@ -62,7 +63,7 @@
Theme="{DynamicResource TitleTextBlock}" /> Theme="{DynamicResource TitleTextBlock}" />
<TabControl> <TabControl>
<TabItem Header="Light"> <TabItem Header="Light">
<ItemsControl Margin="16" Items="{Binding LightLists}"> <ItemsControl Margin="16" ItemsSource="{Binding LightLists}">
<ItemsControl.ItemsPanel> <ItemsControl.ItemsPanel>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<WrapPanel Orientation="Horizontal" /> <WrapPanel Orientation="Horizontal" />
@@ -70,7 +71,7 @@
</ItemsControl.ItemsPanel> </ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate> <ItemsControl.ItemTemplate>
<DataTemplate x:DataType="viewModels:ColorListViewModel"> <DataTemplate x:DataType="viewModels:ColorListViewModel">
<ItemsControl Margin="4,0" Items="{Binding Color}"> <ItemsControl Margin="4,0" ItemsSource="{Binding Color}">
<ItemsControl.ItemTemplate> <ItemsControl.ItemTemplate>
<DataTemplate x:DataType="viewModels:ColorItemViewModel"> <DataTemplate x:DataType="viewModels:ColorItemViewModel">
<controls:ColorItemControl <controls:ColorItemControl
@@ -86,7 +87,7 @@
</ItemsControl> </ItemsControl>
</TabItem> </TabItem>
<TabItem Header="Dark"> <TabItem Header="Dark">
<ItemsControl Margin="16" Items="{Binding DarkLists}"> <ItemsControl Margin="16" ItemsSource="{Binding DarkLists}">
<ItemsControl.ItemsPanel> <ItemsControl.ItemsPanel>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<WrapPanel Orientation="Horizontal" /> <WrapPanel Orientation="Horizontal" />
@@ -94,7 +95,7 @@
</ItemsControl.ItemsPanel> </ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate> <ItemsControl.ItemTemplate>
<DataTemplate x:DataType="viewModels:ColorListViewModel"> <DataTemplate x:DataType="viewModels:ColorListViewModel">
<ItemsControl Margin="4,0" Items="{Binding Color}"> <ItemsControl Margin="4,0" ItemsSource="{Binding Color}">
<ItemsControl.ItemTemplate> <ItemsControl.ItemTemplate>
<DataTemplate x:DataType="viewModels:ColorItemViewModel"> <DataTemplate x:DataType="viewModels:ColorItemViewModel">
<controls:ColorItemControl <controls:ColorItemControl
@@ -111,7 +112,7 @@
</TabItem> </TabItem>
</TabControl> </TabControl>
<ItemsControl Items="{Binding FunctionalColors}"> <ItemsControl ItemsSource="{Binding FunctionalColors}">
<ItemsControl.ItemTemplate> <ItemsControl.ItemTemplate>
<DataTemplate> <DataTemplate>
<!-- --> <!-- -->

View File

@@ -5,73 +5,163 @@
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"> mc:Ignorable="d">
<StackPanel HorizontalAlignment="Left" Spacing="20"> <ScrollViewer>
<TextBlock Text="Radio Buttons" /> <StackPanel HorizontalAlignment="Left" Spacing="20">
<StackPanel> <TextBlock Text="Radio Buttons" />
<RadioButton>111</RadioButton>
<RadioButton>222</RadioButton>
<RadioButton>333</RadioButton>
</StackPanel>
<TextBlock Text="Radio Button as Button" />
<Border HorizontalAlignment="Left" Theme="{StaticResource RadioButtonGroupBorder}">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<RadioButton Classes="Small" Theme="{DynamicResource ButtonRadioButton}">小1</RadioButton> <RadioButton>Unchecked</RadioButton>
<RadioButton Classes="Small" Theme="{DynamicResource ButtonRadioButton}">小2</RadioButton> <RadioButton IsChecked="True">Checked</RadioButton>
</StackPanel> </StackPanel>
</Border>
<Border HorizontalAlignment="Left" Theme="{StaticResource RadioButtonGroupBorder}">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<RadioButton Theme="{DynamicResource ButtonRadioButton}">默认1</RadioButton> <RadioButton IsEnabled="False">Unchecked</RadioButton>
<RadioButton Theme="{DynamicResource ButtonRadioButton}">默认2</RadioButton> <RadioButton IsChecked="True" IsEnabled="False">Checked</RadioButton>
</StackPanel> </StackPanel>
</Border> <TextBlock Text="Radio Button as Button" />
<Border HorizontalAlignment="Left" Theme="{StaticResource RadioButtonGroupBorder}">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<RadioButton Classes="Large" Theme="{DynamicResource ButtonRadioButton}">大1</RadioButton> <Border HorizontalAlignment="Left" Theme="{StaticResource RadioButtonGroupBorder}">
<RadioButton Classes="Large" Theme="{DynamicResource ButtonRadioButton}">大2</RadioButton> <StackPanel Orientation="Horizontal">
<RadioButton Classes="Small" Theme="{DynamicResource ButtonRadioButton}">小1</RadioButton>
<RadioButton
Classes="Small"
Theme="{DynamicResource ButtonRadioButton}"
IsChecked="True">
小2
</RadioButton>
</StackPanel>
</Border>
<Border Margin="8 0" HorizontalAlignment="Left" Theme="{StaticResource RadioButtonGroupBorder}">
<StackPanel Orientation="Horizontal">
<RadioButton
Classes="Small"
Theme="{DynamicResource ButtonRadioButton}"
IsEnabled="False">
小1
</RadioButton>
<RadioButton
Classes="Small"
Theme="{DynamicResource ButtonRadioButton}"
IsChecked="True"
IsEnabled="False">
小2
</RadioButton>
</StackPanel>
</Border>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Border HorizontalAlignment="Left" Theme="{StaticResource RadioButtonGroupBorder}">
<StackPanel Orientation="Horizontal">
<RadioButton Theme="{DynamicResource ButtonRadioButton}">默认1</RadioButton>
<RadioButton Theme="{DynamicResource ButtonRadioButton}" IsChecked="True">默认2</RadioButton>
</StackPanel>
</Border>
<Border Margin="8 0" HorizontalAlignment="Left" Theme="{StaticResource RadioButtonGroupBorder}">
<StackPanel Orientation="Horizontal">
<RadioButton Theme="{DynamicResource ButtonRadioButton}" IsEnabled="False">默认1</RadioButton>
<RadioButton
Theme="{DynamicResource ButtonRadioButton}"
IsEnabled="False"
IsChecked="True">
默认2
</RadioButton>
</StackPanel>
</Border>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Border HorizontalAlignment="Left" Theme="{StaticResource RadioButtonGroupBorder}">
<StackPanel Orientation="Horizontal">
<RadioButton Classes="Large" Theme="{DynamicResource ButtonRadioButton}">大1</RadioButton>
<RadioButton
Classes="Large"
Theme="{DynamicResource ButtonRadioButton}"
IsChecked="True">
大2
</RadioButton>
</StackPanel>
</Border>
<Border Margin="8 0" HorizontalAlignment="Left" Theme="{StaticResource RadioButtonGroupBorder}">
<StackPanel Orientation="Horizontal">
<RadioButton
Classes="Large"
Theme="{DynamicResource ButtonRadioButton}"
IsEnabled="False">
大1
</RadioButton>
<RadioButton
Classes="Large"
Theme="{DynamicResource ButtonRadioButton}"
IsChecked="True"
IsEnabled="False">
大2
</RadioButton>
</StackPanel>
</Border>
</StackPanel>
<TextBlock Text="Radio Button as Card" />
<StackPanel Orientation="Horizontal">
<RadioButton Width="300" Theme="{DynamicResource CardRadioButton}">
<StackPanel>
<TextBlock FontWeight="Bold">单选框标题</TextBlock>
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
</StackPanel>
</RadioButton>
<RadioButton IsChecked="True" Width="300" Theme="{DynamicResource CardRadioButton}">
<StackPanel>
<TextBlock FontWeight="Bold">单选框标题</TextBlock>
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
</StackPanel>
</RadioButton>
</StackPanel>
<StackPanel Orientation="Horizontal">
<RadioButton IsEnabled="False" Width="300" Theme="{DynamicResource CardRadioButton}">
<StackPanel>
<TextBlock FontWeight="Bold">单选框标题</TextBlock>
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
</StackPanel>
</RadioButton>
<RadioButton
IsChecked="True"
IsEnabled="False"
Width="300"
Theme="{DynamicResource CardRadioButton}">
<StackPanel>
<TextBlock FontWeight="Bold">单选框标题</TextBlock>
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
</StackPanel>
</RadioButton>
</StackPanel>
<TextBlock Text="Radio Button as Pure Card" />
<StackPanel Orientation="Horizontal">
<RadioButton Width="300" Theme="{DynamicResource PureCardRadioButton}">
<StackPanel>
<TextBlock FontWeight="Bold">单选框标题</TextBlock>
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
</StackPanel>
</RadioButton>
<RadioButton IsChecked="True" Width="300" Theme="{DynamicResource PureCardRadioButton}">
<StackPanel>
<TextBlock FontWeight="Bold">单选框标题</TextBlock>
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
</StackPanel>
</RadioButton>
</StackPanel>
<StackPanel Orientation="Horizontal">
<RadioButton IsEnabled="False" Width="300" Theme="{DynamicResource PureCardRadioButton}">
<StackPanel>
<TextBlock FontWeight="Bold">单选框标题</TextBlock>
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
</StackPanel>
</RadioButton>
<RadioButton
IsChecked="True"
IsEnabled="False"
Width="300"
Theme="{DynamicResource PureCardRadioButton}">
<StackPanel>
<TextBlock FontWeight="Bold">单选框标题</TextBlock>
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
</StackPanel>
</RadioButton>
</StackPanel> </StackPanel>
</Border>
<TextBlock Text="Radio Button as Card" />
<StackPanel Orientation="Horizontal">
<RadioButton Width="300" Theme="{DynamicResource CardRadioButton}">
<StackPanel>
<TextBlock FontWeight="Bold">单选框标题</TextBlock>
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
</StackPanel>
</RadioButton>
<RadioButton Width="300" Theme="{DynamicResource CardRadioButton}">
<StackPanel>
<TextBlock FontWeight="Bold">单选框标题</TextBlock>
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
</StackPanel>
</RadioButton>
<RadioButton Width="300" Theme="{DynamicResource CardRadioButton}">
<StackPanel>
<TextBlock FontWeight="Bold">单选框标题</TextBlock>
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
</StackPanel>
</RadioButton>
</StackPanel> </StackPanel>
<TextBlock Text="Radio Button as Pure Card" /> </ScrollViewer>
<StackPanel Orientation="Horizontal">
<RadioButton Width="300" Theme="{DynamicResource PureCardRadioButton}">
<StackPanel>
<TextBlock FontWeight="Bold">单选框标题</TextBlock>
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
</StackPanel>
</RadioButton>
<RadioButton Width="300" Theme="{DynamicResource PureCardRadioButton}">
<StackPanel>
<TextBlock FontWeight="Bold">单选框标题</TextBlock>
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
</StackPanel>
</RadioButton>
<RadioButton Width="300" Theme="{DynamicResource PureCardRadioButton}">
<StackPanel>
<TextBlock FontWeight="Bold">单选框标题</TextBlock>
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
</StackPanel>
</RadioButton>
</StackPanel>
</StackPanel>
</UserControl> </UserControl>

View File

@@ -0,0 +1,33 @@
<UserControl
x:Class="Semi.Avalonia.Demo.Pages.ScrollViewerDemo"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
<StackPanel>
<ScrollViewer
Width="200"
Height="200"
Margin="10"
HorizontalScrollBarVisibility="Auto">
<Rectangle
Width="300"
Height="300"
Fill="#FEFBCB" />
</ScrollViewer>
<ScrollViewer
Width="200"
Height="200"
Margin="10"
HorizontalScrollBarVisibility="Auto"
Theme="{DynamicResource StaticScrollViewer}">
<Rectangle
Width="300"
Height="300"
Fill="#FEFBCB" />
</ScrollViewer>
</StackPanel>
</UserControl>

View File

@@ -0,0 +1,18 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Semi.Avalonia.Demo.Pages;
public partial class ScrollViewerDemo : UserControl
{
public ScrollViewerDemo()
{
InitializeComponent();
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}

View File

@@ -4,6 +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"
xmlns:system="clr-namespace:System;assembly=netstandard"
d:DesignHeight="450" d:DesignHeight="450"
d:DesignWidth="800" d:DesignWidth="800"
mc:Ignorable="d"> mc:Ignorable="d">

View File

@@ -7,23 +7,39 @@
d:DesignHeight="450" d:DesignHeight="450"
d:DesignWidth="800" d:DesignWidth="800"
mc:Ignorable="d"> mc:Ignorable="d">
<StackPanel> <StackPanel Spacing="20">
<TextBlock Text="Toggle Button" /> <TextBlock Text="Toggle Button (Default)" />
<StackPanel Orientation="Horizontal" Spacing="20"> <StackPanel Orientation="Horizontal" Spacing="20">
<ToggleButton>Primary</ToggleButton> <ToggleButton>Default</ToggleButton>
<ToggleButton Classes="Primary">Primary</ToggleButton>
<ToggleButton Classes="Secondary">Secondary</ToggleButton> <ToggleButton Classes="Secondary">Secondary</ToggleButton>
<ToggleButton Classes="Tertiary">Tertiary</ToggleButton> <ToggleButton Classes="Tertiary">Tertiary</ToggleButton>
<ToggleButton Classes="Success">Success</ToggleButton>
<ToggleButton Classes="Warning">Warning</ToggleButton> <ToggleButton Classes="Warning">Warning</ToggleButton>
<ToggleButton Classes="Error">Error</ToggleButton> <ToggleButton Classes="Danger">Danger</ToggleButton>
<ToggleButton Classes="Danger" IsEnabled="False">Danger</ToggleButton>
</StackPanel> </StackPanel>
<TextBlock Text="Toggle Button Checked State" />
<TextBlock Margin="0,20,0,0" Text="Toggle Button Three State" />
<StackPanel Orientation="Horizontal" Spacing="20"> <StackPanel Orientation="Horizontal" Spacing="20">
<ToggleButton Name="button" IsThreeState="True">Primary</ToggleButton> <ToggleButton IsChecked="True">Default</ToggleButton>
<ToggleButton Classes="Secondary" IsThreeState="True">Secondary</ToggleButton> <ToggleButton Classes="Primary" IsChecked="True">Primary</ToggleButton>
<ToggleButton Classes="Tertiary" IsThreeState="True">Tertiary</ToggleButton> <ToggleButton Classes="Secondary" IsChecked="True">Secondary</ToggleButton>
<ToggleButton Classes="Warning" IsThreeState="True">Warning</ToggleButton> <ToggleButton Classes="Tertiary" IsChecked="True">Tertiary</ToggleButton>
<ToggleButton Classes="Error" IsThreeState="True">Error</ToggleButton> <ToggleButton Classes="Success" IsChecked="True">Success</ToggleButton>
<ToggleButton Classes="Warning" IsChecked="True">Warning</ToggleButton>
<ToggleButton Classes="Danger" IsChecked="True">Danger</ToggleButton>
<ToggleButton Classes="Danger" IsChecked="True" IsEnabled="False">Danger</ToggleButton>
</StackPanel>
<TextBlock Text="Toggle Button Three State" />
<StackPanel Orientation="Horizontal" Spacing="20">
<ToggleButton IsThreeState="True" IsChecked="{x:Null}">Default</ToggleButton>
<ToggleButton Classes="Primary" IsThreeState="True" IsChecked="{x:Null}">Primary</ToggleButton>
<ToggleButton Classes="Secondary" IsThreeState="True" IsChecked="{x:Null}">Secondary</ToggleButton>
<ToggleButton Classes="Tertiary" IsThreeState="True" IsChecked="{x:Null}">Tertiary</ToggleButton>
<ToggleButton Classes="Success" IsThreeState="True" IsChecked="{x:Null}">Success</ToggleButton>
<ToggleButton Classes="Warning" IsThreeState="True" IsChecked="{x:Null}">Warning</ToggleButton>
<ToggleButton Classes="Danger" IsThreeState="True" IsChecked="{x:Null}">Danger</ToggleButton>
<ToggleButton Classes="Danger" IsThreeState="True" IsChecked="{x:Null}" IsEnabled="False">Danger</ToggleButton>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</UserControl> </UserControl>

View File

@@ -11,7 +11,8 @@
<Border <Border
Margin="5" Margin="5"
Padding="50,10" Padding="50,10"
Background="Yellow" Classes="Hover"
Theme="{StaticResource CardBorder}"
ToolTip.Tip="This is a ToolTip"> ToolTip.Tip="This is a ToolTip">
<TextBlock>Hover Here</TextBlock> <TextBlock>Hover Here</TextBlock>
</Border> </Border>
@@ -23,7 +24,8 @@
Name="Border" Name="Border"
Margin="5" Margin="5"
Padding="50,10" Padding="50,10"
Background="Yellow" Classes="Hover"
Theme="{StaticResource CardBorder}"
ToolTip.Placement="Bottom"> ToolTip.Placement="Bottom">
<ToolTip.Tip> <ToolTip.Tip>
<StackPanel> <StackPanel>
@@ -36,7 +38,8 @@
<Border <Border
Margin="5" Margin="5"
Padding="50,10" Padding="50,10"
Background="Yellow" Classes="Hover"
Theme="{StaticResource CardBorder}"
ToolTip.Placement="Top" ToolTip.Placement="Top"
ToolTip.Tip="Hello"> ToolTip.Tip="Hello">
<Border.Styles> <Border.Styles>
@@ -60,7 +63,8 @@
<Border <Border
Margin="5" Margin="5"
Padding="50,10" Padding="50,10"
Background="Yellow" Classes="Hover"
Theme="{StaticResource CardBorder}"
ToolTip.Placement="Top" ToolTip.Placement="Top"
ToolTip.Tip="Hello"> ToolTip.Tip="Hello">
<TextBlock>Top</TextBlock> <TextBlock>Top</TextBlock>
@@ -68,7 +72,8 @@
<Border <Border
Margin="5" Margin="5"
Padding="50,10" Padding="50,10"
Background="Yellow" Classes="Hover"
Theme="{StaticResource CardBorder}"
ToolTip.Placement="Left" ToolTip.Placement="Left"
ToolTip.Tip="Hello"> ToolTip.Tip="Hello">
<TextBlock>Left</TextBlock> <TextBlock>Left</TextBlock>
@@ -76,7 +81,8 @@
<Border <Border
Margin="5" Margin="5"
Padding="50,10" Padding="50,10"
Background="Yellow" Classes="Hover"
Theme="{StaticResource CardBorder}"
ToolTip.Placement="Right" ToolTip.Placement="Right"
ToolTip.Tip="Hello"> ToolTip.Tip="Hello">
<TextBlock>Right</TextBlock> <TextBlock>Right</TextBlock>
@@ -84,7 +90,8 @@
<Border <Border
Margin="5" Margin="5"
Padding="50,10" Padding="50,10"
Background="Yellow" Classes="Hover"
Theme="{StaticResource CardBorder}"
ToolTip.Placement="Bottom" ToolTip.Placement="Bottom"
ToolTip.Tip="Hello"> ToolTip.Tip="Hello">
<TextBlock>Bottom</TextBlock> <TextBlock>Bottom</TextBlock>

View File

@@ -1,9 +1,13 @@
<UserControl <UserControl
x:Class="Semi.Avalonia.Demo.Pages.TreeViewDemo" xmlns="https://github.com/avaloniaui" x:Class="Semi.Avalonia.Demo.Pages.TreeViewDemo"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns="https://github.com/avaloniaui"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" d:DesignHeight="450" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
d:DesignWidth="800" mc:Ignorable="d"> xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
<Panel> xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
<Panel HorizontalAlignment="Left">
<TreeView> <TreeView>
<TreeViewItem Header="Level 1"> <TreeViewItem Header="Level 1">
<TreeViewItem Header="Level 2" /> <TreeViewItem Header="Level 2" />

View File

@@ -11,10 +11,10 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Avalonia" Version="11.0.0-preview6" /> <PackageReference Include="Avalonia" Version="$(AvaloniaVersion)" />
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.0.0-preview6" /> <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="11.0.0-preview6" /> <PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.1.0" /> <PackageReference Include="CommunityToolkit.Mvvm" Version="8.1.0" />
</ItemGroup> </ItemGroup>

View File

@@ -11,11 +11,17 @@ namespace Semi.Avalonia.Demo.ViewModels;
public class PaletteDemoViewModel: ObservableObject public class PaletteDemoViewModel: ObservableObject
{ {
private readonly string[] _predefinedColorNames = { "Amber","Blue","Cyan","Green","Grey","Indigo","LightBlue","LightGreen","Lime","Orange","Pink","Purple","Red","Teal","Violet","Yellow" }; private readonly string[] _predefinedColorNames =
private IResourceDictionary _lightResourceDictionary; {
private IResourceDictionary _darkResourceDictionary; "Red", "Pink", "Purple", "Violet", "Indigo",
"Blue", "LightBlue", "Cyan", "Teal", "Green",
"LightGreen", "Lime", "Yellow", "Amber", "Orange",
"Grey"
};
private readonly IResourceDictionary? _lightResourceDictionary;
private readonly IResourceDictionary? _darkResourceDictionary;
private ColorItemViewModel _selectedColor; private ColorItemViewModel _selectedColor = null!;
public ColorItemViewModel SelectedColor public ColorItemViewModel SelectedColor
{ {
@@ -24,14 +30,14 @@ public class PaletteDemoViewModel: ObservableObject
} }
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);
@@ -41,8 +47,8 @@ public class PaletteDemoViewModel: ObservableObject
public PaletteDemoViewModel() public PaletteDemoViewModel()
{ {
_lightResourceDictionary = (ResourceDictionary)AvaloniaXamlLoader.Load(new Uri("avares://Semi.Avalonia/Themes/Light/Palette.axaml")); _lightResourceDictionary = AvaloniaXamlLoader.Load(new Uri("avares://Semi.Avalonia/Themes/Light/Palette.axaml")) as ResourceDictionary;
_darkResourceDictionary = (ResourceDictionary)AvaloniaXamlLoader.Load(new Uri("avares://Semi.Avalonia/Themes/Dark/Palette.axaml")); _darkResourceDictionary = AvaloniaXamlLoader.Load(new Uri("avares://Semi.Avalonia/Themes/Dark/Palette.axaml")) as ResourceDictionary;
WeakReferenceMessenger.Default.Register<PaletteDemoViewModel, ColorItemViewModel>(this, OnClickColorItem); WeakReferenceMessenger.Default.Register<PaletteDemoViewModel, ColorItemViewModel>(this, OnClickColorItem);
} }
@@ -110,8 +116,12 @@ public class ColorListViewModel: ObservableObject
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)
{
return;
}
SeriesName = color; SeriesName = color;
Color = new ObservableCollection<ColorItemViewModel>(); Color = new ObservableCollection<ColorItemViewModel>();
@@ -124,6 +134,7 @@ public class ColorListViewModel: ObservableObject
{ {
string name = color + " " + i; string name = color + " " + i;
var item = new ColorItemViewModel(name, brush, key, light, i); var item = new ColorItemViewModel(name, brush, key, light, i);
item.ColorResourceKey = item.ResourceKey + "Color";
Color.Add(item); Color.Add(item);
} }
} }
@@ -134,28 +145,28 @@ public class ColorListViewModel: ObservableObject
public class ColorItemViewModel : ObservableObject public class ColorItemViewModel : ObservableObject
{ {
private IBrush _brush; 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; private IBrush _textBrush = null!;
public IBrush TextBrush public IBrush TextBrush
{ {
get => _textBrush; get => _textBrush;
set => SetProperty(ref _textBrush, value); set => SetProperty(ref _textBrush, value);
} }
private string _colorDisplayName; private string _colorDisplayName = null!;
public string ColorDisplayName public string ColorDisplayName
{ {
get => _colorDisplayName; get => _colorDisplayName;
set => SetProperty(ref _colorDisplayName, value); set => SetProperty(ref _colorDisplayName, value);
} }
private string _resourceKey; private string _resourceKey = null!;
public string ResourceKey public string ResourceKey
{ {
@@ -163,7 +174,15 @@ public class ColorItemViewModel : ObservableObject
set => SetProperty(ref _resourceKey, value); set => SetProperty(ref _resourceKey, value);
} }
private string _hex; private string _colorResourceKey = null!;
public string ColorResourceKey
{
get => _colorResourceKey;
set => SetProperty(ref _colorResourceKey, value);
}
private string _hex = null!;
public string Hex public string Hex
{ {
@@ -177,7 +196,7 @@ public class ColorItemViewModel : ObservableObject
Brush = brush; Brush = brush;
ResourceKey = resourceKey; ResourceKey = resourceKey;
Hex = brush.ToString().ToUpperInvariant(); Hex = brush.ToString().ToUpperInvariant();
if ((light && index < 5) || (!light && index > 5)) if ((light && index < 5) || (!light && index >= 5))
{ {
TextBrush = Brushes.Black; TextBrush = Brushes.Black;
} }
@@ -190,7 +209,7 @@ public class ColorItemViewModel : ObservableObject
public class FunctionalColorGroupViewModel : ObservableObject public class FunctionalColorGroupViewModel : ObservableObject
{ {
private string _title; private string _title = null!;
public string Title public string Title
{ {
get => _title; get => _title;
@@ -200,21 +219,22 @@ public class FunctionalColorGroupViewModel : ObservableObject
public ObservableCollection<ColorItemViewModel> LightColors { get; set; } = new(); public ObservableCollection<ColorItemViewModel> LightColors { get; set; } = new();
public ObservableCollection<ColorItemViewModel> DarkColors { get; set; } = new(); public ObservableCollection<ColorItemViewModel> DarkColors { get; set; } = new();
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 token in tokens)
{ {
string key = token.Item1; string key = token.Item1;
string name = token.Item2; string name = token.Item2;
if (lightDictionary.TryGetValue(key, out var lightValue)) if (lightDictionary?.TryGetValue(key, out var lightValue) ?? false)
{ {
if (lightValue is ISolidColorBrush lightBrush) if (lightValue is ISolidColorBrush lightBrush)
{ {
LightColors.Add(new ColorItemViewModel(name, lightBrush, key, true, 0)); LightColors.Add(new ColorItemViewModel(name, lightBrush, key, true, 0));
} }
} }
if (darkDictionary.TryGetValue(key, out var darkValue))
if (darkDictionary?.TryGetValue(key, out var darkValue) ?? false)
{ {
if (darkValue is ISolidColorBrush darkBrush) if (darkValue is ISolidColorBrush darkBrush)
{ {

View File

@@ -105,6 +105,9 @@
<TabItem Header="ComboBox"> <TabItem Header="ComboBox">
<pages:ComboBoxDemo /> <pages:ComboBoxDemo />
</TabItem> </TabItem>
<TabItem Header="DataValidationErrors">
<pages:DataValidationErrorsDemo />
</TabItem>
<TabItem Header="DataGrid"> <TabItem Header="DataGrid">
<pages:DataGridDemo /> <pages:DataGridDemo />
</TabItem> </TabItem>
@@ -150,6 +153,9 @@
<TabItem Header="RepeatButton"> <TabItem Header="RepeatButton">
<pages:RepeatButtonDemo /> <pages:RepeatButtonDemo />
</TabItem> </TabItem>
<TabItem Header="ScrollViewer">
<pages:ScrollViewerDemo />
</TabItem>
<TabItem Header="Slider"> <TabItem Header="Slider">
<pages:SliderDemo /> <pages:SliderDemo />
</TabItem> </TabItem>

View File

@@ -3,10 +3,11 @@
<TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks> <TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<LangVersion>10</LangVersion> <LangVersion>10</LangVersion>
<Version>0.1.0-preview6</Version> <Version>0.1.0-preview8</Version>
<Authors>IRIHI Technology</Authors> <Authors>IRIHI Technology</Authors>
<Description>Avalonia Theme inspired by Semi Design. </Description> <Description>Avalonia Theme inspired by Semi Design. </Description>
<PackageProjectUrl>https://github.com/irihitech/Semi.Avalonia</PackageProjectUrl> <PackageProjectUrl>https://github.com/irihitech/Semi.Avalonia</PackageProjectUrl>
<AvaloniaVersion>11.0.0-preview6</AvaloniaVersion> <AvaloniaVersion>11.0.0-preview8</AvaloniaVersion>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@@ -167,7 +167,7 @@
Orientation="Vertical"> Orientation="Vertical">
<primitives:ColorSlider.IsVisible> <primitives:ColorSlider.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}"> <MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" /> <ReflectionBinding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" />
</MultiBinding> </MultiBinding>
</primitives:ColorSlider.IsVisible> </primitives:ColorSlider.IsVisible>
</primitives:ColorSlider> </primitives:ColorSlider>
@@ -188,7 +188,7 @@
Margin="12" Margin="12"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
ItemContainerTheme="{DynamicResource ColorViewPaletteListBoxItemTheme}" ItemContainerTheme="{DynamicResource ColorViewPaletteListBoxItemTheme}"
Items="{TemplateBinding PaletteColors}" ItemsSource="{TemplateBinding PaletteColors}"
SelectedItem="{Binding Color, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource DoNothingForNullConverter}, Mode=TwoWay}" SelectedItem="{Binding Color, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource DoNothingForNullConverter}, Mode=TwoWay}"
Theme="{DynamicResource ColorViewPaletteListBoxTheme}" Theme="{DynamicResource ColorViewPaletteListBoxTheme}"
UseLayoutRounding="False"> UseLayoutRounding="False">
@@ -323,6 +323,7 @@
Margin="0,0,12,0" Margin="0,0,12,0"
VerticalAlignment="Center" VerticalAlignment="Center"
AllowSpin="True" AllowSpin="True"
Classes="Small"
IsVisible="{TemplateBinding IsComponentTextInputVisible}" IsVisible="{TemplateBinding IsComponentTextInputVisible}"
Maximum="{Binding Maximum, ElementName=Component1Slider}" Maximum="{Binding Maximum, ElementName=Component1Slider}"
Minimum="{Binding Minimum, ElementName=Component1Slider}" Minimum="{Binding Minimum, ElementName=Component1Slider}"
@@ -353,6 +354,7 @@
Margin="0,0,12,0" Margin="0,0,12,0"
VerticalAlignment="Center" VerticalAlignment="Center"
AllowSpin="True" AllowSpin="True"
Classes="Small"
IsVisible="{TemplateBinding IsComponentTextInputVisible}" IsVisible="{TemplateBinding IsComponentTextInputVisible}"
Maximum="{Binding Maximum, ElementName=Component2Slider}" Maximum="{Binding Maximum, ElementName=Component2Slider}"
Minimum="{Binding Minimum, ElementName=Component2Slider}" Minimum="{Binding Minimum, ElementName=Component2Slider}"
@@ -383,6 +385,7 @@
Margin="0,0,12,0" Margin="0,0,12,0"
VerticalAlignment="Center" VerticalAlignment="Center"
AllowSpin="True" AllowSpin="True"
Classes="Small"
IsVisible="{TemplateBinding IsComponentTextInputVisible}" IsVisible="{TemplateBinding IsComponentTextInputVisible}"
Maximum="{Binding Maximum, ElementName=Component3Slider}" Maximum="{Binding Maximum, ElementName=Component3Slider}"
Minimum="{Binding Minimum, ElementName=Component3Slider}" Minimum="{Binding Minimum, ElementName=Component3Slider}"
@@ -413,6 +416,7 @@
Margin="0,0,12,0" Margin="0,0,12,0"
VerticalAlignment="Center" VerticalAlignment="Center"
AllowSpin="True" AllowSpin="True"
Classes="Small"
IsEnabled="{TemplateBinding IsAlphaEnabled}" IsEnabled="{TemplateBinding IsAlphaEnabled}"
Maximum="{Binding Maximum, ElementName=AlphaComponentSlider}" Maximum="{Binding Maximum, ElementName=AlphaComponentSlider}"
Minimum="{Binding Minimum, ElementName=AlphaComponentSlider}" Minimum="{Binding Minimum, ElementName=AlphaComponentSlider}"
@@ -421,8 +425,8 @@
Value="{Binding Value, ElementName=AlphaComponentSlider}"> Value="{Binding Value, ElementName=AlphaComponentSlider}">
<NumericUpDown.IsVisible> <NumericUpDown.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}"> <MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" /> <ReflectionBinding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" />
<Binding Path="IsComponentTextInputVisible" RelativeSource="{RelativeSource TemplatedParent}" /> <ReflectionBinding Path="IsComponentTextInputVisible" RelativeSource="{RelativeSource TemplatedParent}" />
</MultiBinding> </MultiBinding>
</NumericUpDown.IsVisible> </NumericUpDown.IsVisible>
</NumericUpDown> </NumericUpDown>
@@ -443,8 +447,8 @@
TickFrequency="1"> TickFrequency="1">
<primitives:ColorSlider.IsVisible> <primitives:ColorSlider.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}"> <MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" /> <ReflectionBinding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" />
<Binding Path="IsComponentSliderVisible" RelativeSource="{RelativeSource TemplatedParent}" /> <ReflectionBinding Path="IsComponentSliderVisible" RelativeSource="{RelativeSource TemplatedParent}" />
</MultiBinding> </MultiBinding>
</primitives:ColorSlider.IsVisible> </primitives:ColorSlider.IsVisible>
</primitives:ColorSlider> </primitives:ColorSlider>

View File

@@ -10,6 +10,7 @@
<ControlTheme x:Key="ColorSliderThumbTheme" TargetType="Thumb"> <ControlTheme x:Key="ColorSliderThumbTheme" TargetType="Thumb">
<Setter Property="Background" Value="Transparent" /> <Setter Property="Background" Value="Transparent" />
<Setter Property="UseLayoutRounding" Value="False" />
<Setter Property="BorderBrush" Value="{DynamicResource ColorSliderDefaultBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource ColorSliderDefaultBorderBrush}" />
<Setter Property="BorderThickness" Value="{DynamicResource ColorSliderThumbBorderBrush}" /> <Setter Property="BorderThickness" Value="{DynamicResource ColorSliderThumbBorderBrush}" />
<Setter Property="CornerRadius" Value="999" /> <Setter Property="CornerRadius" Value="999" />
@@ -17,9 +18,11 @@
<Setter.Value> <Setter.Value>
<ControlTemplate> <ControlTemplate>
<Border <Border
Margin="1"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
BoxShadow="{DynamicResource ColorSliderBoxShadow}"
CornerRadius="{TemplateBinding CornerRadius}" /> CornerRadius="{TemplateBinding CornerRadius}" />
</ControlTemplate> </ControlTemplate>
</Setter.Value> </Setter.Value>
@@ -39,6 +42,8 @@
CornerRadius="{TemplateBinding CornerRadius}"> CornerRadius="{TemplateBinding CornerRadius}">
<Grid Margin="{TemplateBinding Padding}"> <Grid Margin="{TemplateBinding Padding}">
<Rectangle <Rectangle
Width="{Binding #PART_Track.Bounds.Width}"
Height="{Binding #PART_Track.Bounds.Height}"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
Fill="{DynamicResource ColorControlCheckeredBackgroundBrush}" Fill="{DynamicResource ColorControlCheckeredBackgroundBrush}"
@@ -47,6 +52,8 @@
RadiusY="{TemplateBinding CornerRadius, RadiusY="{TemplateBinding CornerRadius,
Converter={StaticResource BottomRightCornerRadiusConverter}}" /> Converter={StaticResource BottomRightCornerRadiusConverter}}" />
<Rectangle <Rectangle
Width="{Binding #PART_Track.Bounds.Width}"
Height="{Binding #PART_Track.Bounds.Height}"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
Fill="{TemplateBinding Background}" Fill="{TemplateBinding Background}"
@@ -56,6 +63,7 @@
Converter={StaticResource BottomRightCornerRadiusConverter}}" /> Converter={StaticResource BottomRightCornerRadiusConverter}}" />
<Track <Track
Name="PART_Track" Name="PART_Track"
Height="12"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
IsDirectionReversed="{TemplateBinding IsDirectionReversed}" IsDirectionReversed="{TemplateBinding IsDirectionReversed}"
@@ -125,6 +133,8 @@
CornerRadius="{TemplateBinding CornerRadius}"> CornerRadius="{TemplateBinding CornerRadius}">
<Grid Margin="{TemplateBinding Padding}"> <Grid Margin="{TemplateBinding Padding}">
<Rectangle <Rectangle
Width="{Binding #PART_Track.Bounds.Width}"
Height="{Binding #PART_Track.Bounds.Height}"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
Fill="{DynamicResource ColorControlCheckeredBackgroundBrush}" Fill="{DynamicResource ColorControlCheckeredBackgroundBrush}"
@@ -133,6 +143,8 @@
RadiusY="{TemplateBinding CornerRadius, RadiusY="{TemplateBinding CornerRadius,
Converter={StaticResource BottomRightCornerRadiusConverter}}" /> Converter={StaticResource BottomRightCornerRadiusConverter}}" />
<Rectangle <Rectangle
Width="{Binding #PART_Track.Bounds.Width}"
Height="{Binding #PART_Track.Bounds.Height}"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
Fill="{TemplateBinding Background}" Fill="{TemplateBinding Background}"
@@ -142,6 +154,7 @@
Converter={StaticResource BottomRightCornerRadiusConverter}}" /> Converter={StaticResource BottomRightCornerRadiusConverter}}" />
<Track <Track
Name="PART_Track" Name="PART_Track"
Width="12"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
IsDirectionReversed="{TemplateBinding IsDirectionReversed}" IsDirectionReversed="{TemplateBinding IsDirectionReversed}"
@@ -212,9 +225,11 @@
<Style Selector="^:dark-selector /template/ Thumb#ColorSliderThumb"> <Style Selector="^:dark-selector /template/ Thumb#ColorSliderThumb">
<Setter Property="BorderBrush" Value="{DynamicResource ColorSliderDarkBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource ColorSliderDarkBorderBrush}" />
<Setter Property="Foreground" Value="{DynamicResource ColorSliderLightBorderBrush}" />
</Style> </Style>
<Style Selector="^:light-selector /template/ Thumb#ColorSliderThumb"> <Style Selector="^:light-selector /template/ Thumb#ColorSliderThumb">
<Setter Property="BorderBrush" Value="{DynamicResource ColorSliderLightBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource ColorSliderLightBorderBrush}" />
<Setter Property="Foreground" Value="{DynamicResource ColorSliderDarkBorderBrush}" />
</Style> </Style>
</ControlTheme> </ControlTheme>

View File

@@ -259,7 +259,7 @@
Orientation="Vertical"> Orientation="Vertical">
<primitives:ColorSlider.IsVisible> <primitives:ColorSlider.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}"> <MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" /> <ReflectionBinding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" />
</MultiBinding> </MultiBinding>
</primitives:ColorSlider.IsVisible> </primitives:ColorSlider.IsVisible>
</primitives:ColorSlider> </primitives:ColorSlider>
@@ -280,7 +280,7 @@
Margin="12" Margin="12"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
ItemContainerTheme="{StaticResource ColorViewPaletteListBoxItemTheme}" ItemContainerTheme="{StaticResource ColorViewPaletteListBoxItemTheme}"
Items="{TemplateBinding PaletteColors}" ItemsSource="{TemplateBinding PaletteColors}"
SelectedItem="{Binding Color, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource DoNothingForNullConverter}, Mode=TwoWay}" SelectedItem="{Binding Color, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource DoNothingForNullConverter}, Mode=TwoWay}"
Theme="{StaticResource ColorViewPaletteListBoxTheme}" Theme="{StaticResource ColorViewPaletteListBoxTheme}"
UseLayoutRounding="False"> UseLayoutRounding="False">
@@ -387,6 +387,7 @@
Margin="0,0,12,0" Margin="0,0,12,0"
VerticalAlignment="Center" VerticalAlignment="Center"
AllowSpin="True" AllowSpin="True"
Classes="Small"
IsVisible="{TemplateBinding IsComponentTextInputVisible}" IsVisible="{TemplateBinding IsComponentTextInputVisible}"
Maximum="{Binding Maximum, ElementName=Component1Slider}" Maximum="{Binding Maximum, ElementName=Component1Slider}"
Minimum="{Binding Minimum, ElementName=Component1Slider}" Minimum="{Binding Minimum, ElementName=Component1Slider}"
@@ -417,6 +418,7 @@
Margin="0,0,12,0" Margin="0,0,12,0"
VerticalAlignment="Center" VerticalAlignment="Center"
AllowSpin="True" AllowSpin="True"
Classes="Small"
IsVisible="{TemplateBinding IsComponentTextInputVisible}" IsVisible="{TemplateBinding IsComponentTextInputVisible}"
Maximum="{Binding Maximum, ElementName=Component2Slider}" Maximum="{Binding Maximum, ElementName=Component2Slider}"
Minimum="{Binding Minimum, ElementName=Component2Slider}" Minimum="{Binding Minimum, ElementName=Component2Slider}"
@@ -447,6 +449,7 @@
Margin="0,0,12,0" Margin="0,0,12,0"
VerticalAlignment="Center" VerticalAlignment="Center"
AllowSpin="True" AllowSpin="True"
Classes="Small"
IsVisible="{TemplateBinding IsComponentTextInputVisible}" IsVisible="{TemplateBinding IsComponentTextInputVisible}"
Maximum="{Binding Maximum, ElementName=Component3Slider}" Maximum="{Binding Maximum, ElementName=Component3Slider}"
Minimum="{Binding Minimum, ElementName=Component3Slider}" Minimum="{Binding Minimum, ElementName=Component3Slider}"
@@ -477,6 +480,7 @@
Margin="0,0,12,0" Margin="0,0,12,0"
VerticalAlignment="Center" VerticalAlignment="Center"
AllowSpin="True" AllowSpin="True"
Classes="Small"
IsEnabled="{TemplateBinding IsAlphaEnabled}" IsEnabled="{TemplateBinding IsAlphaEnabled}"
Maximum="{Binding Maximum, ElementName=AlphaComponentSlider}" Maximum="{Binding Maximum, ElementName=AlphaComponentSlider}"
Minimum="{Binding Minimum, ElementName=AlphaComponentSlider}" Minimum="{Binding Minimum, ElementName=AlphaComponentSlider}"
@@ -485,8 +489,8 @@
Value="{Binding Value, ElementName=AlphaComponentSlider}"> Value="{Binding Value, ElementName=AlphaComponentSlider}">
<NumericUpDown.IsVisible> <NumericUpDown.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}"> <MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" /> <ReflectionBinding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" />
<Binding Path="IsComponentTextInputVisible" RelativeSource="{RelativeSource TemplatedParent}" /> <ReflectionBinding Path="IsComponentTextInputVisible" RelativeSource="{RelativeSource TemplatedParent}" />
</MultiBinding> </MultiBinding>
</NumericUpDown.IsVisible> </NumericUpDown.IsVisible>
</NumericUpDown> </NumericUpDown>
@@ -507,8 +511,8 @@
TickFrequency="1"> TickFrequency="1">
<primitives:ColorSlider.IsVisible> <primitives:ColorSlider.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}"> <MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" /> <ReflectionBinding Path="IsAlphaVisible" RelativeSource="{RelativeSource TemplatedParent}" />
<Binding Path="IsComponentSliderVisible" RelativeSource="{RelativeSource TemplatedParent}" /> <ReflectionBinding Path="IsComponentSliderVisible" RelativeSource="{RelativeSource TemplatedParent}" />
</MultiBinding> </MultiBinding>
</primitives:ColorSlider.IsVisible> </primitives:ColorSlider.IsVisible>
</primitives:ColorSlider> </primitives:ColorSlider>

View File

@@ -1,4 +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"
xmlns:colorPicker="clr-namespace:Semi.Avalonia.ColorPicker">
<!-- Add Resources Here --> <!-- Add Resources Here -->
<SolidColorBrush x:Key="ColorViewRadioButtonForeground" Color="#54A9FF" /> <SolidColorBrush x:Key="ColorViewRadioButtonForeground" Color="#54A9FF" />
<SolidColorBrush x:Key="ColorViewRadioButtonBackground" Color="#1C1F23" /> <SolidColorBrush x:Key="ColorViewRadioButtonBackground" Color="#1C1F23" />
@@ -29,8 +32,9 @@
<SolidColorBrush x:Key="ColorSliderDarkBorderBrush" Color="#E4000000" /> <SolidColorBrush x:Key="ColorSliderDarkBorderBrush" Color="#E4000000" />
<x:Double x:Key="ColorSliderWidth">16</x:Double> <x:Double x:Key="ColorSliderWidth">16</x:Double>
<CornerRadius x:Key="ColorSliderCornerRadius">8</CornerRadius> <CornerRadius x:Key="ColorSliderCornerRadius">6</CornerRadius>
<Thickness x:Key="ColorSliderThumbBorderBrush">2</Thickness> <Thickness x:Key="ColorSliderThumbBorderBrush">2</Thickness>
<BoxShadows x:Key="ColorSliderBoxShadow">0 0 2 1 #FFFFFF</BoxShadows>
<SolidColorBrush x:Key="ColorSpectrumBorderBrush" Opacity="0.08" Color="#1C1F23" /> <SolidColorBrush x:Key="ColorSpectrumBorderBrush" Opacity="0.08" Color="#1C1F23" />
@@ -40,4 +44,6 @@
<CornerRadius x:Key="ColorPreviewerCornerRadius">3</CornerRadius> <CornerRadius x:Key="ColorPreviewerCornerRadius">3</CornerRadius>
<BoxShadows x:Key="ColorPreviewerMainBoxShadow">0 0 14 0 #1AFFFFFF</BoxShadows> <BoxShadows x:Key="ColorPreviewerMainBoxShadow">0 0 14 0 #1AFFFFFF</BoxShadows>
<colorPicker:SemiColorDarkPalette x:Key="SemiColorPalette" />
</ResourceDictionary> </ResourceDictionary>

View File

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

View File

@@ -1,4 +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"
xmlns:colorPicker="clr-namespace:Semi.Avalonia.ColorPicker">
<!-- Add Resources Here --> <!-- Add Resources Here -->
<SolidColorBrush x:Key="ColorViewRadioButtonForeground" Color="#0077FA" /> <SolidColorBrush x:Key="ColorViewRadioButtonForeground" Color="#0077FA" />
<SolidColorBrush x:Key="ColorViewRadioButtonBackground" Color="White" /> <SolidColorBrush x:Key="ColorViewRadioButtonBackground" Color="White" />
@@ -29,8 +32,9 @@
<SolidColorBrush x:Key="ColorSliderDarkBorderBrush" Color="#E4000000" /> <SolidColorBrush x:Key="ColorSliderDarkBorderBrush" Color="#E4000000" />
<x:Double x:Key="ColorSliderWidth">16</x:Double> <x:Double x:Key="ColorSliderWidth">16</x:Double>
<CornerRadius x:Key="ColorSliderCornerRadius">8</CornerRadius> <CornerRadius x:Key="ColorSliderCornerRadius">6</CornerRadius>
<Thickness x:Key="ColorSliderThumbBorderBrush">2</Thickness> <Thickness x:Key="ColorSliderThumbBorderBrush">2</Thickness>
<BoxShadows x:Key="ColorSliderBoxShadow">0 0 2 1 #1A000000</BoxShadows>
<SolidColorBrush x:Key="ColorSpectrumBorderBrush" Opacity="0.08" Color="#1C1F23" /> <SolidColorBrush x:Key="ColorSpectrumBorderBrush" Opacity="0.08" Color="#1C1F23" />
@@ -40,4 +44,5 @@
<CornerRadius x:Key="ColorPreviewerCornerRadius">3</CornerRadius> <CornerRadius x:Key="ColorPreviewerCornerRadius">3</CornerRadius>
<BoxShadows x:Key="ColorPreviewerMainBoxShadow">0 0 14 0 #1A000000</BoxShadows> <BoxShadows x:Key="ColorPreviewerMainBoxShadow">0 0 14 0 #1A000000</BoxShadows>
<colorPicker:SemiColorLightPalette x:Key="SemiColorPalette" />
</ResourceDictionary> </ResourceDictionary>

View File

@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<Import Project="../Package.props"/> <Import Project="../Package.props" />
<PropertyGroup> <PropertyGroup>
<Title>Semi.Avalonia.ColorPicker</Title> <Title>Semi.Avalonia.ColorPicker</Title>
<PackageReleaseNotes>Upgrade to Avalonia 11.0.0-preview6.</PackageReleaseNotes> <PackageReleaseNotes>Update to Avalonia 11.0.0-preview8</PackageReleaseNotes>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@@ -0,0 +1,231 @@
using Avalonia.Controls;
using Avalonia.Media;
using Avalonia.Utilities;
namespace Semi.Avalonia.ColorPicker;
public class SemiColorDarkPalette: IColorPalette
{
private static readonly Color[,] Colors = new Color[,]
{
{
//Red
Color.FromUInt32(0xFF6C090B),
Color.FromUInt32(0xFF901110),
Color.FromUInt32(0xFFB42019),
Color.FromUInt32(0xFFD73324),
Color.FromUInt32(0xFFFB4932),
Color.FromUInt32(0xFFFC725A),
Color.FromUInt32(0xFFFD9983),
Color.FromUInt32(0xFFFDBEAC),
Color.FromUInt32(0xFFFEE0D5),
Color.FromUInt32(0xFFFFF3EF),
},
{
//Pink
Color.FromUInt32(0xFF5C0730),
Color.FromUInt32(0xFF800E41),
Color.FromUInt32(0xFFA41751),
Color.FromUInt32(0xFFC72261),
Color.FromUInt32(0xFFEB2F71),
Color.FromUInt32(0xFFEF5686),
Color.FromUInt32(0xFFF37E9F),
Color.FromUInt32(0xFFF7A8BC),
Color.FromUInt32(0xFFFBD3DC),
Color.FromUInt32(0xFFFDEEF1),
},
{
//Purple
Color.FromUInt32(0xFF4A1061),
Color.FromUInt32(0xFF5E1776),
Color.FromUInt32(0xFF731F8A),
Color.FromUInt32(0xFF89289F),
Color.FromUInt32(0xFFA033B3),
Color.FromUInt32(0xFFB553C2),
Color.FromUInt32(0xFFCA78D1),
Color.FromUInt32(0xFFDDA0E1),
Color.FromUInt32(0xFFEFCEF0),
Color.FromUInt32(0xFFF7EBF7),
},
{
//Violet
Color.FromUInt32(0xFF401B77),
Color.FromUInt32(0xFF4C248C),
Color.FromUInt32(0xFF582EA0),
Color.FromUInt32(0xFF6439B5),
Color.FromUInt32(0xFF7246C9),
Color.FromUInt32(0xFF8865D4),
Color.FromUInt32(0xFFA288DF),
Color.FromUInt32(0xFFBEADE9),
Color.FromUInt32(0xFFDDD4F4),
Color.FromUInt32(0xFFF1EEFA),
},
{
//Indigo
Color.FromUInt32(0xFF171E65),
Color.FromUInt32(0xFF20297A),
Color.FromUInt32(0xFF29368E),
Color.FromUInt32(0xFF3444A3),
Color.FromUInt32(0xFF4053B7),
Color.FromUInt32(0xFF5F71C5),
Color.FromUInt32(0xFF8191D4),
Color.FromUInt32(0xFFA7B4E2),
Color.FromUInt32(0xFFD1D8F1),
Color.FromUInt32(0xFFEDEFF8),
},
{
//Blue
Color.FromUInt32(0xFF053170),
Color.FromUInt32(0xFF0A4694),
Color.FromUInt32(0xFF135CB8),
Color.FromUInt32(0xFF1D75DB),
Color.FromUInt32(0xFF2990FF),
Color.FromUInt32(0xFF54A9FF),
Color.FromUInt32(0xFF7FC1FF),
Color.FromUInt32(0xFFA9D7FF),
Color.FromUInt32(0xFFD4ECFF),
Color.FromUInt32(0xFFEFF8FF),
},
{
//LightBlue
Color.FromUInt32(0xFF003761),
Color.FromUInt32(0xFF004D85),
Color.FromUInt32(0xFF0366A9),
Color.FromUInt32(0xFF0A81CC),
Color.FromUInt32(0xFF139FF0),
Color.FromUInt32(0xFF40B4F3),
Color.FromUInt32(0xFF6EC8F6),
Color.FromUInt32(0xFF9DDCF9),
Color.FromUInt32(0xFFCEEEFC),
Color.FromUInt32(0xFFEBF8FE),
},
{
//Cyan
Color.FromUInt32(0xFF04343D),
Color.FromUInt32(0xFF074F5C),
Color.FromUInt32(0xFF0A6C7B),
Color.FromUInt32(0xFF0E8999),
Color.FromUInt32(0xFF13A8B8),
Color.FromUInt32(0xFF38BBC6),
Color.FromUInt32(0xFF62CDD4),
Color.FromUInt32(0xFF91DFE3),
Color.FromUInt32(0xFFC6EFF1),
Color.FromUInt32(0xFFE7F7F8),
},
{
//Teal
Color.FromUInt32(0xFF023C39),
Color.FromUInt32(0xFF045A55),
Color.FromUInt32(0xFF07776F),
Color.FromUInt32(0xFF0A9588),
Color.FromUInt32(0xFF0EB3A1),
Color.FromUInt32(0xFF33C2B0),
Color.FromUInt32(0xFF5ED1C1),
Color.FromUInt32(0xFF8EE1D3),
Color.FromUInt32(0xFFC4F0E8),
Color.FromUInt32(0xFFE6F7F4),
},
{
//Green
Color.FromUInt32(0xFF123C19),
Color.FromUInt32(0xFF1C5A25),
Color.FromUInt32(0xFF277731),
Color.FromUInt32(0xFF32953D),
Color.FromUInt32(0xFF3EB349),
Color.FromUInt32(0xFF5DC264),
Color.FromUInt32(0xFF7FD184),
Color.FromUInt32(0xFFA6E1A8),
Color.FromUInt32(0xFFD0F0D1),
Color.FromUInt32(0xFFECF7EC),
},
{
//LightGreen
Color.FromUInt32(0xFF263D13),
Color.FromUInt32(0xFF3B5C1D),
Color.FromUInt32(0xFF517B28),
Color.FromUInt32(0xFF679934),
Color.FromUInt32(0xFF7FB840),
Color.FromUInt32(0xFF97C65F),
Color.FromUInt32(0xFFB0D481),
Color.FromUInt32(0xFFC9E3A7),
Color.FromUInt32(0xFFE4F1D1),
Color.FromUInt32(0xFFF3F8ED),
},
{
//Lime
Color.FromUInt32(0xFF314603),
Color.FromUInt32(0xFF4B6905),
Color.FromUInt32(0xFF678D09),
Color.FromUInt32(0xFF84B00C),
Color.FromUInt32(0xFFA2D311),
Color.FromUInt32(0xFFAEDC3A),
Color.FromUInt32(0xFFBDE566),
Color.FromUInt32(0xFFCFED96),
Color.FromUInt32(0xFFE5F6C9),
Color.FromUInt32(0xFFF3FBE9),
},
{
//Yellow
Color.FromUInt32(0xFF544903),
Color.FromUInt32(0xFF7E6C06),
Color.FromUInt32(0xFFA88E0A),
Color.FromUInt32(0xFFD2AF0F),
Color.FromUInt32(0xFFFCCE14),
Color.FromUInt32(0xFFFDDE43),
Color.FromUInt32(0xFFFDEB71),
Color.FromUInt32(0xFFFEF5A0),
Color.FromUInt32(0xFFFEFBD0),
Color.FromUInt32(0xFFFFFEEC),
},
{
//Amber
Color.FromUInt32(0xFF512E09),
Color.FromUInt32(0xFF794B0F),
Color.FromUInt32(0xFFA16B16),
Color.FromUInt32(0xFFCA8F1E),
Color.FromUInt32(0xFFF2B726),
Color.FromUInt32(0xFFF5CA50),
Color.FromUInt32(0xFFF7DB7A),
Color.FromUInt32(0xFFFAEAA6),
Color.FromUInt32(0xFFFCF6D2),
Color.FromUInt32(0xFFFEFBED),
},
{
//Orange
Color.FromUInt32(0xFF551F03),
Color.FromUInt32(0xFF803506),
Color.FromUInt32(0xFFAA500A),
Color.FromUInt32(0xFFD56F0F),
Color.FromUInt32(0xFFFF9214),
Color.FromUInt32(0xFFFFAE43),
Color.FromUInt32(0xFFFFC772),
Color.FromUInt32(0xFFFFDDA1),
Color.FromUInt32(0xFFFFEFD0),
Color.FromUInt32(0xFFFFF9ED),
},
{
//Grey
Color.FromUInt32(0xFF1C1F23),
Color.FromUInt32(0xFF2E3238),
Color.FromUInt32(0xFF41464C),
Color.FromUInt32(0xFF555B61),
Color.FromUInt32(0xFF6B7075),
Color.FromUInt32(0xFF888D92),
Color.FromUInt32(0xFFA7ABB0),
Color.FromUInt32(0xFFC6CACD),
Color.FromUInt32(0xFFE6E8EA),
Color.FromUInt32(0xFFF9F9F9),
},
};
public Color GetColor(int colorIndex, int shadeIndex)
{
return Colors[
MathUtilities.Clamp(colorIndex, 0, ColorCount - 1),
MathUtilities.Clamp(shadeIndex, 0, ShadeCount - 1)
];
}
public int ColorCount => Colors.GetLength(0);
public int ShadeCount => Colors.GetLength(1);
}

View File

@@ -0,0 +1,231 @@
using Avalonia.Controls;
using Avalonia.Media;
using Avalonia.Utilities;
namespace Semi.Avalonia.ColorPicker;
public class SemiColorLightPalette: IColorPalette
{
private static readonly Color[,] Colors = new Color[,]
{
{
//Red
Color.FromUInt32(0xFFFEF2ED),
Color.FromUInt32(0xFFFEDDD2),
Color.FromUInt32(0xFFFDB7A5),
Color.FromUInt32(0xFFFB9078),
Color.FromUInt32(0xFFFA664C),
Color.FromUInt32(0xFFF93920),
Color.FromUInt32(0xFFD52515),
Color.FromUInt32(0xFFB2140C),
Color.FromUInt32(0xFF8E0805),
Color.FromUInt32(0xFF6A0103),
},
{
//Pink
Color.FromUInt32(0xFFFDECEF),
Color.FromUInt32(0xFFFBCFD8),
Color.FromUInt32(0xFFF6A0B5),
Color.FromUInt32(0xFFF27396),
Color.FromUInt32(0xFFED487B),
Color.FromUInt32(0xFFE91E63),
Color.FromUInt32(0xFFC51356),
Color.FromUInt32(0xFFA20B48),
Color.FromUInt32(0xFF7E053A),
Color.FromUInt32(0xFF5A012B),
},
{
//Purple
Color.FromUInt32(0xFFF7E9F7),
Color.FromUInt32(0xFFEFCAF0),
Color.FromUInt32(0xFFDD9BE0),
Color.FromUInt32(0xFFC96FD1),
Color.FromUInt32(0xFFB449C2),
Color.FromUInt32(0xFF9E28B3),
Color.FromUInt32(0xFF871E9E),
Color.FromUInt32(0xFF71168A),
Color.FromUInt32(0xFF5C0F75),
Color.FromUInt32(0xFF490A61),
},
{
//Violet
Color.FromUInt32(0xFFF3EDF9),
Color.FromUInt32(0xFFE2D1F4),
Color.FromUInt32(0xFFC4A7E9),
Color.FromUInt32(0xFFA67FDD),
Color.FromUInt32(0xFF885BD2),
Color.FromUInt32(0xFF6A3AC7),
Color.FromUInt32(0xFF572FB3),
Color.FromUInt32(0xFF46259E),
Color.FromUInt32(0xFF361C8A),
Color.FromUInt32(0xFF281475),
},
{
//Indigo
Color.FromUInt32(0xFFECEFF8),
Color.FromUInt32(0xFFD1D8F0),
Color.FromUInt32(0xFFA7B3E1),
Color.FromUInt32(0xFF8090D3),
Color.FromUInt32(0xFF5E6FC4),
Color.FromUInt32(0xFF3F51B5),
Color.FromUInt32(0xFF3342A1),
Color.FromUInt32(0xFF28348C),
Color.FromUInt32(0xFF1F2878),
Color.FromUInt32(0xFF171D63),
},
{
//Blue
Color.FromUInt32(0xFFEAF5FF),
Color.FromUInt32(0xFFCBE7FE),
Color.FromUInt32(0xFF98CDFD),
Color.FromUInt32(0xFF65B2FC),
Color.FromUInt32(0xFF3295FB),
Color.FromUInt32(0xFF0077FA),
Color.FromUInt32(0xFF0062D6),
Color.FromUInt32(0xFF004FB3),
Color.FromUInt32(0xFF003D8F),
Color.FromUInt32(0xFF002C6B),
},
{
//LightBlue
Color.FromUInt32(0xFFE9F7FD),
Color.FromUInt32(0xFFC9ECFC),
Color.FromUInt32(0xFF95D8F8),
Color.FromUInt32(0xFF62C3F5),
Color.FromUInt32(0xFF30ACF1),
Color.FromUInt32(0xFF0095EE),
Color.FromUInt32(0xFF007BCA),
Color.FromUInt32(0xFF0063A7),
Color.FromUInt32(0xFF004B83),
Color.FromUInt32(0xFF00355F),
},
{
//Cyan
Color.FromUInt32(0xFFE5F7F8),
Color.FromUInt32(0xFFC2EFF0),
Color.FromUInt32(0xFF8ADDE2),
Color.FromUInt32(0xFF58CBD3),
Color.FromUInt32(0xFF2CB8C5),
Color.FromUInt32(0xFF05A4B6),
Color.FromUInt32(0xFF038698),
Color.FromUInt32(0xFF016979),
Color.FromUInt32(0xFF004D5B),
Color.FromUInt32(0xFF00323D),
},
{
//Teal
Color.FromUInt32(0xFFE4F7F4),
Color.FromUInt32(0xFFC0F0E8),
Color.FromUInt32(0xFF87E0D3),
Color.FromUInt32(0xFF54D1C1),
Color.FromUInt32(0xFF27C2B0),
Color.FromUInt32(0xFF00B3A1),
Color.FromUInt32(0xFF009589),
Color.FromUInt32(0xFF00776F),
Color.FromUInt32(0xFF005955),
Color.FromUInt32(0xFF003C3A),
},
{
//Green
Color.FromUInt32(0xFFECF7EC),
Color.FromUInt32(0xFFD0F0D1),
Color.FromUInt32(0xFFA4E0A7),
Color.FromUInt32(0xFF7DD182),
Color.FromUInt32(0xFF5AC262),
Color.FromUInt32(0xFF3BB346),
Color.FromUInt32(0xFF30953B),
Color.FromUInt32(0xFF25772F),
Color.FromUInt32(0xFF1B5924),
Color.FromUInt32(0xFF113C18),
},
{
//LightGreen
Color.FromUInt32(0xFFF3F8EC),
Color.FromUInt32(0xFFE3F0D0),
Color.FromUInt32(0xFFC8E2A5),
Color.FromUInt32(0xFFADD37E),
Color.FromUInt32(0xFF93C55B),
Color.FromUInt32(0xFF7BB63C),
Color.FromUInt32(0xFF649830),
Color.FromUInt32(0xFF4E7926),
Color.FromUInt32(0xFF395B1B),
Color.FromUInt32(0xFF253D12),
},
{
//Lime
Color.FromUInt32(0xFFF2FAE6),
Color.FromUInt32(0xFFE3F6C5),
Color.FromUInt32(0xFFCBED8E),
Color.FromUInt32(0xFFB7E35B),
Color.FromUInt32(0xFFA7DA2C),
Color.FromUInt32(0xFF9BD100),
Color.FromUInt32(0xFF7EAE00),
Color.FromUInt32(0xFF638B00),
Color.FromUInt32(0xFF486800),
Color.FromUInt32(0xFF2F4600),
},
{
//Yellow
Color.FromUInt32(0xFFFFFDEA),
Color.FromUInt32(0xFFFEFBCB),
Color.FromUInt32(0xFFFDF398),
Color.FromUInt32(0xFFFCE865),
Color.FromUInt32(0xFFFBDA32),
Color.FromUInt32(0xFFFAC800),
Color.FromUInt32(0xFFD0AA00),
Color.FromUInt32(0xFFA78B00),
Color.FromUInt32(0xFF7D6A00),
Color.FromUInt32(0xFF534800),
},
{
//Amber
Color.FromUInt32(0xFFFEFBEB),
Color.FromUInt32(0xFFFCF5CE),
Color.FromUInt32(0xFFF9E89E),
Color.FromUInt32(0xFFF6D86F),
Color.FromUInt32(0xFFF3C641),
Color.FromUInt32(0xFFF0B114),
Color.FromUInt32(0xFFC88A0F),
Color.FromUInt32(0xFFA0660A),
Color.FromUInt32(0xFF784606),
Color.FromUInt32(0xFF502B03),
},
{
//Orange
Color.FromUInt32(0xFFFFF8EA),
Color.FromUInt32(0xFFFEEECC),
Color.FromUInt32(0xFFFED998),
Color.FromUInt32(0xFFFDC165),
Color.FromUInt32(0xFFFDA633),
Color.FromUInt32(0xFFFC8800),
Color.FromUInt32(0xFFD26700),
Color.FromUInt32(0xFFA84A00),
Color.FromUInt32(0xFF7E3100),
Color.FromUInt32(0xFF541D00),
},
{
//Grey
Color.FromUInt32(0xFFF9F9F9),
Color.FromUInt32(0xFFE6E8EA),
Color.FromUInt32(0xFFC6CACD),
Color.FromUInt32(0xFFA7ABB0),
Color.FromUInt32(0xFF888D92),
Color.FromUInt32(0xFF6B7075),
Color.FromUInt32(0xFF555B61),
Color.FromUInt32(0xFF41464C),
Color.FromUInt32(0xFF2E3238),
Color.FromUInt32(0xFF1C1F23),
},
};
public Color GetColor(int colorIndex, int shadeIndex)
{
return Colors[
MathUtilities.Clamp(colorIndex, 0, ColorCount - 1),
MathUtilities.Clamp(shadeIndex, 0, ShadeCount - 1)
];
}
public int ColorCount => Colors.GetLength(0);
public int ShadeCount => Colors.GetLength(1);
}

View File

@@ -14,6 +14,13 @@
BasedOn="{StaticResource {x:Type TextBox}}" BasedOn="{StaticResource {x:Type TextBox}}"
TargetType="TextBox"> TargetType="TextBox">
<Setter Property="VerticalAlignment" Value="Stretch" /> <Setter Property="VerticalAlignment" Value="Stretch" />
<Setter Property="MinHeight" Value="20" />
<Style Selector="^ /template/ Border#PART_ContentPresenterBorder">
<Setter Property="MinHeight" Value="20" />
</Style>
<Style Selector="^:error:focus /template/ Border#PART_ContentPresenterBorder">
<Setter Property="Border.BorderBrush" Value="Transparent" />
</Style>
<Style Selector="^ /template/ DataValidationErrors"> <Style Selector="^ /template/ DataValidationErrors">
<Setter Property="Theme" Value="{DynamicResource TooltipDataValidationErrors}" /> <Setter Property="Theme" Value="{DynamicResource TooltipDataValidationErrors}" />
</Style> </Style>

View File

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

View File

@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<Import Project="../Package.props"/> <Import Project="../Package.props" />
<PropertyGroup> <PropertyGroup>
<Title>Semi.Avalonia.DataGrid</Title> <Title>Semi.Avalonia.DataGrid</Title>
<PackageReleaseNotes>Upgrade to Avalonia 11.0.0-preview6.</PackageReleaseNotes> <PackageReleaseNotes>Update to Avalonia 11.0.0-preview8</PackageReleaseNotes>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@@ -12,35 +12,38 @@
<Setter Property="AutoCompleteBox.MaxDropDownHeight" Value="{DynamicResource AutoCompleteMaxDropdownHeight}" /> <Setter Property="AutoCompleteBox.MaxDropDownHeight" Value="{DynamicResource AutoCompleteMaxDropdownHeight}" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="AutoCompleteBox"> <ControlTemplate TargetType="AutoCompleteBox">
<Panel> <DataValidationErrors>
<TextBox <Panel>
Name="PART_TextBox" <TextBox
VerticalAlignment="Center" Name="PART_TextBox"
DataValidationErrors.Errors="{TemplateBinding (DataValidationErrors.Errors)}" VerticalAlignment="Center"
Watermark="{TemplateBinding Watermark}" /> DataValidationErrors.Errors="{TemplateBinding (DataValidationErrors.Errors)}"
<Popup Theme="{DynamicResource NonErrorTextBox}"
Name="PART_Popup" Watermark="{TemplateBinding Watermark}" />
MinWidth="{Binding Bounds.Width, RelativeSource={RelativeSource TemplatedParent}}" <Popup
MaxHeight="{TemplateBinding MaxDropDownHeight}" Name="PART_Popup"
IsLightDismissEnabled="True" MinWidth="{Binding Bounds.Width, RelativeSource={RelativeSource TemplatedParent}}"
PlacementTarget="{TemplateBinding}"> MaxHeight="{TemplateBinding MaxDropDownHeight}"
<Border IsLightDismissEnabled="True"
Margin="{DynamicResource AutoCompleteBoxPopupMargin}" PlacementTarget="{TemplateBinding}">
HorizontalAlignment="Stretch" <Border
Background="{DynamicResource AutoCompleteBoxPopupBackground}" Margin="{DynamicResource AutoCompleteBoxPopupMargin}"
BorderBrush="{DynamicResource AutoCompleteBoxPopupBorderBrush}" HorizontalAlignment="Stretch"
BorderThickness="{DynamicResource AutoCompleteBoxPopupBorderThickness}" Background="{DynamicResource AutoCompleteBoxPopupBackground}"
BoxShadow="{DynamicResource AutoCompleteBoxPopupBoxShadow}" BorderBrush="{DynamicResource AutoCompleteBoxPopupBorderBrush}"
CornerRadius="{DynamicResource AutoCompleteBoxPopupCornerRadius}"> BorderThickness="{DynamicResource AutoCompleteBoxPopupBorderThickness}"
<ListBox BoxShadow="{DynamicResource AutoCompleteBoxPopupBoxShadow}"
Name="PART_SelectingItemsControl" CornerRadius="{DynamicResource AutoCompleteBoxPopupCornerRadius}">
Foreground="{TemplateBinding Foreground}" <ListBox
ItemTemplate="{TemplateBinding ItemTemplate}" Name="PART_SelectingItemsControl"
ScrollViewer.HorizontalScrollBarVisibility="Auto" Foreground="{TemplateBinding Foreground}"
ScrollViewer.VerticalScrollBarVisibility="Auto" /> ItemTemplate="{TemplateBinding ItemTemplate}"
</Border> ScrollViewer.HorizontalScrollBarVisibility="Auto"
</Popup> ScrollViewer.VerticalScrollBarVisibility="Auto" />
</Panel> </Border>
</Popup>
</Panel>
</DataValidationErrors>
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>

View File

@@ -20,6 +20,7 @@
<Setter Property="Button.HorizontalContentAlignment" Value="Center" /> <Setter Property="Button.HorizontalContentAlignment" Value="Center" />
<Setter Property="Button.VerticalContentAlignment" Value="Center" /> <Setter Property="Button.VerticalContentAlignment" Value="Center" />
<Setter Property="Button.MinHeight" Value="12" /> <Setter Property="Button.MinHeight" Value="12" />
<Setter Property="Button.Cursor" Value="Hand" />
<Setter Property="Button.Template"> <Setter Property="Button.Template">
<ControlTemplate TargetType="Button"> <ControlTemplate TargetType="Button">
<ContentPresenter <ContentPresenter
@@ -53,6 +54,9 @@
<Style Selector="^.Tertiary"> <Style Selector="^.Tertiary">
<Setter Property="Button.Foreground" Value="{DynamicResource ButtonDefaultTertiaryForeground}" /> <Setter Property="Button.Foreground" Value="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Style> </Style>
<Style Selector="^.Success">
<Setter Property="Button.Foreground" Value="{DynamicResource ButtonDefaultSuccessForeground}" />
</Style>
<Style Selector="^.Warning"> <Style Selector="^.Warning">
<Setter Property="Button.Foreground" Value="{DynamicResource ButtonDefaultWarningForeground}" /> <Setter Property="Button.Foreground" Value="{DynamicResource ButtonDefaultWarningForeground}" />
</Style> </Style>
@@ -140,6 +144,19 @@
<Setter Property="Button.BorderBrush" Value="{DynamicResource ButtonSolidTertiaryPressedBorderBrush}" /> <Setter Property="Button.BorderBrush" Value="{DynamicResource ButtonSolidTertiaryPressedBorderBrush}" />
</Style> </Style>
</Style> </Style>
<Style Selector="^.Success">
<Setter Property="Button.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
<Setter Property="Button.Background" Value="{DynamicResource ButtonSolidSuccessBackground}" />
<Setter Property="Button.BorderBrush" Value="{DynamicResource ButtonSolidSuccessBorderBrush}" />
<Style Selector="^:pointerover">
<Setter Property="Button.Background" Value="{DynamicResource ButtonSolidSuccessPointeroverBackground}" />
<Setter Property="Button.BorderBrush" Value="{DynamicResource ButtonSolidSuccessPointeroverBorderBrush}" />
</Style>
<Style Selector="^:pressed">
<Setter Property="Button.Background" Value="{DynamicResource ButtonSolidSuccessPressedBackground}" />
<Setter Property="Button.BorderBrush" Value="{DynamicResource ButtonSolidSuccessPressedBorderBrush}" />
</Style>
</Style>
<Style Selector="^.Warning"> <Style Selector="^.Warning">
<Setter Property="Button.Foreground" Value="{DynamicResource ButtonSolidForeground}" /> <Setter Property="Button.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
<Setter Property="Button.Background" Value="{DynamicResource ButtonSolidWarningBackground}" /> <Setter Property="Button.Background" Value="{DynamicResource ButtonSolidWarningBackground}" />

View File

@@ -34,101 +34,108 @@
<Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalContentAlignment" Value="Left" /> <Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="CalendarDatePicker.MinHeight" Value="{DynamicResource CalendarDatePickerDefaultHeight}" />
<Setter Property="Padding" Value="8 0" /> <Setter Property="Padding" Value="8 0" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="CalendarDatePicker"> <ControlTemplate TargetType="CalendarDatePicker">
<Panel <DataValidationErrors>
x:Name="LayoutRoot" <Panel
HorizontalAlignment="Stretch" x:Name="LayoutRoot"
VerticalAlignment="Stretch"> HorizontalAlignment="Stretch"
<Border VerticalAlignment="Stretch">
x:Name="Background" <Border
Background="{TemplateBinding Background}" x:Name="Background"
BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}"
BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}"
CornerRadius="{TemplateBinding CornerRadius}"> BorderThickness="{TemplateBinding BorderThickness}"
<Grid CornerRadius="{TemplateBinding CornerRadius}">
HorizontalAlignment="Stretch" <Grid
VerticalAlignment="Center"
ColumnDefinitions="*,Auto">
<TextBox
Name="PART_TextBox"
Grid.Column="0"
MinHeight="{DynamicResource CalendarDatePickerInnerDefaultHeight}"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Center" VerticalAlignment="Center"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" ColumnDefinitions="*,Auto">
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" <TextBox
Background="Transparent" Name="PART_TextBox"
BorderBrush="Transparent" Grid.Column="0"
BorderThickness="0" MinHeight="{DynamicResource CalendarDatePickerDefaultHeight}"
CornerRadius="{TemplateBinding CornerRadius}" HorizontalAlignment="Stretch"
Foreground="{TemplateBinding Foreground}" VerticalAlignment="Center"
UseFloatingWatermark="{TemplateBinding UseFloatingWatermark}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
Watermark="{TemplateBinding Watermark}"> VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
<TextBox.Styles> Background="Transparent"
<Style Selector="TextBox#PART_TextBox:pointerover /template/ Border#PART_ContentPresenterBorder"> BorderBrush="Transparent"
<!-- By default the TextBox has its own focused state, override this to disable it here --> BorderThickness="0"
<Setter Property="Background" Value="Transparent" /> CornerRadius="{TemplateBinding CornerRadius}"
<Setter Property="BorderBrush" Value="Transparent" /> Foreground="{TemplateBinding Foreground}"
<Setter Property="BorderThickness" Value="0" /> Theme="{DynamicResource NonErrorTextBox}"
</Style> UseFloatingWatermark="{TemplateBinding UseFloatingWatermark}"
<Style Selector="TextBox#PART_TextBox:focus /template/ Border#PART_ContentPresenterBorder"> Watermark="{TemplateBinding Watermark}">
<!-- By default the TextBox has its own focused state, override this to disable it here --> <TextBox.Styles>
<Setter Property="Background" Value="Transparent" /> <Style Selector="TextBox#PART_TextBox:pointerover /template/ Border#PART_ContentPresenterBorder">
<Setter Property="BorderBrush" Value="Transparent" /> <!-- By default the TextBox has its own focused state, override this to disable it here -->
<Setter Property="BorderThickness" Value="0" />
</Style>
<Style Selector="TextBox#PART_TextBox:disabled">
<Style Selector="^ /template/ Border#PART_ContentPresenterBorder">
<!-- By default the TextBox has its own disabled state, override this to make the border background show through -->
<Setter Property="Background" Value="Transparent" /> <Setter Property="Background" Value="Transparent" />
<Setter Property="BorderBrush" Value="Transparent" /> <Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
</Style> </Style>
</Style> <Style Selector="TextBox#PART_TextBox:focus /template/ Border#PART_ContentPresenterBorder">
</TextBox.Styles> <!-- By default the TextBox has its own focused state, override this to disable it here -->
</TextBox> <Setter Property="Background" Value="Transparent" />
<Button <Setter Property="BorderBrush" Value="Transparent" />
Name="PART_Button" <Setter Property="BorderThickness" Value="0" />
Grid.Column="1" </Style>
Padding="0,0,8,0" <Style Selector="TextBox#PART_TextBox:disabled">
Cursor="Hand" <Style Selector="^ /template/ Border#PART_ContentPresenterBorder">
Focusable="False" <!-- By default the TextBox has its own disabled state, override this to make the border background show through -->
Theme="{DynamicResource CalendarDatePickerButton}" /> <Setter Property="Background" Value="Transparent" />
<Popup <Setter Property="BorderBrush" Value="Transparent" />
Name="PART_Popup" </Style>
HorizontalOffset="-8" </Style>
IsLightDismissEnabled="True" </TextBox.Styles>
PlacementTarget="{TemplateBinding}" </TextBox>
VerticalOffset="-4"> <Button
<Border Margin="8" BoxShadow="{DynamicResource CalendarDatePickerPopupBoxShadows}"> Name="PART_Button"
<Calendar Grid.Column="1"
Name="PART_Calendar" Padding="0,0,8,0"
DisplayDate="{TemplateBinding DisplayDate}" Cursor="Hand"
DisplayDateEnd="{TemplateBinding DisplayDateEnd}" Focusable="False"
DisplayDateStart="{TemplateBinding DisplayDateStart}" Theme="{DynamicResource CalendarDatePickerButton}" />
FirstDayOfWeek="{TemplateBinding FirstDayOfWeek}" <Popup
IsTodayHighlighted="{TemplateBinding IsTodayHighlighted}" Name="PART_Popup"
SelectedDate="{TemplateBinding SelectedDate, HorizontalOffset="-8"
Mode=TwoWay}" /> IsLightDismissEnabled="True"
</Border> PlacementTarget="{TemplateBinding}"
</Popup> VerticalOffset="-4">
</Grid> <Border
</Border> Margin="8"
Background="Transparent"
BoxShadow="{DynamicResource CalendarDatePickerPopupBoxShadows}"
CornerRadius="{DynamicResource CalendarCornerRadius}">
<Calendar
Name="PART_Calendar"
BorderThickness="0"
CornerRadius="{Binding $parent[Border].CornerRadius}"
DisplayDate="{TemplateBinding DisplayDate}"
DisplayDateEnd="{TemplateBinding DisplayDateEnd}"
DisplayDateStart="{TemplateBinding DisplayDateStart}"
FirstDayOfWeek="{TemplateBinding FirstDayOfWeek}"
IsTodayHighlighted="{TemplateBinding IsTodayHighlighted}"
SelectedDate="{TemplateBinding SelectedDate,
Mode=TwoWay}" />
</Border>
</Popup>
</Grid>
</Border>
</Panel>
</DataValidationErrors>
</Panel>
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
<Style Selector="^.Large"> <Style Selector="^.Large">
<Setter Property="CalendarDatePicker.MinHeight" Value="{DynamicResource CalendarDatePickerLargeHeight}" />
<Style Selector="^ /template/ TextBox#PART_TextBox"> <Style Selector="^ /template/ TextBox#PART_TextBox">
<Setter Property="TextBox.MinHeight" Value="{DynamicResource CalendarDatePickerInnerLargeHeight}" /> <Setter Property="TextBox.MinHeight" Value="{DynamicResource CalendarDatePickerInnerLargeHeight}" />
</Style> </Style>
</Style> </Style>
<Style Selector="^.Small"> <Style Selector="^.Small">
<Setter Property="CalendarDatePicker.MinHeight" Value="{DynamicResource CalendarDatePickerSmallHeight}" />
<Style Selector="^ /template/ TextBox#PART_TextBox"> <Style Selector="^ /template/ TextBox#PART_TextBox">
<Setter Property="TextBox.MinHeight" Value="{DynamicResource CalendarDatePickerInnerSmallHeight}" /> <Setter Property="TextBox.MinHeight" Value="{DynamicResource CalendarDatePickerInnerSmallHeight}" />
</Style> </Style>
@@ -160,6 +167,25 @@
<Setter Property="BorderBrush" Value="{DynamicResource CalendarDatePickerFocusBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource CalendarDatePickerFocusBorderBrush}" />
</Style> </Style>
<Style Selector="^:error">
<Style Selector="^ /template/ Border#Background">
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsBackground}" />
<Setter Property="BorderBrush" Value="Transparent" />
</Style>
<Style Selector="^:pointerover /template/ Border#Background">
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsPointerOverBackground}" />
<Setter Property="BorderBrush" Value="Transparent" />
</Style>
<Style Selector="^:pressed /template/ Border#Background">
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsPressedBackground}" />
<Setter Property="BorderBrush" Value="Transparent" />
</Style>
<Style Selector="^:focus-within /template/ Border#Background">
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsSelectedBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource DataValidationErrorsSelectedBorderBrush}" />
</Style>
</Style>
<Style Selector="^.Bordered"> <Style Selector="^.Bordered">
<Style Selector="^ Border#Background"> <Style Selector="^ Border#Background">
<Setter Property="Border.Background" Value="{DynamicResource CalendarDatePickerBorderedDefaultBackground}" /> <Setter Property="Border.Background" Value="{DynamicResource CalendarDatePickerBorderedDefaultBackground}" />
@@ -183,6 +209,24 @@
<Setter Property="Foreground" Value="{DynamicResource CalendarDatePickerDisabledIconForeground}" /> <Setter Property="Foreground" Value="{DynamicResource CalendarDatePickerDisabledIconForeground}" />
</Style> </Style>
</Style> </Style>
<Style Selector="^:error">
<Style Selector="^ /template/ Border#Background">
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource DataValidationErrorsBorderBrush}" />
</Style>
<Style Selector="^:pointerover /template/ Border#Background">
<Setter Property="Border.Background" Value="{DynamicResource DataValidationErrorsPointerOverBackground}" />
<Setter Property="Border.BorderBrush" Value="{DynamicResource DataValidationErrorsPointerOverBorderBrush}" />
</Style>
<Style Selector="^:pressed /template/ Border#Background">
<Setter Property="Border.Background" Value="{DynamicResource DataValidationErrorsPressedBackground}" />
<Setter Property="Border.BorderBrush" Value="{DynamicResource DataValidationErrorsPressedBorderBrush}" />
</Style>
<Style Selector="^:focus-within /template/ Border#Background">
<Setter Property="Border.Background" Value="{DynamicResource DataValidationErrorsSelectedBackground}" />
<Setter Property="Border.BorderBrush" Value="{DynamicResource DataValidationErrorsSelectedBorderBrush}" />
</Style>
</Style>
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -141,7 +141,8 @@
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center" VerticalAlignment="Center"
ItemContainerTheme="{DynamicResource CarouselIndicatorDotListBoxItem}" ItemContainerTheme="{DynamicResource CarouselIndicatorDotListBoxItem}"
ItemsSource="{TemplateBinding Items, ItemsSource="{TemplateBinding ItemCount,
Mode=OneWay,
Converter={StaticResource ItemsConverter}}" Converter={StaticResource ItemsConverter}}"
SelectedIndex="{Binding SelectedIndex, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"> SelectedIndex="{Binding SelectedIndex, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}">
<ListBox.ItemsPanel> <ListBox.ItemsPanel>

View File

@@ -64,11 +64,11 @@
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
<!-- Unchecked PointerOver State --> <!-- Unchecked Pointerover State -->
<Style Selector="^:pointerover"> <Style Selector="^:pointerover">
<Style Selector="^ /template/ Border#NormalRectangle"> <Style Selector="^ /template/ Border#NormalRectangle">
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxPointOverBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource CheckBoxPointeroverBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource CheckBoxPointOverBackground}" /> <Setter Property="Background" Value="{DynamicResource CheckBoxPointeroverBackground}" />
</Style> </Style>
</Style> </Style>
@@ -102,11 +102,11 @@
<Setter Property="Opacity" Value="1" /> <Setter Property="Opacity" Value="1" />
</Style> </Style>
<!-- Checked PointerOver State --> <!-- Checked Pointerover State -->
<Style Selector="^:pointerover"> <Style Selector="^:pointerover">
<Style Selector="^ /template/ Border#NormalRectangle"> <Style Selector="^ /template/ Border#NormalRectangle">
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCheckedPointOverBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCheckedPointeroverBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedPointOverBackground}" /> <Setter Property="Background" Value="{DynamicResource CheckBoxCheckedPointeroverBackground}" />
</Style> </Style>
</Style> </Style>
@@ -145,11 +145,11 @@
<Setter Property="Opacity" Value="1" /> <Setter Property="Opacity" Value="1" />
</Style> </Style>
<!-- Checked PointerOver State --> <!-- Checked Pointerover State -->
<Style Selector="^:pointerover"> <Style Selector="^:pointerover">
<Style Selector="^ /template/ Border#NormalRectangle"> <Style Selector="^ /template/ Border#NormalRectangle">
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCheckedPointOverBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCheckedPointeroverBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedPointOverBackground}" /> <Setter Property="Background" Value="{DynamicResource CheckBoxCheckedPointeroverBackground}" />
</Style> </Style>
</Style> </Style>
@@ -180,6 +180,7 @@
<ControlTheme x:Key="CardCheckBox" TargetType="CheckBox"> <ControlTheme x:Key="CardCheckBox" TargetType="CheckBox">
<Setter Property="Cursor" Value="Hand" /> <Setter Property="Cursor" Value="Hand" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Padding" Value="{DynamicResource CheckBoxCardPadding}" /> <Setter Property="Padding" Value="{DynamicResource CheckBoxCardPadding}" />
<Setter Property="BorderThickness" Value="{DynamicResource CheckBoxCardBorderThickness}" /> <Setter Property="BorderThickness" Value="{DynamicResource CheckBoxCardBorderThickness}" />
<Setter Property="CornerRadius" Value="{DynamicResource CheckBoxCardCornerRadius}" /> <Setter Property="CornerRadius" Value="{DynamicResource CheckBoxCardCornerRadius}" />
@@ -193,7 +194,11 @@
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}"> CornerRadius="{TemplateBinding CornerRadius}">
<Grid x:Name="RootGrid" ColumnDefinitions="Auto,*"> <Grid
x:Name="RootGrid"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
ColumnDefinitions="Auto,*">
<Grid Grid.Column="0" VerticalAlignment="Top"> <Grid Grid.Column="0" VerticalAlignment="Top">
<Border <Border
x:Name="NormalRectangle" x:Name="NormalRectangle"
@@ -215,7 +220,6 @@
x:Name="ContentPresenter" x:Name="ContentPresenter"
Grid.Column="1" Grid.Column="1"
Margin="8,0,0,0" Margin="8,0,0,0"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="Center" VerticalAlignment="Center"
Content="{TemplateBinding Content}" Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplate="{TemplateBinding ContentTemplate}"
@@ -228,10 +232,10 @@
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
<!-- Unchecked PointerOver State --> <!-- Unchecked Pointerover State -->
<Style Selector="^:pointerover"> <Style Selector="^:pointerover">
<Style Selector="^ /template/ Border#NormalRectangle"> <Style Selector="^ /template/ Border#NormalRectangle">
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxPointOverBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource CheckBoxPointeroverBorderBrush}" />
</Style> </Style>
<Style Selector="^ /template/ Border#RootBorder"> <Style Selector="^ /template/ Border#RootBorder">
<Setter Property="Background" Value="{DynamicResource CheckBoxCardPointeroverBackground}" /> <Setter Property="Background" Value="{DynamicResource CheckBoxCardPointeroverBackground}" />
@@ -274,11 +278,11 @@
<Setter Property="Opacity" Value="1" /> <Setter Property="Opacity" Value="1" />
</Style> </Style>
<!-- Checked PointerOver State --> <!-- Checked Pointerover State -->
<Style Selector="^:pointerover"> <Style Selector="^:pointerover">
<Style Selector="^ /template/ Border#NormalRectangle"> <Style Selector="^ /template/ Border#NormalRectangle">
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCheckedPointOverBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCheckedPointeroverBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedPointOverBackground}" /> <Setter Property="Background" Value="{DynamicResource CheckBoxCheckedPointeroverBackground}" />
</Style> </Style>
<Style Selector="^ /template/ Border#RootBorder"> <Style Selector="^ /template/ Border#RootBorder">
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedPointeroverBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedPointeroverBorderBrush}" />
@@ -329,11 +333,11 @@
<Setter Property="Opacity" Value="1" /> <Setter Property="Opacity" Value="1" />
</Style> </Style>
<!-- Checked PointerOver State --> <!-- Checked Pointerover State -->
<Style Selector="^:pointerover"> <Style Selector="^:pointerover">
<Style Selector="^ /template/ Border#NormalRectangle"> <Style Selector="^ /template/ Border#NormalRectangle">
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCheckedPointOverBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCheckedPointeroverBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedPointOverBackground}" /> <Setter Property="Background" Value="{DynamicResource CheckBoxCheckedPointeroverBackground}" />
</Style> </Style>
<Style Selector="^ /template/ Border#RootBorder"> <Style Selector="^ /template/ Border#RootBorder">
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedPointeroverBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedPointeroverBorderBrush}" />
@@ -376,88 +380,82 @@
<Setter Property="Padding" Value="{DynamicResource CheckBoxCardPadding}" /> <Setter Property="Padding" Value="{DynamicResource CheckBoxCardPadding}" />
<Setter Property="BorderThickness" Value="{DynamicResource CheckBoxCardBorderThickness}" /> <Setter Property="BorderThickness" Value="{DynamicResource CheckBoxCardBorderThickness}" />
<Setter Property="CornerRadius" Value="{DynamicResource CheckBoxCardCornerRadius}" /> <Setter Property="CornerRadius" Value="{DynamicResource CheckBoxCardCornerRadius}" />
<Setter Property="CheckBox.VerticalContentAlignment" Value="Center" />
<Setter Property="Background" Value="Transparent" /> <Setter Property="Background" Value="Transparent" />
<Setter Property="CheckBox.Template"> <Setter Property="CheckBox.Template">
<ControlTemplate TargetType="CheckBox"> <ControlTemplate TargetType="CheckBox">
<Border <ContentPresenter
Name="RootBorder" x:Name="PART_ContentPresenter"
Margin="{TemplateBinding Margin}"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}"> Content="{TemplateBinding Content}"
<ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}"
x:Name="ContentPresenter" CornerRadius="{TemplateBinding CornerRadius}"
Grid.Column="1" RecognizesAccessKey="True"
Margin="8,0,0,0" UseLayoutRounding="False" />
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="Center"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
IsVisible="{TemplateBinding Content,
Converter={x:Static ObjectConverters.IsNotNull}}"
RecognizesAccessKey="True"
TextWrapping="Wrap" />
</Border>
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
<!-- Unchecked PointerOver State --> <!-- Unchecked Pointerover State -->
<Style Selector="^:pointerover"> <Style Selector="^:pointerover">
<Style Selector="^ /template/ Border#RootBorder"> <Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Background" Value="{DynamicResource CheckBoxCardPointeroverBackground}" /> <Setter Property="Background" Value="{DynamicResource CheckBoxCardPointeroverBackground}" />
</Style> </Style>
</Style> </Style>
<!-- Unchecked Pressed State --> <!-- Unchecked Pressed State -->
<Style Selector="^:pressed"> <Style Selector="^:pressed">
<Style Selector="^ /template/ Border#RootBorder"> <Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Background" Value="{DynamicResource CheckBoxCardPressedBackground}" /> <Setter Property="Background" Value="{DynamicResource CheckBoxCardPressedBackground}" />
</Style> </Style>
</Style> </Style>
<!-- Unchecked Disabled state --> <!-- Unchecked Disabled state -->
<Style Selector="^:disabled"> <Style Selector="^:disabled">
<Style Selector="^ /template/ ContentPresenter#ContentPresenter"> <Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" /> <Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" />
</Style> </Style>
</Style> </Style>
<Style Selector="^:checked"> <Style Selector="^:checked">
<Style Selector="^ /template/ Border#RootBorder"> <Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource CheckBoxCardCheckedBackground}" /> <Setter Property="Background" Value="{DynamicResource CheckBoxCardCheckedBackground}" />
</Style> </Style>
<Style Selector="^:pointerover /template/ Border#RootBorder"> <Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedPointeroverBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedPointeroverBorderBrush}" />
</Style> </Style>
<Style Selector="^:pressed /template/ Border#RootBorder"> <Style Selector="^:pressed /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedPressedBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedPressedBorderBrush}" />
</Style> </Style>
<!-- Checked Disabled State --> <!-- Checked Disabled State -->
<Style Selector="^:disabled"> <Style Selector="^:disabled">
<Style Selector="^ /template/ Border#RootBorder"> <Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedDisabledBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedDisabledBorderBrush}" />
</Style> </Style>
<Style Selector="^ /template/ ContentPresenter#ContentPresenter"> <Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" /> <Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" />
</Style> </Style>
</Style> </Style>
</Style> </Style>
<Style Selector="^:indeterminate"> <Style Selector="^:indeterminate">
<!-- Checked Disabled State --> <Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Style Selector="^ /template/ Border#RootBorder">
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedBorderBrush}" />
</Style> </Style>
<Style Selector="^:pointerover /template/ Border#RootBorder"> <Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedPointeroverBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedPointeroverBorderBrush}" />
</Style> </Style>
<Style Selector="^:pressed /template/ Border#RootBorder"> <Style Selector="^:pressed /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedPressedBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedPressedBorderBrush}" />
</Style> </Style>
<Style Selector="^:disabled"> <Style Selector="^:disabled">
<Style Selector="^ /template/ Border#RootBorder"> <Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedDisabledBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedDisabledBorderBrush}" />
</Style> </Style>
</Style> </Style>

View File

@@ -36,7 +36,6 @@
<Setter Property="CornerRadius" Value="{DynamicResource ComboBoxSelectorCornerRadius}" /> <Setter Property="CornerRadius" Value="{DynamicResource ComboBoxSelectorCornerRadius}" />
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" /> <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" /> <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
<Setter Property="MinHeight" Value="{DynamicResource ComboBoxDefaultHeight}" />
<Setter Property="HorizontalContentAlignment" Value="Left" /> <Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Left" /> <Setter Property="HorizontalAlignment" Value="Left" />
@@ -45,106 +44,109 @@
<Setter Property="PlaceholderForeground" Value="{DynamicResource ComboBoxPlaceHolderForeground}" /> <Setter Property="PlaceholderForeground" Value="{DynamicResource ComboBoxPlaceHolderForeground}" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="ComboBox"> <ControlTemplate TargetType="ComboBox">
<Grid ColumnDefinitions="*,32"> <DataValidationErrors>
<Border <Grid ColumnDefinitions="*,32">
x:Name="Background"
Grid.Column="0"
Grid.ColumnSpan="2"
MinWidth="{DynamicResource ComboBoxThemeMinWidth}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}" />
<TextBlock
x:Name="PlaceholderTextBlock"
Grid.Column="0"
Margin="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Foreground="{TemplateBinding Foreground}"
IsVisible="{TemplateBinding SelectionBoxItem,
Converter={x:Static ObjectConverters.IsNull}}"
Opacity="0.3"
Text="{TemplateBinding PlaceholderText}" />
<ContentPresenter
x:Name="ContentPresenter"
Grid.Column="0"
Margin="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding SelectionBoxItem}"
ContentTemplate="{TemplateBinding ItemTemplate}" />
<Border
x:Name="DropDownOverlay"
Grid.Column="1"
Width="30"
Margin="0,1,1,1"
HorizontalAlignment="Right"
Background="Transparent"
IsVisible="False" />
<PathIcon
x:Name="DropDownGlyph"
Grid.Column="1"
Width="12"
Height="12"
Margin="0,0,10,0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Data="{DynamicResource ComboBoxIcon}"
Foreground="{DynamicResource ComboBoxIconDefaultForeground}"
IsHitTestVisible="False"
UseLayoutRounding="False" />
<Popup
Name="PART_Popup"
Grid.Column="0"
MinWidth="{Binding Bounds.Width, RelativeSource={RelativeSource TemplatedParent}}"
MaxHeight="{TemplateBinding MaxDropDownHeight}"
ClipToBounds="False"
InheritsTransform="True"
IsLightDismissEnabled="True"
IsOpen="{TemplateBinding IsDropDownOpen,
Mode=TwoWay}"
PlacementTarget="Background"
WindowManagerAddShadowHint="False">
<Border <Border
x:Name="PopupBorder" x:Name="Background"
Margin="0,4" Grid.Column="0"
HorizontalAlignment="Stretch" Grid.ColumnSpan="2"
Background="{DynamicResource ComboBoxPopupBackground}" MinHeight="{DynamicResource ComboBoxDefaultHeight}"
BorderBrush="{DynamicResource ComboBoxPopupBorderBrush}" MinWidth="{DynamicResource ComboBoxThemeMinWidth}"
BorderThickness="{DynamicResource ComboBoxPopupBorderThickness}" Background="{TemplateBinding Background}"
BoxShadow="{DynamicResource ComboBoxPopupBoxShadow}" BorderBrush="{TemplateBinding BorderBrush}"
ClipToBounds="True" BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="6"> CornerRadius="{TemplateBinding CornerRadius}" />
<ScrollViewer HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"> <TextBlock
<ItemsPresenter x:Name="PlaceholderTextBlock"
Name="PART_ItemsPresenter" Grid.Column="0"
Margin="{DynamicResource ComboBoxDropdownContentMargin}" Margin="{TemplateBinding Padding}"
ItemsPanel="{TemplateBinding ItemsPanel}" /> HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
</ScrollViewer> VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
</Border> Foreground="{TemplateBinding Foreground}"
</Popup> IsVisible="{TemplateBinding SelectionBoxItem,Converter={x:Static ObjectConverters.IsNull}}"
</Grid> Opacity="0.3"
Text="{TemplateBinding PlaceholderText}" />
<ContentPresenter
x:Name="ContentPresenter"
Grid.Column="0"
Margin="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding SelectionBoxItem}"
ContentTemplate="{TemplateBinding ItemTemplate}" />
<Border
x:Name="DropDownOverlay"
Grid.Column="1"
Width="30"
Margin="0,1,1,1"
HorizontalAlignment="Right"
Background="Transparent"
IsVisible="False" />
<PathIcon
x:Name="DropDownGlyph"
Grid.Column="1"
Width="12"
Height="12"
Margin="0,0,10,0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Data="{DynamicResource ComboBoxIcon}"
Foreground="{DynamicResource ComboBoxIconDefaultForeground}"
IsHitTestVisible="False"
UseLayoutRounding="False" />
<Popup
Name="PART_Popup"
Grid.Column="0"
MinWidth="{Binding Bounds.Width, RelativeSource={RelativeSource TemplatedParent}}"
MaxHeight="{TemplateBinding MaxDropDownHeight}"
ClipToBounds="False"
InheritsTransform="True"
IsLightDismissEnabled="True"
IsOpen="{TemplateBinding IsDropDownOpen,Mode=TwoWay}"
PlacementTarget="Background"
WindowManagerAddShadowHint="False">
<Border
x:Name="PopupBorder"
Margin="0,4"
HorizontalAlignment="Stretch"
Background="{DynamicResource ComboBoxPopupBackground}"
BorderBrush="{DynamicResource ComboBoxPopupBorderBrush}"
BorderThickness="{DynamicResource ComboBoxPopupBorderThickness}"
BoxShadow="{DynamicResource ComboBoxPopupBoxShadow}"
ClipToBounds="True"
CornerRadius="6">
<ScrollViewer
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
<ItemsPresenter
Name="PART_ItemsPresenter"
Margin="{DynamicResource ComboBoxDropdownContentMargin}"
ItemsPanel="{TemplateBinding ItemsPanel}" />
</ScrollViewer>
</Border>
</Popup>
</Grid>
</DataValidationErrors>
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
<Style Selector="^.Large"> <Style Selector="^.Large /template/ Border#Background">
<Setter Property="ComboBox.MinHeight" Value="{DynamicResource ComboBoxLargeHeight}" /> <Setter Property="ComboBox.MinHeight" Value="{DynamicResource ComboBoxLargeHeight}" />
</Style> </Style>
<Style Selector="^.Small"> <Style Selector="^.Small /template/ Border#Background">
<Setter Property="ComboBox.MinHeight" Value="{DynamicResource ComboBoxSmallHeight}" /> <Setter Property="ComboBox.MinHeight" Value="{DynamicResource ComboBoxSmallHeight}" />
</Style> </Style>
<!-- PointerOver State --> <!-- Pointerover State -->
<Style Selector="^:pointerover"> <Style Selector="^:pointerover">
<Setter Property="Background" Value="{DynamicResource ComboBoxSelectorPointerOverBackground}" /> <Setter Property="Background" Value="{DynamicResource ComboBoxSelectorPointeroverBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource ComboBoxSelectorPointerOverBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource ComboBoxSelectorPointeroverBorderBrush}" />
</Style> </Style>
<Style Selector="^:pointerover /template/ PathIcon#DropDownGlyph"> <Style Selector="^:pointerover /template/ PathIcon#DropDownGlyph">
<Setter Property="Foreground" Value="{DynamicResource ComboBoxIconPointerOverForeground}" /> <Setter Property="Foreground" Value="{DynamicResource ComboBoxIconPointeroverForeground}" />
</Style> </Style>
<!-- Pressed State --> <!-- Pressed State -->
@@ -173,6 +175,25 @@
<Setter Property="Foreground" Value="{DynamicResource ComboBoxIconDisabledForeground}" /> <Setter Property="Foreground" Value="{DynamicResource ComboBoxIconDisabledForeground}" />
</Style> </Style>
</Style> </Style>
<!-- Error State -->
<Style Selector="^:error">
<Style Selector="^ /template/ Border#Background">
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsBackground}" />
</Style>
<Style Selector="^:pointerover /template/ Border#Background">
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsPointerOverBackground}" />
<Setter Property="BorderBrush" Value="Transparent" />
</Style>
<Style Selector="^:pressed /template/ Border#Background">
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsPressedBackground}" />
<Setter Property="BorderBrush" Value="Transparent" />
</Style>
<Style Selector="^:focus /template/ Border#Background">
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsSelectedBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource DataValidationErrorsSelectedBorderBrush}" />
</Style>
</Style>
<Style Selector="^.Bordered"> <Style Selector="^.Bordered">
<Style Selector="^ /template/ Border#Background"> <Style Selector="^ /template/ Border#Background">
<Setter Property="Background" Value="{DynamicResource ComboBoxSelectorBorderedBackground}" /> <Setter Property="Background" Value="{DynamicResource ComboBoxSelectorBorderedBackground}" />
@@ -201,6 +222,24 @@
<Setter Property="Foreground" Value="{DynamicResource ComboBoxIconDisabledForeground}" /> <Setter Property="Foreground" Value="{DynamicResource ComboBoxIconDisabledForeground}" />
</Style> </Style>
</Style> </Style>
<Style Selector="^:error">
<Style Selector="^ /template/ Border#Background">
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource DataValidationErrorsBorderBrush}" />
</Style>
<Style Selector="^:pointerover /template/ Border#Background">
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsPointerOverBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource DataValidationErrorsPointerOverBorderBrush}" />
</Style>
<Style Selector="^:pressed /template/ Border#Background">
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsPressedBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource DataValidationErrorsPressedBorderBrush}" />
</Style>
<Style Selector="^:focus /template/ Border#Background">
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsSelectedBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource DataValidationErrorsSelectedBorderBrush}" />
</Style>
</Style>
</Style> </Style>
</ControlTheme> </ControlTheme>
@@ -227,7 +266,7 @@
</Setter> </Setter>
<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter"> <Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Background" Value="{DynamicResource ComboBoxItemPointerOverBackground}" /> <Setter Property="Background" Value="{DynamicResource ComboBoxItemPointeroverBackground}" />
</Style> </Style>
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter"> <Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
@@ -246,7 +285,7 @@
<Setter Property="Background" Value="{DynamicResource ComboBoxItemSelectedDisabledBackground}" /> <Setter Property="Background" Value="{DynamicResource ComboBoxItemSelectedDisabledBackground}" />
</Style> </Style>
<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter"> <Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Background" Value="{DynamicResource ComboBoxItemSelectedPointerOverBackground}" /> <Setter Property="Background" Value="{DynamicResource ComboBoxItemSelectedPointeroverBackground}" />
</Style> </Style>
</Style> </Style>
</ControlTheme> </ControlTheme>

View File

@@ -18,7 +18,7 @@
<Border <Border
MinHeight="{TemplateBinding MinHeight}" MinHeight="{TemplateBinding MinHeight}"
MaxWidth="{TemplateBinding MaxWidth}" MaxWidth="{TemplateBinding MaxWidth}"
Margin="0,4" Margin="4"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalAlignment}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
@@ -26,7 +26,7 @@
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
BoxShadow="{DynamicResource MenuFlyoutBorderBoxShadow}" BoxShadow="{DynamicResource MenuFlyoutBorderBoxShadow}"
CornerRadius="{TemplateBinding CornerRadius}"> CornerRadius="{TemplateBinding CornerRadius}">
<ScrollViewer Theme="{StaticResource MenuScrollViewer}"> <ScrollViewer Theme="{DynamicResource MenuScrollViewer}">
<ItemsPresenter <ItemsPresenter
Name="PART_ItemsPresenter" Name="PART_ItemsPresenter"
Grid.IsSharedSizeScope="True" Grid.IsSharedSizeScope="True"

View File

@@ -16,9 +16,10 @@
<ResourceInclude Source="avares://Semi.Avalonia/Controls/ComboBox.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Controls/ComboBox.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Controls/ContentControl.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Controls/ContentControl.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Controls/ContextMenu.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Controls/ContextMenu.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Controls/DataValidationErrors.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Controls/DatePicker.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Controls/DatePicker.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Controls/DateTimePickerShared.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Controls/DateTimePickerShared.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Controls/DropdownButton.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Controls/DropDownButton.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Controls/EmbeddableControlRoot.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Controls/EmbeddableControlRoot.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Controls/Expander.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Controls/Expander.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Controls/FlyoutPresenter.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Controls/FlyoutPresenter.axaml" />

View File

@@ -0,0 +1,108 @@
<ResourceDictionary
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:collections="clr-namespace:System.Collections;assembly=netstandard">
<!-- Add Resources Here -->
<ControlTheme x:Key="{x:Type DataValidationErrors}" TargetType="DataValidationErrors">
<Setter Property="Template">
<ControlTemplate TargetType="DataValidationErrors">
<DockPanel LastChildFill="True">
<ContentControl
x:Name="InlineDataValidationContentControl"
Margin="0,4,0,0"
Content="{Binding (DataValidationErrors.Errors)}"
ContentTemplate="{TemplateBinding ErrorTemplate}"
DataContext="{TemplateBinding Owner}"
DockPanel.Dock="Bottom"
IsVisible="{Binding (DataValidationErrors.HasErrors)}" />
<ContentPresenter
Name="PART_ContentPresenter"
Padding="{TemplateBinding Padding}"
Background="{TemplateBinding Background}"
BorderThickness="{TemplateBinding BorderThickness}"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
CornerRadius="{TemplateBinding CornerRadius}" />
</DockPanel>
</ControlTemplate>
</Setter>
<Setter Property="ErrorTemplate">
<DataTemplate>
<ItemsControl
x:DataType="DataValidationErrors"
Foreground="{DynamicResource DataValidationErrorsForeground}"
ItemsSource="{Binding}">
<ItemsControl.Styles>
<Style Selector="TextBlock">
<Setter Property="TextWrapping" Value="Wrap" />
</Style>
</ItemsControl.Styles>
</ItemsControl>
</DataTemplate>
</Setter>
</ControlTheme>
<ControlTheme x:Key="SilentDataValidationErrors" TargetType="DataValidationErrors">
<Setter Property="Template">
<ControlTemplate TargetType="DataValidationErrors">
<ContentPresenter
Name="PART_ContentPresenter"
Padding="{TemplateBinding Padding}"
Background="{TemplateBinding Background}"
BorderThickness="{TemplateBinding BorderThickness}"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
CornerRadius="{TemplateBinding CornerRadius}" />
</ControlTemplate>
</Setter>
</ControlTheme>
<ControlTheme x:Key="TooltipDataValidationErrors" TargetType="DataValidationErrors">
<Setter Property="Template">
<ControlTemplate TargetType="DataValidationErrors">
<DockPanel LastChildFill="True">
<ContentControl
Content="{Binding (DataValidationErrors.Errors)}"
ContentTemplate="{TemplateBinding ErrorTemplate}"
DataContext="{TemplateBinding Owner}"
DockPanel.Dock="Right"
IsVisible="{Binding (DataValidationErrors.HasErrors)}" />
<ContentPresenter
Name="PART_ContentPresenter"
Padding="{TemplateBinding Padding}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
CornerRadius="{TemplateBinding CornerRadius}" />
</DockPanel>
</ControlTemplate>
</Setter>
<Setter Property="ErrorTemplate">
<DataTemplate>
<Panel Name="PART_InlineErrorTemplatePanel" Background="Transparent">
<Panel.Styles>
<Style Selector="Panel#PART_InlineErrorTemplatePanel">
<Setter Property="Margin" Value="8,0" />
</Style>
<Style Selector="Panel#PART_InlineErrorTemplatePanel ToolTip">
<Setter Property="BorderBrush" Value="{DynamicResource DataValidationErrorsForeground}" />
</Style>
<Style Selector="Panel#PART_InlineErrorTemplatePanel ToolTip TextBlock">
<Setter Property="TextWrapping" Value="Wrap" />
</Style>
</Panel.Styles>
<ToolTip.Tip>
<ItemsControl x:DataType="collections:IEnumerable" ItemsSource="{Binding}" />
</ToolTip.Tip>
<Path
Width="14"
Height="14"
Data="M14,7 A7,7 0 0,0 0,7 M0,7 A7,7 0 1,0 14,7 M7,3l0,5 M7,9l0,2"
Stroke="{DynamicResource DataValidationErrorsForeground}"
StrokeThickness="2" />
</Panel>
</DataTemplate>
</Setter>
</ControlTheme>
</ResourceDictionary>

View File

@@ -125,7 +125,6 @@
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="{x:Type DatePicker}" TargetType="DatePicker"> <ControlTheme x:Key="{x:Type DatePicker}" TargetType="DatePicker">
<Setter Property="MinHeight" Value="{DynamicResource DateTimePickerButtonDefaultHeight}" />
<Setter Property="Foreground" Value="{DynamicResource DateTimePickerButtonForeground}" /> <Setter Property="Foreground" Value="{DynamicResource DateTimePickerButtonForeground}" />
<Setter Property="Background" Value="{DynamicResource DateTimePickerButtonBackground}" /> <Setter Property="Background" Value="{DynamicResource DateTimePickerButtonBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource DateTimePickerButtonBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource DateTimePickerButtonBorderBrush}" />
@@ -135,90 +134,94 @@
<Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="DatePicker"> <ControlTemplate TargetType="DatePicker">
<Grid Name="LayoutRoot" Margin="{TemplateBinding Padding}"> <DataValidationErrors>
<Button <Grid Name="LayoutRoot" Margin="{TemplateBinding Padding}">
Name="PART_FlyoutButton" <Button
Width="298" Name="PART_FlyoutButton"
MinWidth="298" Width="298"
HorizontalAlignment="Stretch" MinWidth="298"
VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
Background="{TemplateBinding Background}" VerticalAlignment="Stretch"
BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}"
BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}"
CornerRadius="{TemplateBinding CornerRadius}" BorderThickness="{TemplateBinding BorderThickness}"
Cursor="Hand" CornerRadius="{TemplateBinding CornerRadius}"
Foreground="{TemplateBinding Foreground}" Cursor="Hand"
IsEnabled="{TemplateBinding IsEnabled}" DataValidationErrors.Errors="{TemplateBinding (DataValidationErrors.Errors)}"
Theme="{StaticResource DateTimePickerFlyoutButton}"> Foreground="{TemplateBinding Foreground}"
<Grid ColumnDefinitions="*, Auto"> IsEnabled="{TemplateBinding IsEnabled}"
<Grid MinHeight="{DynamicResource DateTimePickerButtonDefaultHeight}"
Name="PART_ButtonContentGrid" Theme="{StaticResource DateTimePickerFlyoutButton}">
Grid.Column="0" <Grid ColumnDefinitions="*, Auto">
VerticalAlignment="Center" <Grid
ColumnDefinitions="78*,Auto,132*,Auto,78*"> Name="PART_ButtonContentGrid"
<TextBlock Grid.Column="0"
Name="PART_DayTextBlock"
Padding="12,4"
HorizontalAlignment="Center"
VerticalAlignment="Center" VerticalAlignment="Center"
FontFamily="{TemplateBinding FontFamily}" ColumnDefinitions="78*,Auto,132*,Auto,78*">
FontSize="{TemplateBinding FontSize}" <TextBlock
FontWeight="{TemplateBinding FontWeight}" Name="PART_DayTextBlock"
Text="day" /> Padding="12,4"
<TextBlock HorizontalAlignment="Center"
Name="PART_MonthTextBlock" VerticalAlignment="Center"
Padding="12,4" FontFamily="{TemplateBinding FontFamily}"
VerticalAlignment="Center" FontSize="{TemplateBinding FontSize}"
FontFamily="{TemplateBinding FontFamily}" FontWeight="{TemplateBinding FontWeight}"
FontSize="{TemplateBinding FontSize}" Text="day" />
FontWeight="{TemplateBinding FontWeight}" <TextBlock
Text="month" Name="PART_MonthTextBlock"
TextAlignment="Left" /> Padding="12,4"
<TextBlock VerticalAlignment="Center"
Name="PART_YearTextBlock" FontFamily="{TemplateBinding FontFamily}"
Padding="12,4" FontSize="{TemplateBinding FontSize}"
HorizontalAlignment="Center" FontWeight="{TemplateBinding FontWeight}"
VerticalAlignment="Center" Text="month"
FontFamily="{TemplateBinding FontFamily}" TextAlignment="Left" />
FontSize="{TemplateBinding FontSize}" <TextBlock
FontWeight="{TemplateBinding FontWeight}" Name="PART_YearTextBlock"
Text="year" /> Padding="12,4"
<Rectangle HorizontalAlignment="Center"
x:Name="PART_FirstSpacer" VerticalAlignment="Center"
FontFamily="{TemplateBinding FontFamily}"
FontSize="{TemplateBinding FontSize}"
FontWeight="{TemplateBinding FontWeight}"
Text="year" />
<Rectangle
x:Name="PART_FirstSpacer"
Grid.Column="1"
Width="1"
Margin="0,4"
HorizontalAlignment="Center"
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
<Rectangle
x:Name="PART_SecondSpacer"
Grid.Column="3"
Width="1"
Margin="0,4"
HorizontalAlignment="Center"
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
</Grid>
<PathIcon
Name="PART_Icon"
Grid.Column="1" Grid.Column="1"
Width="1" Width="16"
Margin="0,4" Height="16"
HorizontalAlignment="Center" Margin="0,0,8,0"
Fill="{DynamicResource DateTimePickerSeparatorBackground}" /> Data="{DynamicResource DatePickerIconGlyph}"
<Rectangle Foreground="{DynamicResource DateTimePickerIconForeground}" />
x:Name="PART_SecondSpacer"
Grid.Column="3"
Width="1"
Margin="0,4"
HorizontalAlignment="Center"
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
</Grid> </Grid>
<PathIcon </Button>
Name="PART_Icon"
Grid.Column="1"
Width="16"
Height="16"
Margin="0,0,8,0"
Data="{DynamicResource DatePickerIconGlyph}"
Foreground="{DynamicResource DateTimePickerIconForeground}" />
</Grid>
</Button>
<Popup <Popup
Name="PART_Popup" Name="PART_Popup"
IsLightDismissEnabled="True" IsLightDismissEnabled="True"
Placement="Bottom" Placement="Bottom"
PlacementTarget="{TemplateBinding}" PlacementTarget="{TemplateBinding}"
WindowManagerAddShadowHint="False"> WindowManagerAddShadowHint="False">
<DatePickerPresenter Name="PART_PickerPresenter" /> <DatePickerPresenter Name="PART_PickerPresenter" />
</Popup> </Popup>
</Grid> </Grid>
</DataValidationErrors>
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
@@ -230,10 +233,10 @@
<Style Selector="^:hasnodate /template/ Button#PART_FlyoutButton TextBlock"> <Style Selector="^:hasnodate /template/ Button#PART_FlyoutButton TextBlock">
<Setter Property="Foreground" Value="{DynamicResource DateTimePickerEmptyForeground}" /> <Setter Property="Foreground" Value="{DynamicResource DateTimePickerEmptyForeground}" />
</Style> </Style>
<Style Selector="^.Large"> <Style Selector="^.Large /template/ Button#PART_FlyoutButton">
<Setter Property="MinHeight" Value="{DynamicResource DateTimePickerButtonLargeHeight}" /> <Setter Property="MinHeight" Value="{DynamicResource DateTimePickerButtonLargeHeight}" />
</Style> </Style>
<Style Selector="^.Small"> <Style Selector="^.Small /template/ Button#PART_FlyoutButton">
<Setter Property="MinHeight" Value="{DynamicResource DateTimePickerButtonSmallHeight}" /> <Setter Property="MinHeight" Value="{DynamicResource DateTimePickerButtonSmallHeight}" />
</Style> </Style>
</ControlTheme> </ControlTheme>

View File

@@ -30,6 +30,25 @@
<Setter Property="BorderBrush" Value="{DynamicResource DateTimePickerButtonDisabledBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource DateTimePickerButtonDisabledBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource DateTimePickerButtonDisabledBackground}" /> <Setter Property="Background" Value="{DynamicResource DateTimePickerButtonDisabledBackground}" />
</Style> </Style>
<Style Selector="^:error">
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsBackground}" />
<Setter Property="BorderBrush" Value="Transparent" />
</Style>
<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsPointerOverBackground}" />
<Setter Property="BorderBrush" Value="Transparent" />
</Style>
<Style Selector="^:pressed /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsPressedBackground}" />
<Setter Property="BorderBrush" Value="Transparent" />
</Style>
<Style Selector="^:focus /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsSelectedBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource DataValidationErrorsSelectedBorderBrush}" />
</Style>
</Style>
</ControlTheme> </ControlTheme>
<!-- Theme for the items displayed in the selectors --> <!-- Theme for the items displayed in the selectors -->

View File

@@ -16,6 +16,7 @@
<Setter Property="DropDownButton.HorizontalContentAlignment" Value="Center" /> <Setter Property="DropDownButton.HorizontalContentAlignment" Value="Center" />
<Setter Property="DropDownButton.VerticalContentAlignment" Value="Center" /> <Setter Property="DropDownButton.VerticalContentAlignment" Value="Center" />
<Setter Property="DropDownButton.MinHeight" Value="12" /> <Setter Property="DropDownButton.MinHeight" Value="12" />
<Setter Property="DropDownButton.Cursor" Value="Hand" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="DropDownButton"> <ControlTemplate TargetType="DropDownButton">
<Border <Border
@@ -43,7 +44,7 @@
Margin="0,0,8,0" Margin="0,0,8,0"
HorizontalAlignment="Right" HorizontalAlignment="Right"
VerticalAlignment="Center" VerticalAlignment="Center"
Data="{DynamicResource DropdownButtonIconGlyph}" Data="{DynamicResource DropDownButtonIconGlyph}"
Foreground="{TemplateBinding Foreground}" Foreground="{TemplateBinding Foreground}"
IsHitTestVisible="False" IsHitTestVisible="False"
UseLayoutRounding="False" /> UseLayoutRounding="False" />
@@ -65,6 +66,9 @@
<Style Selector="^.Tertiary"> <Style Selector="^.Tertiary">
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonDefaultTertiaryForeground}" /> <Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Style> </Style>
<Style Selector="^.Success">
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonDefaultSuccessForeground}" />
</Style>
<Style Selector="^.Warning"> <Style Selector="^.Warning">
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonDefaultWarningForeground}" /> <Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonDefaultWarningForeground}" />
</Style> </Style>
@@ -96,7 +100,7 @@
</Style> </Style>
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="SolidDropdownButton" TargetType="DropDownButton"> <ControlTheme x:Key="SolidDropDownButton" TargetType="DropDownButton">
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonSolidForeground}" /> <Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" /> <Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" />
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidPrimaryBorderBrush}" /> <Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidPrimaryBorderBrush}" />
@@ -109,6 +113,7 @@
<Setter Property="DropDownButton.HorizontalContentAlignment" Value="Center" /> <Setter Property="DropDownButton.HorizontalContentAlignment" Value="Center" />
<Setter Property="DropDownButton.VerticalContentAlignment" Value="Center" /> <Setter Property="DropDownButton.VerticalContentAlignment" Value="Center" />
<Setter Property="DropDownButton.MinHeight" Value="12" /> <Setter Property="DropDownButton.MinHeight" Value="12" />
<Setter Property="DropDownButton.Cursor" Value="Hand" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="DropDownButton"> <ControlTemplate TargetType="DropDownButton">
<Border <Border
@@ -136,7 +141,7 @@
Margin="0,0,8,0" Margin="0,0,8,0"
HorizontalAlignment="Right" HorizontalAlignment="Right"
VerticalAlignment="Center" VerticalAlignment="Center"
Data="{DynamicResource DropdownButtonIconGlyph}" Data="{DynamicResource DropDownButtonIconGlyph}"
Foreground="{TemplateBinding Foreground}" Foreground="{TemplateBinding Foreground}"
IsHitTestVisible="False" IsHitTestVisible="False"
UseLayoutRounding="False" /> UseLayoutRounding="False" />
@@ -188,6 +193,19 @@
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidTertiaryPressedBorderBrush}" /> <Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidTertiaryPressedBorderBrush}" />
</Style> </Style>
</Style> </Style>
<Style Selector="^.Success">
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidSuccessBackground}" />
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidSuccessBorderBrush}" />
<Style Selector="^:pointerover">
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidSuccessPointeroverBackground}" />
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidSuccessPointeroverBorderBrush}" />
</Style>
<Style Selector="^:pressed">
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidSuccessPressedBackground}" />
<Setter Property="DropDownButton.BorderBrush" Value="{DynamicResource ButtonSolidSuccessPressedBorderBrush}" />
</Style>
</Style>
<Style Selector="^.Warning"> <Style Selector="^.Warning">
<Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonSolidForeground}" /> <Setter Property="DropDownButton.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
<Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidWarningBackground}" /> <Setter Property="DropDownButton.Background" Value="{DynamicResource ButtonSolidWarningBackground}" />
@@ -223,7 +241,7 @@
</ControlTheme> </ControlTheme>
<ControlTheme <ControlTheme
x:Key="BorderlessDropdownButton" x:Key="BorderlessDropDownButton"
BasedOn="{StaticResource {x:Type DropDownButton}}" BasedOn="{StaticResource {x:Type DropDownButton}}"
TargetType="DropDownButton"> TargetType="DropDownButton">
<Setter Property="DropDownButton.Background" Value="Transparent" /> <Setter Property="DropDownButton.Background" Value="Transparent" />

View File

@@ -20,11 +20,11 @@
<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="FlyoutPresenter.CornerRadius" Value="{DynamicResource FlyoutCornerRadius}" />
<Setter Property="FlyoutPresenter.Margin" Value="4" />
<Setter Property="FlyoutPresenter.Template"> <Setter Property="FlyoutPresenter.Template">
<ControlTemplate TargetType="FlyoutPresenter"> <ControlTemplate TargetType="FlyoutPresenter">
<Border <Border
Name="LayoutRoot" Name="LayoutRoot"
Margin="4"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
@@ -46,4 +46,48 @@
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="LightFlyout" TargetType="FlyoutPresenter">
<Setter Property="FlyoutPresenter.HorizontalContentAlignment" Value="Stretch" />
<Setter Property="FlyoutPresenter.VerticalContentAlignment" Value="Stretch" />
<Setter Property="FlyoutPresenter.UseLayoutRounding" Value="False" />
<Setter Property="FlyoutPresenter.FontWeight" Value="{DynamicResource FlyoutFontWeight}" />
<Setter Property="FlyoutPresenter.Background" Value="Transparent" />
<Setter Property="FlyoutPresenter.BorderBrush" Value="Transparent" />
<Setter Property="FlyoutPresenter.BorderThickness" Value="0" />
<Setter Property="FlyoutPresenter.Padding" Value="{DynamicResource FlyoutPadding}" />
<Setter Property="FlyoutPresenter.MinWidth" Value="{DynamicResource FlyoutMinWidth}" />
<Setter Property="FlyoutPresenter.MaxWidth" Value="{DynamicResource FlyoutMaxWidth}" />
<Setter Property="FlyoutPresenter.MinHeight" Value="{DynamicResource FlyoutMinHeight}" />
<Setter Property="FlyoutPresenter.MaxHeight" Value="{DynamicResource FlyoutMaxHeight}" />
<Setter Property="FlyoutPresenter.Foreground" Value="{DynamicResource FlyoutForeground}" />
<Setter Property="FlyoutPresenter.ClipToBounds" Value="False" />
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
<Setter Property="FlyoutPresenter.CornerRadius" Value="{DynamicResource FlyoutCornerRadius}" />
<Setter Property="FlyoutPresenter.Margin" Value="4" />
<Setter Property="FlyoutPresenter.Template">
<ControlTemplate TargetType="FlyoutPresenter">
<Border
Name="LayoutRoot"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
ClipToBounds="False"
CornerRadius="{TemplateBinding CornerRadius}"
UseLayoutRounding="False">
<ScrollViewer HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
<ContentPresenter
Margin="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}" />
</ScrollViewer>
</Border>
</ControlTemplate>
</Setter>
</ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -70,9 +70,9 @@
</Style> </Style>
</Style> </Style>
<!-- PointerOver State --> <!-- Pointerover State -->
<Style Selector="^:pointerover"> <Style Selector="^:pointerover">
<Setter Property="ListBoxItem.Background" Value="{DynamicResource ListBoxItemPointerOverBackground}" /> <Setter Property="ListBoxItem.Background" Value="{DynamicResource ListBoxItemPointeroverBackground}" />
</Style> </Style>
<!-- Pressed State --> <!-- Pressed State -->

View File

@@ -1,6 +1,7 @@
<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="using:Semi.Avalonia.Converters"
xmlns:dialogs="clr-namespace:Avalonia.Dialogs;assembly=Avalonia.Dialogs" xmlns:dialogs="clr-namespace:Avalonia.Dialogs;assembly=Avalonia.Dialogs"
xmlns:internal="clr-namespace:Avalonia.Dialogs.Internal;assembly=Avalonia.Dialogs" xmlns:internal="clr-namespace:Avalonia.Dialogs.Internal;assembly=Avalonia.Dialogs"
x:CompileBindings="True"> x:CompileBindings="True">
@@ -14,11 +15,11 @@
</Border> </Border>
</Design.PreviewWith> </Design.PreviewWith>
<internal:ResourceSelectorConverter x:Key="Icons"> <converters:KeyToPathConverter x:Key="Icons">
<PathGeometry x:Key="Icon_Folder">M19,20H4C2.89,20 2,19.1 2,18V6C2,4.89 2.89,4 4,4H10L12,6H19A2,2 0 0,1 21,8H21L4,8V18L6.14,10H23.21L20.93,18.5C20.7,19.37 19.92,20 19,20Z</PathGeometry> <PathGeometry x:Key="Icon_Folder">M19,20H4C2.89,20 2,19.1 2,18V6C2,4.89 2.89,4 4,4H10L12,6H19A2,2 0 0,1 21,8H21L4,8V18L6.14,10H23.21L20.93,18.5C20.7,19.37 19.92,20 19,20Z</PathGeometry>
<PathGeometry x:Key="Icon_File">M13,9H18.5L13,3.5V9M6,2H14L20,8V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V4C4,2.89 4.89,2 6,2M15,18V16H6V18H15M18,14V12H6V14H18Z</PathGeometry> <PathGeometry x:Key="Icon_File">M13,9H18.5L13,3.5V9M6,2H14L20,8V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V4C4,2.89 4.89,2 6,2M15,18V16H6V18H15M18,14V12H6V14H18Z</PathGeometry>
<PathGeometry 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</PathGeometry> <PathGeometry 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</PathGeometry>
</internal:ResourceSelectorConverter> </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="dialogs:ManagedFileChooser.Template">
<ControlTemplate x:DataType="internal:ManagedFileChooserViewModel" TargetType="dialogs:ManagedFileChooser"> <ControlTemplate x:DataType="internal:ManagedFileChooserViewModel" TargetType="dialogs:ManagedFileChooser">
@@ -31,7 +32,7 @@
<ListBox <ListBox
x:Name="PART_QuickLinks" x:Name="PART_QuickLinks"
Focusable="False" Focusable="False"
Items="{Binding QuickLinks}" ItemsSource="{Binding QuickLinks}"
SelectedIndex="{Binding QuickLinksSelectedIndex}"> SelectedIndex="{Binding QuickLinksSelectedIndex}">
<ListBox.ItemTemplate> <ListBox.ItemTemplate>
<DataTemplate> <DataTemplate>
@@ -74,7 +75,7 @@
Margin="8,0,0,0" Margin="8,0,0,0"
DockPanel.Dock="Right" DockPanel.Dock="Right"
IsVisible="{Binding ShowFilters}" IsVisible="{Binding ShowFilters}"
Items="{Binding Filters}" ItemsSource="{Binding Filters}"
SelectedItem="{Binding SelectedFilter}" /> SelectedItem="{Binding SelectedFilter}" />
<TextBox <TextBox
IsVisible="{Binding !SelectingFolder}" IsVisible="{Binding !SelectingFolder}"
@@ -142,7 +143,7 @@
</Grid> </Grid>
<ListBox <ListBox
Name="PART_Files" Name="PART_Files"
Items="{Binding Items}" ItemsSource="{Binding Items}"
SelectedItems="{Binding SelectedItems}" SelectedItems="{Binding SelectedItems}"
SelectionMode="{Binding SelectionMode}"> SelectionMode="{Binding SelectionMode}">
<ListBox.ItemTemplate> <ListBox.ItemTemplate>

View File

@@ -27,10 +27,10 @@
RenderTransform="{x:Null}"> RenderTransform="{x:Null}">
<RepeatButton.IsVisible> <RepeatButton.IsVisible>
<MultiBinding Converter="{x:Static converters:MenuScrollingVisibilityConverter.Instance}" ConverterParameter="0"> <MultiBinding Converter="{x:Static converters:MenuScrollingVisibilityConverter.Instance}" ConverterParameter="0">
<Binding Path="VerticalScrollBarVisibility" RelativeSource="{RelativeSource TemplatedParent}" /> <ReflectionBinding Path="VerticalScrollBarVisibility" RelativeSource="{RelativeSource TemplatedParent}" />
<Binding Path="Offset.Y" RelativeSource="{RelativeSource TemplatedParent}" /> <ReflectionBinding Path="Offset.Y" RelativeSource="{RelativeSource TemplatedParent}" />
<Binding Path="Extent.Height" RelativeSource="{RelativeSource TemplatedParent}" /> <ReflectionBinding Path="Extent.Height" RelativeSource="{RelativeSource TemplatedParent}" />
<Binding Path="Viewport.Height" RelativeSource="{RelativeSource TemplatedParent}" /> <ReflectionBinding Path="Viewport.Height" RelativeSource="{RelativeSource TemplatedParent}" />
</MultiBinding> </MultiBinding>
</RepeatButton.IsVisible> </RepeatButton.IsVisible>
<PathIcon <PathIcon
@@ -50,10 +50,10 @@
RenderTransform="{x:Null}"> RenderTransform="{x:Null}">
<RepeatButton.IsVisible> <RepeatButton.IsVisible>
<MultiBinding Converter="{x:Static converters:MenuScrollingVisibilityConverter.Instance}" ConverterParameter="100"> <MultiBinding Converter="{x:Static converters:MenuScrollingVisibilityConverter.Instance}" ConverterParameter="100">
<Binding Path="VerticalScrollBarVisibility" RelativeSource="{RelativeSource TemplatedParent}" /> <ReflectionBinding Path="VerticalScrollBarVisibility" RelativeSource="{RelativeSource TemplatedParent}" />
<Binding Path="Offset.Y" RelativeSource="{RelativeSource TemplatedParent}" /> <ReflectionBinding Path="Offset.Y" RelativeSource="{RelativeSource TemplatedParent}" />
<Binding Path="Extent.Height" RelativeSource="{RelativeSource TemplatedParent}" /> <ReflectionBinding Path="Extent.Height" RelativeSource="{RelativeSource TemplatedParent}" />
<Binding Path="Viewport.Height" RelativeSource="{RelativeSource TemplatedParent}" /> <ReflectionBinding Path="Viewport.Height" RelativeSource="{RelativeSource TemplatedParent}" />
</MultiBinding> </MultiBinding>
</RepeatButton.IsVisible> </RepeatButton.IsVisible>
<PathIcon <PathIcon
@@ -65,17 +65,15 @@
<ScrollContentPresenter <ScrollContentPresenter
Name="PART_ContentPresenter" Name="PART_ContentPresenter"
Margin="{TemplateBinding Padding}" Margin="{TemplateBinding Padding}"
CanHorizontallyScroll="{TemplateBinding CanHorizontallyScroll}" HorizontalSnapPointsAlignment="{TemplateBinding HorizontalSnapPointsAlignment}"
CanVerticallyScroll="{TemplateBinding CanVerticallyScroll}" HorizontalSnapPointsType="{TemplateBinding HorizontalSnapPointsType}"
Content="{TemplateBinding Content}" VerticalSnapPointsAlignment="{TemplateBinding VerticalSnapPointsAlignment}"
Extent="{TemplateBinding Extent, VerticalSnapPointsType="{TemplateBinding VerticalSnapPointsType}">
Mode=TwoWay}"
Viewport="{TemplateBinding Viewport,
Mode=TwoWay}"
Offset="{TemplateBinding Offset,
Mode=TwoWay}">
<ScrollContentPresenter.GestureRecognizers> <ScrollContentPresenter.GestureRecognizers>
<ScrollGestureRecognizer CanHorizontallyScroll="{TemplateBinding CanHorizontallyScroll}" CanVerticallyScroll="{TemplateBinding CanVerticallyScroll}" /> <ScrollGestureRecognizer
CanHorizontallyScroll="{Binding CanHorizontallyScroll, ElementName=PART_ContentPresenter}"
CanVerticallyScroll="{Binding CanVerticallyScroll, ElementName=PART_ContentPresenter}"
IsScrollInertiaEnabled="{Binding IsScrollInertiaEnabled, RelativeSource={RelativeSource TemplatedParent}}" />
</ScrollContentPresenter.GestureRecognizers> </ScrollContentPresenter.GestureRecognizers>
</ScrollContentPresenter> </ScrollContentPresenter>
</DockPanel> </DockPanel>

View File

@@ -13,31 +13,26 @@
<Setter Property="MenuFlyoutPresenter.Foreground" Value="{DynamicResource TextBlockDefaultForeground}" /> <Setter Property="MenuFlyoutPresenter.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.Margin" Value="4" /> <Setter Property="MenuFlyoutPresenter.CornerRadius" Value="{DynamicResource MenuFlyoutCornerRadius}" />
<Setter Property="MenuFlyoutPresenter.CornerRadius" Value="{DynamicResource OverlayCornerRadius}" />
<Setter Property="MenuFlyoutPresenter.Template"> <Setter Property="MenuFlyoutPresenter.Template">
<ControlTemplate TargetType="MenuFlyoutPresenter"> <ControlTemplate TargetType="MenuFlyoutPresenter">
<Border <Border
Name="LayoutRoot" Name="LayoutRoot"
MinWidth="{DynamicResource MenuFlyoutMinWidth}" Margin="4"
MinHeight="{DynamicResource MenuFlyoutMinHeight}" Background="{TemplateBinding Background}"
MaxWidth="{DynamicResource MenuFlyoutMaxWidth}" BorderBrush="{TemplateBinding BorderBrush}"
MaxHeight="{DynamicResource MenuFlyoutMaxHeight}" BorderThickness="{TemplateBinding BorderThickness}"
Margin="8"
Padding="{DynamicResource MenuFlyoutPadding}"
HorizontalAlignment="Stretch"
Background="{DynamicResource MenuFlyoutBackground}"
BorderBrush="{DynamicResource MenuFlyoutBorderBrush}"
BorderThickness="{DynamicResource MenuFlyoutBorderThickness}"
BoxShadow="{DynamicResource MenuFlyoutBorderBoxShadow}" BoxShadow="{DynamicResource MenuFlyoutBorderBoxShadow}"
CornerRadius="{DynamicResource MenuFlyoutCornerRadius}"> ClipToBounds="False"
CornerRadius="{TemplateBinding CornerRadius}"
UseLayoutRounding="False">
<ScrollViewer <ScrollViewer
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
Theme="{StaticResource MenuScrollViewer}" Theme="{StaticResource MenuScrollViewer}"
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"> VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
<ItemsPresenter <ItemsPresenter
Name="PART_ItemsPresenter" Name="PART_ItemsPresenter"
Margin="{DynamicResource MenuFlyoutScrollerMargin}" Margin="{TemplateBinding Padding}"
Grid.IsSharedSizeScope="True" Grid.IsSharedSizeScope="True"
ItemsPanel="{TemplateBinding ItemsPanel}" ItemsPanel="{TemplateBinding ItemsPanel}"
KeyboardNavigation.TabNavigation="Continue" /> KeyboardNavigation.TabNavigation="Continue" />

View File

@@ -8,32 +8,64 @@
<Setter Property="NumericUpDown.CornerRadius" Value="{DynamicResource NumericUpDownCornerRadius}" /> <Setter Property="NumericUpDown.CornerRadius" Value="{DynamicResource NumericUpDownCornerRadius}" />
<Setter Property="NumericUpDown.Template"> <Setter Property="NumericUpDown.Template">
<ControlTemplate TargetType="NumericUpDown"> <ControlTemplate TargetType="NumericUpDown">
<ButtonSpinner <DataValidationErrors>
Name="PART_Spinner" <ButtonSpinner
MinWidth="0" Name="PART_Spinner"
HorizontalContentAlignment="Stretch" MinWidth="0"
VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch"
AllowSpin="{TemplateBinding AllowSpin}" VerticalContentAlignment="Stretch"
Background="{TemplateBinding Background}" AllowSpin="{TemplateBinding AllowSpin}"
BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}"
BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}"
ButtonSpinnerLocation="{TemplateBinding ButtonSpinnerLocation}" BorderThickness="{TemplateBinding BorderThickness}"
ShowButtonSpinner="{TemplateBinding ShowButtonSpinner}"> ButtonSpinnerLocation="{TemplateBinding ButtonSpinnerLocation}"
<TextBox ShowButtonSpinner="{TemplateBinding ShowButtonSpinner}">
Name="PART_TextBox" <TextBox
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Name="PART_TextBox"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Height="{TemplateBinding Height}"
AcceptsReturn="False" MinHeight="{DynamicResource NumericUpDownWrapperDefaultHeight}"
CornerRadius="{TemplateBinding CornerRadius}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
FontSize="{TemplateBinding FontSize}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
Foreground="{TemplateBinding Foreground}" AcceptsReturn="False"
IsReadOnly="{TemplateBinding IsReadOnly}" CornerRadius="{TemplateBinding CornerRadius}"
Text="{TemplateBinding Text}" DataValidationErrors.Errors="{ReflectionBinding $parent[NumericUpDown].(DataValidationErrors.Errors)}"
TextWrapping="NoWrap" FontSize="{TemplateBinding FontSize}"
Watermark="{TemplateBinding Watermark}" /> Foreground="{TemplateBinding Foreground}"
</ButtonSpinner> IsReadOnly="{TemplateBinding IsReadOnly}"
Text="{TemplateBinding Text}"
TextWrapping="NoWrap"
Theme="{DynamicResource NonErrorTextBox}"
Watermark="{TemplateBinding Watermark}" />
</ButtonSpinner>
</DataValidationErrors>
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
<Style Selector="^.Large /template/ TextBox#PART_TextBox">
<Setter Property="MinHeight" Value="{DynamicResource NumericUpDownWrapperLargeHeight}" />
</Style>
<Style Selector="^.Small /template/ TextBox#PART_TextBox">
<Setter Property="MinHeight" Value="{DynamicResource NumericUpDownWrapperSmallHeight}" />
</Style>
<Style Selector="^:error">
<Style Selector="^ /template/ TextBox#PART_TextBox">
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsBackground}" />
<Setter Property="BorderBrush" Value="Transparent" />
</Style>
<Style Selector="^:pointerover /template/ TextBox#PART_TextBox">
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsPointerOverBackground}" />
<Setter Property="BorderBrush" Value="Transparent" />
</Style>
<Style Selector="^:pressed /template/ TextBox#PART_TextBox">
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsPressedBackground}" />
<Setter Property="BorderBrush" Value="Transparent" />
</Style>
<Style Selector="^:focus /template/ TextBox#PART_TextBox">
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsSelectedBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource DataValidationErrorsSelectedBorderBrush}" />
</Style>
</Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -158,7 +158,7 @@
<TextBlock.Text> <TextBlock.Text>
<MultiBinding Converter="{StaticResource StringFormatConverter}"> <MultiBinding Converter="{StaticResource StringFormatConverter}">
<TemplateBinding Property="ProgressTextFormat" /> <TemplateBinding Property="ProgressTextFormat" />
<Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" /> <ReflectionBinding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
<TemplateBinding Property="Percentage" /> <TemplateBinding Property="Percentage" />
<TemplateBinding Property="Minimum" /> <TemplateBinding Property="Minimum" />
<TemplateBinding Property="Maximum" /> <TemplateBinding Property="Maximum" />
@@ -211,13 +211,13 @@
<Style.Animations> <Style.Animations>
<Animation IterationCount="Infinite" Duration="0:0:2"> <Animation IterationCount="Infinite" Duration="0:0:2">
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0"> <KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0">
<Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateProperties.ContainerAnimationStartPosition}" /> <Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerAnimationStartPosition}" />
</KeyFrame> </KeyFrame>
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:1.5"> <KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:1.5">
<Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateProperties.ContainerAnimationEndPosition}" /> <Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerAnimationEndPosition}" />
</KeyFrame> </KeyFrame>
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:2"> <KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:2">
<Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateProperties.ContainerAnimationEndPosition}" /> <Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerAnimationEndPosition}" />
</KeyFrame> </KeyFrame>
</Animation> </Animation>
</Style.Animations> </Style.Animations>
@@ -226,13 +226,13 @@
<Style.Animations> <Style.Animations>
<Animation IterationCount="Infinite" Duration="0:0:2"> <Animation IterationCount="Infinite" Duration="0:0:2">
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0"> <KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0">
<Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateProperties.Container2AnimationStartPosition}" /> <Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2AnimationStartPosition}" />
</KeyFrame> </KeyFrame>
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0.75"> <KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0.75">
<Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateProperties.Container2AnimationStartPosition}" /> <Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2AnimationStartPosition}" />
</KeyFrame> </KeyFrame>
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:2"> <KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:2">
<Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateProperties.Container2AnimationEndPosition}" /> <Setter Property="TranslateTransform.X" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2AnimationEndPosition}" />
</KeyFrame> </KeyFrame>
</Animation> </Animation>
</Style.Animations> </Style.Animations>
@@ -241,13 +241,13 @@
<Style.Animations> <Style.Animations>
<Animation IterationCount="Infinite" Duration="0:0:2"> <Animation IterationCount="Infinite" Duration="0:0:2">
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0"> <KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0">
<Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateProperties.ContainerAnimationStartPosition}" /> <Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerAnimationStartPosition}" />
</KeyFrame> </KeyFrame>
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:1.5"> <KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:1.5">
<Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateProperties.ContainerAnimationEndPosition}" /> <Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerAnimationEndPosition}" />
</KeyFrame> </KeyFrame>
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:2"> <KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:2">
<Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateProperties.ContainerAnimationEndPosition}" /> <Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerAnimationEndPosition}" />
</KeyFrame> </KeyFrame>
</Animation> </Animation>
</Style.Animations> </Style.Animations>
@@ -256,28 +256,28 @@
<Style.Animations> <Style.Animations>
<Animation IterationCount="Infinite" Duration="0:0:2"> <Animation IterationCount="Infinite" Duration="0:0:2">
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0"> <KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0">
<Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateProperties.Container2AnimationStartPosition}" /> <Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2AnimationStartPosition}" />
</KeyFrame> </KeyFrame>
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0.75"> <KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:0.75">
<Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateProperties.Container2AnimationStartPosition}" /> <Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2AnimationStartPosition}" />
</KeyFrame> </KeyFrame>
<KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:2"> <KeyFrame KeySpline="0.4,0,0.6,1" KeyTime="0:0:2">
<Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateProperties.Container2AnimationEndPosition}" /> <Setter Property="TranslateTransform.Y" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2AnimationEndPosition}" />
</KeyFrame> </KeyFrame>
</Animation> </Animation>
</Style.Animations> </Style.Animations>
</Style> </Style>
<Style Selector="^:horizontal /template/ Border#IndeterminateProgressBarIndicator"> <Style Selector="^:horizontal /template/ Border#IndeterminateProgressBarIndicator">
<Setter Property="Width" Value="{Binding $parent[ProgressBar].TemplateProperties.ContainerWidth}" /> <Setter Property="Width" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerWidth}" />
</Style> </Style>
<Style Selector="^:horizontal /template/ Border#IndeterminateProgressBarIndicator2"> <Style Selector="^:horizontal /template/ Border#IndeterminateProgressBarIndicator2">
<Setter Property="Width" Value="{Binding $parent[ProgressBar].TemplateProperties.Container2Width}" /> <Setter Property="Width" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2Width}" />
</Style> </Style>
<Style Selector="^:vertical /template/ Border#IndeterminateProgressBarIndicator"> <Style Selector="^:vertical /template/ Border#IndeterminateProgressBarIndicator">
<Setter Property="Height" Value="{Binding $parent[ProgressBar].TemplateProperties.ContainerWidth}" /> <Setter Property="Height" Value="{Binding $parent[ProgressBar].TemplateSettings.ContainerWidth}" />
</Style> </Style>
<Style Selector="^:vertical /template/ Border#IndeterminateProgressBarIndicator2"> <Style Selector="^:vertical /template/ Border#IndeterminateProgressBarIndicator2">
<Setter Property="Height" Value="{Binding $parent[ProgressBar].TemplateProperties.Container2Width}" /> <Setter Property="Height" Value="{Binding $parent[ProgressBar].TemplateSettings.Container2Width}" />
</Style> </Style>
<Style Selector="^.Left"> <Style Selector="^.Left">
<Style Selector="^:horizontal /template/ LayoutTransformControl#PART_LayoutTransformControl"> <Style Selector="^:horizontal /template/ LayoutTransformControl#PART_LayoutTransformControl">

View File

@@ -35,7 +35,7 @@
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}"> CornerRadius="{TemplateBinding CornerRadius}">
<Grid ColumnDefinitions="Auto,*"> <Grid ColumnDefinitions="Auto,*">
<Grid Margin="{DynamicResource RadioButtonIconMargin}" VerticalAlignment="Top"> <Grid Margin="{DynamicResource RadioButtonIconMargin}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
<Ellipse <Ellipse
Name="OuterEllipse" Name="OuterEllipse"
Width="{DynamicResource RadioButtonIconRadius}" Width="{DynamicResource RadioButtonIconRadius}"
@@ -72,37 +72,7 @@
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
<!-- PointerOver State --> <!-- Unchecked State -->
<Style Selector="^:checked">
<Style Selector="^ /template/ Ellipse#OuterEllipse">
<Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconDefaultBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconDefaultBackground}" />
</Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Ellipse.Opacity" Value="1" />
</Style>
<Style Selector="^:disabled /template/ Ellipse#OuterEllipse">
<Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconDisabledBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconDisabledBackground}" />
</Style>
<Style Selector="^:disabled /template/ Ellipse#CheckGlyph">
<Setter Property="Ellipse.Opacity" Value="1" />
</Style>
<Style Selector="^:pointerover /template/ Ellipse#OuterEllipse">
<Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconPointOverBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconPointOverBackground}" />
</Style>
<Style Selector="^:pointerover /template/ Ellipse#CheckGlyph">
<Setter Property="Ellipse.Opacity" Value="1" />
</Style>
<Style Selector="^:pressed /template/ Ellipse#OuterEllipse">
<Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconPressedBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconPressedBackground}" />
</Style>
<Style Selector="^:pressed /template/ Ellipse#CheckGlyph">
<Setter Property="Ellipse.Opacity" Value="1" />
</Style>
</Style>
<Style Selector="^:unchecked"> <Style Selector="^:unchecked">
<Style Selector="^ /template/ Ellipse#OuterEllipse"> <Style Selector="^ /template/ Ellipse#OuterEllipse">
<Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconDefaultBorderBrush}" /> <Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconDefaultBorderBrush}" />
@@ -111,32 +81,95 @@
<Style Selector="^ /template/ Ellipse#CheckGlyph"> <Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Ellipse.Opacity" Value="0" /> <Setter Property="Ellipse.Opacity" Value="0" />
</Style> </Style>
<Style Selector="^:disabled /template/ Ellipse#OuterEllipse">
<Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconDisabledBorderBrush}" /> <!-- Unchecked Pointerover State -->
<Setter Property="Fill" Value="{DynamicResource RadioButtonUncheckIconDisabledBackground}" /> <Style Selector="^:pointerover">
<Style Selector="^ /template/ Ellipse#OuterEllipse">
<Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconPointeroverBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonUncheckIconPointeroverBackground}" />
</Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Ellipse.Opacity" Value="0" />
</Style>
</Style> </Style>
<Style Selector="^:disabled /template/ Ellipse#CheckGlyph">
<Setter Property="Ellipse.Opacity" Value="0" /> <!-- Unchecked Pressed State -->
<Style Selector="^:pressed">
<Style Selector="^ /template/ Ellipse#OuterEllipse">
<Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconPressedBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonUncheckIconPressedBackground}" />
</Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Ellipse.Opacity" Value="0" />
</Style>
</Style> </Style>
<Style Selector="^:pointerover /template/ Ellipse#OuterEllipse">
<Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconPointOverBorderBrush}" /> <!-- Unchecked Disabled state -->
<Setter Property="Fill" Value="{DynamicResource RadioButtonUncheckIconPointOverBackground}" /> <Style Selector="^:disabled">
<Style Selector="^ /template/ Ellipse#OuterEllipse">
<Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconDisabledBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonUncheckIconDisabledBackground}" />
</Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Ellipse.Opacity" Value="0" />
</Style>
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource RadioButtonDisabledForeground}" />
</Style>
</Style> </Style>
<Style Selector="^:pointerover /template/ Ellipse#CheckGlyph"> </Style>
<Setter Property="Ellipse.Opacity" Value="0" />
<!-- Checked State -->
<Style Selector="^:checked">
<Style Selector="^ /template/ Ellipse#OuterEllipse">
<Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconDefaultBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconDefaultBackground}" />
</Style> </Style>
<Style Selector="^:pressed /template/ Ellipse#OuterEllipse"> <Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconPressedBorderBrush}" /> <Setter Property="Ellipse.Opacity" Value="1" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonUncheckIconPressedBackground}" />
</Style> </Style>
<Style Selector="^:pressed /template/ Ellipse#CheckGlyph">
<Setter Property="Ellipse.Opacity" Value="0" /> <!-- Checked Pointerover State -->
<Style Selector="^:pointerover">
<Style Selector="^ /template/ Ellipse#OuterEllipse">
<Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconPointeroverBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconPointeroverBackground}" />
</Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Ellipse.Opacity" Value="1" />
</Style>
</Style>
<!-- Checked Pressed State -->
<Style Selector="^:pressed">
<Style Selector="^ /template/ Ellipse#OuterEllipse">
<Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconPressedBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconPressedBackground}" />
</Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Ellipse.Opacity" Value="1" />
</Style>
</Style>
<!-- Checked Disabled State -->
<Style Selector="^:disabled">
<Style Selector="^ /template/ Ellipse#OuterEllipse">
<Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconDisabledBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconDisabledBackground}" />
</Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Ellipse.Opacity" Value="1" />
</Style>
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource RadioButtonDisabledForeground}" />
</Style>
</Style> </Style>
</Style> </Style>
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="ButtonRadioButton" TargetType="RadioButton"> <ControlTheme x:Key="ButtonRadioButton" TargetType="RadioButton">
<Setter Property="RadioButton.CornerRadius" Value="{DynamicResource RadioButtonButtonCornerRadius}" /> <Setter Property="RadioButton.CornerRadius" Value="{DynamicResource RadioButtonButtonCornerRadius}" />
<Setter Property="RadioButton.VerticalContentAlignment" Value="Center" />
<Setter Property="RadioButton.Margin" Value="2" /> <Setter Property="RadioButton.Margin" Value="2" />
<Setter Property="RadioButton.Cursor" Value="Hand" /> <Setter Property="RadioButton.Cursor" Value="Hand" />
<Setter Property="RadioButton.FontWeight" Value="{DynamicResource RadioButtonButtonFontWeight}" /> <Setter Property="RadioButton.FontWeight" Value="{DynamicResource RadioButtonButtonFontWeight}" />
@@ -163,15 +196,21 @@
UseLayoutRounding="False" /> UseLayoutRounding="False" />
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
<Style Selector="^:checked">
<Setter Property="RadioButton.Background" Value="{DynamicResource RadioButtonButtonCheckedBackground}" />
<Setter Property="RadioButton.Foreground" Value="{DynamicResource RadioButtonButtonCheckedForeground}" />
</Style>
<Style Selector="^:unchecked"> <Style Selector="^:unchecked">
<Setter Property="RadioButton.Background" Value="Transparent" /> <Setter Property="RadioButton.Background" Value="Transparent" />
<Style Selector="^:pointerover"> <Style Selector="^:pointerover">
<Setter Property="RadioButton.Background" Value="{DynamicResource RadioButtonButtonUncheckedPointeroverBackground}" /> <Setter Property="RadioButton.Background" Value="{DynamicResource RadioButtonButtonUncheckedPointeroverBackground}" />
</Style> </Style>
<Style Selector="^:disabled">
<Setter Property="RadioButton.Foreground" Value="{DynamicResource RadioButtonButtonUncheckedDisabledForeground}" />
</Style>
</Style>
<Style Selector="^:checked">
<Setter Property="RadioButton.Background" Value="{DynamicResource RadioButtonButtonCheckedBackground}" />
<Setter Property="RadioButton.Foreground" Value="{DynamicResource RadioButtonButtonCheckedForeground}" />
<Style Selector="^:disabled">
<Setter Property="RadioButton.Foreground" Value="{DynamicResource RadioButtonButtonCheckedDisabledForeground}" />
</Style>
</Style> </Style>
<Style Selector="^.Small"> <Style Selector="^.Small">
<Setter Property="RadioButton.FontSize" Value="{DynamicResource RadioButtonButtonSmallFontSize}" /> <Setter Property="RadioButton.FontSize" Value="{DynamicResource RadioButtonButtonSmallFontSize}" />
@@ -189,7 +228,7 @@
<Setter Property="RadioButton.CornerRadius" Value="{DynamicResource RadioButtonCardCornerRadius}" /> <Setter Property="RadioButton.CornerRadius" Value="{DynamicResource RadioButtonCardCornerRadius}" />
<Setter Property="RadioButton.Cursor" Value="Hand" /> <Setter Property="RadioButton.Cursor" Value="Hand" />
<Setter Property="RadioButton.HorizontalAlignment" Value="Left" /> <Setter Property="RadioButton.HorizontalAlignment" Value="Left" />
<Setter Property="RadioButton.VerticalAlignment" Value="Top" /> <Setter Property="RadioButton.VerticalAlignment" Value="Center" />
<Setter Property="RadioButton.HorizontalContentAlignment" Value="Left" /> <Setter Property="RadioButton.HorizontalContentAlignment" Value="Left" />
<Setter Property="RadioButton.VerticalContentAlignment" Value="Center" /> <Setter Property="RadioButton.VerticalContentAlignment" Value="Center" />
<Setter Property="RadioButton.Background" Value="{DynamicResource RadioButtonCardDefaultBackground}" /> <Setter Property="RadioButton.Background" Value="{DynamicResource RadioButtonCardDefaultBackground}" />
@@ -204,7 +243,10 @@
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}"> CornerRadius="{TemplateBinding CornerRadius}">
<Grid ColumnDefinitions="Auto,*"> <Grid
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
ColumnDefinitions="Auto,*">
<Grid Margin="{DynamicResource RadioButtonIconMargin}" VerticalAlignment="Top"> <Grid Margin="{DynamicResource RadioButtonIconMargin}" VerticalAlignment="Top">
<Ellipse <Ellipse
Name="OuterEllipse" Name="OuterEllipse"
@@ -229,7 +271,6 @@
<ContentPresenter <ContentPresenter
Name="PART_ContentPresenter" Name="PART_ContentPresenter"
Grid.Column="1" Grid.Column="1"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding Content}" Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplate="{TemplateBinding ContentTemplate}"
@@ -242,7 +283,54 @@
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
<!-- PointerOver State --> <!-- Unchecked State -->
<Style Selector="^:unchecked">
<Style Selector="^ /template/ Ellipse#OuterEllipse">
<Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconDefaultBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonUncheckIconDefaultBackground}" />
</Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Ellipse.Opacity" Value="0" />
</Style>
<!-- Unchecked Pointerover State -->
<Style Selector="^:pointerover">
<Setter Property="RadioButton.Background" Value="{DynamicResource RadioButtonCardUncheckPointeroverBackground}" />
<Style Selector="^ /template/ Ellipse#OuterEllipse">
<Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconPointeroverBorderBrush}" />
</Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Ellipse.Opacity" Value="0" />
</Style>
</Style>
<!-- Unchecked Pressed State -->
<Style Selector="^:pressed">
<Setter Property="RadioButton.Background" Value="{DynamicResource RadioButtonCardUncheckPressedBackground}" />
<Style Selector="^ /template/ Ellipse#OuterEllipse">
<Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconPressedBorderBrush}" />
</Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Ellipse.Opacity" Value="0" />
</Style>
</Style>
<!-- Unchecked Disabled state -->
<Style Selector="^:disabled">
<Style Selector="^ /template/ Ellipse#OuterEllipse">
<Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconDisabledBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonUncheckIconDisabledBackground}" />
</Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Ellipse.Opacity" Value="0" />
</Style>
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource RadioButtonDisabledForeground}" />
</Style>
</Style>
</Style>
<!-- Checked State -->
<Style Selector="^:checked"> <Style Selector="^:checked">
<Setter Property="RadioButton.Background" Value="{DynamicResource RadioButtonCardCheckedBackground}" /> <Setter Property="RadioButton.Background" Value="{DynamicResource RadioButtonCardCheckedBackground}" />
<Setter Property="RadioButton.BorderBrush" Value="{DynamicResource RadioButtonCardCheckDefaultBorderBrush}" /> <Setter Property="RadioButton.BorderBrush" Value="{DynamicResource RadioButtonCardCheckDefaultBorderBrush}" />
@@ -253,27 +341,24 @@
<Style Selector="^ /template/ Ellipse#CheckGlyph"> <Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Ellipse.Opacity" Value="1" /> <Setter Property="Ellipse.Opacity" Value="1" />
</Style> </Style>
<Style Selector="^:disabled /template/ Ellipse#OuterEllipse">
<Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconDisabledBorderBrush}" /> <!-- Checked Pointerover State -->
<Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconDisabledBackground}" />
</Style>
<Style Selector="^:disabled /template/ Ellipse#CheckGlyph">
<Setter Property="Ellipse.Opacity" Value="1" />
</Style>
<Style Selector="^:pointerover"> <Style Selector="^:pointerover">
<Setter Property="RadioButton.BorderBrush" Value="{DynamicResource RadioButtonCardCheckPointOverBorderBrush}" /> <Setter Property="RadioButton.BorderBrush" Value="{DynamicResource RadioButtonCardCheckPointeroverBorderBrush}" />
<Style Selector="^ /template/ Ellipse#OuterEllipse"> <Style Selector="^ /template/ Ellipse#OuterEllipse">
<Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconPointOverBorderBrush}" /> <Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconPointeroverBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconPointOverBackground}" /> <Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconPointeroverBackground}" />
</Style> </Style>
<Style Selector="^ /template/ Ellipse#OuterEllipse"> <Style Selector="^ /template/ Ellipse#OuterEllipse">
<Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconPointOverBorderBrush}" /> <Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconPointeroverBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconPointOverBackground}" /> <Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconPointeroverBackground}" />
</Style> </Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph"> <Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Ellipse.Opacity" Value="1" /> <Setter Property="Ellipse.Opacity" Value="1" />
</Style> </Style>
</Style> </Style>
<!-- Checked Pressed State -->
<Style Selector="^:pressed"> <Style Selector="^:pressed">
<Setter Property="RadioButton.BorderBrush" Value="{DynamicResource RadioButtonCardCheckPressedBorderBrush}" /> <Setter Property="RadioButton.BorderBrush" Value="{DynamicResource RadioButtonCardCheckPressedBorderBrush}" />
<Style Selector="^ /template/ Ellipse#OuterEllipse"> <Style Selector="^ /template/ Ellipse#OuterEllipse">
@@ -284,38 +369,22 @@
<Setter Property="Ellipse.Opacity" Value="1" /> <Setter Property="Ellipse.Opacity" Value="1" />
</Style> </Style>
</Style> </Style>
</Style>
<Style Selector="^:unchecked"> <!-- Checked Disabled State -->
<Style Selector="^ /template/ Ellipse#OuterEllipse"> <Style Selector="^:disabled">
<Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconDefaultBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonUncheckIconDefaultBackground}" />
</Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Ellipse.Opacity" Value="0" />
</Style>
<Style Selector="^:disabled /template/ Ellipse#OuterEllipse">
<Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconDisabledBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonUncheckIconDisabledBackground}" />
</Style>
<Style Selector="^:disabled /template/ Ellipse#CheckGlyph">
<Setter Property="Ellipse.Opacity" Value="0" />
</Style>
<Style Selector="^:pointerover">
<Setter Property="RadioButton.Background" Value="{DynamicResource RadioButtonCardUncheckPointOverBackground}" />
<Style Selector="^ /template/ Ellipse#OuterEllipse"> <Style Selector="^ /template/ Ellipse#OuterEllipse">
<Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconPointOverBorderBrush}" /> <Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconDisabledBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconDisabledBackground}" />
</Style> </Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph"> <Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Ellipse.Opacity" Value="0" /> <Setter Property="Ellipse.Opacity" Value="1" />
</Style> </Style>
</Style> <Style Selector="^ /template/ Border#RootBorder">
<Style Selector="^:pressed"> <Setter Property="BorderBrush" Value="{DynamicResource RadioButtonCheckIconDisabledBackground}" />
<Setter Property="RadioButton.Background" Value="{DynamicResource RadioButtonCardUncheckPressedBackground}" /> <Setter Property="Background" Value="{DynamicResource RadioButtonCardCheckedBackground}" />
<Style Selector="^ /template/ Ellipse#OuterEllipse">
<Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconPressedBorderBrush}" />
</Style> </Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph"> <Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Ellipse.Opacity" Value="0" /> <Setter Property="Foreground" Value="{DynamicResource RadioButtonDisabledForeground}" />
</Style> </Style>
</Style> </Style>
</Style> </Style>
@@ -324,10 +393,10 @@
<ControlTheme x:Key="PureCardRadioButton" TargetType="RadioButton"> <ControlTheme x:Key="PureCardRadioButton" TargetType="RadioButton">
<Setter Property="RadioButton.CornerRadius" Value="{DynamicResource RadioButtonCardCornerRadius}" /> <Setter Property="RadioButton.CornerRadius" Value="{DynamicResource RadioButtonCardCornerRadius}" />
<Setter Property="RadioButton.Cursor" Value="Hand" /> <Setter Property="RadioButton.Cursor" Value="Hand" />
<Setter Property="RadioButton.VerticalContentAlignment" Value="Center" />
<Setter Property="RadioButton.BorderThickness" Value="1" /> <Setter Property="RadioButton.BorderThickness" Value="1" />
<Setter Property="RadioButton.FontSize" Value="{DynamicResource RadioButtonFontSize}" /> <Setter Property="RadioButton.FontSize" Value="{DynamicResource RadioButtonFontSize}" />
<Setter Property="RadioButton.Padding" Value="{DynamicResource RadioButtonCardPadding}" /> <Setter Property="RadioButton.Padding" Value="{DynamicResource RadioButtonCardPadding}" />
<Setter Property="RadioButton.Foreground" Value="{DynamicResource RadioButtonButtonUncheckedForeground}" />
<Setter Property="RadioButton.Background" Value="{DynamicResource RadioButtonCardDefaultBackground}" /> <Setter Property="RadioButton.Background" Value="{DynamicResource RadioButtonCardDefaultBackground}" />
<Setter Property="RadioButton.Template"> <Setter Property="RadioButton.Template">
<ControlTemplate TargetType="RadioButton"> <ControlTemplate TargetType="RadioButton">
@@ -344,29 +413,40 @@
ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplate="{TemplateBinding ContentTemplate}"
CornerRadius="{TemplateBinding CornerRadius}" CornerRadius="{TemplateBinding CornerRadius}"
RecognizesAccessKey="True" RecognizesAccessKey="True"
TextElement.FontSize="{TemplateBinding FontSize}"
TextElement.FontWeight="{TemplateBinding FontWeight}"
UseLayoutRounding="False" /> UseLayoutRounding="False" />
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
<Style Selector="^:checked">
<Setter Property="RadioButton.Background" Value="{DynamicResource RadioButtonCardCheckedBackground}" />
<Setter Property="RadioButton.BorderBrush" Value="{DynamicResource RadioButtonCardCheckDefaultBorderBrush}" />
<Style Selector="^:pointerover">
<Setter Property="RadioButton.BorderBrush" Value="{DynamicResource RadioButtonCardCheckPointOverBorderBrush}" />
</Style>
<Style Selector="^:pressed">
<Setter Property="RadioButton.BorderBrush" Value="{DynamicResource RadioButtonCardCheckPressedBorderBrush}" />
</Style>
</Style>
<Style Selector="^:unchecked"> <Style Selector="^:unchecked">
<Setter Property="RadioButton.BorderBrush" Value="{DynamicResource RadioButtonCardDefaultBorderBrush}" /> <Setter Property="RadioButton.BorderBrush" Value="{DynamicResource RadioButtonCardDefaultBorderBrush}" />
<Style Selector="^:pointerover"> <Style Selector="^:pointerover">
<Setter Property="RadioButton.Background" Value="{DynamicResource RadioButtonCardUncheckPointOverBackground}" /> <Setter Property="RadioButton.Background" Value="{DynamicResource RadioButtonCardUncheckPointeroverBackground}" />
</Style> </Style>
<Style Selector="^:pressed"> <Style Selector="^:pressed">
<Setter Property="RadioButton.Background" Value="{DynamicResource RadioButtonCardUncheckPressedBackground}" /> <Setter Property="RadioButton.Background" Value="{DynamicResource RadioButtonCardUncheckPressedBackground}" />
</Style> </Style>
<Style Selector="^:disabled">
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource RadioButtonDisabledForeground}" />
</Style>
</Style>
</Style> </Style>
<Style Selector="^:checked">
<Setter Property="RadioButton.Background" Value="{DynamicResource RadioButtonCardCheckedBackground}" />
<Setter Property="RadioButton.BorderBrush" Value="{DynamicResource RadioButtonCardCheckDefaultBorderBrush}" />
<Style Selector="^:pointerover">
<Setter Property="RadioButton.BorderBrush" Value="{DynamicResource RadioButtonCardCheckPointeroverBorderBrush}" />
</Style>
<Style Selector="^:pressed">
<Setter Property="RadioButton.BorderBrush" Value="{DynamicResource RadioButtonCardCheckPressedBorderBrush}" />
</Style>
<Style Selector="^:disabled">
<Setter Property="BorderBrush" Value="{DynamicResource RadioButtonCheckIconDisabledBackground}" />
<Setter Property="Background" Value="{DynamicResource RadioButtonCardCheckedBackground}" />
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource RadioButtonDisabledForeground}" />
</Style>
</Style>
</Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -15,6 +15,7 @@
<Setter Property="RepeatButton.HorizontalContentAlignment" Value="Center" /> <Setter Property="RepeatButton.HorizontalContentAlignment" Value="Center" />
<Setter Property="RepeatButton.VerticalContentAlignment" Value="Center" /> <Setter Property="RepeatButton.VerticalContentAlignment" Value="Center" />
<Setter Property="RepeatButton.MinHeight" Value="12" /> <Setter Property="RepeatButton.MinHeight" Value="12" />
<Setter Property="RepeatButton.Cursor" Value="Hand" />
<Setter Property="RepeatButton.Template"> <Setter Property="RepeatButton.Template">
<ControlTemplate TargetType="RepeatButton"> <ControlTemplate TargetType="RepeatButton">
<ContentPresenter <ContentPresenter
@@ -48,6 +49,9 @@
<Style Selector="^.Tertiary"> <Style Selector="^.Tertiary">
<Setter Property="RepeatButton.Foreground" Value="{DynamicResource ButtonDefaultTertiaryForeground}" /> <Setter Property="RepeatButton.Foreground" Value="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Style> </Style>
<Style Selector="^.Success">
<Setter Property="RepeatButton.Foreground" Value="{DynamicResource ButtonDefaultSuccessForeground}" />
</Style>
<Style Selector="^.Warning"> <Style Selector="^.Warning">
<Setter Property="RepeatButton.Foreground" Value="{DynamicResource ButtonDefaultWarningForeground}" /> <Setter Property="RepeatButton.Foreground" Value="{DynamicResource ButtonDefaultWarningForeground}" />
</Style> </Style>
@@ -126,6 +130,19 @@
<Setter Property="RepeatButton.BorderBrush" Value="{DynamicResource ButtonSolidTertiaryPressedBorderBrush}" /> <Setter Property="RepeatButton.BorderBrush" Value="{DynamicResource ButtonSolidTertiaryPressedBorderBrush}" />
</Style> </Style>
</Style> </Style>
<Style Selector="^.Success">
<Setter Property="RepeatButton.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
<Setter Property="RepeatButton.Background" Value="{DynamicResource ButtonSolidSuccessBackground}" />
<Setter Property="RepeatButton.BorderBrush" Value="{DynamicResource ButtonSolidSuccessBorderBrush}" />
<Style Selector="^:pointerover">
<Setter Property="RepeatButton.Background" Value="{DynamicResource ButtonSolidSuccessPointeroverBackground}" />
<Setter Property="RepeatButton.BorderBrush" Value="{DynamicResource ButtonSolidSuccessPointeroverBorderBrush}" />
</Style>
<Style Selector="^:pressed">
<Setter Property="RepeatButton.Background" Value="{DynamicResource ButtonSolidSuccessPressedBackground}" />
<Setter Property="RepeatButton.BorderBrush" Value="{DynamicResource ButtonSolidSuccessPressedBorderBrush}" />
</Style>
</Style>
<Style Selector="^.Warning"> <Style Selector="^.Warning">
<Setter Property="RepeatButton.Foreground" Value="{DynamicResource ButtonSolidForeground}" /> <Setter Property="RepeatButton.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
<Setter Property="RepeatButton.Background" Value="{DynamicResource ButtonSolidWarningBackground}" /> <Setter Property="RepeatButton.Background" Value="{DynamicResource ButtonSolidWarningBackground}" />

View File

@@ -197,7 +197,7 @@
<Setter Property="Fill" Value="{DynamicResource ScrollBarButtonDefaultForeground}" /> <Setter Property="Fill" Value="{DynamicResource ScrollBarButtonDefaultForeground}" />
</Style> </Style>
<Style Selector="^ /template/ RepeatButton:pointerover &gt; Path"> <Style Selector="^ /template/ RepeatButton:pointerover &gt; Path">
<Setter Property="Fill" Value="{DynamicResource ScrollBarButtonPointerOverForeground}" /> <Setter Property="Fill" Value="{DynamicResource ScrollBarButtonPointeroverForeground}" />
</Style> </Style>
</ControlTheme> </ControlTheme>
@@ -208,50 +208,33 @@
<Grid ColumnDefinitions="*,Auto" RowDefinitions="*,Auto"> <Grid ColumnDefinitions="*,Auto" RowDefinitions="*,Auto">
<ScrollContentPresenter <ScrollContentPresenter
Name="PART_ContentPresenter" Name="PART_ContentPresenter"
Grid.RowSpan="2"
Grid.ColumnSpan="2"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
CanHorizontallyScroll="{TemplateBinding CanHorizontallyScroll}" HorizontalSnapPointsAlignment="{TemplateBinding HorizontalSnapPointsAlignment}"
CanVerticallyScroll="{TemplateBinding CanVerticallyScroll}" HorizontalSnapPointsType="{TemplateBinding HorizontalSnapPointsType}"
Content="{TemplateBinding Content}" VerticalSnapPointsAlignment="{TemplateBinding VerticalSnapPointsAlignment}"
Extent="{TemplateBinding Extent, VerticalSnapPointsType="{TemplateBinding VerticalSnapPointsType}">
Mode=TwoWay}"
IsScrollChainingEnabled="{TemplateBinding IsScrollChainingEnabled}"
Viewport="{TemplateBinding Viewport,
Mode=TwoWay}"
Offset="{TemplateBinding Offset,
Mode=TwoWay}">
<ScrollContentPresenter.GestureRecognizers> <ScrollContentPresenter.GestureRecognizers>
<ScrollGestureRecognizer CanHorizontallyScroll="{TemplateBinding CanHorizontallyScroll}" CanVerticallyScroll="{TemplateBinding CanVerticallyScroll}" /> <ScrollGestureRecognizer
CanHorizontallyScroll="{Binding CanHorizontallyScroll, ElementName=PART_ContentPresenter}"
CanVerticallyScroll="{Binding CanVerticallyScroll, ElementName=PART_ContentPresenter}"
IsScrollInertiaEnabled="{Binding IsScrollInertiaEnabled, RelativeSource={RelativeSource TemplatedParent}}" />
</ScrollContentPresenter.GestureRecognizers> </ScrollContentPresenter.GestureRecognizers>
</ScrollContentPresenter> </ScrollContentPresenter>
<ScrollBar <ScrollBar
Name="horizontalScrollBar" Name="PART_HorizontalScrollBar"
Grid.Row="1" Grid.Row="1"
Grid.Column="0" Grid.Column="0"
Focusable="False"
LargeChange="{Binding LargeChange.Width, RelativeSource={RelativeSource TemplatedParent}}"
Maximum="{TemplateBinding HorizontalScrollBarMaximum}"
Opacity="0" Opacity="0"
Orientation="Horizontal" Orientation="Horizontal" />
SmallChange="{Binding SmallChange.Width, RelativeSource={RelativeSource TemplatedParent}}"
ViewportSize="{TemplateBinding HorizontalScrollBarViewportSize}"
Visibility="{TemplateBinding HorizontalScrollBarVisibility}"
Value="{TemplateBinding HorizontalScrollBarValue,
Mode=TwoWay}" />
<ScrollBar <ScrollBar
Name="verticalScrollBar" Name="PART_VerticalScrollBar"
Grid.Row="0" Grid.Row="0"
Grid.Column="1" Grid.Column="1"
Focusable="False"
LargeChange="{Binding LargeChange.Height, RelativeSource={RelativeSource TemplatedParent}}"
Maximum="{TemplateBinding VerticalScrollBarMaximum}"
Opacity="0" Opacity="0"
Orientation="Vertical" Orientation="Vertical" />
SmallChange="{Binding SmallChange.Height, RelativeSource={RelativeSource TemplatedParent}}"
ViewportSize="{TemplateBinding VerticalScrollBarViewportSize}"
Visibility="{TemplateBinding VerticalScrollBarVisibility}"
Value="{TemplateBinding VerticalScrollBarValue,
Mode=TwoWay}" />
<Panel <Panel
Grid.Row="1" Grid.Row="1"
Grid.Column="1" Grid.Column="1"
@@ -260,15 +243,54 @@
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
<Style Selector="^:pointerover"> <Style Selector="^:pointerover">
<Style Selector="^ /template/ ScrollBar#horizontalScrollBar"> <Style Selector="^ /template/ ScrollBar#PART_HorizontalScrollBar">
<Setter Property="Opacity" Value="1" /> <Setter Property="Opacity" Value="1" />
</Style> </Style>
<Style Selector="^ /template/ ScrollBar#verticalScrollBar"> <Style Selector="^ /template/ ScrollBar#PART_VerticalScrollBar">
<Setter Property="Opacity" Value="1" /> <Setter Property="Opacity" Value="1" />
</Style> </Style>
</Style> </Style>
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="StaticScrollViewer" TargetType="ScrollViewer">
<Setter Property="Background" Value="Transparent" />
<Setter Property="Template">
<ControlTemplate TargetType="ScrollViewer">
<Grid ColumnDefinitions="*,Auto" RowDefinitions="*,Auto">
<ScrollContentPresenter
Name="PART_ContentPresenter"
Padding="{TemplateBinding Padding}"
Background="{TemplateBinding Background}"
HorizontalSnapPointsAlignment="{TemplateBinding HorizontalSnapPointsAlignment}"
HorizontalSnapPointsType="{TemplateBinding HorizontalSnapPointsType}"
VerticalSnapPointsAlignment="{TemplateBinding VerticalSnapPointsAlignment}"
VerticalSnapPointsType="{TemplateBinding VerticalSnapPointsType}">
<ScrollContentPresenter.GestureRecognizers>
<ScrollGestureRecognizer
CanHorizontallyScroll="{Binding CanHorizontallyScroll, ElementName=PART_ContentPresenter}"
CanVerticallyScroll="{Binding CanVerticallyScroll, ElementName=PART_ContentPresenter}"
IsScrollInertiaEnabled="{Binding IsScrollInertiaEnabled, RelativeSource={RelativeSource TemplatedParent}}" />
</ScrollContentPresenter.GestureRecognizers>
</ScrollContentPresenter>
<ScrollBar
Name="PART_HorizontalScrollBar"
Grid.Row="1"
Grid.Column="0"
Orientation="Horizontal" />
<ScrollBar
Name="PART_VerticalScrollBar"
Grid.Row="0"
Grid.Column="1"
Orientation="Vertical" />
<Panel
Grid.Row="1"
Grid.Column="1"
Background="{DynamicResource ColorScrollBarBackground}" />
</Grid>
</ControlTemplate>
</Setter>
</ControlTheme>
<ControlTheme x:Key="SimpleMenuScrollViewer" TargetType="ScrollViewer"> <ControlTheme x:Key="SimpleMenuScrollViewer" TargetType="ScrollViewer">
<Setter Property="Background" Value="Transparent" /> <Setter Property="Background" Value="Transparent" />
<Setter Property="Template"> <Setter Property="Template">
@@ -281,10 +303,10 @@
DockPanel.Dock="Top"> DockPanel.Dock="Top">
<RepeatButton.IsVisible> <RepeatButton.IsVisible>
<MultiBinding Converter="{x:Static converters:MenuScrollingVisibilityConverter.Instance}" ConverterParameter="0"> <MultiBinding Converter="{x:Static converters:MenuScrollingVisibilityConverter.Instance}" ConverterParameter="0">
<Binding Path="VerticalScrollBarVisibility" RelativeSource="{RelativeSource TemplatedParent}" /> <ReflectionBinding Path="VerticalScrollBarVisibility" RelativeSource="{RelativeSource TemplatedParent}" />
<Binding Path="Offset.Y" RelativeSource="{RelativeSource TemplatedParent}" /> <ReflectionBinding Path="Offset.Y" RelativeSource="{RelativeSource TemplatedParent}" />
<Binding Path="Extent.Height" RelativeSource="{RelativeSource TemplatedParent}" /> <ReflectionBinding Path="Extent.Height" RelativeSource="{RelativeSource TemplatedParent}" />
<Binding Path="Viewport.Height" RelativeSource="{RelativeSource TemplatedParent}" /> <ReflectionBinding Path="Viewport.Height" RelativeSource="{RelativeSource TemplatedParent}" />
</MultiBinding> </MultiBinding>
</RepeatButton.IsVisible> </RepeatButton.IsVisible>
<Path Data="M 0 4 L 8 4 L 4 0 Z" /> <Path Data="M 0 4 L 8 4 L 4 0 Z" />
@@ -296,26 +318,15 @@
DockPanel.Dock="Bottom"> DockPanel.Dock="Bottom">
<RepeatButton.IsVisible> <RepeatButton.IsVisible>
<MultiBinding Converter="{x:Static converters:MenuScrollingVisibilityConverter.Instance}" ConverterParameter="100"> <MultiBinding Converter="{x:Static converters:MenuScrollingVisibilityConverter.Instance}" ConverterParameter="100">
<Binding Path="VerticalScrollBarVisibility" RelativeSource="{RelativeSource TemplatedParent}" /> <ReflectionBinding Path="VerticalScrollBarVisibility" RelativeSource="{RelativeSource TemplatedParent}" />
<Binding Path="Offset.Y" RelativeSource="{RelativeSource TemplatedParent}" /> <ReflectionBinding Path="Offset.Y" RelativeSource="{RelativeSource TemplatedParent}" />
<Binding Path="Extent.Height" RelativeSource="{RelativeSource TemplatedParent}" /> <ReflectionBinding Path="Extent.Height" RelativeSource="{RelativeSource TemplatedParent}" />
<Binding Path="Viewport.Height" RelativeSource="{RelativeSource TemplatedParent}" /> <ReflectionBinding Path="Viewport.Height" RelativeSource="{RelativeSource TemplatedParent}" />
</MultiBinding> </MultiBinding>
</RepeatButton.IsVisible> </RepeatButton.IsVisible>
<Path Data="M 0 0 L 4 4 L 8 0 Z" /> <Path Data="M 0 0 L 4 4 L 8 0 Z" />
</RepeatButton> </RepeatButton>
<ScrollContentPresenter <ScrollContentPresenter Name="PART_ContentPresenter" Margin="{TemplateBinding Padding}" />
Name="PART_ContentPresenter"
Margin="{TemplateBinding Padding}"
CanHorizontallyScroll="{TemplateBinding CanHorizontallyScroll}"
CanVerticallyScroll="{TemplateBinding CanVerticallyScroll}"
Content="{TemplateBinding Content}"
Extent="{TemplateBinding Extent,
Mode=TwoWay}"
Viewport="{TemplateBinding Viewport,
Mode=TwoWay}"
Offset="{TemplateBinding Offset,
Mode=TwoWay}" />
</DockPanel> </DockPanel>
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
@@ -324,7 +335,7 @@
</Style> </Style>
<Style Selector="^ /template/ RepeatButton:pointerover &gt; Path"> <Style Selector="^ /template/ RepeatButton:pointerover &gt; Path">
<Setter Property="Fill" Value="{DynamicResource ColorScrollBarButtonPointerOverForeground}" /> <Setter Property="Fill" Value="{DynamicResource ColorScrollBarButtonPointeroverForeground}" />
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -60,10 +60,10 @@
CornerRadius="{TemplateBinding CornerRadius}" /> CornerRadius="{TemplateBinding CornerRadius}" />
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
<Style Selector="^:pointerover /template/ Border"> <Style Selector="^:pointerover">
<Setter Property="BorderBrush" Value="{DynamicResource SliderThumbPointeroverBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource SliderThumbPointeroverBorderBrush}" />
</Style> </Style>
<Style Selector="^:pressed /template/ Border"> <Style Selector="^:pressed">
<Setter Property="BorderBrush" Value="{DynamicResource SliderThumbPressedBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource SliderThumbPressedBorderBrush}" />
</Style> </Style>
</ControlTheme> </ControlTheme>
@@ -75,165 +75,155 @@
<Style Selector="^:horizontal"> <Style Selector="^:horizontal">
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="Slider"> <ControlTemplate TargetType="Slider">
<Border <DataValidationErrors>
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}">
<Grid <Grid
x:Name="SliderContainer" x:Name="SliderContainer"
Margin="{TemplateBinding Padding}" Margin="{TemplateBinding Padding}"
Background="Transparent"> Background="Transparent"
RowDefinitions="Auto,Auto,Auto">
<Grid.Styles> <Grid.Styles>
<Style Selector="TickBar"> <Style Selector="TickBar">
<Setter Property="ReservedSpace" Value="{Binding #PART_Track.Thumb.Bounds}" /> <Setter Property="ReservedSpace" Value="{Binding #PART_Track.Thumb.Bounds}" />
</Style> </Style>
</Grid.Styles> </Grid.Styles>
<Grid x:Name="HorizontalTemplate" RowDefinitions="Auto,Auto,Auto"> <TickBar
<TickBar Name="TopTickBar"
Name="TopTickBar" Grid.Row="0"
Grid.Row="0" Height="{DynamicResource SliderTickHorizontalHeight}"
Height="{DynamicResource SliderTickHorizontalHeight}" Margin="0,0,0,4"
Margin="0,0,0,4" VerticalAlignment="Bottom"
VerticalAlignment="Bottom" Fill="{DynamicResource SliderTickForeground}"
Fill="{DynamicResource SliderTickForeground}" IsVisible="False"
IsVisible="False" Maximum="{TemplateBinding Slider.Maximum}"
Maximum="{TemplateBinding Slider.Maximum}" Minimum="{TemplateBinding Slider.Minimum}"
Minimum="{TemplateBinding Slider.Minimum}" Orientation="{TemplateBinding Slider.Orientation}"
Orientation="{TemplateBinding Slider.Orientation}" Placement="Top"
Placement="Top" TickFrequency="{TemplateBinding Slider.TickFrequency}"
TickFrequency="{TemplateBinding Slider.TickFrequency}" Ticks="{TemplateBinding Ticks}" />
Ticks="{TemplateBinding Ticks}" /> <TickBar
<TickBar Name="BottomTickBar"
Name="BottomTickBar" Grid.Row="2"
Grid.Row="2" Height="{DynamicResource SliderTickHorizontalHeight}"
Height="{DynamicResource SliderTickHorizontalHeight}" Margin="0,4,0,0"
Margin="0,4,0,0" VerticalAlignment="Top"
VerticalAlignment="Top" Fill="{DynamicResource SliderTickForeground}"
Fill="{DynamicResource SliderTickForeground}" IsVisible="False"
IsVisible="False" Maximum="{TemplateBinding Slider.Maximum}"
Maximum="{TemplateBinding Slider.Maximum}" Minimum="{TemplateBinding Slider.Minimum}"
Minimum="{TemplateBinding Slider.Minimum}" Orientation="{TemplateBinding Slider.Orientation}"
Orientation="{TemplateBinding Slider.Orientation}" Placement="Bottom"
Placement="Bottom" TickFrequency="{TemplateBinding Slider.TickFrequency}"
TickFrequency="{TemplateBinding Slider.TickFrequency}" Ticks="{TemplateBinding Ticks}" />
Ticks="{TemplateBinding Ticks}" /> <Track
<Track Name="PART_Track"
Name="PART_Track" Grid.Row="1"
Grid.Row="1" IsDirectionReversed="{TemplateBinding IsDirectionReversed}"
IsDirectionReversed="{TemplateBinding IsDirectionReversed}" Maximum="{TemplateBinding Maximum}"
Maximum="{TemplateBinding Maximum}" Minimum="{TemplateBinding Minimum}"
Minimum="{TemplateBinding Minimum}" Orientation="Horizontal"
Orientation="Horizontal" Value="{TemplateBinding Value,
Value="{TemplateBinding Value, Mode=TwoWay}">
Mode=TwoWay}"> <Track.DecreaseButton>
<Track.DecreaseButton> <RepeatButton
<RepeatButton Name="PART_DecreaseButton"
Name="PART_DecreaseButton" Background="{TemplateBinding Foreground}"
Background="{TemplateBinding Foreground}" Focusable="False"
Focusable="False" Theme="{StaticResource SliderHorizontalRepeatButton}" />
Theme="{StaticResource SliderHorizontalRepeatButton}" /> </Track.DecreaseButton>
</Track.DecreaseButton> <Track.IncreaseButton>
<Track.IncreaseButton> <RepeatButton
<RepeatButton Name="PART_IncreaseButton"
Name="PART_IncreaseButton" Background="{TemplateBinding Background}"
Background="{TemplateBinding Background}" Focusable="False"
Focusable="False" Theme="{StaticResource SliderHorizontalRepeatButton}" />
Theme="{StaticResource SliderHorizontalRepeatButton}" /> </Track.IncreaseButton>
</Track.IncreaseButton> <Thumb
<Thumb Name="thumb"
Name="thumb" Width="{DynamicResource SliderThumbWidth}"
Width="{DynamicResource SliderThumbWidth}" Height="{DynamicResource SliderThumbHeight}"
Height="{DynamicResource SliderThumbHeight}" DataContext="{TemplateBinding Value}"
DataContext="{TemplateBinding Value}" Theme="{StaticResource SliderThumbTheme}" />
Theme="{StaticResource SliderThumbTheme}" /> </Track>
</Track>
</Grid>
</Grid> </Grid>
</Border> </DataValidationErrors>
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
</Style> </Style>
<Style Selector="^:vertical"> <Style Selector="^:vertical">
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate> <ControlTemplate>
<Border <DataValidationErrors>
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}">
<Grid <Grid
x:Name="SliderContainer" x:Name="SliderContainer"
MinWidth="{DynamicResource SliderVerticalWidth}"
Margin="{TemplateBinding Padding}" Margin="{TemplateBinding Padding}"
Background="{DynamicResource SliderContainerBackground}"> Background="{DynamicResource SliderContainerBackground}"
ColumnDefinitions="Auto,Auto,Auto">
<Grid.Styles> <Grid.Styles>
<Style Selector="TickBar"> <Style Selector="TickBar">
<Setter Property="ReservedSpace" Value="{Binding #PART_Track.Thumb.Bounds}" /> <Setter Property="ReservedSpace" Value="{Binding #PART_Track.Thumb.Bounds}" />
</Style> </Style>
</Grid.Styles> </Grid.Styles>
<Grid <TickBar
x:Name="VerticalTemplate" Name="LeftTickBar"
MinWidth="{DynamicResource SliderVerticalWidth}" Grid.Column="0"
ColumnDefinitions="Auto,Auto,Auto"> Width="{DynamicResource SliderTickVerticalWidth}"
<TickBar Margin="0,0,4,0"
Name="LeftTickBar" HorizontalAlignment="Right"
Grid.Column="0" Fill="{DynamicResource SliderTickForeground}"
Width="{DynamicResource SliderTickVerticalWidth}" IsVisible="False"
Margin="0,0,4,0" Maximum="{TemplateBinding Slider.Maximum}"
HorizontalAlignment="Right" Minimum="{TemplateBinding Slider.Minimum}"
Fill="{DynamicResource SliderTickForeground}" Orientation="{TemplateBinding Slider.Orientation}"
IsVisible="False" Placement="Left"
Maximum="{TemplateBinding Slider.Maximum}" TickFrequency="{TemplateBinding Slider.TickFrequency}"
Minimum="{TemplateBinding Slider.Minimum}" Ticks="{TemplateBinding Ticks}" />
Orientation="{TemplateBinding Slider.Orientation}" <TickBar
Placement="Left" Name="RightTickBar"
TickFrequency="{TemplateBinding Slider.TickFrequency}" Grid.Column="2"
Ticks="{TemplateBinding Ticks}" /> Width="{DynamicResource SliderTickVerticalWidth}"
<TickBar Margin="4,0,0,0"
Name="RightTickBar" HorizontalAlignment="Left"
Grid.Column="2" Fill="{DynamicResource SliderTickForeground}"
Width="{DynamicResource SliderTickVerticalWidth}" IsVisible="False"
Margin="4,0,0,0" Maximum="{TemplateBinding Slider.Maximum}"
HorizontalAlignment="Left" Minimum="{TemplateBinding Slider.Minimum}"
Fill="{DynamicResource SliderTickForeground}" Orientation="{TemplateBinding Slider.Orientation}"
IsVisible="False" Placement="Right"
Maximum="{TemplateBinding Slider.Maximum}" TickFrequency="{TemplateBinding Slider.TickFrequency}"
Minimum="{TemplateBinding Slider.Minimum}" Ticks="{TemplateBinding Ticks}" />
Orientation="{TemplateBinding Slider.Orientation}" <Track
Placement="Right" Name="PART_Track"
TickFrequency="{TemplateBinding Slider.TickFrequency}" Grid.Column="1"
Ticks="{TemplateBinding Ticks}" /> IsDirectionReversed="{TemplateBinding IsDirectionReversed}"
<Track Maximum="{TemplateBinding Maximum}"
Name="PART_Track" Minimum="{TemplateBinding Minimum}"
Grid.Column="1" Orientation="Vertical"
IsDirectionReversed="{TemplateBinding IsDirectionReversed}" Value="{TemplateBinding Value,
Maximum="{TemplateBinding Maximum}" Mode=TwoWay}">
Minimum="{TemplateBinding Minimum}" <Track.DecreaseButton>
Orientation="Vertical" <RepeatButton
Value="{TemplateBinding Value, Name="PART_DecreaseButton"
Mode=TwoWay}"> Background="{TemplateBinding Foreground}"
<Track.DecreaseButton> Focusable="False"
<RepeatButton Theme="{StaticResource SliderVerticalRepeatButton}" />
Name="PART_DecreaseButton" </Track.DecreaseButton>
Background="{TemplateBinding Foreground}" <Track.IncreaseButton>
Focusable="False" <RepeatButton
Theme="{StaticResource SliderVerticalRepeatButton}" /> Name="PART_IncreaseButton"
</Track.DecreaseButton> Background="{TemplateBinding Background}"
<Track.IncreaseButton> Focusable="False"
<RepeatButton Theme="{StaticResource SliderVerticalRepeatButton}" />
Name="PART_IncreaseButton" </Track.IncreaseButton>
Background="{TemplateBinding Background}" <Thumb
Focusable="False" Name="thumb"
Theme="{StaticResource SliderVerticalRepeatButton}" /> Width="{DynamicResource SliderThumbWidth}"
</Track.IncreaseButton> Height="{DynamicResource SliderThumbHeight}"
<Thumb DataContext="{TemplateBinding Value}"
Name="thumb" Theme="{StaticResource SliderThumbTheme}" />
Width="{DynamicResource SliderThumbWidth}" </Track>
Height="{DynamicResource SliderThumbHeight}"
DataContext="{TemplateBinding Value}"
Theme="{StaticResource SliderThumbTheme}" />
</Track>
</Grid>
</Grid> </Grid>
</Border> </DataValidationErrors>
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
</Style> </Style>
@@ -263,6 +253,10 @@
<Setter Property="IsVisible" Value="True" /> <Setter Property="IsVisible" Value="True" />
</Style> </Style>
<Style Selector="^:error /template/ Thumb#thumb">
<Setter Property="Thumb.BorderBrush" Value="{DynamicResource DataValidationErrorsSelectedBorderBrush}" />
</Style>
<!-- Disabled State --> <!-- Disabled State -->
<Style Selector="^:disabled"> <Style Selector="^:disabled">

View File

@@ -82,6 +82,9 @@
<Style Selector="^.Tertiary /template/ Button"> <Style Selector="^.Tertiary /template/ Button">
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultTertiaryForeground}" /> <Setter Property="Foreground" Value="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Style> </Style>
<Style Selector="^.Success /template/ Button">
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultSuccessForeground}" />
</Style>
<Style Selector="^.Warning /template/ Button"> <Style Selector="^.Warning /template/ Button">
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultWarningForeground}" /> <Setter Property="Foreground" Value="{DynamicResource ButtonDefaultWarningForeground}" />
</Style> </Style>
@@ -101,6 +104,10 @@
<Setter Property="Background" Value="{DynamicResource ButtonSolidTertiaryBackground}" /> <Setter Property="Background" Value="{DynamicResource ButtonSolidTertiaryBackground}" />
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" /> <Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
</Style> </Style>
<Style Selector="^.Success /template/ Button">
<Setter Property="Background" Value="{DynamicResource ButtonSolidSuccessBackground}" />
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
</Style>
<Style Selector="^.Warning /template/ Button"> <Style Selector="^.Warning /template/ Button">
<Setter Property="Background" Value="{DynamicResource ButtonSolidWarningBackground}" /> <Setter Property="Background" Value="{DynamicResource ButtonSolidWarningBackground}" />
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" /> <Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
@@ -110,10 +117,110 @@
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" /> <Setter Property="Foreground" Value="{DynamicResource ButtonSolidForeground}" />
</Style> </Style>
</Style> </Style>
<Style Selector="^.Large /template/ Button">
<Setter Property="Padding" Value="{DynamicResource ButtonLargePadding}" />
</Style>
<Style Selector="^.Small /template/ Button">
<Setter Property="Padding" Value="{DynamicResource ButtonSmallPadding}" />
</Style>
<Style Selector="^:disabled /template/ Button"> <Style Selector="^:disabled /template/ Button">
<Setter Property="Background" Value="{DynamicResource ButtonDefaultDisabledBackground}" /> <Setter Property="Background" Value="{DynamicResource ButtonDefaultDisabledBackground}" />
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" /> <Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
</Style> </Style>
</ControlTheme> </ControlTheme>
<ControlTheme
x:Key="SolidSplitButton"
BasedOn="{StaticResource {x:Type SplitButton}}"
TargetType="SplitButton">
<Setter Property="SplitButton.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
<Setter Property="SplitButton.Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" />
<Style Selector="^ /template/ Button">
<Style Selector="^:pointerover">
<Setter Property="SplitButton.Background" Value="{DynamicResource ButtonSolidPrimaryPointeroverBackground}" />
</Style>
<Style Selector="^:pressed">
<Setter Property="SplitButton.Background" Value="{DynamicResource ButtonSolidPrimaryPressedBackground}" />
</Style>
</Style>
<Style Selector="^.Primary /template/ Button">
<Setter Property="SplitButton.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
<Setter Property="SplitButton.Background" Value="{DynamicResource ButtonSolidPrimaryBackground}" />
<Style Selector="^:pointerover">
<Setter Property="SplitButton.Background" Value="{DynamicResource ButtonSolidPrimaryPointeroverBackground}" />
</Style>
<Style Selector="^:pressed">
<Setter Property="SplitButton.Background" Value="{DynamicResource ButtonSolidPrimaryPressedBackground}" />
</Style>
</Style>
<Style Selector="^.Secondary /template/ Button">
<Setter Property="SplitButton.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
<Setter Property="SplitButton.Background" Value="{DynamicResource ButtonSolidSecondaryBackground}" />
<Style Selector="^:pointerover">
<Setter Property="SplitButton.Background" Value="{DynamicResource ButtonSolidSecondaryPointeroverBackground}" />
</Style>
<Style Selector="^:pressed">
<Setter Property="SplitButton.Background" Value="{DynamicResource ButtonSolidSecondaryPressedBackground}" />
</Style>
</Style>
<Style Selector="^.Tertiary /template/ Button">
<Setter Property="SplitButton.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
<Setter Property="SplitButton.Background" Value="{DynamicResource ButtonSolidTertiaryBackground}" />
<Style Selector="^:pointerover">
<Setter Property="SplitButton.Background" Value="{DynamicResource ButtonSolidTertiaryPointeroverBackground}" />
</Style>
<Style Selector="^:pressed">
<Setter Property="SplitButton.Background" Value="{DynamicResource ButtonSolidTertiaryPressedBackground}" />
</Style>
</Style>
<Style Selector="^.Success /template/ Button">
<Setter Property="SplitButton.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
<Setter Property="SplitButton.Background" Value="{DynamicResource ButtonSolidSuccessBackground}" />
<Style Selector="^:pointerover">
<Setter Property="SplitButton.Background" Value="{DynamicResource ButtonSolidSuccessPointeroverBackground}" />
</Style>
<Style Selector="^:pressed">
<Setter Property="SplitButton.Background" Value="{DynamicResource ButtonSolidSuccessPressedBackground}" />
</Style>
</Style>
<Style Selector="^.Warning /template/ Button">
<Setter Property="SplitButton.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
<Setter Property="SplitButton.Background" Value="{DynamicResource ButtonSolidWarningBackground}" />
<Style Selector="^:pointerover">
<Setter Property="SplitButton.Background" Value="{DynamicResource ButtonSolidWarningPointeroverBackground}" />
</Style>
<Style Selector="^:pressed">
<Setter Property="SplitButton.Background" Value="{DynamicResource ButtonSolidWarningPressedBackground}" />
</Style>
</Style>
<Style Selector="^.Danger /template/ Button">
<Setter Property="SplitButton.Foreground" Value="{DynamicResource ButtonSolidForeground}" />
<Setter Property="SplitButton.Background" Value="{DynamicResource ButtonSolidDangerBackground}" />
<Style Selector="^:pointerover">
<Setter Property="SplitButton.Background" Value="{DynamicResource ButtonSolidDangerPointeroverBackground}" />
</Style>
<Style Selector="^:pressed">
<Setter Property="SplitButton.Background" Value="{DynamicResource ButtonSolidDangerPressedBackground}" />
</Style>
</Style>
<Style Selector="^:disabled /template/ Button">
<Setter Property="SplitButton.Background" Value="{DynamicResource ButtonDefaultDisabledBackground}" />
<Setter Property="SplitButton.Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
</Style>
</ControlTheme>
<ControlTheme
x:Key="BorderlessSplitButton"
BasedOn="{StaticResource {x:Type SplitButton}}"
TargetType="SplitButton">
<Setter Property="SplitButton.Background" Value="Transparent" />
<Setter Property="SplitButton.BorderBrush" Value="Transparent" />
<Style Selector="^:disabled /template/ Button">
<Setter Property="SplitButton.BorderBrush" Value="Transparent" />
<Setter Property="SplitButton.Background" Value="Transparent" />
<Setter Property="SplitButton.Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
</Style>
</ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -61,7 +61,7 @@
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
<Style Selector="^:pointerover"> <Style Selector="^:pointerover">
<Setter Property="Button.Foreground" Value="{DynamicResource TextBoxButtonPointerOverForeground}" /> <Setter Property="Button.Foreground" Value="{DynamicResource TextBoxButtonPointeroverForeground}" />
</Style> </Style>
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="InputToggleButton" TargetType="ToggleButton"> <ControlTheme x:Key="InputToggleButton" TargetType="ToggleButton">
@@ -94,9 +94,8 @@
<Setter Property="TextBox.BorderThickness" Value="{DynamicResource TextBoxBorderThickness}" /> <Setter Property="TextBox.BorderThickness" Value="{DynamicResource TextBoxBorderThickness}" />
<Setter Property="TextBox.CornerRadius" Value="{DynamicResource TextBoxDefaultCornerRadius}" /> <Setter Property="TextBox.CornerRadius" Value="{DynamicResource TextBoxDefaultCornerRadius}" />
<Setter Property="TextBox.FontSize" Value="14" /> <Setter Property="TextBox.FontSize" Value="14" />
<Setter Property="TextBox.Cursor" Value="IBeam" /> <Setter Property="TextBox.Cursor" Value="Ibeam" />
<Setter Property="TextBox.CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" /> <Setter Property="TextBox.CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" />
<Setter Property="TextBox.MinHeight" Value="{DynamicResource TextBoxWrapperDefaultHeight}" />
<Setter Property="TextBox.Padding" Value="{DynamicResource TextBoxContentPadding}" /> <Setter Property="TextBox.Padding" Value="{DynamicResource TextBoxContentPadding}" />
<Setter Property="TextBox.VerticalContentAlignment" Value="Center" /> <Setter Property="TextBox.VerticalContentAlignment" Value="Center" />
<Setter Property="TextBox.FocusAdorner" Value="{x:Null}" /> <Setter Property="TextBox.FocusAdorner" Value="{x:Null}" />
@@ -104,79 +103,82 @@
<Setter Property="TextBox.ContextFlyout" Value="{StaticResource DefaultTextBoxContextFlyout}" /> <Setter Property="TextBox.ContextFlyout" Value="{StaticResource DefaultTextBoxContextFlyout}" />
<Setter Property="TextBox.Template"> <Setter Property="TextBox.Template">
<ControlTemplate TargetType="TextBox"> <ControlTemplate TargetType="TextBox">
<Border <DataValidationErrors>
Name="PART_ContentPresenterBorder" <Border
Background="{TemplateBinding Background}" Name="PART_ContentPresenterBorder"
BorderBrush="{TemplateBinding BorderBrush}" MinHeight="{DynamicResource TextBoxWrapperDefaultHeight}"
BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"
CornerRadius="{TemplateBinding CornerRadius}"> BorderBrush="{TemplateBinding BorderBrush}"
<Grid Margin="{TemplateBinding Padding}" ColumnDefinitions="Auto,*,Auto, Auto, Auto"> BorderThickness="{TemplateBinding BorderThickness}"
<ContentPresenter CornerRadius="{TemplateBinding CornerRadius}">
Grid.Column="0" <Grid Margin="{TemplateBinding Padding}" ColumnDefinitions="Auto,*,Auto, Auto, Auto">
Padding="{DynamicResource TextBoxInnerLeftContentPadding}" <ContentPresenter
VerticalAlignment="Center" Grid.Column="0"
Content="{TemplateBinding InnerLeftContent}" Padding="{DynamicResource TextBoxInnerLeftContentPadding}"
Foreground="{DynamicResource TextBoxInnerForeground}" VerticalAlignment="Center"
IsVisible="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=InnerLeftContent, Converter={x:Static ObjectConverters.IsNotNull}}" /> Content="{TemplateBinding InnerLeftContent}"
<ScrollViewer Foreground="{DynamicResource TextBoxInnerForeground}"
Grid.Column="1" IsVisible="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=InnerLeftContent, Converter={x:Static ObjectConverters.IsNotNull}}" />
AllowAutoHide="{TemplateBinding (ScrollViewer.AllowAutoHide)}" <ScrollViewer
HorizontalScrollBarVisibility="{TemplateBinding (ScrollViewer.HorizontalScrollBarVisibility)}" Grid.Column="1"
IsScrollChainingEnabled="{TemplateBinding (ScrollViewer.IsScrollChainingEnabled)}" AllowAutoHide="{TemplateBinding (ScrollViewer.AllowAutoHide)}"
VerticalScrollBarVisibility="{TemplateBinding (ScrollViewer.VerticalScrollBarVisibility)}"> HorizontalScrollBarVisibility="{TemplateBinding (ScrollViewer.HorizontalScrollBarVisibility)}"
<Panel> IsScrollChainingEnabled="{TemplateBinding (ScrollViewer.IsScrollChainingEnabled)}"
<TextBlock VerticalScrollBarVisibility="{TemplateBinding (ScrollViewer.VerticalScrollBarVisibility)}">
Name="PART_Watermark" <Panel>
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" <TextBlock
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Name="PART_Watermark"
IsVisible="{TemplateBinding Text, HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Converter={x:Static StringConverters.IsNullOrEmpty}}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Opacity="0.5" IsVisible="{TemplateBinding Text,
Text="{TemplateBinding Watermark}" Converter={x:Static StringConverters.IsNullOrEmpty}}"
TextAlignment="{TemplateBinding TextAlignment}" Opacity="0.5"
TextWrapping="{TemplateBinding TextWrapping}" /> Text="{TemplateBinding Watermark}"
<TextPresenter TextAlignment="{TemplateBinding TextAlignment}"
Name="PART_TextPresenter" TextWrapping="{TemplateBinding TextWrapping}" />
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" <TextPresenter
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Name="PART_TextPresenter"
CaretBrush="{TemplateBinding CaretBrush}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
CaretIndex="{TemplateBinding CaretIndex}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
LineHeight="{TemplateBinding LineHeight}" CaretBrush="{TemplateBinding CaretBrush}"
PasswordChar="{TemplateBinding PasswordChar}" CaretIndex="{TemplateBinding CaretIndex}"
RevealPassword="{TemplateBinding RevealPassword}" LineHeight="{TemplateBinding LineHeight}"
SelectionBrush="{TemplateBinding SelectionBrush}" PasswordChar="{TemplateBinding PasswordChar}"
SelectionEnd="{TemplateBinding SelectionEnd}" RevealPassword="{TemplateBinding RevealPassword}"
SelectionForegroundBrush="{TemplateBinding SelectionForegroundBrush}" SelectionBrush="{TemplateBinding SelectionBrush}"
SelectionStart="{TemplateBinding SelectionStart}" SelectionEnd="{TemplateBinding SelectionEnd}"
Text="{TemplateBinding Text, SelectionForegroundBrush="{TemplateBinding SelectionForegroundBrush}"
Mode=TwoWay}" SelectionStart="{TemplateBinding SelectionStart}"
TextAlignment="{TemplateBinding TextAlignment}" Text="{TemplateBinding Text,
TextWrapping="{TemplateBinding TextWrapping}" /> Mode=TwoWay}"
</Panel> TextAlignment="{TemplateBinding TextAlignment}"
</ScrollViewer> TextWrapping="{TemplateBinding TextWrapping}" />
<Button </Panel>
Name="PART_ClearButton" </ScrollViewer>
Grid.Column="2" <Button
Command="{Binding $parent[TextBox].Clear}" Name="PART_ClearButton"
IsVisible="False" Grid.Column="2"
Theme="{StaticResource InputClearButton}" /> Command="{Binding $parent[TextBox].Clear}"
<ToggleButton IsVisible="False"
Name="PART_RevealButton" Theme="{StaticResource InputClearButton}" />
Grid.Column="3" <ToggleButton
Margin="4,0,0,0" Name="PART_RevealButton"
IsChecked="{TemplateBinding RevealPassword, Grid.Column="3"
Mode=TwoWay}" Margin="4,0,0,0"
IsVisible="False" IsChecked="{TemplateBinding RevealPassword,
Theme="{StaticResource InputToggleButton}" /> Mode=TwoWay}"
<ContentPresenter IsVisible="False"
Grid.Column="4" Theme="{StaticResource InputToggleButton}" />
Padding="{DynamicResource TextBoxInnerRightContentPadding}" <ContentPresenter
VerticalAlignment="Center" Grid.Column="4"
Content="{TemplateBinding InnerRightContent}" Padding="{DynamicResource TextBoxInnerRightContentPadding}"
Foreground="{DynamicResource TextBoxInnerForeground}" VerticalAlignment="Center"
IsVisible="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=InnerRightContent, Converter={x:Static ObjectConverters.IsNotNull}}" /> Content="{TemplateBinding InnerRightContent}"
</Grid> Foreground="{DynamicResource TextBoxInnerForeground}"
</Border> IsVisible="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=InnerRightContent, Converter={x:Static ObjectConverters.IsNotNull}}" />
</Grid>
</Border>
</DataValidationErrors>
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
@@ -196,6 +198,26 @@
<Style Selector="^:disabled"> <Style Selector="^:disabled">
<Setter Property="TextBox.Foreground" Value="{DynamicResource TextBoxDisabledForeground}" /> <Setter Property="TextBox.Foreground" Value="{DynamicResource TextBoxDisabledForeground}" />
</Style> </Style>
<Style Selector="^:error">
<Style Selector="^ /template/ Border#PART_ContentPresenterBorder">
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsBackground}" />
<Setter Property="BorderBrush" Value="Transparent" />
</Style>
<Style Selector="^:pointerover /template/ Border#PART_ContentPresenterBorder">
<Setter Property="Border.Background" Value="{DynamicResource DataValidationErrorsPointerOverBackground}" />
<Setter Property="Border.BorderBrush" Value="Transparent" />
</Style>
<Style Selector="^:pressed /template/ Border#PART_ContentPresenterBorder">
<Setter Property="Border.Background" Value="{DynamicResource DataValidationErrorsPressedBackground}" />
<Setter Property="Border.BorderBrush" Value="Transparent" />
</Style>
<Style Selector="^:focus /template/ Border#PART_ContentPresenterBorder">
<Setter Property="Border.Background" Value="{DynamicResource DataValidationErrorsSelectedBackground}" />
<Setter Property="Border.BorderBrush" Value="{DynamicResource DataValidationErrorsSelectedBorderBrush}" />
</Style>
</Style>
<Style Selector="^.clearButton, ^.ClearButton"> <Style Selector="^.clearButton, ^.ClearButton">
<Style Selector="^[AcceptsReturn=False][IsReadOnly=False]:focus:not(:empty) /template/ Button#PART_ClearButton"> <Style Selector="^[AcceptsReturn=False][IsReadOnly=False]:focus:not(:empty) /template/ Button#PART_ClearButton">
<Setter Property="Button.IsVisible" Value="True" /> <Setter Property="Button.IsVisible" Value="True" />
@@ -209,11 +231,11 @@
<Setter Property="ToggleButton.IsVisible" Value="True" /> <Setter Property="ToggleButton.IsVisible" Value="True" />
</Style> </Style>
</Style> </Style>
<Style Selector="^.Large"> <Style Selector="^.Large /template/ Border#PART_ContentPresenterBorder">
<Setter Property="TextBox.MinHeight" Value="{DynamicResource TextBoxWrapperLargeHeight}" /> <Setter Property="MinHeight" Value="{DynamicResource TextBoxWrapperLargeHeight}" />
</Style> </Style>
<Style Selector="^.Small"> <Style Selector="^.Small /template/ Border#PART_ContentPresenterBorder">
<Setter Property="TextBox.MinHeight" Value="{DynamicResource TextBoxWrapperSmallHeight}" /> <Setter Property="MinHeight" Value="{DynamicResource TextBoxWrapperSmallHeight}" />
</Style> </Style>
<Style Selector="^.Bordered"> <Style Selector="^.Bordered">
@@ -231,6 +253,139 @@
<Setter Property="TextBox.Background" Value="{DynamicResource TextBoxDisabledBackground}" /> <Setter Property="TextBox.Background" Value="{DynamicResource TextBoxDisabledBackground}" />
<Setter Property="TextBox.BorderBrush" Value="{DynamicResource TextBoxDisabledBorderBrush}" /> <Setter Property="TextBox.BorderBrush" Value="{DynamicResource TextBoxDisabledBorderBrush}" />
</Style> </Style>
<Style Selector="^:error">
<Style Selector="^ /template/ Border#PART_ContentPresenterBorder">
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource DataValidationErrorsBorderBrush}" />
</Style>
<Style Selector="^:pointerover /template/ Border#PART_ContentPresenterBorder">
<Setter Property="Border.Background" Value="{DynamicResource DataValidationErrorsPointerOverBackground}" />
<Setter Property="Border.BorderBrush" Value="{DynamicResource DataValidationErrorsPointerOverBorderBrush}" />
</Style>
<Style Selector="^:pressed /template/ Border#PART_ContentPresenterBorder">
<Setter Property="Border.Background" Value="{DynamicResource DataValidationErrorsPressedBackground}" />
<Setter Property="Border.BorderBrush" Value="{DynamicResource DataValidationErrorsPressedBorderBrush}" />
</Style>
<Style Selector="^:focus /template/ Border#PART_ContentPresenterBorder">
<Setter Property="Border.Background" Value="{DynamicResource DataValidationErrorsSelectedBackground}" />
<Setter Property="Border.BorderBrush" Value="{DynamicResource DataValidationErrorsSelectedBorderBrush}" />
</Style>
</Style>
</Style>
</ControlTheme>
<ControlTheme x:Key="NonErrorTextBox" TargetType="TextBox">
<Setter Property="TextBox.Foreground" Value="{DynamicResource TextBoxForeground}" />
<Setter Property="TextBox.Background" Value="{DynamicResource TextBoxDefaultBackground}" />
<Setter Property="TextBox.BorderBrush" Value="{DynamicResource TextBoxDefaultBorderBrush}" />
<Setter Property="TextBox.SelectionBrush" Value="{DynamicResource TextBoxSelectionBackground}" />
<Setter Property="TextBox.SelectionForegroundBrush" Value="{DynamicResource TextBoxSelectionForeground}" />
<Setter Property="TextBox.BorderThickness" Value="{DynamicResource TextBoxBorderThickness}" />
<Setter Property="TextBox.CornerRadius" Value="{DynamicResource TextBoxDefaultCornerRadius}" />
<Setter Property="TextBox.FontSize" Value="14" />
<Setter Property="TextBox.Cursor" Value="Ibeam" />
<Setter Property="TextBox.CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" />
<Setter Property="TextBox.Padding" Value="{DynamicResource TextBoxContentPadding}" />
<Setter Property="TextBox.MinHeight" Value="{DynamicResource TextBoxWrapperDefaultHeight}" />
<Setter Property="TextBox.VerticalContentAlignment" Value="Center" />
<Setter Property="TextBox.FocusAdorner" Value="{x:Null}" />
<Setter Property="ScrollViewer.IsScrollChainingEnabled" Value="True" />
<Setter Property="TextBox.ContextFlyout" Value="{StaticResource DefaultTextBoxContextFlyout}" />
<Setter Property="TextBox.Template">
<ControlTemplate TargetType="TextBox">
<DataValidationErrors Theme="{DynamicResource SilentDataValidationErrors}">
<Border
Name="PART_ContentPresenterBorder"
MinHeight="{TemplateBinding MinHeight}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}">
<Grid Margin="{TemplateBinding Padding}" ColumnDefinitions="Auto, *">
<ContentPresenter
Grid.Column="0"
Padding="{DynamicResource TextBoxInnerLeftContentPadding}"
VerticalAlignment="Center"
Content="{TemplateBinding InnerLeftContent}"
Foreground="{DynamicResource TextBoxInnerForeground}"
IsVisible="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=InnerLeftContent, Converter={x:Static ObjectConverters.IsNotNull}}" />
<ScrollViewer
Grid.Column="1"
AllowAutoHide="{TemplateBinding (ScrollViewer.AllowAutoHide)}"
HorizontalScrollBarVisibility="{TemplateBinding (ScrollViewer.HorizontalScrollBarVisibility)}"
IsScrollChainingEnabled="{TemplateBinding (ScrollViewer.IsScrollChainingEnabled)}"
VerticalScrollBarVisibility="{TemplateBinding (ScrollViewer.VerticalScrollBarVisibility)}">
<Panel>
<TextBlock
Name="PART_Watermark"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
IsVisible="{TemplateBinding Text,
Converter={x:Static StringConverters.IsNullOrEmpty}}"
Opacity="0.5"
Text="{TemplateBinding Watermark}"
TextAlignment="{TemplateBinding TextAlignment}"
TextWrapping="{TemplateBinding TextWrapping}" />
<TextPresenter
Name="PART_TextPresenter"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
CaretBrush="{TemplateBinding CaretBrush}"
CaretIndex="{TemplateBinding CaretIndex}"
LineHeight="{TemplateBinding LineHeight}"
PasswordChar="{TemplateBinding PasswordChar}"
RevealPassword="{TemplateBinding RevealPassword}"
SelectionBrush="{TemplateBinding SelectionBrush}"
SelectionEnd="{TemplateBinding SelectionEnd}"
SelectionForegroundBrush="{TemplateBinding SelectionForegroundBrush}"
SelectionStart="{TemplateBinding SelectionStart}"
Text="{TemplateBinding Text,
Mode=TwoWay}"
TextAlignment="{TemplateBinding TextAlignment}"
TextWrapping="{TemplateBinding TextWrapping}" />
</Panel>
</ScrollViewer>
</Grid>
</Border>
</DataValidationErrors>
</ControlTemplate>
</Setter>
<Style Selector="^:pointerover /template/ Border#PART_ContentPresenterBorder">
<Setter Property="Border.Background" Value="{DynamicResource TextBoxPointeroverBackground}" />
</Style>
<Style Selector="^:pressed /template/ Border#PART_ContentPresenterBorder">
<Setter Property="Border.Background" Value="{DynamicResource TextBoxPressedBackground}" />
</Style>
<Style Selector="^:focus /template/ Border#PART_ContentPresenterBorder">
<Setter Property="Border.BorderBrush" Value="{DynamicResource TextBoxFocusBorderBrush}" />
</Style>
<Style Selector="^:disabled /template/ Border#PART_ContentPresenterBorder">
<Setter Property="Border.BorderBrush" Value="{DynamicResource TextBoxDisabledBorderBrush}" />
<Setter Property="Border.Background" Value="{DynamicResource TextBoxDisabledBackground}" />
</Style>
<Style Selector="^:disabled">
<Setter Property="TextBox.Foreground" Value="{DynamicResource TextBoxDisabledForeground}" />
</Style>
<Style Selector="^:error">
<Style Selector="^ /template/ Border#PART_ContentPresenterBorder">
<Setter Property="Background" Value="{DynamicResource DataValidationErrorsBackground}" />
<Setter Property="BorderBrush" Value="Transparent" />
</Style>
<Style Selector="^:pointerover /template/ Border#PART_ContentPresenterBorder">
<Setter Property="Border.Background" Value="{DynamicResource DataValidationErrorsPointerOverBackground}" />
<Setter Property="Border.BorderBrush" Value="Transparent" />
</Style>
<Style Selector="^:pressed /template/ Border#PART_ContentPresenterBorder">
<Setter Property="Border.Background" Value="{DynamicResource DataValidationErrorsPressedBackground}" />
<Setter Property="Border.BorderBrush" Value="Transparent" />
</Style>
<Style Selector="^:focus /template/ Border#PART_ContentPresenterBorder">
<Setter Property="Border.Background" Value="{DynamicResource DataValidationErrorsSelectedBackground}" />
<Setter Property="Border.BorderBrush" Value="{DynamicResource DataValidationErrorsSelectedBorderBrush}" />
</Style>
</Style> </Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -129,7 +129,6 @@
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="{x:Type TimePicker}" TargetType="TimePicker"> <ControlTheme x:Key="{x:Type TimePicker}" TargetType="TimePicker">
<Setter Property="MinHeight" Value="{DynamicResource DateTimePickerButtonDefaultHeight}" />
<Setter Property="Foreground" Value="{DynamicResource DateTimePickerButtonForeground}" /> <Setter Property="Foreground" Value="{DynamicResource DateTimePickerButtonForeground}" />
<Setter Property="Background" Value="{DynamicResource DateTimePickerButtonBackground}" /> <Setter Property="Background" Value="{DynamicResource DateTimePickerButtonBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource DateTimePickerButtonBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource DateTimePickerButtonBorderBrush}" />
@@ -139,106 +138,110 @@
<Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate> <ControlTemplate>
<Grid Name="LayoutRoot" Margin="{TemplateBinding Padding}"> <DataValidationErrors>
<Button <Grid Name="LayoutRoot" Margin="{TemplateBinding Padding}">
x:Name="PART_FlyoutButton" <Button
Width="242" x:Name="PART_FlyoutButton"
MinWidth="242" Width="242"
HorizontalAlignment="Stretch" MinWidth="242"
VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
Background="{TemplateBinding Background}" VerticalAlignment="Stretch"
BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}"
BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}"
CornerRadius="{TemplateBinding CornerRadius}" BorderThickness="{TemplateBinding BorderThickness}"
Cursor="Hand" CornerRadius="{TemplateBinding CornerRadius}"
Foreground="{TemplateBinding Foreground}" Cursor="Hand"
IsEnabled="{TemplateBinding IsEnabled}" DataValidationErrors.Errors="{TemplateBinding (DataValidationErrors.Errors)}"
Theme="{StaticResource DateTimePickerFlyoutButton}"> Foreground="{TemplateBinding Foreground}"
<Grid ColumnDefinitions="*, Auto"> IsEnabled="{TemplateBinding IsEnabled}"
<Grid Name="PART_FlyoutButtonContentGrid" Grid.Column="0"> MinHeight="{DynamicResource DateTimePickerButtonDefaultHeight}"
<!-- Ignore col defs here, set in code --> Theme="{StaticResource DateTimePickerFlyoutButton}">
<Border <Grid ColumnDefinitions="*, Auto">
x:Name="PART_FirstPickerHost" <Grid Name="PART_FlyoutButtonContentGrid" Grid.Column="0">
Grid.Column="0" <!-- Ignore col defs here, set in code -->
HorizontalAlignment="Stretch" <Border
VerticalAlignment="Stretch"> x:Name="PART_FirstPickerHost"
<TextBlock Grid.Column="0"
x:Name="PART_HourTextBlock" HorizontalAlignment="Stretch"
Padding="12,4" VerticalAlignment="Stretch">
HorizontalAlignment="Center" <TextBlock
VerticalAlignment="Center" x:Name="PART_HourTextBlock"
FontFamily="{TemplateBinding FontFamily}" Padding="12,4"
FontSize="{TemplateBinding FontSize}" HorizontalAlignment="Center"
FontWeight="{TemplateBinding FontWeight}" /> VerticalAlignment="Center"
</Border> FontFamily="{TemplateBinding FontFamily}"
FontSize="{TemplateBinding FontSize}"
FontWeight="{TemplateBinding FontWeight}" />
</Border>
<Rectangle <Rectangle
Name="PART_FirstColumnDivider" Name="PART_FirstColumnDivider"
Grid.Column="1"
Width="1"
Margin="0,4"
HorizontalAlignment="Center"
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
<Border
x:Name="PART_SecondPickerHost"
Grid.Column="2"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch">
<TextBlock
x:Name="PART_MinuteTextBlock"
Padding="12,4"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontFamily="{TemplateBinding FontFamily}"
FontSize="{TemplateBinding FontSize}"
FontWeight="{TemplateBinding FontWeight}" />
</Border>
<Rectangle
Name="PART_SecondColumnDivider"
Grid.Column="3"
Width="1"
Margin="0,4"
HorizontalAlignment="Center"
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
<Border
x:Name="PART_ThirdPickerHost"
Grid.Column="4"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch">
<TextBlock
x:Name="PART_PeriodTextBlock"
Padding="12,4"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontFamily="{TemplateBinding FontFamily}"
FontSize="{TemplateBinding FontSize}"
FontWeight="{TemplateBinding FontWeight}" />
</Border>
</Grid>
<PathIcon
Name="PART_Icon"
Grid.Column="1" Grid.Column="1"
Width="1" Width="16"
Margin="0,4" Height="16"
HorizontalAlignment="Center" Margin="0,0,8,0"
Fill="{DynamicResource DateTimePickerSeparatorBackground}" /> Data="{DynamicResource TimePickerIconGlyph}"
Foreground="{DynamicResource DateTimePickerIconForeground}" />
<Border
x:Name="PART_SecondPickerHost"
Grid.Column="2"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch">
<TextBlock
x:Name="PART_MinuteTextBlock"
Padding="12,4"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontFamily="{TemplateBinding FontFamily}"
FontSize="{TemplateBinding FontSize}"
FontWeight="{TemplateBinding FontWeight}" />
</Border>
<Rectangle
Name="PART_SecondColumnDivider"
Grid.Column="3"
Width="1"
Margin="0,4"
HorizontalAlignment="Center"
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
<Border
x:Name="PART_ThirdPickerHost"
Grid.Column="4"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch">
<TextBlock
x:Name="PART_PeriodTextBlock"
Padding="12,4"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontFamily="{TemplateBinding FontFamily}"
FontSize="{TemplateBinding FontSize}"
FontWeight="{TemplateBinding FontWeight}" />
</Border>
</Grid> </Grid>
<PathIcon
Name="PART_Icon"
Grid.Column="1"
Width="16"
Height="16"
Margin="0,0,8,0"
Data="{DynamicResource TimePickerIconGlyph}"
Foreground="{DynamicResource DateTimePickerIconForeground}" />
</Grid>
</Button> </Button>
<Popup <Popup
Name="PART_Popup" Name="PART_Popup"
IsLightDismissEnabled="True" IsLightDismissEnabled="True"
Placement="Bottom" Placement="Bottom"
PlacementTarget="{TemplateBinding}" PlacementTarget="{TemplateBinding}"
WindowManagerAddShadowHint="False"> WindowManagerAddShadowHint="False">
<TimePickerPresenter Name="PART_PickerPresenter" /> <TimePickerPresenter Name="PART_PickerPresenter" />
</Popup> </Popup>
</Grid> </Grid>
</DataValidationErrors>
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
@@ -250,10 +253,10 @@
<Setter Property="Foreground" Value="{DynamicResource DateTimePickerEmptyForeground}" /> <Setter Property="Foreground" Value="{DynamicResource DateTimePickerEmptyForeground}" />
</Style> </Style>
<Style Selector="^.Large"> <Style Selector="^.Large /template/ Button#PART_FlyoutButton">
<Setter Property="MinHeight" Value="{DynamicResource DateTimePickerButtonLargeHeight}" /> <Setter Property="MinHeight" Value="{DynamicResource DateTimePickerButtonLargeHeight}" />
</Style> </Style>
<Style Selector="^.Small"> <Style Selector="^.Small /template/ Button#PART_FlyoutButton">
<Setter Property="MinHeight" Value="{DynamicResource DateTimePickerButtonSmallHeight}" /> <Setter Property="MinHeight" Value="{DynamicResource DateTimePickerButtonSmallHeight}" />
</Style> </Style>
</ControlTheme> </ControlTheme>

View File

@@ -4,17 +4,19 @@
x:CompileBindings="True"> x:CompileBindings="True">
<Design.PreviewWith> <Design.PreviewWith>
<StackPanel Margin="20"> <StackPanel Margin="20">
<ToggleButton>Toggle</ToggleButton> <ToggleButton Classes="Primary">Toggle</ToggleButton>
<ToggleButton Classes="Secondary">Toggle</ToggleButton> <ToggleButton Classes="Secondary">Toggle</ToggleButton>
<ToggleButton Classes="Tertiary">Toggle</ToggleButton> <ToggleButton Classes="Tertiary">Toggle</ToggleButton>
<ToggleButton Classes="Success">Toggle</ToggleButton>
<ToggleButton Classes="Warning">Toggle</ToggleButton> <ToggleButton Classes="Warning">Toggle</ToggleButton>
<ToggleButton Classes="Error">Toggle</ToggleButton> <ToggleButton Classes="Danger">Toggle</ToggleButton>
<ToggleButton IsThreeState="True">Toggle 3</ToggleButton> <ToggleButton Classes="Primary" IsThreeState="True">Toggle 3</ToggleButton>
<ToggleButton Classes="Secondary" IsThreeState="True">Toggle 3</ToggleButton> <ToggleButton Classes="Secondary" IsThreeState="True">Toggle 3</ToggleButton>
<ToggleButton Classes="Tertiary" IsThreeState="True">Toggle 3</ToggleButton> <ToggleButton Classes="Tertiary" IsThreeState="True">Toggle 3</ToggleButton>
<ToggleButton Classes="Success" IsThreeState="True">Toggle 3</ToggleButton>
<ToggleButton Classes="Warning" IsThreeState="True">Toggle 3</ToggleButton> <ToggleButton Classes="Warning" IsThreeState="True">Toggle 3</ToggleButton>
<ToggleButton Classes="Error" IsThreeState="True">Toggle 3</ToggleButton> <ToggleButton Classes="Danger" IsThreeState="True">Toggle 3</ToggleButton>
</StackPanel> </StackPanel>
</Design.PreviewWith> </Design.PreviewWith>
<ControlTheme x:Key="{x:Type ToggleButton}" TargetType="ToggleButton"> <ControlTheme x:Key="{x:Type ToggleButton}" TargetType="ToggleButton">
@@ -30,6 +32,7 @@
<Setter Property="ToggleButton.HorizontalContentAlignment" Value="Center" /> <Setter Property="ToggleButton.HorizontalContentAlignment" Value="Center" />
<Setter Property="ToggleButton.VerticalContentAlignment" Value="Center" /> <Setter Property="ToggleButton.VerticalContentAlignment" Value="Center" />
<Setter Property="ToggleButton.MinHeight" Value="12" /> <Setter Property="ToggleButton.MinHeight" Value="12" />
<Setter Property="ToggleButton.Cursor" Value="Hand" />
<Setter Property="ToggleButton.Template"> <Setter Property="ToggleButton.Template">
<ControlTemplate TargetType="ToggleButton"> <ControlTemplate TargetType="ToggleButton">
<ContentPresenter <ContentPresenter
@@ -54,88 +57,113 @@
<Setter Property="RenderTransform" Value="scale(0.98)" /> <Setter Property="RenderTransform" Value="scale(0.98)" />
</Style> </Style>
<Style Selector="^.Large">
<Setter Property="ToggleButton.Padding" Value="{DynamicResource ButtonLargePadding}" />
</Style>
<Style Selector="^.Small">
<Setter Property="ToggleButton.Padding" Value="{DynamicResource ButtonSmallPadding}" />
</Style>
<Style Selector="^:pointerover"> <Style Selector="^:pointerover">
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonDefaultPointeroverBackground}" /> <Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonDefaultPointeroverBackground}" />
</Style> </Style>
<Style Selector="^:pressed"> <Style Selector="^:pressed">
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonDefaultPressedBackground}" /> <Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonDefaultPressedBackground}" />
</Style> </Style>
<Style Selector="^:disabled"> <Style Selector="^:disabled">
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonDefaultDisabledForeground}" /> <Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonDefaultDisabledBorderBrush}" />
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonDefaultDisabledBackground}" />
</Style> </Style>
<Style Selector="^.Primary">
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonDefaultPrimaryForeground}" />
</Style>
<Style Selector="^.Secondary"> <Style Selector="^.Secondary">
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonDefaultSecondaryForeground}" /> <Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonDefaultSecondaryForeground}" />
</Style> </Style>
<Style Selector="^.Tertiary"> <Style Selector="^.Tertiary">
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonDefaultTertiaryForeground}" /> <Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonDefaultTertiaryForeground}" />
</Style> </Style>
<Style Selector="^.Success">
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonDefaultSuccessForeground}" />
</Style>
<Style Selector="^.Warning"> <Style Selector="^.Warning">
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonDefaultWarningForeground}" /> <Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonDefaultWarningForeground}" />
</Style> </Style>
<Style Selector="^.Error"> <Style Selector="^.Danger">
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonDefaultErrorForeground}" /> <Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonDefaultDangerForeground}" />
</Style> </Style>
<Style Selector="^:checked"> <Style Selector="^:checked">
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonCheckedForeground}" /> <Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonCheckedForeground}" />
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonPrimaryCheckedBackground}" /> <Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonPrimaryCheckedBackground}" />
<Style Selector="^.Primary">
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonPrimaryCheckedBackground}" />
</Style>
<Style Selector="^.Secondary"> <Style Selector="^.Secondary">
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonSecondaryCheckedBackground}" /> <Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonSecondaryCheckedBackground}" />
</Style> </Style>
<Style Selector="^.Tertiary"> <Style Selector="^.Tertiary">
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonTertiaryCheckedBackground}" /> <Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonTertiaryCheckedBackground}" />
</Style> </Style>
<Style Selector="^.Success">
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonSuccessCheckedBackground}" />
</Style>
<Style Selector="^.Warning"> <Style Selector="^.Warning">
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonWarningCheckedBackground}" /> <Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonWarningCheckedBackground}" />
</Style> </Style>
<Style Selector="^.Error"> <Style Selector="^.Danger">
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonErrorCheckedBackground}" /> <Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonDangerCheckedBackground}" />
</Style> </Style>
<Style Selector="^:pointerover"> <Style Selector="^:pointerover">
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonPrimaryCheckedPointeroverBackground}" /> <Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonPrimaryCheckedPointeroverBackground}" />
<Style Selector="^.Primary">
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonPrimaryCheckedPointeroverBackground}" />
</Style>
<Style Selector="^.Secondary"> <Style Selector="^.Secondary">
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonSecondaryCheckedPointeroverBackground}" /> <Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonSecondaryCheckedPointeroverBackground}" />
</Style> </Style>
<Style Selector="^.Tertiary"> <Style Selector="^.Tertiary">
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonTertiaryCheckedPointeroverBackground}" /> <Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonTertiaryCheckedPointeroverBackground}" />
</Style> </Style>
<Style Selector="^.Success">
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonSuccessCheckedPointeroverBackground}" />
</Style>
<Style Selector="^.Warning"> <Style Selector="^.Warning">
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonWarningCheckedPointeroverBackground}" /> <Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonWarningCheckedPointeroverBackground}" />
</Style> </Style>
<Style Selector="^.Error"> <Style Selector="^.Danger">
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonErrorCheckedPointeroverBackground}" /> <Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonDangerCheckedPointeroverBackground}" />
</Style> </Style>
</Style> </Style>
<Style Selector="^:pressed"> <Style Selector="^:pressed">
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonPrimaryCheckedPressedBackground}" /> <Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonPrimaryCheckedPressedBackground}" />
<Style Selector="^.Primary">
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonPrimaryCheckedPressedBackground}" />
</Style>
<Style Selector="^.Secondary"> <Style Selector="^.Secondary">
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonSecondaryCheckedPressedBackground}" /> <Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonSecondaryCheckedPressedBackground}" />
</Style> </Style>
<Style Selector="^.Tertiary"> <Style Selector="^.Tertiary">
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonTertiaryCheckedPressedBackground}" /> <Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonTertiaryCheckedPressedBackground}" />
</Style> </Style>
<Style Selector="^.Success">
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonSuccessCheckedPressedBackground}" />
</Style>
<Style Selector="^.Warning"> <Style Selector="^.Warning">
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonWarningCheckedPressedBackground}" /> <Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonWarningCheckedPressedBackground}" />
</Style> </Style>
<Style Selector="^.Error"> <Style Selector="^.Danger">
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonErrorCheckedPressedBackground}" /> <Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonDangerCheckedPressedBackground}" />
</Style> </Style>
</Style> </Style>
<Style Selector="^:disabled">
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonDefaultDisabledBorderBrush}" />
</Style>
</Style> </Style>
<Style Selector="^:indeterminate"> <Style Selector="^:indeterminate">
<Setter Property="ToggleButton.BorderThickness" Value="1" /> <Setter Property="ToggleButton.BorderThickness" Value="1" />
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonPrimaryIndeterminateBorderBrush}" /> <Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonPrimaryIndeterminateBorderBrush}" />
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonPrimaryIndeterminateBackground}" /> <Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonPrimaryIndeterminateBackground}" />
<Style Selector="^.Primary">
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonPrimaryIndeterminateBackground}" />
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonPrimaryIndeterminateBorderBrush}" />
</Style>
<Style Selector="^.Secondary"> <Style Selector="^.Secondary">
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonSecondaryIndeterminateBackground}" /> <Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonSecondaryIndeterminateBackground}" />
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonSecondaryIndeterminateBorderBrush}" /> <Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonSecondaryIndeterminateBorderBrush}" />
@@ -144,45 +172,89 @@
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonTertiaryIndeterminateBackground}" /> <Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonTertiaryIndeterminateBackground}" />
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonTertiaryIndeterminateBorderBrush}" /> <Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonTertiaryIndeterminateBorderBrush}" />
</Style> </Style>
<Style Selector="^.Success">
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonSuccessIndeterminateBackground}" />
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonSuccessIndeterminateBorderBrush}" />
</Style>
<Style Selector="^.Warning"> <Style Selector="^.Warning">
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonWarningIndeterminateBackground}" /> <Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonWarningIndeterminateBackground}" />
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonWarningIndeterminateBorderBrush}" /> <Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonWarningIndeterminateBorderBrush}" />
</Style> </Style>
<Style Selector="^.Error"> <Style Selector="^.Danger">
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonErrorIndeterminateBackground}" /> <Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonDangerIndeterminateBackground}" />
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonErrorIndeterminateBorderBrush}" /> <Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonDangerIndeterminateBorderBrush}" />
</Style> </Style>
<Style Selector="^:pointerover"> <Style Selector="^:pointerover">
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonPrimaryIndeterminatePointeroverBorderBrush}" /> <Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonPrimaryIndeterminatePointeroverBorderBrush}" />
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonPrimaryIndeterminatePointeroverForeground}" />
<Style Selector="^.Primary">
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonPrimaryIndeterminatePointeroverBorderBrush}" />
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonPrimaryIndeterminatePointeroverForeground}" />
</Style>
<Style Selector="^.Secondary"> <Style Selector="^.Secondary">
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonSecondaryIndeterminatePointeroverBorderBrush}" /> <Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonSecondaryIndeterminatePointeroverBorderBrush}" />
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonSecondaryIndeterminatePointeroverForeground}" />
</Style> </Style>
<Style Selector="^.Tertiary"> <Style Selector="^.Tertiary">
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonTertiaryIndeterminatePointeroverBorderBrush}" /> <Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonTertiaryIndeterminatePointeroverBorderBrush}" />
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonTertiaryIndeterminatePointeroverForeground}" />
</Style>
<Style Selector="^.Success">
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonSuccessIndeterminatePointeroverBorderBrush}" />
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonSuccessIndeterminatePointeroverForeground}" />
</Style> </Style>
<Style Selector="^.Warning"> <Style Selector="^.Warning">
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonWarningIndeterminatePointeroverBorderBrush}" /> <Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonWarningIndeterminatePointeroverBorderBrush}" />
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonWarningIndeterminatePointeroverForeground}" />
</Style> </Style>
<Style Selector="^.Error"> <Style Selector="^.Danger">
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonErrorIndeterminatePointeroverBorderBrush}" /> <Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonDangerIndeterminatePointeroverBorderBrush}" />
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonDangerIndeterminatePointeroverForeground}" />
</Style> </Style>
</Style> </Style>
<Style Selector="^:pressed"> <Style Selector="^:pressed">
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonPrimaryIndeterminatePressedBorderBrush}" /> <Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonPrimaryIndeterminatePressedBorderBrush}" />
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonPrimaryIndeterminatePressedBorderBrush}" />
<Style Selector="^.Primary">
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonPrimaryIndeterminatePressedBorderBrush}" />
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonPrimaryIndeterminatePressedForeground}" />
</Style>
<Style Selector="^.Secondary"> <Style Selector="^.Secondary">
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonSecondaryIndeterminatePressedBorderBrush}" /> <Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonSecondaryIndeterminatePressedBorderBrush}" />
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonSecondaryIndeterminatePressedForeground}" />
</Style> </Style>
<Style Selector="^.Tertiary"> <Style Selector="^.Tertiary">
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonTertiaryIndeterminatePressedBorderBrush}" /> <Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonTertiaryIndeterminatePressedBorderBrush}" />
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonTertiaryIndeterminatePressedForeground}" />
</Style>
<Style Selector="^.Success">
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonSuccessIndeterminatePressedBorderBrush}" />
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonSuccessIndeterminatePressedForeground}" />
</Style> </Style>
<Style Selector="^.Warning"> <Style Selector="^.Warning">
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonWarningIndeterminatePressedBorderBrush}" /> <Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonWarningIndeterminatePressedBorderBrush}" />
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonWarningIndeterminatePressedForeground}" />
</Style> </Style>
<Style Selector="^.Error"> <Style Selector="^.Danger">
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonErrorIndeterminatePressedBorderBrush}" /> <Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonDangerIndeterminatePressedBorderBrush}" />
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonDangerIndeterminatePressedForeground}" />
</Style> </Style>
</Style> </Style>
<Style Selector="^:disabled">
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonIndeterminateDisabledBorderBrush}" />
</Style>
</Style> </Style>
<Style Selector="^:disabled">
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonDefaultDisabledForeground}" />
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonDefaultDisabledBackground}" />
</Style>
<Style Selector="^.Large">
<Setter Property="ToggleButton.Padding" Value="{DynamicResource ButtonLargePadding}" />
</Style>
<Style Selector="^.Small">
<Setter Property="ToggleButton.Padding" Value="{DynamicResource ButtonSmallPadding}" />
</Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -126,7 +126,7 @@
<Setter Property="Border.Background" Value="{DynamicResource ToggleSwitchContainerUnCheckedDefaultBackground}" /> <Setter Property="Border.Background" Value="{DynamicResource ToggleSwitchContainerUnCheckedDefaultBackground}" />
</Style> </Style>
<Style Selector="^:pointerover /template/ Border#SwitchBackgroundBorder"> <Style Selector="^:pointerover /template/ Border#SwitchBackgroundBorder">
<Setter Property="Border.Background" Value="{DynamicResource ToggleSwitchContainerUnCheckedPointerOverBackground}" /> <Setter Property="Border.Background" Value="{DynamicResource ToggleSwitchContainerUnCheckedPointeroverBackground}" />
</Style> </Style>
<Style Selector="^:pressed /template/ Border#SwitchBackgroundBorder"> <Style Selector="^:pressed /template/ Border#SwitchBackgroundBorder">
<Setter Property="Border.Background" Value="{DynamicResource ToggleSwitchContainerUnCheckedPressedBackground}" /> <Setter Property="Border.Background" Value="{DynamicResource ToggleSwitchContainerUnCheckedPressedBackground}" />
@@ -149,7 +149,7 @@
<Setter Property="Border.Background" Value="{DynamicResource ToggleSwitchContainerCheckedDefaultBackground}" /> <Setter Property="Border.Background" Value="{DynamicResource ToggleSwitchContainerCheckedDefaultBackground}" />
</Style> </Style>
<Style Selector="^:pointerover /template/ Border#SwitchBackgroundBorder"> <Style Selector="^:pointerover /template/ Border#SwitchBackgroundBorder">
<Setter Property="Border.Background" Value="{DynamicResource ToggleSwitchContainerCheckedPointerOverBackground}" /> <Setter Property="Border.Background" Value="{DynamicResource ToggleSwitchContainerCheckedPointeroverBackground}" />
</Style> </Style>
<Style Selector="^:pressed /template/ Border#SwitchBackgroundBorder"> <Style Selector="^:pressed /template/ Border#SwitchBackgroundBorder">
<Setter Property="Border.Background" Value="{DynamicResource ToggleSwitchContainerCheckedPressedBackground}" /> <Setter Property="Border.Background" Value="{DynamicResource ToggleSwitchContainerCheckedPressedBackground}" />

View File

@@ -93,7 +93,6 @@
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="{x:Type TreeViewItem}" TargetType="TreeViewItem"> <ControlTheme x:Key="{x:Type TreeViewItem}" TargetType="TreeViewItem">
<Setter Property="TreeViewItem.Padding" Value="0" />
<Setter Property="TreeViewItem.Background" Value="{DynamicResource TreeViewItemDefaultBackground}" /> <Setter Property="TreeViewItem.Background" Value="{DynamicResource TreeViewItemDefaultBackground}" />
<Setter Property="TreeViewItem.Foreground" Value="{DynamicResource TreeViewItemDefaultForeground}" /> <Setter Property="TreeViewItem.Foreground" Value="{DynamicResource TreeViewItemDefaultForeground}" />
<Setter Property="TreeViewItem.CornerRadius" Value="3" /> <Setter Property="TreeViewItem.CornerRadius" Value="3" />
@@ -144,9 +143,9 @@
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
<!-- PointerOver state --> <!-- Pointerover state -->
<Style Selector="^ /template/ Border#PART_LayoutRoot:pointerover"> <Style Selector="^ /template/ Border#PART_LayoutRoot:pointerover">
<Setter Property="Background" Value="{DynamicResource TreeViewItemPointerOverBackground}" /> <Setter Property="Background" Value="{DynamicResource TreeViewItemPointeroverBackground}" />
</Style> </Style>
<!-- Pressed state --> <!-- Pressed state -->

View File

@@ -12,9 +12,9 @@ public class ItemToObjectConverter: IValueConverter
{ {
public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture) public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{ {
if (value is ItemCollection list) if (value is int i)
{ {
return list.Select(a => new object()); return Enumerable.Repeat(new object(), i).ToList();
} }
return new List<object>(); return new List<object>();
} }

View File

@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using Avalonia;
using Avalonia.Data.Converters;
using Avalonia.Metadata;
namespace Semi.Avalonia.Converters;
public class KeyToPathConverter: IValueConverter
{
[Content]
public IDictionary<string, object?> Resources { get; } = new Dictionary<string, object?>();
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if(value is string s && Resources.TryGetValue(s, out var v))
return v;
return AvaloniaProperty.UnsetValue;
}
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}

View File

@@ -4,7 +4,7 @@
<PropertyGroup> <PropertyGroup>
<Title>Semi.Avalonia</Title> <Title>Semi.Avalonia</Title>
<PackageReleaseNotes>Upgrade to Avalonia 11.0.0-preview6. </PackageReleaseNotes> <PackageReleaseNotes>Update to Avalonia 11.0.0-preview8</PackageReleaseNotes>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@@ -18,6 +18,7 @@
<SolidColorBrush x:Key="ButtonDefaultPrimaryForeground" Color="#54A9FF" /> <SolidColorBrush x:Key="ButtonDefaultPrimaryForeground" Color="#54A9FF" />
<SolidColorBrush x:Key="ButtonDefaultSecondaryForeground" Color="#40B4F3" /> <SolidColorBrush x:Key="ButtonDefaultSecondaryForeground" Color="#40B4F3" />
<SolidColorBrush x:Key="ButtonDefaultTertiaryForeground" Color="#888D92" /> <SolidColorBrush x:Key="ButtonDefaultTertiaryForeground" Color="#888D92" />
<SolidColorBrush x:Key="ButtonDefaultSuccessForeground" Color="#5DC264" />
<SolidColorBrush x:Key="ButtonDefaultWarningForeground" Color="#FFAE43" /> <SolidColorBrush x:Key="ButtonDefaultWarningForeground" Color="#FFAE43" />
<SolidColorBrush x:Key="ButtonDefaultDangerForeground" Color="#FC725A" /> <SolidColorBrush x:Key="ButtonDefaultDangerForeground" Color="#FC725A" />
<SolidColorBrush x:Key="ButtonDefaultDisabledForeground" Opacity="0.35" Color="#F9F9F9" /> <SolidColorBrush x:Key="ButtonDefaultDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
@@ -50,6 +51,10 @@
<SolidColorBrush x:Key="ButtonSolidTertiaryPointeroverBackground" Color="#A7ABB0" /> <SolidColorBrush x:Key="ButtonSolidTertiaryPointeroverBackground" Color="#A7ABB0" />
<SolidColorBrush x:Key="ButtonSolidTertiaryPressedBackground" Color="#C6CACD" /> <SolidColorBrush x:Key="ButtonSolidTertiaryPressedBackground" Color="#C6CACD" />
<SolidColorBrush x:Key="ButtonSolidSuccessBackground" Color="#5DC264" />
<SolidColorBrush x:Key="ButtonSolidSuccessPointeroverBackground" Color="#7FD184" />
<SolidColorBrush x:Key="ButtonSolidSuccessPressedBackground" Color="#A6E1A8" />
<SolidColorBrush x:Key="ButtonSolidWarningBackground" Color="#FFAE43" /> <SolidColorBrush x:Key="ButtonSolidWarningBackground" Color="#FFAE43" />
<SolidColorBrush x:Key="ButtonSolidWarningPointeroverBackground" Color="#FFC772" /> <SolidColorBrush x:Key="ButtonSolidWarningPointeroverBackground" Color="#FFC772" />
<SolidColorBrush x:Key="ButtonSolidWarningPressedBackground" Color="#FFDDA1" /> <SolidColorBrush x:Key="ButtonSolidWarningPressedBackground" Color="#FFDDA1" />
@@ -72,6 +77,10 @@
<SolidColorBrush x:Key="ButtonSolidTertiaryPointeroverBorderBrush" Color="#A7ABB0" /> <SolidColorBrush x:Key="ButtonSolidTertiaryPointeroverBorderBrush" Color="#A7ABB0" />
<SolidColorBrush x:Key="ButtonSolidTertiaryPressedBorderBrush" Color="#C6CACD" /> <SolidColorBrush x:Key="ButtonSolidTertiaryPressedBorderBrush" Color="#C6CACD" />
<SolidColorBrush x:Key="ButtonSolidSuccessBorderBrush" Color="#5DC264" />
<SolidColorBrush x:Key="ButtonSolidSuccessPointeroverBorderBrush" Color="#7FD184" />
<SolidColorBrush x:Key="ButtonSolidSuccessPressedBorderBrush" Color="#A6E1A8" />
<SolidColorBrush x:Key="ButtonSolidWarningBorderBrush" Color="#FFAE43" /> <SolidColorBrush x:Key="ButtonSolidWarningBorderBrush" Color="#FFAE43" />
<SolidColorBrush x:Key="ButtonSolidWarningPointeroverBorderBrush" Color="#FFC772" /> <SolidColorBrush x:Key="ButtonSolidWarningPointeroverBorderBrush" Color="#FFC772" />
<SolidColorBrush x:Key="ButtonSolidWarningPressedBorderBrush" Color="#FFDDA1" /> <SolidColorBrush x:Key="ButtonSolidWarningPressedBorderBrush" Color="#FFDDA1" />

View File

@@ -10,15 +10,15 @@
<SolidColorBrush x:Key="CheckBoxDefaultBackground" Color="Transparent" /> <SolidColorBrush x:Key="CheckBoxDefaultBackground" Color="Transparent" />
<SolidColorBrush x:Key="CheckBoxDefaultBorderBrush" Opacity="0.35" Color="#F9F9F9" /> <SolidColorBrush x:Key="CheckBoxDefaultBorderBrush" Opacity="0.35" Color="#F9F9F9" />
<SolidColorBrush x:Key="CheckBoxPointOverBackground" Opacity="0.12" Color="White" /> <SolidColorBrush x:Key="CheckBoxPointeroverBackground" Opacity="0.12" Color="White" />
<SolidColorBrush x:Key="CheckBoxPointOverBorderBrush" Color="#54A9FF" /> <SolidColorBrush x:Key="CheckBoxPointeroverBorderBrush" Color="#54A9FF" />
<SolidColorBrush x:Key="CheckBoxPressedBackground" Color="#A9D7FF" /> <SolidColorBrush x:Key="CheckBoxPressedBackground" Color="#A9D7FF" />
<SolidColorBrush x:Key="CheckBoxPressedBorderBrush" Color="#A9D7FF" /> <SolidColorBrush x:Key="CheckBoxPressedBorderBrush" Color="#A9D7FF" />
<SolidColorBrush x:Key="CheckBoxCheckedDefaultBackground" Color="#54A9FF" /> <SolidColorBrush x:Key="CheckBoxCheckedDefaultBackground" Color="#54A9FF" />
<SolidColorBrush x:Key="CheckBoxCheckedDefaultBorderBrush" Color="#54A9FF" /> <SolidColorBrush x:Key="CheckBoxCheckedDefaultBorderBrush" Color="#54A9FF" />
<SolidColorBrush x:Key="CheckBoxCheckedPointOverBackground" Color="#7FC1FF" /> <SolidColorBrush x:Key="CheckBoxCheckedPointeroverBackground" Color="#7FC1FF" />
<SolidColorBrush x:Key="CheckBoxCheckedPointOverBorderBrush" Color="#7FC1FF" /> <SolidColorBrush x:Key="CheckBoxCheckedPointeroverBorderBrush" Color="#7FC1FF" />
<SolidColorBrush x:Key="CheckBoxCheckedPressedBackground" Color="#A9D7FF" /> <SolidColorBrush x:Key="CheckBoxCheckedPressedBackground" Color="#A9D7FF" />
<SolidColorBrush x:Key="CheckBoxCheckedPressedBorderBrush" Color="#A9D7FF" /> <SolidColorBrush x:Key="CheckBoxCheckedPressedBorderBrush" Color="#A9D7FF" />

View File

@@ -1,16 +1,16 @@
<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="ComboBoxSelectorBackground" Opacity="0.12" Color="White" /> <SolidColorBrush x:Key="ComboBoxSelectorBackground" Opacity="0.12" Color="White" />
<SolidColorBrush x:Key="ComboBoxSelectorPointerOverBackground" Opacity="0.16" Color="White" /> <SolidColorBrush x:Key="ComboBoxSelectorPointeroverBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="ComboBoxSelectorPressedBackground" Opacity="0.20" Color="White" /> <SolidColorBrush x:Key="ComboBoxSelectorPressedBackground" Opacity="0.20" Color="White" />
<SolidColorBrush x:Key="ComboBoxSelectorDisabledBackground" Opacity="0.04" Color="#E6E8EA" /> <SolidColorBrush x:Key="ComboBoxSelectorDisabledBackground" Opacity="0.04" Color="#E6E8EA" />
<SolidColorBrush x:Key="ComboBoxSelectorBorderBrush" Color="Transparent" /> <SolidColorBrush x:Key="ComboBoxSelectorBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="ComboBoxSelectorPointerOverBorderBrush" Color="Transparent" /> <SolidColorBrush x:Key="ComboBoxSelectorPointeroverBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="ComboBoxSelectorPressedBorderBrush" Color="#A9D7FF" /> <SolidColorBrush x:Key="ComboBoxSelectorPressedBorderBrush" Color="#A9D7FF" />
<CornerRadius x:Key="ComboBoxSelectorCornerRadius">3</CornerRadius> <CornerRadius x:Key="ComboBoxSelectorCornerRadius">3</CornerRadius>
<SolidColorBrush x:Key="ComboBoxIconDefaultForeground" Opacity="0.62" Color="#F9F9F9" /> <SolidColorBrush x:Key="ComboBoxIconDefaultForeground" Opacity="0.62" Color="#F9F9F9" />
<SolidColorBrush x:Key="ComboBoxIconPointerOverForeground" Color="#F9F9F9" /> <SolidColorBrush x:Key="ComboBoxIconPointeroverForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="ComboBoxIconPressedForeground" Color="#F9F9F9" /> <SolidColorBrush x:Key="ComboBoxIconPressedForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="ComboBoxIconDisabledForeground" Opacity="0.35" Color="#F9F9F9" /> <SolidColorBrush x:Key="ComboBoxIconDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
@@ -27,10 +27,10 @@
<SolidColorBrush x:Key="ComboBoxItemForeground" Color="#F9F9F9" /> <SolidColorBrush x:Key="ComboBoxItemForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="ComboBoxItemBackground" Color="Transparent" /> <SolidColorBrush x:Key="ComboBoxItemBackground" Color="Transparent" />
<SolidColorBrush x:Key="ComboBoxItemPointerOverBackground" Opacity="0.12" Color="White" /> <SolidColorBrush x:Key="ComboBoxItemPointeroverBackground" Opacity="0.12" Color="White" />
<SolidColorBrush x:Key="ComboBoxItemPressedBackground" Opacity="0.16" Color="White" /> <SolidColorBrush x:Key="ComboBoxItemPressedBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="ComboBoxItemSelectedBackground" Color="#053170" /> <SolidColorBrush x:Key="ComboBoxItemSelectedBackground" Color="#053170" />
<SolidColorBrush x:Key="ComboBoxItemSelectedPointerOverBackground" Color="#0A4694" /> <SolidColorBrush x:Key="ComboBoxItemSelectedPointeroverBackground" Color="#0A4694" />
<SolidColorBrush x:Key="ComboBoxItemDisabledBackground" Color="Transparent" /> <SolidColorBrush x:Key="ComboBoxItemDisabledBackground" Color="Transparent" />
<SolidColorBrush x:Key="ComboBoxItemSelectedDisabledBackground" Opacity="0.04" Color="#E6E8EA" /> <SolidColorBrush x:Key="ComboBoxItemSelectedDisabledBackground" Opacity="0.04" Color="#E6E8EA" />

View File

@@ -13,9 +13,10 @@
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Carousel.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Carousel.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/CheckBox.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/CheckBox.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/ComboBox.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/ComboBox.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/DataValidationErrors.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/DatePicker.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/DatePicker.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/DateTimePickerShared.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/DateTimePickerShared.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/DropdownButton.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/DropDownButton.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Expander.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Expander.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/GridSplitter.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/GridSplitter.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Label.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Label.axaml" />

View File

@@ -0,0 +1,12 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- Add Resources Here -->
<SolidColorBrush x:Key="DataValidationErrorsForeground" Color="#FFFC725A" />
<SolidColorBrush x:Key="DataValidationErrorsBackground" Opacity="0.2" Color="#FFFC725A" />
<SolidColorBrush x:Key="DataValidationErrorsBorderBrush" Opacity="0.2" Color="#FFFC725A" />
<SolidColorBrush x:Key="DataValidationErrorsPointerOverBackground" Opacity="0.3" Color="#FFFC725A" />
<SolidColorBrush x:Key="DataValidationErrorsPointerOverBorderBrush" Opacity="0.3" Color="#FFFC725A" />
<SolidColorBrush x:Key="DataValidationErrorsPressedBackground" Opacity="0.4" Color="#FFFC725A" />
<SolidColorBrush x:Key="DataValidationErrorsPressedBorderBrush" Opacity="0.4" Color="#FFFC725A" />
<SolidColorBrush x:Key="DataValidationErrorsSelectedBackground" Opacity="0.2" Color="#FFFC725A" />
<SolidColorBrush x:Key="DataValidationErrorsSelectedBorderBrush" Color="#FFFC725A" />
</ResourceDictionary>

View File

@@ -20,7 +20,7 @@
<PathGeometry x:Key="DateTimePickerDismissGlyph">M17.6568 19.7782C18.2426 20.3639 19.1924 20.3639 19.7782 19.7782C20.3639 19.1924 20.3639 18.2426 19.7782 17.6568L14.1213 12L19.7782 6.34313C20.3639 5.75734 20.3639 4.8076 19.7782 4.22181C19.1924 3.63602 18.2426 3.63602 17.6568 4.22181L12 9.87866L6.34313 4.22181C5.75734 3.63602 4.8076 3.63602 4.22181 4.22181C3.63602 4.8076 3.63602 5.75734 4.22181 6.34313L9.87866 12L4.22181 17.6568C3.63602 18.2426 3.63602 19.1924 4.22181 19.7782C4.8076 20.3639 5.75734 20.3639 6.34313 19.7782L12 14.1213L17.6568 19.7782Z</PathGeometry> <PathGeometry x:Key="DateTimePickerDismissGlyph">M17.6568 19.7782C18.2426 20.3639 19.1924 20.3639 19.7782 19.7782C20.3639 19.1924 20.3639 18.2426 19.7782 17.6568L14.1213 12L19.7782 6.34313C20.3639 5.75734 20.3639 4.8076 19.7782 4.22181C19.1924 3.63602 18.2426 3.63602 17.6568 4.22181L12 9.87866L6.34313 4.22181C5.75734 3.63602 4.8076 3.63602 4.22181 4.22181C3.63602 4.8076 3.63602 5.75734 4.22181 6.34313L9.87866 12L4.22181 17.6568C3.63602 18.2426 3.63602 19.1924 4.22181 19.7782C4.8076 20.3639 5.75734 20.3639 6.34313 19.7782L12 14.1213L17.6568 19.7782Z</PathGeometry>
<SolidColorBrush x:Key="DateTimePickerSeparatorBackground" Opacity="0.08" Color="#F9F9F9" /> <SolidColorBrush x:Key="DateTimePickerSeparatorBackground" Opacity="0.08" Color="#F9F9F9" />
<sys:Double x:Key="DateTimePickerListBoxItemHeight">28</sys:Double> <sys:Double x:Key="DateTimePickerListBoxItemHeight">30</sys:Double>
<SolidColorBrush x:Key="DateTimePickerButtonBorderBrush" Color="Transparent" /> <SolidColorBrush x:Key="DateTimePickerButtonBorderBrush" Color="Transparent" />
@@ -31,7 +31,7 @@
<SolidColorBrush x:Key="DateTimePickerEmptyForeground" Opacity="0.5" Color="#F9F9F9" /> <SolidColorBrush x:Key="DateTimePickerEmptyForeground" Opacity="0.5" Color="#F9F9F9" />
<SolidColorBrush x:Key="DateTimePickerButtonPointeroverBackground" Opacity="0.16" Color="White" /> <SolidColorBrush x:Key="DateTimePickerButtonPointeroverBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="DateTimePickerButtonDisabledBorderBrush" Color="Transparent" /> <SolidColorBrush x:Key="DateTimePickerButtonDisabledBorderBrush" Color="Transparent" />
<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" />

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">
<!-- Add Resources Here --> <!-- Add Resources Here -->
<PathGeometry x:Key="DropdownButtonIconGlyph">M4.08045 7.59809C4.66624 7.01231 5.61599 7.01231 6.20177 7.59809L11.8586 13.2549L17.5155 7.59809C18.1013 7.01231 19.051 7.01231 19.6368 7.59809C20.2226 8.18388 20.2226 9.13363 19.6368 9.71941L12.9193 16.4369C12.3335 17.0227 11.3838 17.0227 10.798 16.4369L4.08045 9.71941C3.49467 9.13363 3.49467 8.18388 4.08045 7.59809Z</PathGeometry> <PathGeometry x:Key="DropDownButtonIconGlyph">M4.08045 7.59809C4.66624 7.01231 5.61599 7.01231 6.20177 7.59809L11.8586 13.2549L17.5155 7.59809C18.1013 7.01231 19.051 7.01231 19.6368 7.59809C20.2226 8.18388 20.2226 9.13363 19.6368 9.71941L12.9193 16.4369C12.3335 17.0227 11.3838 17.0227 10.798 16.4369L4.08045 9.71941C3.49467 9.13363 3.49467 8.18388 4.08045 7.59809Z</PathGeometry>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -8,7 +8,7 @@
<SolidColorBrush x:Key="ListBoxItemDisabledForeground" Opacity="0.35" Color="#F9F9F9" /> <SolidColorBrush x:Key="ListBoxItemDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
<SolidColorBrush x:Key="ListBoxItemDefaultBackground" Color="Transparent" /> <SolidColorBrush x:Key="ListBoxItemDefaultBackground" Color="Transparent" />
<SolidColorBrush x:Key="ListBoxItemPointerOverBackground" Opacity="0.12" Color="White" /> <SolidColorBrush x:Key="ListBoxItemPointeroverBackground" Opacity="0.12" Color="White" />
<SolidColorBrush x:Key="ListBoxItemPressedBackground" Opacity="0.16" Color="White" /> <SolidColorBrush x:Key="ListBoxItemPressedBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="ListBoxItemSelectedBackground" Opacity="0.2" Color="#FF54A9FF" /> <SolidColorBrush x:Key="ListBoxItemSelectedBackground" Opacity="0.2" Color="#FF54A9FF" />
<SolidColorBrush x:Key="ListBoxItemSelectedPointeroverBackground" Opacity="0.3" Color="#FF54A9FF" /> <SolidColorBrush x:Key="ListBoxItemSelectedPointeroverBackground" Opacity="0.3" Color="#FF54A9FF" />

View File

@@ -13,7 +13,7 @@
<SolidColorBrush x:Key="MenuFlyoutBackground" Color="#35363C" /> <SolidColorBrush x:Key="MenuFlyoutBackground" Color="#35363C" />
<SolidColorBrush x:Key="MenuFlyoutBorderBrush" Opacity="0.08" Color="#F9F9F9" /> <SolidColorBrush x:Key="MenuFlyoutBorderBrush" Opacity="0.08" Color="#F9F9F9" />
<Thickness x:Key="MenuFlyoutBorderThickness">1</Thickness> <Thickness x:Key="MenuFlyoutBorderThickness">1</Thickness>
<Thickness x:Key="MenuFlyoutPadding">0 4</Thickness> <Thickness x:Key="MenuFlyoutPadding">8</Thickness>
<BoxShadows x:Key="MenuFlyoutBorderBoxShadow">0 0 8 0 #1AFFFFFF</BoxShadows> <BoxShadows x:Key="MenuFlyoutBorderBoxShadow">0 0 8 0 #1AFFFFFF</BoxShadows>
<CornerRadius x:Key="MenuFlyoutCornerRadius">6</CornerRadius> <CornerRadius x:Key="MenuFlyoutCornerRadius">6</CornerRadius>
<sys:Double x:Key="MenuFlyoutMinHeight">16</sys:Double> <sys:Double x:Key="MenuFlyoutMinHeight">16</sys:Double>

View File

@@ -1,4 +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">
<!-- Add Resources Here --> <!-- Add Resources Here -->
<CornerRadius x:Key="NumericUpDownCornerRadius">3</CornerRadius> <CornerRadius x:Key="NumericUpDownCornerRadius">3</CornerRadius>
<x:Double x:Key="NumericUpDownWrapperDefaultHeight">32</x:Double>
<x:Double x:Key="NumericUpDownWrapperSmallHeight">24</x:Double>
<x:Double x:Key="NumericUpDownWrapperLargeHeight">40</x:Double>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -1,231 +1,393 @@
<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">
<!-- Add Resources Here --> <!-- Add Resources Here -->
<SolidColorBrush x:Key="SemiRed0" Color="#6C090B" /> <!-- Color Resources -->
<SolidColorBrush x:Key="SemiRed1" Color="#901110" /> <Color x:Key="SemiRed0Color">#6C090B</Color>
<SolidColorBrush x:Key="SemiRed2" Color="#B42019" /> <Color x:Key="SemiRed1Color">#901110</Color>
<SolidColorBrush x:Key="SemiRed3" Color="#D73324" /> <Color x:Key="SemiRed2Color">#B42019</Color>
<SolidColorBrush x:Key="SemiRed4" Color="#FB4932" /> <Color x:Key="SemiRed3Color">#D73324</Color>
<SolidColorBrush x:Key="SemiRed5" Color="#FC725A" /> <Color x:Key="SemiRed4Color">#FB4932</Color>
<SolidColorBrush x:Key="SemiRed6" Color="#FD9983" /> <Color x:Key="SemiRed5Color">#FC725A</Color>
<SolidColorBrush x:Key="SemiRed7" Color="#FDBEAC" /> <Color x:Key="SemiRed6Color">#FD9983</Color>
<SolidColorBrush x:Key="SemiRed8" Color="#FEE0D5" /> <Color x:Key="SemiRed7Color">#FDBEAC</Color>
<SolidColorBrush x:Key="SemiRed9" Color="#FFF3EF" /> <Color x:Key="SemiRed8Color">#FEE0D5</Color>
<SolidColorBrush x:Key="SemiPink0" Color="#5C0730" /> <Color x:Key="SemiRed9Color">#FFF3EF</Color>
<SolidColorBrush x:Key="SemiPink1" Color="#800E41" /> <Color x:Key="SemiPink0Color">#5C0730</Color>
<SolidColorBrush x:Key="SemiPink2" Color="#A41751" /> <Color x:Key="SemiPink1Color">#800E41</Color>
<SolidColorBrush x:Key="SemiPink3" Color="#C72261" /> <Color x:Key="SemiPink2Color">#A41751</Color>
<SolidColorBrush x:Key="SemiPink4" Color="#EB2F71" /> <Color x:Key="SemiPink3Color">#C72261</Color>
<SolidColorBrush x:Key="SemiPink5" Color="#EF5686" /> <Color x:Key="SemiPink4Color">#EB2F71</Color>
<SolidColorBrush x:Key="SemiPink6" Color="#F37E9F" /> <Color x:Key="SemiPink5Color">#EF5686</Color>
<SolidColorBrush x:Key="SemiPink7" Color="#F7A8BC" /> <Color x:Key="SemiPink6Color">#F37E9F</Color>
<SolidColorBrush x:Key="SemiPink8" Color="#FBD3DC" /> <Color x:Key="SemiPink7Color">#F7A8BC</Color>
<SolidColorBrush x:Key="SemiPink9" Color="#FDEEF1" /> <Color x:Key="SemiPink8Color">#FBD3DC</Color>
<SolidColorBrush x:Key="SemiPurple0" Color="#4A1061" /> <Color x:Key="SemiPink9Color">#FDEEF1</Color>
<SolidColorBrush x:Key="SemiPurple1" Color="#5E1776" /> <Color x:Key="SemiPurple0Color">#4A1061</Color>
<SolidColorBrush x:Key="SemiPurple2" Color="#731F8A" /> <Color x:Key="SemiPurple1Color">#5E1776</Color>
<SolidColorBrush x:Key="SemiPurple3" Color="#89289F" /> <Color x:Key="SemiPurple2Color">#731F8A</Color>
<SolidColorBrush x:Key="SemiPurple4" Color="#A033B3" /> <Color x:Key="SemiPurple3Color">#89289F</Color>
<SolidColorBrush x:Key="SemiPurple5" Color="#B553C2" /> <Color x:Key="SemiPurple4Color">#A033B3</Color>
<SolidColorBrush x:Key="SemiPurple6" Color="#CA78D1" /> <Color x:Key="SemiPurple5Color">#B553C2</Color>
<SolidColorBrush x:Key="SemiPurple7" Color="#DDA0E1" /> <Color x:Key="SemiPurple6Color">#CA78D1</Color>
<SolidColorBrush x:Key="SemiPurple8" Color="#EFCEF0" /> <Color x:Key="SemiPurple7Color">#DDA0E1</Color>
<SolidColorBrush x:Key="SemiPurple9" Color="#F7EBF7" /> <Color x:Key="SemiPurple8Color">#EFCEF0</Color>
<SolidColorBrush x:Key="SemiViolet0" Color="#401B77" /> <Color x:Key="SemiPurple9Color">#F7EBF7</Color>
<SolidColorBrush x:Key="SemiViolet1" Color="#4C248C" /> <Color x:Key="SemiViolet0Color">#401B77</Color>
<SolidColorBrush x:Key="SemiViolet2" Color="#582EA0" /> <Color x:Key="SemiViolet1Color">#4C248C</Color>
<SolidColorBrush x:Key="SemiViolet3" Color="#6439B5" /> <Color x:Key="SemiViolet2Color">#582EA0</Color>
<SolidColorBrush x:Key="SemiViolet4" Color="#7246C9" /> <Color x:Key="SemiViolet3Color">#6439B5</Color>
<SolidColorBrush x:Key="SemiViolet5" Color="#8865D4" /> <Color x:Key="SemiViolet4Color">#7246C9</Color>
<SolidColorBrush x:Key="SemiViolet6" Color="#A288DF" /> <Color x:Key="SemiViolet5Color">#8865D4</Color>
<SolidColorBrush x:Key="SemiViolet7" Color="#BEADE9" /> <Color x:Key="SemiViolet6Color">#A288DF</Color>
<SolidColorBrush x:Key="SemiViolet8" Color="#DDD4F4" /> <Color x:Key="SemiViolet7Color">#BEADE9</Color>
<SolidColorBrush x:Key="SemiViolet9" Color="#F1EEFA" /> <Color x:Key="SemiViolet8Color">#DDD4F4</Color>
<SolidColorBrush x:Key="SemiIndigo0" Color="#171E65" /> <Color x:Key="SemiViolet9Color">#F1EEFA</Color>
<SolidColorBrush x:Key="SemiIndigo1" Color="#20297A" /> <Color x:Key="SemiIndigo0Color">#171E65</Color>
<SolidColorBrush x:Key="SemiIndigo2" Color="#29368E" /> <Color x:Key="SemiIndigo1Color">#20297A</Color>
<SolidColorBrush x:Key="SemiIndigo3" Color="#3444A3" /> <Color x:Key="SemiIndigo2Color">#29368E</Color>
<SolidColorBrush x:Key="SemiIndigo4" Color="#4053B7" /> <Color x:Key="SemiIndigo3Color">#3444A3</Color>
<SolidColorBrush x:Key="SemiIndigo5" Color="#5F71C5" /> <Color x:Key="SemiIndigo4Color">#4053B7</Color>
<SolidColorBrush x:Key="SemiIndigo6" Color="#8191D4" /> <Color x:Key="SemiIndigo5Color">#5F71C5</Color>
<SolidColorBrush x:Key="SemiIndigo7" Color="#A7B4E2" /> <Color x:Key="SemiIndigo6Color">#8191D4</Color>
<SolidColorBrush x:Key="SemiIndigo8" Color="#D1D8F1" /> <Color x:Key="SemiIndigo7Color">#A7B4E2</Color>
<SolidColorBrush x:Key="SemiIndigo9" Color="#EDEFF8" /> <Color x:Key="SemiIndigo8Color">#D1D8F1</Color>
<SolidColorBrush x:Key="SemiBlue0" Color="#053170" /> <Color x:Key="SemiIndigo9Color">#EDEFF8</Color>
<SolidColorBrush x:Key="SemiBlue1" Color="#0A4694" /> <Color x:Key="SemiBlue0Color">#053170</Color>
<SolidColorBrush x:Key="SemiBlue2" Color="#135CB8" /> <Color x:Key="SemiBlue1Color">#0A4694</Color>
<SolidColorBrush x:Key="SemiBlue3" Color="#1D75DB" /> <Color x:Key="SemiBlue2Color">#135CB8</Color>
<SolidColorBrush x:Key="SemiBlue4" Color="#2990FF" /> <Color x:Key="SemiBlue3Color">#1D75DB</Color>
<SolidColorBrush x:Key="SemiBlue5" Color="#54A9FF" /> <Color x:Key="SemiBlue4Color">#2990FF</Color>
<SolidColorBrush x:Key="SemiBlue6" Color="#7FC1FF" /> <Color x:Key="SemiBlue5Color">#54A9FF</Color>
<SolidColorBrush x:Key="SemiBlue7" Color="#A9D7FF" /> <Color x:Key="SemiBlue6Color">#7FC1FF</Color>
<SolidColorBrush x:Key="SemiBlue8" Color="#D4ECFF" /> <Color x:Key="SemiBlue7Color">#A9D7FF</Color>
<SolidColorBrush x:Key="SemiBlue9" Color="#EFF8FF" /> <Color x:Key="SemiBlue8Color">#D4ECFF</Color>
<SolidColorBrush x:Key="SemiLightBlue0" Color="#003761" /> <Color x:Key="SemiBlue9Color">#EFF8FF</Color>
<SolidColorBrush x:Key="SemiLightBlue1" Color="#004D85" /> <Color x:Key="SemiLightBlue0Color">#003761</Color>
<SolidColorBrush x:Key="SemiLightBlue2" Color="#0366A9" /> <Color x:Key="SemiLightBlue1Color">#004D85</Color>
<SolidColorBrush x:Key="SemiLightBlue3" Color="#0A81CC" /> <Color x:Key="SemiLightBlue2Color">#0366A9</Color>
<SolidColorBrush x:Key="SemiLightBlue4" Color="#139FF0" /> <Color x:Key="SemiLightBlue3Color">#0A81CC</Color>
<SolidColorBrush x:Key="SemiLightBlue5" Color="#40B4F3" /> <Color x:Key="SemiLightBlue4Color">#139FF0</Color>
<SolidColorBrush x:Key="SemiLightBlue6" Color="#6EC8F6" /> <Color x:Key="SemiLightBlue5Color">#40B4F3</Color>
<SolidColorBrush x:Key="SemiLightBlue7" Color="#9DDCF9" /> <Color x:Key="SemiLightBlue6Color">#6EC8F6</Color>
<SolidColorBrush x:Key="SemiLightBlue8" Color="#CEEEFC" /> <Color x:Key="SemiLightBlue7Color">#9DDCF9</Color>
<SolidColorBrush x:Key="SemiLightBlue9" Color="#EBF8FE" /> <Color x:Key="SemiLightBlue8Color">#CEEEFC</Color>
<SolidColorBrush x:Key="SemiCyan0" Color="#04343D" /> <Color x:Key="SemiLightBlue9Color">#EBF8FE</Color>
<SolidColorBrush x:Key="SemiCyan1" Color="#074F5C" /> <Color x:Key="SemiCyan0Color">#04343D</Color>
<SolidColorBrush x:Key="SemiCyan2" Color="#0A6C7B" /> <Color x:Key="SemiCyan1Color">#074F5C</Color>
<SolidColorBrush x:Key="SemiCyan3" Color="#0E8999" /> <Color x:Key="SemiCyan2Color">#0A6C7B</Color>
<SolidColorBrush x:Key="SemiCyan4" Color="#13A8B8" /> <Color x:Key="SemiCyan3Color">#0E8999</Color>
<SolidColorBrush x:Key="SemiCyan5" Color="#38BBC6" /> <Color x:Key="SemiCyan4Color">#13A8B8</Color>
<SolidColorBrush x:Key="SemiCyan6" Color="#62CDD4" /> <Color x:Key="SemiCyan5Color">#38BBC6</Color>
<SolidColorBrush x:Key="SemiCyan7" Color="#91DFE3" /> <Color x:Key="SemiCyan6Color">#62CDD4</Color>
<SolidColorBrush x:Key="SemiCyan8" Color="#C6EFF1" /> <Color x:Key="SemiCyan7Color">#91DFE3</Color>
<SolidColorBrush x:Key="SemiCyan9" Color="#E7F7F8" /> <Color x:Key="SemiCyan8Color">#C6EFF1</Color>
<SolidColorBrush x:Key="SemiTeal0" Color="#023C39" /> <Color x:Key="SemiCyan9Color">#E7F7F8</Color>
<SolidColorBrush x:Key="SemiTeal1" Color="#045A55" /> <Color x:Key="SemiTeal0Color">#023C39</Color>
<SolidColorBrush x:Key="SemiTeal2" Color="#07776F" /> <Color x:Key="SemiTeal1Color">#045A55</Color>
<SolidColorBrush x:Key="SemiTeal3" Color="#0A9588" /> <Color x:Key="SemiTeal2Color">#07776F</Color>
<SolidColorBrush x:Key="SemiTeal4" Color="#0EB3A1" /> <Color x:Key="SemiTeal3Color">#0A9588</Color>
<SolidColorBrush x:Key="SemiTeal5" Color="#33C2B0" /> <Color x:Key="SemiTeal4Color">#0EB3A1</Color>
<SolidColorBrush x:Key="SemiTeal6" Color="#5ED1C1" /> <Color x:Key="SemiTeal5Color">#33C2B0</Color>
<SolidColorBrush x:Key="SemiTeal7" Color="#8EE1D3" /> <Color x:Key="SemiTeal6Color">#5ED1C1</Color>
<SolidColorBrush x:Key="SemiTeal8" Color="#C4F0E8" /> <Color x:Key="SemiTeal7Color">#8EE1D3</Color>
<SolidColorBrush x:Key="SemiTeal9" Color="#E6F7F4" /> <Color x:Key="SemiTeal8Color">#C4F0E8</Color>
<SolidColorBrush x:Key="SemiGreen0" Color="#123C19" /> <Color x:Key="SemiTeal9Color">#E6F7F4</Color>
<SolidColorBrush x:Key="SemiGreen1" Color="#1C5A25" /> <Color x:Key="SemiGreen0Color">#123C19</Color>
<SolidColorBrush x:Key="SemiGreen2" Color="#277731" /> <Color x:Key="SemiGreen1Color">#1C5A25</Color>
<SolidColorBrush x:Key="SemiGreen3" Color="#32953D" /> <Color x:Key="SemiGreen2Color">#277731</Color>
<SolidColorBrush x:Key="SemiGreen4" Color="#3EB349" /> <Color x:Key="SemiGreen3Color">#32953D</Color>
<SolidColorBrush x:Key="SemiGreen5" Color="#5DC264" /> <Color x:Key="SemiGreen4Color">#3EB349</Color>
<SolidColorBrush x:Key="SemiGreen6" Color="#7FD184" /> <Color x:Key="SemiGreen5Color">#5DC264</Color>
<SolidColorBrush x:Key="SemiGreen7" Color="#A6E1A8" /> <Color x:Key="SemiGreen6Color">#7FD184</Color>
<SolidColorBrush x:Key="SemiGreen8" Color="#D0F0D1" /> <Color x:Key="SemiGreen7Color">#A6E1A8</Color>
<SolidColorBrush x:Key="SemiGreen9" Color="#ECF7EC" /> <Color x:Key="SemiGreen8Color">#D0F0D1</Color>
<SolidColorBrush x:Key="SemiLightGreen0" Color="#263D13" /> <Color x:Key="SemiGreen9Color">#ECF7EC</Color>
<SolidColorBrush x:Key="SemiLightGreen1" Color="#3B5C1D" /> <Color x:Key="SemiLightGreen0Color">#263D13</Color>
<SolidColorBrush x:Key="SemiLightGreen2" Color="#517B28" /> <Color x:Key="SemiLightGreen1Color">#3B5C1D</Color>
<SolidColorBrush x:Key="SemiLightGreen3" Color="#679934" /> <Color x:Key="SemiLightGreen2Color">#517B28</Color>
<SolidColorBrush x:Key="SemiLightGreen4" Color="#7FB840" /> <Color x:Key="SemiLightGreen3Color">#679934</Color>
<SolidColorBrush x:Key="SemiLightGreen5" Color="#97C65F" /> <Color x:Key="SemiLightGreen4Color">#7FB840</Color>
<SolidColorBrush x:Key="SemiLightGreen6" Color="#B0D481" /> <Color x:Key="SemiLightGreen5Color">#97C65F</Color>
<SolidColorBrush x:Key="SemiLightGreen7" Color="#C9E3A7" /> <Color x:Key="SemiLightGreen6Color">#B0D481</Color>
<SolidColorBrush x:Key="SemiLightGreen8" Color="#E4F1D1" /> <Color x:Key="SemiLightGreen7Color">#C9E3A7</Color>
<SolidColorBrush x:Key="SemiLightGreen9" Color="#F3F8ED" /> <Color x:Key="SemiLightGreen8Color">#E4F1D1</Color>
<SolidColorBrush x:Key="SemiLime0" Color="#314603" /> <Color x:Key="SemiLightGreen9Color">#F3F8ED</Color>
<SolidColorBrush x:Key="SemiLime1" Color="#4B6905" /> <Color x:Key="SemiLime0Color">#314603</Color>
<SolidColorBrush x:Key="SemiLime2" Color="#678D09" /> <Color x:Key="SemiLime1Color">#4B6905</Color>
<SolidColorBrush x:Key="SemiLime3" Color="#84B00C" /> <Color x:Key="SemiLime2Color">#678D09</Color>
<SolidColorBrush x:Key="SemiLime4" Color="#A2D311" /> <Color x:Key="SemiLime3Color">#84B00C</Color>
<SolidColorBrush x:Key="SemiLime5" Color="#AEDC3A" /> <Color x:Key="SemiLime4Color">#A2D311</Color>
<SolidColorBrush x:Key="SemiLime6" Color="#BDE566" /> <Color x:Key="SemiLime5Color">#AEDC3A</Color>
<SolidColorBrush x:Key="SemiLime7" Color="#CFED96" /> <Color x:Key="SemiLime6Color">#BDE566</Color>
<SolidColorBrush x:Key="SemiLime8" Color="#E5F6C9" /> <Color x:Key="SemiLime7Color">#CFED96</Color>
<SolidColorBrush x:Key="SemiLime9" Color="#F3FBE9" /> <Color x:Key="SemiLime8Color">#E5F6C9</Color>
<SolidColorBrush x:Key="SemiYellow0" Color="#544903" /> <Color x:Key="SemiLime9Color">#F3FBE9</Color>
<SolidColorBrush x:Key="SemiYellow1" Color="#7E6C06" /> <Color x:Key="SemiYellow0Color">#544903</Color>
<SolidColorBrush x:Key="SemiYellow2" Color="#A88E0A" /> <Color x:Key="SemiYellow1Color">#7E6C06</Color>
<SolidColorBrush x:Key="SemiYellow3" Color="#D2AF0F" /> <Color x:Key="SemiYellow2Color">#A88E0A</Color>
<SolidColorBrush x:Key="SemiYellow4" Color="#FCCE14" /> <Color x:Key="SemiYellow3Color">#D2AF0F</Color>
<SolidColorBrush x:Key="SemiYellow5" Color="#FDDE43" /> <Color x:Key="SemiYellow4Color">#FCCE14</Color>
<SolidColorBrush x:Key="SemiYellow6" Color="#FDEB71" /> <Color x:Key="SemiYellow5Color">#FDDE43</Color>
<SolidColorBrush x:Key="SemiYellow7" Color="#FEF5A0" /> <Color x:Key="SemiYellow6Color">#FDEB71</Color>
<SolidColorBrush x:Key="SemiYellow8" Color="#FEFBD0" /> <Color x:Key="SemiYellow7Color">#FEF5A0</Color>
<SolidColorBrush x:Key="SemiYellow9" Color="#FFFEEC" /> <Color x:Key="SemiYellow8Color">#FEFBD0</Color>
<SolidColorBrush x:Key="SemiAmber0" Color="#512E09" /> <Color x:Key="SemiYellow9Color">#FFFEEC</Color>
<SolidColorBrush x:Key="SemiAmber1" Color="#794B0F" /> <Color x:Key="SemiAmber0Color">#512E09</Color>
<SolidColorBrush x:Key="SemiAmber2" Color="#A16B16" /> <Color x:Key="SemiAmber1Color">#794B0F</Color>
<SolidColorBrush x:Key="SemiAmber3" Color="#CA8F1E" /> <Color x:Key="SemiAmber2Color">#A16B16</Color>
<SolidColorBrush x:Key="SemiAmber4" Color="#F2B726" /> <Color x:Key="SemiAmber3Color">#CA8F1E</Color>
<SolidColorBrush x:Key="SemiAmber5" Color="#F5CA50" /> <Color x:Key="SemiAmber4Color">#F2B726</Color>
<SolidColorBrush x:Key="SemiAmber6" Color="#F7DB7A" /> <Color x:Key="SemiAmber5Color">#F5CA50</Color>
<SolidColorBrush x:Key="SemiAmber7" Color="#FAEAA6" /> <Color x:Key="SemiAmber6Color">#F7DB7A</Color>
<SolidColorBrush x:Key="SemiAmber8" Color="#FCF6D2" /> <Color x:Key="SemiAmber7Color">#FAEAA6</Color>
<SolidColorBrush x:Key="SemiAmber9" Color="#FEFBED" /> <Color x:Key="SemiAmber8Color">#FCF6D2</Color>
<SolidColorBrush x:Key="SemiOrange0" Color="#551F03" /> <Color x:Key="SemiAmber9Color">#FEFBED</Color>
<SolidColorBrush x:Key="SemiOrange1" Color="#803506" /> <Color x:Key="SemiOrange0Color">#551F03</Color>
<SolidColorBrush x:Key="SemiOrange2" Color="#AA500A" /> <Color x:Key="SemiOrange1Color">#803506</Color>
<SolidColorBrush x:Key="SemiOrange3" Color="#D56F0F" /> <Color x:Key="SemiOrange2Color">#AA500A</Color>
<SolidColorBrush x:Key="SemiOrange4" Color="#FF9214" /> <Color x:Key="SemiOrange3Color">#D56F0F</Color>
<SolidColorBrush x:Key="SemiOrange5" Color="#FFAE43" /> <Color x:Key="SemiOrange4Color">#FF9214</Color>
<SolidColorBrush x:Key="SemiOrange6" Color="#FFC772" /> <Color x:Key="SemiOrange5Color">#FFAE43</Color>
<SolidColorBrush x:Key="SemiOrange7" Color="#FFDDA1" /> <Color x:Key="SemiOrange6Color">#FFC772</Color>
<SolidColorBrush x:Key="SemiOrange8" Color="#FFEFD0" /> <Color x:Key="SemiOrange7Color">#FFDDA1</Color>
<SolidColorBrush x:Key="SemiOrange9" Color="#FFF9ED" /> <Color x:Key="SemiOrange8Color">#FFEFD0</Color>
<SolidColorBrush x:Key="SemiGrey0" Color="#1C1F23" /> <Color x:Key="SemiOrange9Color">#FFF9ED</Color>
<SolidColorBrush x:Key="SemiGrey1" Color="#2E3238" /> <Color x:Key="SemiGrey0Color">#1C1F23</Color>
<SolidColorBrush x:Key="SemiGrey2" Color="#41464C" /> <Color x:Key="SemiGrey1Color">#2E3238</Color>
<SolidColorBrush x:Key="SemiGrey3" Color="#555B61" /> <Color x:Key="SemiGrey2Color">#41464C</Color>
<SolidColorBrush x:Key="SemiGrey4" Color="#6B7075" /> <Color x:Key="SemiGrey3Color">#555B61</Color>
<SolidColorBrush x:Key="SemiGrey5" Color="#888D92" /> <Color x:Key="SemiGrey4Color">#6B7075</Color>
<SolidColorBrush x:Key="SemiGrey6" Color="#A7ABB0" /> <Color x:Key="SemiGrey5Color">#888D92</Color>
<SolidColorBrush x:Key="SemiGrey7" Color="#C6CACD" /> <Color x:Key="SemiGrey6Color">#A7ABB0</Color>
<SolidColorBrush x:Key="SemiGrey8" Color="#E6E8EA" /> <Color x:Key="SemiGrey7Color">#C6CACD</Color>
<SolidColorBrush x:Key="SemiGrey9" Color="#F9F9F9" /> <Color x:Key="SemiGrey8Color">#E6E8EA</Color>
<Color x:Key="SemiGrey9Color">#F9F9F9</Color>
<SolidColorBrush x:Key="SemiRed0" Color="{StaticResource SemiRed0Color}" />
<SolidColorBrush x:Key="SemiRed1" Color="{StaticResource SemiRed1Color}" />
<SolidColorBrush x:Key="SemiRed2" Color="{StaticResource SemiRed2Color}" />
<SolidColorBrush x:Key="SemiRed3" Color="{StaticResource SemiRed3Color}" />
<SolidColorBrush x:Key="SemiRed4" Color="{StaticResource SemiRed4Color}" />
<SolidColorBrush x:Key="SemiRed5" Color="{StaticResource SemiRed5Color}" />
<SolidColorBrush x:Key="SemiRed6" Color="{StaticResource SemiRed6Color}" />
<SolidColorBrush x:Key="SemiRed7" Color="{StaticResource SemiRed7Color}" />
<SolidColorBrush x:Key="SemiRed8" Color="{StaticResource SemiRed8Color}" />
<SolidColorBrush x:Key="SemiRed9" Color="{StaticResource SemiRed9Color}" />
<SolidColorBrush x:Key="SemiPink0" Color="{StaticResource SemiPink0Color}" />
<SolidColorBrush x:Key="SemiPink1" Color="{StaticResource SemiPink1Color}" />
<SolidColorBrush x:Key="SemiPink2" Color="{StaticResource SemiPink2Color}" />
<SolidColorBrush x:Key="SemiPink3" Color="{StaticResource SemiPink3Color}" />
<SolidColorBrush x:Key="SemiPink4" Color="{StaticResource SemiPink4Color}" />
<SolidColorBrush x:Key="SemiPink5" Color="{StaticResource SemiPink5Color}" />
<SolidColorBrush x:Key="SemiPink6" Color="{StaticResource SemiPink6Color}" />
<SolidColorBrush x:Key="SemiPink7" Color="{StaticResource SemiPink7Color}" />
<SolidColorBrush x:Key="SemiPink8" Color="{StaticResource SemiPink8Color}" />
<SolidColorBrush x:Key="SemiPink9" Color="{StaticResource SemiPink9Color}" />
<SolidColorBrush x:Key="SemiPurple0" Color="{StaticResource SemiPurple0Color}" />
<SolidColorBrush x:Key="SemiPurple1" Color="{StaticResource SemiPurple1Color}" />
<SolidColorBrush x:Key="SemiPurple2" Color="{StaticResource SemiPurple2Color}" />
<SolidColorBrush x:Key="SemiPurple3" Color="{StaticResource SemiPurple3Color}" />
<SolidColorBrush x:Key="SemiPurple4" Color="{StaticResource SemiPurple4Color}" />
<SolidColorBrush x:Key="SemiPurple5" Color="{StaticResource SemiPurple5Color}" />
<SolidColorBrush x:Key="SemiPurple6" Color="{StaticResource SemiPurple6Color}" />
<SolidColorBrush x:Key="SemiPurple7" Color="{StaticResource SemiPurple7Color}" />
<SolidColorBrush x:Key="SemiPurple8" Color="{StaticResource SemiPurple8Color}" />
<SolidColorBrush x:Key="SemiPurple9" Color="{StaticResource SemiPurple9Color}" />
<SolidColorBrush x:Key="SemiViolet0" Color="{StaticResource SemiViolet0Color}" />
<SolidColorBrush x:Key="SemiViolet1" Color="{StaticResource SemiViolet1Color}" />
<SolidColorBrush x:Key="SemiViolet2" Color="{StaticResource SemiViolet2Color}" />
<SolidColorBrush x:Key="SemiViolet3" Color="{StaticResource SemiViolet3Color}" />
<SolidColorBrush x:Key="SemiViolet4" Color="{StaticResource SemiViolet4Color}" />
<SolidColorBrush x:Key="SemiViolet5" Color="{StaticResource SemiViolet5Color}" />
<SolidColorBrush x:Key="SemiViolet6" Color="{StaticResource SemiViolet6Color}" />
<SolidColorBrush x:Key="SemiViolet7" Color="{StaticResource SemiViolet7Color}" />
<SolidColorBrush x:Key="SemiViolet8" Color="{StaticResource SemiViolet8Color}" />
<SolidColorBrush x:Key="SemiViolet9" Color="{StaticResource SemiViolet9Color}" />
<SolidColorBrush x:Key="SemiIndigo0" Color="{StaticResource SemiIndigo0Color}" />
<SolidColorBrush x:Key="SemiIndigo1" Color="{StaticResource SemiIndigo1Color}" />
<SolidColorBrush x:Key="SemiIndigo2" Color="{StaticResource SemiIndigo2Color}" />
<SolidColorBrush x:Key="SemiIndigo3" Color="{StaticResource SemiIndigo3Color}" />
<SolidColorBrush x:Key="SemiIndigo4" Color="{StaticResource SemiIndigo4Color}" />
<SolidColorBrush x:Key="SemiIndigo5" Color="{StaticResource SemiIndigo5Color}" />
<SolidColorBrush x:Key="SemiIndigo6" Color="{StaticResource SemiIndigo6Color}" />
<SolidColorBrush x:Key="SemiIndigo7" Color="{StaticResource SemiIndigo7Color}" />
<SolidColorBrush x:Key="SemiIndigo8" Color="{StaticResource SemiIndigo8Color}" />
<SolidColorBrush x:Key="SemiIndigo9" Color="{StaticResource SemiIndigo9Color}" />
<SolidColorBrush x:Key="SemiBlue0" Color="{StaticResource SemiBlue0Color}" />
<SolidColorBrush x:Key="SemiBlue1" Color="{StaticResource SemiBlue1Color}" />
<SolidColorBrush x:Key="SemiBlue2" Color="{StaticResource SemiBlue2Color}" />
<SolidColorBrush x:Key="SemiBlue3" Color="{StaticResource SemiBlue3Color}" />
<SolidColorBrush x:Key="SemiBlue4" Color="{StaticResource SemiBlue4Color}" />
<SolidColorBrush x:Key="SemiBlue5" Color="{StaticResource SemiBlue5Color}" />
<SolidColorBrush x:Key="SemiBlue6" Color="{StaticResource SemiBlue6Color}" />
<SolidColorBrush x:Key="SemiBlue7" Color="{StaticResource SemiBlue7Color}" />
<SolidColorBrush x:Key="SemiBlue8" Color="{StaticResource SemiBlue8Color}" />
<SolidColorBrush x:Key="SemiBlue9" Color="{StaticResource SemiBlue9Color}" />
<SolidColorBrush x:Key="SemiLightBlue0" Color="{StaticResource SemiLightBlue0Color}" />
<SolidColorBrush x:Key="SemiLightBlue1" Color="{StaticResource SemiLightBlue1Color}" />
<SolidColorBrush x:Key="SemiLightBlue2" Color="{StaticResource SemiLightBlue2Color}" />
<SolidColorBrush x:Key="SemiLightBlue3" Color="{StaticResource SemiLightBlue3Color}" />
<SolidColorBrush x:Key="SemiLightBlue4" Color="{StaticResource SemiLightBlue4Color}" />
<SolidColorBrush x:Key="SemiLightBlue5" Color="{StaticResource SemiLightBlue5Color}" />
<SolidColorBrush x:Key="SemiLightBlue6" Color="{StaticResource SemiLightBlue6Color}" />
<SolidColorBrush x:Key="SemiLightBlue7" Color="{StaticResource SemiLightBlue7Color}" />
<SolidColorBrush x:Key="SemiLightBlue8" Color="{StaticResource SemiLightBlue8Color}" />
<SolidColorBrush x:Key="SemiLightBlue9" Color="{StaticResource SemiLightBlue9Color}" />
<SolidColorBrush x:Key="SemiCyan0" Color="{StaticResource SemiCyan0Color}" />
<SolidColorBrush x:Key="SemiCyan1" Color="{StaticResource SemiCyan1Color}" />
<SolidColorBrush x:Key="SemiCyan2" Color="{StaticResource SemiCyan2Color}" />
<SolidColorBrush x:Key="SemiCyan3" Color="{StaticResource SemiCyan3Color}" />
<SolidColorBrush x:Key="SemiCyan4" Color="{StaticResource SemiCyan4Color}" />
<SolidColorBrush x:Key="SemiCyan5" Color="{StaticResource SemiCyan5Color}" />
<SolidColorBrush x:Key="SemiCyan6" Color="{StaticResource SemiCyan6Color}" />
<SolidColorBrush x:Key="SemiCyan7" Color="{StaticResource SemiCyan7Color}" />
<SolidColorBrush x:Key="SemiCyan8" Color="{StaticResource SemiCyan8Color}" />
<SolidColorBrush x:Key="SemiCyan9" Color="{StaticResource SemiCyan9Color}" />
<SolidColorBrush x:Key="SemiTeal0" Color="{StaticResource SemiTeal0Color}" />
<SolidColorBrush x:Key="SemiTeal1" Color="{StaticResource SemiTeal1Color}" />
<SolidColorBrush x:Key="SemiTeal2" Color="{StaticResource SemiTeal2Color}" />
<SolidColorBrush x:Key="SemiTeal3" Color="{StaticResource SemiTeal3Color}" />
<SolidColorBrush x:Key="SemiTeal4" Color="{StaticResource SemiTeal4Color}" />
<SolidColorBrush x:Key="SemiTeal5" Color="{StaticResource SemiTeal5Color}" />
<SolidColorBrush x:Key="SemiTeal6" Color="{StaticResource SemiTeal6Color}" />
<SolidColorBrush x:Key="SemiTeal7" Color="{StaticResource SemiTeal7Color}" />
<SolidColorBrush x:Key="SemiTeal8" Color="{StaticResource SemiTeal8Color}" />
<SolidColorBrush x:Key="SemiTeal9" Color="{StaticResource SemiTeal9Color}" />
<SolidColorBrush x:Key="SemiGreen0" Color="{StaticResource SemiGreen0Color}" />
<SolidColorBrush x:Key="SemiGreen1" Color="{StaticResource SemiGreen1Color}" />
<SolidColorBrush x:Key="SemiGreen2" Color="{StaticResource SemiGreen2Color}" />
<SolidColorBrush x:Key="SemiGreen3" Color="{StaticResource SemiGreen3Color}" />
<SolidColorBrush x:Key="SemiGreen4" Color="{StaticResource SemiGreen4Color}" />
<SolidColorBrush x:Key="SemiGreen5" Color="{StaticResource SemiGreen5Color}" />
<SolidColorBrush x:Key="SemiGreen6" Color="{StaticResource SemiGreen6Color}" />
<SolidColorBrush x:Key="SemiGreen7" Color="{StaticResource SemiGreen7Color}" />
<SolidColorBrush x:Key="SemiGreen8" Color="{StaticResource SemiGreen8Color}" />
<SolidColorBrush x:Key="SemiGreen9" Color="{StaticResource SemiGreen9Color}" />
<SolidColorBrush x:Key="SemiLightGreen0" Color="{StaticResource SemiLightGreen0Color}" />
<SolidColorBrush x:Key="SemiLightGreen1" Color="{StaticResource SemiLightGreen1Color}" />
<SolidColorBrush x:Key="SemiLightGreen2" Color="{StaticResource SemiLightGreen2Color}" />
<SolidColorBrush x:Key="SemiLightGreen3" Color="{StaticResource SemiLightGreen3Color}" />
<SolidColorBrush x:Key="SemiLightGreen4" Color="{StaticResource SemiLightGreen4Color}" />
<SolidColorBrush x:Key="SemiLightGreen5" Color="{StaticResource SemiLightGreen5Color}" />
<SolidColorBrush x:Key="SemiLightGreen6" Color="{StaticResource SemiLightGreen6Color}" />
<SolidColorBrush x:Key="SemiLightGreen7" Color="{StaticResource SemiLightGreen7Color}" />
<SolidColorBrush x:Key="SemiLightGreen8" Color="{StaticResource SemiLightGreen8Color}" />
<SolidColorBrush x:Key="SemiLightGreen9" Color="{StaticResource SemiLightGreen9Color}" />
<SolidColorBrush x:Key="SemiLime0" Color="{StaticResource SemiLime0Color}" />
<SolidColorBrush x:Key="SemiLime1" Color="{StaticResource SemiLime1Color}" />
<SolidColorBrush x:Key="SemiLime2" Color="{StaticResource SemiLime2Color}" />
<SolidColorBrush x:Key="SemiLime3" Color="{StaticResource SemiLime3Color}" />
<SolidColorBrush x:Key="SemiLime4" Color="{StaticResource SemiLime4Color}" />
<SolidColorBrush x:Key="SemiLime5" Color="{StaticResource SemiLime5Color}" />
<SolidColorBrush x:Key="SemiLime6" Color="{StaticResource SemiLime6Color}" />
<SolidColorBrush x:Key="SemiLime7" Color="{StaticResource SemiLime7Color}" />
<SolidColorBrush x:Key="SemiLime8" Color="{StaticResource SemiLime8Color}" />
<SolidColorBrush x:Key="SemiLime9" Color="{StaticResource SemiLime9Color}" />
<SolidColorBrush x:Key="SemiYellow0" Color="{StaticResource SemiYellow0Color}" />
<SolidColorBrush x:Key="SemiYellow1" Color="{StaticResource SemiYellow1Color}" />
<SolidColorBrush x:Key="SemiYellow2" Color="{StaticResource SemiYellow2Color}" />
<SolidColorBrush x:Key="SemiYellow3" Color="{StaticResource SemiYellow3Color}" />
<SolidColorBrush x:Key="SemiYellow4" Color="{StaticResource SemiYellow4Color}" />
<SolidColorBrush x:Key="SemiYellow5" Color="{StaticResource SemiYellow5Color}" />
<SolidColorBrush x:Key="SemiYellow6" Color="{StaticResource SemiYellow6Color}" />
<SolidColorBrush x:Key="SemiYellow7" Color="{StaticResource SemiYellow7Color}" />
<SolidColorBrush x:Key="SemiYellow8" Color="{StaticResource SemiYellow8Color}" />
<SolidColorBrush x:Key="SemiYellow9" Color="{StaticResource SemiYellow9Color}" />
<SolidColorBrush x:Key="SemiAmber0" Color="{StaticResource SemiAmber0Color}" />
<SolidColorBrush x:Key="SemiAmber1" Color="{StaticResource SemiAmber1Color}" />
<SolidColorBrush x:Key="SemiAmber2" Color="{StaticResource SemiAmber2Color}" />
<SolidColorBrush x:Key="SemiAmber3" Color="{StaticResource SemiAmber3Color}" />
<SolidColorBrush x:Key="SemiAmber4" Color="{StaticResource SemiAmber4Color}" />
<SolidColorBrush x:Key="SemiAmber5" Color="{StaticResource SemiAmber5Color}" />
<SolidColorBrush x:Key="SemiAmber6" Color="{StaticResource SemiAmber6Color}" />
<SolidColorBrush x:Key="SemiAmber7" Color="{StaticResource SemiAmber7Color}" />
<SolidColorBrush x:Key="SemiAmber8" Color="{StaticResource SemiAmber8Color}" />
<SolidColorBrush x:Key="SemiAmber9" Color="{StaticResource SemiAmber9Color}" />
<SolidColorBrush x:Key="SemiOrange0" Color="{StaticResource SemiOrange0Color}" />
<SolidColorBrush x:Key="SemiOrange1" Color="{StaticResource SemiOrange1Color}" />
<SolidColorBrush x:Key="SemiOrange2" Color="{StaticResource SemiOrange2Color}" />
<SolidColorBrush x:Key="SemiOrange3" Color="{StaticResource SemiOrange3Color}" />
<SolidColorBrush x:Key="SemiOrange4" Color="{StaticResource SemiOrange4Color}" />
<SolidColorBrush x:Key="SemiOrange5" Color="{StaticResource SemiOrange5Color}" />
<SolidColorBrush x:Key="SemiOrange6" Color="{StaticResource SemiOrange6Color}" />
<SolidColorBrush x:Key="SemiOrange7" Color="{StaticResource SemiOrange7Color}" />
<SolidColorBrush x:Key="SemiOrange8" Color="{StaticResource SemiOrange8Color}" />
<SolidColorBrush x:Key="SemiOrange9" Color="{StaticResource SemiOrange9Color}" />
<SolidColorBrush x:Key="SemiGrey0" Color="{StaticResource SemiGrey0Color}" />
<SolidColorBrush x:Key="SemiGrey1" Color="{StaticResource SemiGrey1Color}" />
<SolidColorBrush x:Key="SemiGrey2" Color="{StaticResource SemiGrey2Color}" />
<SolidColorBrush x:Key="SemiGrey3" Color="{StaticResource SemiGrey3Color}" />
<SolidColorBrush x:Key="SemiGrey4" Color="{StaticResource SemiGrey4Color}" />
<SolidColorBrush x:Key="SemiGrey5" Color="{StaticResource SemiGrey5Color}" />
<SolidColorBrush x:Key="SemiGrey6" Color="{StaticResource SemiGrey6Color}" />
<SolidColorBrush x:Key="SemiGrey7" Color="{StaticResource SemiGrey7Color}" />
<SolidColorBrush x:Key="SemiGrey8" Color="{StaticResource SemiGrey8Color}" />
<SolidColorBrush x:Key="SemiGrey9" Color="{StaticResource SemiGrey9Color}" />
<!-- Primary --> <!-- Primary -->
<SolidColorBrush x:Key="SemiColorPrimary" Color="#FF54A9FF" /> <SolidColorBrush x:Key="SemiColorPrimary" Color="{StaticResource SemiBlue5Color}" />
<SolidColorBrush x:Key="SemiColorPrimaryPointerover" Color="#FF7FC1FF" /> <SolidColorBrush x:Key="SemiColorPrimaryPointerover" Color="{StaticResource SemiBlue6Color}" />
<SolidColorBrush x:Key="SemiColorPrimaryPressed" Color="#FFA9D7FF" /> <SolidColorBrush x:Key="SemiColorPrimaryPressed" Color="{StaticResource SemiBlue7Color}" />
<SolidColorBrush x:Key="SemiColorPrimaryDisabled" Color="#FF135CB8" /> <SolidColorBrush x:Key="SemiColorPrimaryDisabled" Color="{StaticResource SemiBlue2Color}" />
<SolidColorBrush x:Key="SemiColorPrimaryLight" Opacity="0.2" Color="#FF54A9FF" /> <SolidColorBrush x:Key="SemiColorPrimaryLight" Opacity="0.2" Color="{StaticResource SemiBlue5Color}" />
<SolidColorBrush x:Key="SemiColorPrimaryLightPointerover" Opacity="0.3" Color="#FF54A9FF" /> <SolidColorBrush x:Key="SemiColorPrimaryLightPointerover" Opacity="0.3" Color="{StaticResource SemiBlue5Color}" />
<SolidColorBrush x:Key="SemiColorPrimaryLightActive" Opacity="0.4" Color="#FF54A9FF" /> <SolidColorBrush x:Key="SemiColorPrimaryLightActive" Opacity="0.4" Color="{StaticResource SemiBlue5Color}" />
<!-- Secondary --> <!-- Secondary -->
<SolidColorBrush x:Key="SemiColorSecondary" Color="#FF40B4F3" /> <SolidColorBrush x:Key="SemiColorSecondary" Color="{StaticResource SemiLightBlue5Color}" />
<SolidColorBrush x:Key="SemiColorSecondaryPointerover" Color="#FF6EC8F6" /> <SolidColorBrush x:Key="SemiColorSecondaryPointerover" Color="{StaticResource SemiLightBlue6Color}" />
<SolidColorBrush x:Key="SemiColorSecondaryPressed" Color="#FF9DDCF9" /> <SolidColorBrush x:Key="SemiColorSecondaryPressed" Color="{StaticResource SemiLightBlue7Color}" />
<SolidColorBrush x:Key="SemiColorSecondaryDisabled" Color="#FF0366A9" /> <SolidColorBrush x:Key="SemiColorSecondaryDisabled" Color="{StaticResource SemiLightBlue2Color}" />
<SolidColorBrush x:Key="SemiColorSecondaryLight" Opacity="0.2" Color="#FF40B4F3" /> <SolidColorBrush x:Key="SemiColorSecondaryLight" Opacity="0.2" Color="{StaticResource SemiLightBlue5Color}" />
<SolidColorBrush x:Key="SemiColorSecondaryLightPointerover" Opacity="0.3" Color="#FF40B4F3" /> <SolidColorBrush x:Key="SemiColorSecondaryLightPointerover" Opacity="0.3" Color="{StaticResource SemiLightBlue5Color}" />
<SolidColorBrush x:Key="SemiColorSecondaryLightActive" Opacity="0.4" Color="#FF40B4F3" /> <SolidColorBrush x:Key="SemiColorSecondaryLightActive" Opacity="0.4" Color="{StaticResource SemiLightBlue5Color}" />
<!-- Tertiary --> <!-- Tertiary -->
<SolidColorBrush x:Key="SemiColorTertiary" Color="#FF888D92" /> <SolidColorBrush x:Key="SemiColorTertiary" Color="{StaticResource SemiGrey5Color}" />
<SolidColorBrush x:Key="SemiColorTertiaryPointerover" Color="#FFA7ABB0" /> <SolidColorBrush x:Key="SemiColorTertiaryPointerover" Color="{StaticResource SemiGrey6Color}" />
<SolidColorBrush x:Key="SemiColorTertiaryPressed" Color="#FFC6CACD" /> <SolidColorBrush x:Key="SemiColorTertiaryPressed" Color="{StaticResource SemiGrey7Color}" />
<SolidColorBrush x:Key="SemiColorTertiaryLight" Opacity="0.2" Color="#FF888D92" /> <SolidColorBrush x:Key="SemiColorTertiaryLight" Opacity="0.2" Color="{StaticResource SemiGrey5Color}" />
<SolidColorBrush x:Key="SemiColorTertiaryLightPointerover" Opacity="0.3" Color="#FF888D92" /> <SolidColorBrush x:Key="SemiColorTertiaryLightPointerover" Opacity="0.3" Color="{StaticResource SemiGrey5Color}" />
<SolidColorBrush x:Key="SemiColorTertiaryLightActive" Opacity="0.4" Color="#FF888D92" /> <SolidColorBrush x:Key="SemiColorTertiaryLightActive" Opacity="0.4" Color="{StaticResource SemiGrey5Color}" />
<!-- Information --> <!-- Information -->
<SolidColorBrush x:Key="SemiColorInformation" Color="#FF54A9FF" /> <SolidColorBrush x:Key="SemiColorInformation" Color="{StaticResource SemiBlue5Color}" />
<SolidColorBrush x:Key="SemiColorInformationPointerover" Color="#FF7FC1FF" /> <SolidColorBrush x:Key="SemiColorInformationPointerover" Color="{StaticResource SemiBlue6Color}" />
<SolidColorBrush x:Key="SemiColorInformationPressed" Color="#FFA9D7FF" /> <SolidColorBrush x:Key="SemiColorInformationPressed" Color="{StaticResource SemiBlue7Color}" />
<SolidColorBrush x:Key="SemiColorInformationDisabled" Color="#FF135CB8" /> <SolidColorBrush x:Key="SemiColorInformationDisabled" Color="{StaticResource SemiBlue2Color}" />
<SolidColorBrush x:Key="SemiColorInformationLight" Opacity="0.2" Color="#FF54A9FF" /> <SolidColorBrush x:Key="SemiColorInformationLight" Opacity="0.2" Color="{StaticResource SemiBlue5Color}" />
<SolidColorBrush x:Key="SemiColorInformationLightPointerover" Opacity="0.3" Color="#FF54A9FF" /> <SolidColorBrush x:Key="SemiColorInformationLightPointerover" Opacity="0.3" Color="{StaticResource SemiBlue5Color}" />
<SolidColorBrush x:Key="SemiColorInformationLightActive" Opacity="0.4" Color="#FF54A9FF" /> <SolidColorBrush x:Key="SemiColorInformationLightActive" Opacity="0.4" Color="{StaticResource SemiBlue5Color}" />
<!-- Success --> <!-- Success -->
<SolidColorBrush x:Key="SemiColorSuccess" Color="#FF5DC264" /> <SolidColorBrush x:Key="SemiColorSuccess" Color="{StaticResource SemiGreen5Color}" />
<SolidColorBrush x:Key="SemiColorSuccessPointerover" Color="#FF7FD184" /> <SolidColorBrush x:Key="SemiColorSuccessPointerover" Color="{StaticResource SemiGreen6Color}" />
<SolidColorBrush x:Key="SemiColorSuccessPressed" Color="#FFA6E1A8" /> <SolidColorBrush x:Key="SemiColorSuccessPressed" Color="{StaticResource SemiGreen7Color}" />
<SolidColorBrush x:Key="SemiColorSuccessDisabled" Color="#FF277731" /> <SolidColorBrush x:Key="SemiColorSuccessDisabled" Color="{StaticResource SemiGreen2Color}" />
<SolidColorBrush x:Key="SemiColorSuccessLight" Opacity="0.2" Color="#FF5DC264" /> <SolidColorBrush x:Key="SemiColorSuccessLight" Opacity="0.2" Color="{StaticResource SemiGreen5Color}" />
<SolidColorBrush x:Key="SemiColorSuccessLightPointerover" Opacity="0.3" Color="#FF5DC264" /> <SolidColorBrush x:Key="SemiColorSuccessLightPointerover" Opacity="0.3" Color="{StaticResource SemiGreen5Color}" />
<SolidColorBrush x:Key="SemiColorSuccessLightActive" Opacity="0.4" Color="#FF5DC264" /> <SolidColorBrush x:Key="SemiColorSuccessLightActive" Opacity="0.4" Color="{StaticResource SemiGreen5Color}" />
<!-- Warning --> <!-- Warning -->
<SolidColorBrush x:Key="SemiColorWarning" Color="#FFFFAE43" /> <SolidColorBrush x:Key="SemiColorWarning" Color="{StaticResource SemiOrange5Color}" />
<SolidColorBrush x:Key="SemiColorWarningPointerover" Color="#FFFFC772" /> <SolidColorBrush x:Key="SemiColorWarningPointerover" Color="{StaticResource SemiOrange6Color}" />
<SolidColorBrush x:Key="SemiColorWarningPressed" Color="#FFFFDDA1" /> <SolidColorBrush x:Key="SemiColorWarningPressed" Color="{StaticResource SemiOrange7Color}" />
<SolidColorBrush x:Key="SemiColorWarningLight" Opacity="0.2" Color="#FFFFAE43" /> <SolidColorBrush x:Key="SemiColorWarningLight" Opacity="0.2" Color="{StaticResource SemiOrange5Color}" />
<SolidColorBrush x:Key="SemiColorWarningLightPointerover" Opacity="0.3" Color="#FFFFAE43" /> <SolidColorBrush x:Key="SemiColorWarningLightPointerover" Opacity="0.3" Color="{StaticResource SemiOrange5Color}" />
<SolidColorBrush x:Key="SemiColorWarningLightActive" Opacity="0.4" Color="#FFFFAE43" /> <SolidColorBrush x:Key="SemiColorWarningLightActive" Opacity="0.4" Color="{StaticResource SemiOrange5Color}" />
<!-- Danger --> <!-- Danger -->
<SolidColorBrush x:Key="SemiColorDanger" Color="#FFFC725A" /> <SolidColorBrush x:Key="SemiColorDanger" Color="{StaticResource SemiRed5Color}" />
<SolidColorBrush x:Key="SemiColorDangerPointerover" Color="#FFFD9983" /> <SolidColorBrush x:Key="SemiColorDangerPointerover" Color="{StaticResource SemiRed6Color}" />
<SolidColorBrush x:Key="SemiColorDangerPressed" Color="#FFFDBEAC" /> <SolidColorBrush x:Key="SemiColorDangerPressed" Color="{StaticResource SemiRed7Color}" />
<SolidColorBrush x:Key="SemiColorDangerLight" Opacity="0.2" Color="#FFFC725A" /> <SolidColorBrush x:Key="SemiColorDangerLight" Opacity="0.2" Color="{StaticResource SemiRed5Color}" />
<SolidColorBrush x:Key="SemiColorDangerLightPointerover" Opacity="0.3" Color="#FFFC725A" /> <SolidColorBrush x:Key="SemiColorDangerLightPointerover" Opacity="0.3" Color="{StaticResource SemiRed5Color}" />
<SolidColorBrush x:Key="SemiColorDangerLightActive" Opacity="0.4" Color="#FFFC725A" /> <SolidColorBrush x:Key="SemiColorDangerLightActive" Opacity="0.4" Color="{StaticResource SemiRed5Color}" />
<!-- Text and Icons --> <!-- Text and Icons -->
<SolidColorBrush x:Key="SemiColorText0" Color="#FFF9F9F9" /> <SolidColorBrush x:Key="SemiColorText0" Color="{StaticResource SemiGrey9Color}" />
<SolidColorBrush x:Key="SemiColorText1" Opacity="0.8" Color="#FFF9F9F9" /> <SolidColorBrush x:Key="SemiColorText1" Opacity="0.8" Color="{StaticResource SemiGrey9Color}" />
<SolidColorBrush x:Key="SemiColorText2" Opacity="0.6" Color="#FFF9F9F9" /> <SolidColorBrush x:Key="SemiColorText2" Opacity="0.6" Color="{StaticResource SemiGrey9Color}" />
<SolidColorBrush x:Key="SemiColorText3" Opacity="0.35" Color="#FFF9F9F9" /> <SolidColorBrush x:Key="SemiColorText3" Opacity="0.35" Color="{StaticResource SemiGrey9Color}" />
<!-- Link --> <!-- Link -->
<SolidColorBrush x:Key="SemiColorLink" Color="#FF54A9FF" /> <SolidColorBrush x:Key="SemiColorLink" Color="{StaticResource SemiBlue5Color}" />
<SolidColorBrush x:Key="SemiColorLinkPointerover" Color="#FF7FC1FF" /> <SolidColorBrush x:Key="SemiColorLinkPointerover" Color="{StaticResource SemiBlue6Color}" />
<SolidColorBrush x:Key="SemiColorLinkActive" Color="#FFA9D7FF" /> <SolidColorBrush x:Key="SemiColorLinkActive" Color="{StaticResource SemiBlue7Color}" />
<SolidColorBrush x:Key="SemiColorLinkVisited" Color="#FF54A9FF" /> <SolidColorBrush x:Key="SemiColorLinkVisited" Color="{StaticResource SemiBlue5Color}" />
<!-- Background --> <!-- Background -->
<SolidColorBrush x:Key="SemiColorBackground0" Color="#FF16161A" /> <SolidColorBrush x:Key="SemiColorBackground0" Color="#FF16161A" />
@@ -243,8 +405,9 @@
<SolidColorBrush x:Key="SemiColorBorder" Opacity="0.08" Color="White" /> <SolidColorBrush x:Key="SemiColorBorder" Opacity="0.08" Color="White" />
<!-- Disabled --> <!-- Disabled -->
<SolidColorBrush x:Key="SemiColorDisabledText" Opacity="0.35" Color="#FFF9F9F9" /> <SolidColorBrush x:Key="SemiColorDisabledText" Opacity="0.35" Color="{StaticResource SemiGrey9Color}" />
<SolidColorBrush x:Key="SemiColorDisabledBorder" Color="#FF2E3238" /> <SolidColorBrush x:Key="SemiColorDisabledBorder" Color="{StaticResource SemiGrey1Color}" />
<SolidColorBrush x:Key="SemiColorDisabledBackground" Color="#FF2E3238" /> <SolidColorBrush x:Key="SemiColorDisabledBackground" Color="{StaticResource SemiGrey1Color}" />
<SolidColorBrush x:Key="SemiColorDisabledFill" Opacity="0.04" Color="#FFE6E8EA" /> <SolidColorBrush x:Key="SemiColorDisabledFill" Opacity="0.04" Color="{StaticResource SemiGrey8Color}" />
</ResourceDictionary> </ResourceDictionary>

View File

@@ -7,24 +7,25 @@
<sys:Double x:Key="RadioButtonFontSize">14</sys:Double> <sys:Double x:Key="RadioButtonFontSize">14</sys:Double>
<Thickness x:Key="RadioButtonIconMargin">0 2 8 0</Thickness> <Thickness x:Key="RadioButtonIconMargin">0 2 8 0</Thickness>
<SolidColorBrush x:Key="RadioButtonDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
<SolidColorBrush x:Key="RadioButtonUncheckIconDefaultBackground" Color="Transparent" /> <SolidColorBrush x:Key="RadioButtonUncheckIconDefaultBackground" Color="Transparent" />
<SolidColorBrush x:Key="RadioButtonUncheckIconPointOverBackground" Opacity="0.12" Color="White" /> <SolidColorBrush x:Key="RadioButtonUncheckIconPointeroverBackground" Opacity="0.12" Color="White" />
<SolidColorBrush x:Key="RadioButtonUncheckIconPressedBackground" Opacity="0.16" Color="White" /> <SolidColorBrush x:Key="RadioButtonUncheckIconPressedBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="RadioButtonUncheckIconDisabledBackground" Opacity="0.12" Color="White" /> <SolidColorBrush x:Key="RadioButtonUncheckIconDisabledBackground" Opacity="0.12" Color="White" />
<SolidColorBrush x:Key="RadioButtonUncheckIconDefaultBorderBrush" Opacity="0.35" Color="#F9F9F9" /> <SolidColorBrush x:Key="RadioButtonUncheckIconDefaultBorderBrush" Opacity="0.35" Color="#F9F9F9" />
<SolidColorBrush x:Key="RadioButtonUncheckIconPointOverBorderBrush" Color="#7FC1FF" /> <SolidColorBrush x:Key="RadioButtonUncheckIconPointeroverBorderBrush" Color="#7FC1FF" />
<SolidColorBrush x:Key="RadioButtonUncheckIconPressedBorderBrush" Color="#A9D7FF" /> <SolidColorBrush x:Key="RadioButtonUncheckIconPressedBorderBrush" Color="#A9D7FF" />
<SolidColorBrush x:Key="RadioButtonUncheckIconDisabledBorderBrush" Opacity="0.08" Color="#F9F9F9" /> <SolidColorBrush x:Key="RadioButtonUncheckIconDisabledBorderBrush" Opacity="0.08" Color="#F9F9F9" />
<SolidColorBrush x:Key="RadioButtonCheckIconDefaultBackground" Color="#54A9FF" /> <SolidColorBrush x:Key="RadioButtonCheckIconDefaultBackground" Color="#54A9FF" />
<SolidColorBrush x:Key="RadioButtonCheckIconPointOverBackground" Color="#7FC1FF" /> <SolidColorBrush x:Key="RadioButtonCheckIconPointeroverBackground" Color="#7FC1FF" />
<SolidColorBrush x:Key="RadioButtonCheckIconPressedBackground" Color="#A9D7FF" /> <SolidColorBrush x:Key="RadioButtonCheckIconPressedBackground" Color="#A9D7FF" />
<SolidColorBrush x:Key="RadioButtonCheckIconDisabledBackground" Color="#135cb8" /> <SolidColorBrush x:Key="RadioButtonCheckIconDisabledBackground" Color="#135cb8" />
<SolidColorBrush x:Key="RadioButtonCheckIconDefaultBorderBrush" Color="#54A9FF" /> <SolidColorBrush x:Key="RadioButtonCheckIconDefaultBorderBrush" Color="#54A9FF" />
<SolidColorBrush x:Key="RadioButtonCheckIconPointOverBorderBrush" Color="#7FC1FF" /> <SolidColorBrush x:Key="RadioButtonCheckIconPointeroverBorderBrush" Color="#7FC1FF" />
<SolidColorBrush x:Key="RadioButtonCheckIconPressedBorderBrush" Color="#A9D7FF" /> <SolidColorBrush x:Key="RadioButtonCheckIconPressedBorderBrush" Color="#A9D7FF" />
<SolidColorBrush x:Key="RadioButtonCheckIconDisabledBorderBrush" Color="#135cb8" /> <SolidColorBrush x:Key="RadioButtonCheckIconDisabledBorderBrush" Color="#135cb8" />
@@ -46,21 +47,23 @@
<sys:Double x:Key="RadioButtonButtonDefaultFontSize">12</sys:Double> <sys:Double x:Key="RadioButtonButtonDefaultFontSize">12</sys:Double>
<sys:Double x:Key="RadioButtonButtonLargeFontSize">14</sys:Double> <sys:Double x:Key="RadioButtonButtonLargeFontSize">14</sys:Double>
<SolidColorBrush x:Key="RadioButtonButtonCheckedForeground" Color="#54A9FF" />
<SolidColorBrush x:Key="RadioButtonButtonUncheckedPointeroverBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="RadioButtonButtonUncheckedForeground" Opacity="0.8" Color="#F9F9F9" /> <SolidColorBrush x:Key="RadioButtonButtonUncheckedForeground" Opacity="0.8" Color="#F9F9F9" />
<SolidColorBrush x:Key="RadioButtonButtonUncheckedPointeroverBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="RadioButtonButtonUncheckedDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
<SolidColorBrush x:Key="RadioButtonButtonCheckedBackground" Color="#43444A" /> <SolidColorBrush x:Key="RadioButtonButtonCheckedBackground" Color="#43444A" />
<SolidColorBrush x:Key="RadioButtonButtonCheckedForeground" Color="#54A9FF" />
<SolidColorBrush x:Key="RadioButtonButtonCheckedDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
<Thickness x:Key="RadioButtonCardPadding">16 12</Thickness> <Thickness x:Key="RadioButtonCardPadding">16 12</Thickness>
<SolidColorBrush x:Key="RadioButtonCardDefaultBackground" Color="Transparent" /> <SolidColorBrush x:Key="RadioButtonCardDefaultBackground" Color="Transparent" />
<SolidColorBrush x:Key="RadioButtonCardDefaultBorderBrush" Color="Transparent" /> <SolidColorBrush x:Key="RadioButtonCardDefaultBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="RadioButtonCardCheckedBackground" Color="#053170" /> <SolidColorBrush x:Key="RadioButtonCardCheckedBackground" Opacity="0.2" Color="#FF54A9FF" />
<SolidColorBrush x:Key="RadioButtonCardCheckDefaultBorderBrush" Color="#54A9FF" /> <SolidColorBrush x:Key="RadioButtonCardCheckDefaultBorderBrush" Color="#54A9FF" />
<SolidColorBrush x:Key="RadioButtonCardCheckPointOverBorderBrush" Color="#7FC1FF" /> <SolidColorBrush x:Key="RadioButtonCardCheckPointeroverBorderBrush" Color="#7FC1FF" />
<SolidColorBrush x:Key="RadioButtonCardCheckPressedBorderBrush" Color="#A9D7FF" /> <SolidColorBrush x:Key="RadioButtonCardCheckPressedBorderBrush" Color="#A9D7FF" />
<SolidColorBrush x:Key="RadioButtonCardCheckDisabledBorderBrush" Color="#135cb8" /> <SolidColorBrush x:Key="RadioButtonCardCheckDisabledBorderBrush" Color="#135cb8" />
<SolidColorBrush x:Key="RadioButtonCardUncheckPointOverBackground" Opacity="0.12" Color="White" /> <SolidColorBrush x:Key="RadioButtonCardUncheckPointeroverBackground" Opacity="0.12" Color="White" />
<SolidColorBrush x:Key="RadioButtonCardUncheckPressedBackground" Opacity="0.16" Color="White" /> <SolidColorBrush x:Key="RadioButtonCardUncheckPressedBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="RadioButtonCardUncheckDisabledBackground" Opacity="0.12" Color="White" /> <SolidColorBrush x:Key="RadioButtonCardUncheckDisabledBackground" Opacity="0.12" Color="White" />

View File

@@ -6,7 +6,7 @@
<sys:Double x:Key="ScrollBarThumbThickness">8</sys:Double> <sys:Double x:Key="ScrollBarThumbThickness">8</sys:Double>
<SolidColorBrush x:Key="ScrollBarButtonDefaultBackground" Color="Transparent" /> <SolidColorBrush x:Key="ScrollBarButtonDefaultBackground" Color="Transparent" />
<SolidColorBrush x:Key="ScrollBarButtonDefaultForeground" Opacity="0.62" Color="#F9F9F9" /> <SolidColorBrush x:Key="ScrollBarButtonDefaultForeground" Opacity="0.62" Color="#F9F9F9" />
<SolidColorBrush x:Key="ScrollBarButtonPointerOverForeground" Color="#F9F9F9" /> <SolidColorBrush x:Key="ScrollBarButtonPointeroverForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="ScrollBarThumbForeground" Opacity="0.35" Color="#F9F9F9" /> <SolidColorBrush x:Key="ScrollBarThumbForeground" Opacity="0.35" Color="#F9F9F9" />
<SolidColorBrush x:Key="ScrollBarBackground" Opacity="0.12" Color="White" /> <SolidColorBrush x:Key="ScrollBarBackground" Opacity="0.12" Color="White" />
</ResourceDictionary> </ResourceDictionary>

View File

@@ -9,14 +9,14 @@
<SolidColorBrush x:Key="TextBoxPointeroverBackground" Opacity="0.16" Color="White" /> <SolidColorBrush x:Key="TextBoxPointeroverBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="TextBoxPressedBackground" Opacity="0.2" Color="White" /> <SolidColorBrush x:Key="TextBoxPressedBackground" Opacity="0.2" Color="White" />
<SolidColorBrush x:Key="TextBoxFocusBackground" Opacity="0.16" Color="White" /> <SolidColorBrush x:Key="TextBoxFocusBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="TextBoxPointerOverBorderBrush" Color="Transparent" /> <SolidColorBrush x:Key="TextBoxPointeroverBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="TextBoxFocusBorderBrush" Color="#54A9FF" /> <SolidColorBrush x:Key="TextBoxFocusBorderBrush" Color="#54A9FF" />
<SolidColorBrush x:Key="TextBoxForeground" Color="#F9F9F9" /> <SolidColorBrush x:Key="TextBoxForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="TextBoxWatermarkForeground" Color="#F9F9F9" /> <SolidColorBrush x:Key="TextBoxWatermarkForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="TextBoxInnerForeground" Opacity="0.6" Color="#F9F9F9" /> <SolidColorBrush x:Key="TextBoxInnerForeground" Opacity="0.6" Color="#F9F9F9" />
<SolidColorBrush x:Key="TextBoxButtonDefaultForeground" Opacity="0.2" Color="#E6E8EA" /> <SolidColorBrush x:Key="TextBoxButtonDefaultForeground" Opacity="0.2" Color="#E6E8EA" />
<SolidColorBrush x:Key="TextBoxButtonPointerOverForeground" Opacity="0.4" Color="#E6E8EA" /> <SolidColorBrush x:Key="TextBoxButtonPointeroverForeground" Opacity="0.4" Color="#E6E8EA" />
<SolidColorBrush x:Key="TextBoxDisabledBackground" Opacity="0.04" Color="#E6E8EA" /> <SolidColorBrush x:Key="TextBoxDisabledBackground" Opacity="0.04" Color="#E6E8EA" />
<SolidColorBrush x:Key="TextBoxDisabledForeground" Opacity="0.35" Color="#F9F9F9" /> <SolidColorBrush x:Key="TextBoxDisabledForeground" Opacity="0.35" Color="#F9F9F9" />

View File

@@ -15,58 +15,83 @@
<SolidColorBrush x:Key="ToggleButtonDefaultBackground" Opacity="0.12" Color="White" /> <SolidColorBrush x:Key="ToggleButtonDefaultBackground" Opacity="0.12" Color="White" />
<SolidColorBrush x:Key="ToggleButtonDefaultPointeroverBackground" Opacity="0.16" Color="White" /> <SolidColorBrush x:Key="ToggleButtonDefaultPointeroverBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="ToggleButtonDefaultPressedBackground" Opacity="0.20" Color="White" /> <SolidColorBrush x:Key="ToggleButtonDefaultPressedBackground" Opacity="0.20" Color="White" />
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledBackground" Opacity="0.12" Color="White" /> <SolidColorBrush x:Key="ToggleButtonDefaultDisabledBackground" Opacity="0.04" Color="#E6E8EA" />
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
<SolidColorBrush x:Key="ToggleButtonDefaultBorderBrush" Color="Transparent" /> <SolidColorBrush x:Key="ToggleButtonDefaultBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="ToggleButtonDefaultPrimaryForeground" Color="#54A9FF" /> <SolidColorBrush x:Key="ToggleButtonDefaultPrimaryForeground" Color="#54A9FF" />
<SolidColorBrush x:Key="ToggleButtonDefaultSecondaryForeground" Color="#40B4F3" /> <SolidColorBrush x:Key="ToggleButtonDefaultSecondaryForeground" Color="#40B4F3" />
<SolidColorBrush x:Key="ToggleButtonDefaultTertiaryForeground" Color="#888D92" /> <SolidColorBrush x:Key="ToggleButtonDefaultTertiaryForeground" Color="#888D92" />
<SolidColorBrush x:Key="ToggleButtonDefaultSuccessForeground" Color="#5DC264" />
<SolidColorBrush x:Key="ToggleButtonDefaultWarningForeground" Color="#FFAE43" /> <SolidColorBrush x:Key="ToggleButtonDefaultWarningForeground" Color="#FFAE43" />
<SolidColorBrush x:Key="ToggleButtonDefaultErrorForeground" Color="#FC725A" /> <SolidColorBrush x:Key="ToggleButtonDefaultDangerForeground" Color="#FC725A" />
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledForeground" Color="#2E3238" />
<SolidColorBrush x:Key="ToggleButtonPrimaryCheckedBackground" Color="#54A9FF" /> <SolidColorBrush x:Key="ToggleButtonPrimaryCheckedBackground" Color="#54A9FF" />
<SolidColorBrush x:Key="ToggleButtonSecondaryCheckedBackground" Color="#40B4F3" /> <SolidColorBrush x:Key="ToggleButtonSecondaryCheckedBackground" Color="#40B4F3" />
<SolidColorBrush x:Key="ToggleButtonTertiaryCheckedBackground" Color="#888D92" /> <SolidColorBrush x:Key="ToggleButtonTertiaryCheckedBackground" Color="#888D92" />
<SolidColorBrush x:Key="ToggleButtonSuccessCheckedBackground" Color="#5DC264" />
<SolidColorBrush x:Key="ToggleButtonWarningCheckedBackground" Color="#FFAE43" /> <SolidColorBrush x:Key="ToggleButtonWarningCheckedBackground" Color="#FFAE43" />
<SolidColorBrush x:Key="ToggleButtonErrorCheckedBackground" Color="#FC725A" /> <SolidColorBrush x:Key="ToggleButtonDangerCheckedBackground" Color="#FC725A" />
<SolidColorBrush x:Key="ToggleButtonPrimaryCheckedPointeroverBackground" Color="#7FC1FF" /> <SolidColorBrush x:Key="ToggleButtonPrimaryCheckedPointeroverBackground" Color="#7FC1FF" />
<SolidColorBrush x:Key="ToggleButtonSecondaryCheckedPointeroverBackground" Color="#6EC8F6" /> <SolidColorBrush x:Key="ToggleButtonSecondaryCheckedPointeroverBackground" Color="#6EC8F6" />
<SolidColorBrush x:Key="ToggleButtonTertiaryCheckedPointeroverBackground" Color="#A7ABB0" /> <SolidColorBrush x:Key="ToggleButtonTertiaryCheckedPointeroverBackground" Color="#A7ABB0" />
<SolidColorBrush x:Key="ToggleButtonSuccessCheckedPointeroverBackground" Color="#7FD184" />
<SolidColorBrush x:Key="ToggleButtonWarningCheckedPointeroverBackground" Color="#FFC772" /> <SolidColorBrush x:Key="ToggleButtonWarningCheckedPointeroverBackground" Color="#FFC772" />
<SolidColorBrush x:Key="ToggleButtonErrorCheckedPointeroverBackground" Color="#FD9983" /> <SolidColorBrush x:Key="ToggleButtonDangerCheckedPointeroverBackground" Color="#FD9983" />
<SolidColorBrush x:Key="ToggleButtonPrimaryCheckedPressedBackground" Color="#A9D7FF" /> <SolidColorBrush x:Key="ToggleButtonPrimaryCheckedPressedBackground" Color="#A9D7FF" />
<SolidColorBrush x:Key="ToggleButtonSecondaryCheckedPressedBackground" Color="#9DDCF9" /> <SolidColorBrush x:Key="ToggleButtonSecondaryCheckedPressedBackground" Color="#9DDCF9" />
<SolidColorBrush x:Key="ToggleButtonTertiaryCheckedPressedBackground" Color="#C6CACD" /> <SolidColorBrush x:Key="ToggleButtonTertiaryCheckedPressedBackground" Color="#C6CACD" />
<SolidColorBrush x:Key="ToggleButtonSuccessCheckedPressedBackground" Color="#A6E1A8" />
<SolidColorBrush x:Key="ToggleButtonWarningCheckedPressedBackground" Color="#FFDDA1" /> <SolidColorBrush x:Key="ToggleButtonWarningCheckedPressedBackground" Color="#FFDDA1" />
<SolidColorBrush x:Key="ToggleButtonErrorCheckedPressedBackground" Color="#FDBEAC" /> <SolidColorBrush x:Key="ToggleButtonDangerCheckedPressedBackground" Color="#FDBEAC" />
<SolidColorBrush x:Key="ToggleButtonCheckedForeground" Color="Black" /> <SolidColorBrush x:Key="ToggleButtonCheckedForeground" Color="Black" />
<SolidColorBrush x:Key="ToggleButtonPrimaryIndeterminateBackground" Color="#053170" /> <SolidColorBrush x:Key="ToggleButtonPrimaryIndeterminateBackground" Color="#053170" />
<SolidColorBrush x:Key="ToggleButtonSecondaryIndeterminateBackground" Color="#003761" /> <SolidColorBrush x:Key="ToggleButtonSecondaryIndeterminateBackground" Color="#003761" />
<SolidColorBrush x:Key="ToggleButtonTertiaryIndeterminateBackground" Color="#1C1F23" /> <SolidColorBrush x:Key="ToggleButtonTertiaryIndeterminateBackground" Color="#1C1F23" />
<SolidColorBrush x:Key="ToggleButtonSuccessIndeterminateBackground" Color="#123C19" />
<SolidColorBrush x:Key="ToggleButtonWarningIndeterminateBackground" Color="#551F03" /> <SolidColorBrush x:Key="ToggleButtonWarningIndeterminateBackground" Color="#551F03" />
<SolidColorBrush x:Key="ToggleButtonErrorIndeterminateBackground" Color="#6C090B" /> <SolidColorBrush x:Key="ToggleButtonDangerIndeterminateBackground" Color="#6C090B" />
<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" Color="#888D92" />
<SolidColorBrush x:Key="ToggleButtonSuccessIndeterminateBorderBrush" Color="#5DC264" />
<SolidColorBrush x:Key="ToggleButtonWarningIndeterminateBorderBrush" Color="#FFAE43" /> <SolidColorBrush x:Key="ToggleButtonWarningIndeterminateBorderBrush" Color="#FFAE43" />
<SolidColorBrush x:Key="ToggleButtonErrorIndeterminateBorderBrush" Color="#FC725A" /> <SolidColorBrush x:Key="ToggleButtonDangerIndeterminateBorderBrush" Color="#FC725A" />
<SolidColorBrush x:Key="ToggleButtonPrimaryIndeterminatePointeroverBorderBrush" Color="#7FC1FF" /> <SolidColorBrush x:Key="ToggleButtonPrimaryIndeterminatePointeroverBorderBrush" Color="#7FC1FF" />
<SolidColorBrush x:Key="ToggleButtonSecondaryIndeterminatePointeroverBorderBrush" Color="#6EC8F6" /> <SolidColorBrush x:Key="ToggleButtonSecondaryIndeterminatePointeroverBorderBrush" Color="#6EC8F6" />
<SolidColorBrush x:Key="ToggleButtonTertiaryIndeterminatePointeroverBorderBrush" Color="#A7ABB0" /> <SolidColorBrush x:Key="ToggleButtonTertiaryIndeterminatePointeroverBorderBrush" Color="#A7ABB0" />
<SolidColorBrush x:Key="ToggleButtonSuccessIndeterminatePointeroverBorderBrush" Color="#7FD184" />
<SolidColorBrush x:Key="ToggleButtonWarningIndeterminatePointeroverBorderBrush" Color="#FFC772" /> <SolidColorBrush x:Key="ToggleButtonWarningIndeterminatePointeroverBorderBrush" Color="#FFC772" />
<SolidColorBrush x:Key="ToggleButtonErrorIndeterminatePointeroverBorderBrush" Color="#FD9983" /> <SolidColorBrush x:Key="ToggleButtonDangerIndeterminatePointeroverBorderBrush" Color="#FD9983" />
<SolidColorBrush x:Key="ToggleButtonPrimaryIndeterminatePointeroverForeground" Color="#7FC1FF" />
<SolidColorBrush x:Key="ToggleButtonSecondaryIndeterminatePointeroverForeground" Color="#6EC8F6" />
<SolidColorBrush x:Key="ToggleButtonTertiaryIndeterminatePointeroverForeground" Color="#A7ABB0" />
<SolidColorBrush x:Key="ToggleButtonSuccessIndeterminatePointeroverForeground" Color="#7FD184" />
<SolidColorBrush x:Key="ToggleButtonWarningIndeterminatePointeroverForeground" Color="#FFC772" />
<SolidColorBrush x:Key="ToggleButtonDangerIndeterminatePointeroverForeground" Color="#FD9983" />
<SolidColorBrush x:Key="ToggleButtonPrimaryIndeterminatePressedBorderBrush" Color="#A9D7FF" /> <SolidColorBrush x:Key="ToggleButtonPrimaryIndeterminatePressedBorderBrush" Color="#A9D7FF" />
<SolidColorBrush x:Key="ToggleButtonSecondaryIndeterminatePressedBorderBrush" Color="#9DDCF9" /> <SolidColorBrush x:Key="ToggleButtonSecondaryIndeterminatePressedBorderBrush" Color="#9DDCF9" />
<SolidColorBrush x:Key="ToggleButtonTertiaryIndeterminatePressedBorderBrush" Color="#C6CACD" /> <SolidColorBrush x:Key="ToggleButtonTertiaryIndeterminatePressedBorderBrush" Color="#C6CACD" />
<SolidColorBrush x:Key="ToggleButtonSuccessIndeterminatePressedBorderBrush" Color="#A6E1A8" />
<SolidColorBrush x:Key="ToggleButtonWarningIndeterminatePressedBorderBrush" Color="#FFDDA1" /> <SolidColorBrush x:Key="ToggleButtonWarningIndeterminatePressedBorderBrush" Color="#FFDDA1" />
<SolidColorBrush x:Key="ToggleButtonErrorIndeterminatePressedBorderBrush" Color="#FDBEAC" /> <SolidColorBrush x:Key="ToggleButtonDangerIndeterminatePressedBorderBrush" Color="#FDBEAC" />
<SolidColorBrush x:Key="ToggleButtonPrimaryIndeterminatePressedForeground" Color="#A9D7FF" />
<SolidColorBrush x:Key="ToggleButtonSecondaryIndeterminatePressedForeground" Color="#9DDCF9" />
<SolidColorBrush x:Key="ToggleButtonTertiaryIndeterminatePressedForeground" Color="#C6CACD" />
<SolidColorBrush x:Key="ToggleButtonSuccessIndeterminatePressedForeground" Color="#A6E1A8" />
<SolidColorBrush x:Key="ToggleButtonWarningIndeterminatePressedForeground" Color="#FFDDA1" />
<SolidColorBrush x:Key="ToggleButtonDangerIndeterminatePressedForeground" Color="#FDBEAC" />
<SolidColorBrush x:Key="ToggleButtonIndeterminateDisabledBorderBrush" Opacity="0.35" Color="#F9F9F9" />
</ResourceDictionary> </ResourceDictionary>

View File

@@ -3,14 +3,14 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=System.Runtime"> xmlns:sys="clr-namespace:System;assembly=System.Runtime">
<SolidColorBrush x:Key="ToggleSwitchContainerUnCheckedDefaultBackground" Opacity="0.12" Color="White" /> <SolidColorBrush x:Key="ToggleSwitchContainerUnCheckedDefaultBackground" Opacity="0.12" Color="White" />
<SolidColorBrush x:Key="ToggleSwitchContainerUnCheckedPointerOverBackground" Opacity="0.16" Color="White" /> <SolidColorBrush x:Key="ToggleSwitchContainerUnCheckedPointeroverBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="ToggleSwitchContainerUnCheckedPressedBackground" Opacity="0.20" Color="White" /> <SolidColorBrush x:Key="ToggleSwitchContainerUnCheckedPressedBackground" Opacity="0.20" Color="White" />
<SolidColorBrush x:Key="ToggleSwitchContainerUnCheckedDisabledBackground" Color="Transparent" /> <SolidColorBrush x:Key="ToggleSwitchContainerUnCheckedDisabledBackground" Color="Transparent" />
<SolidColorBrush x:Key="ToggleSwitchContainerUnCheckedDisabledBorderBrush" Opacity="0.09" Color="#F9F9F9" /> <SolidColorBrush x:Key="ToggleSwitchContainerUnCheckedDisabledBorderBrush" Opacity="0.09" Color="#F9F9F9" />
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedDefaultBackground" Color="#5FB346" /> <SolidColorBrush x:Key="ToggleSwitchContainerCheckedDefaultBackground" Color="#5FB346" />
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedPointerOverBackground" Color="#7FD184" /> <SolidColorBrush x:Key="ToggleSwitchContainerCheckedPointeroverBackground" Color="#7FD184" />
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedPressedBackground" Color="#A6E1A8" /> <SolidColorBrush x:Key="ToggleSwitchContainerCheckedPressedBackground" Color="#A6E1A8" />
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedDisabledBackground" Color="#277731" /> <SolidColorBrush x:Key="ToggleSwitchContainerCheckedDisabledBackground" Color="#277731" />

View File

@@ -14,12 +14,12 @@
<SolidColorBrush x:Key="TreeViewItemDisabledForeground" Opacity="0.35" Color="#F9F9F9" /> <SolidColorBrush x:Key="TreeViewItemDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
<SolidColorBrush x:Key="TreeViewItemDefaultBackground" Color="Transparent" /> <SolidColorBrush x:Key="TreeViewItemDefaultBackground" Color="Transparent" />
<SolidColorBrush x:Key="TreeViewItemPointerOverBackground" Opacity="0.12" Color="White" /> <SolidColorBrush x:Key="TreeViewItemPointeroverBackground" Opacity="0.12" Color="White" />
<SolidColorBrush x:Key="TreeViewItemPressedBackground" Opacity="0.16" Color="White" /> <SolidColorBrush x:Key="TreeViewItemPressedBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="TreeViewItemSelectedBackground" Opacity="0.2" Color="#54A9FF" /> <SolidColorBrush x:Key="TreeViewItemSelectedBackground" Opacity="0.2" Color="#54A9FF" />
<SolidColorBrush x:Key="TreeViewItemDisabledBackground" Color="Transparent" /> <SolidColorBrush x:Key="TreeViewItemDisabledBackground" Color="Transparent" />
<SolidColorBrush x:Key="TreeViewItemSelectedDisabledBackground" Opacity="0.04" Color="#E6E8EA" /> <SolidColorBrush x:Key="TreeViewItemSelectedDisabledBackground" Opacity="0.04" Color="#E6E8EA" />
<Thickness x:Key="TreeViewItemIconMargin">8 0</Thickness> <Thickness x:Key="TreeViewItemIconMargin">8 0</Thickness>
<Thickness x:Key="TreeViewItemPadding">0 4 0 4</Thickness> <Thickness x:Key="TreeViewItemPadding">0 4 8 4</Thickness>
</ResourceDictionary> </ResourceDictionary>

View File

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

View File

@@ -18,6 +18,7 @@
<SolidColorBrush x:Key="ButtonDefaultPrimaryForeground" Color="#0077FA" /> <SolidColorBrush x:Key="ButtonDefaultPrimaryForeground" Color="#0077FA" />
<SolidColorBrush x:Key="ButtonDefaultSecondaryForeground" Color="#0095EE" /> <SolidColorBrush x:Key="ButtonDefaultSecondaryForeground" Color="#0095EE" />
<SolidColorBrush x:Key="ButtonDefaultTertiaryForeground" Color="#6B7075" /> <SolidColorBrush x:Key="ButtonDefaultTertiaryForeground" Color="#6B7075" />
<SolidColorBrush x:Key="ButtonDefaultSuccessForeground" Color="#3BB346" />
<SolidColorBrush x:Key="ButtonDefaultWarningForeground" Color="#FC8800" /> <SolidColorBrush x:Key="ButtonDefaultWarningForeground" Color="#FC8800" />
<SolidColorBrush x:Key="ButtonDefaultDangerForeground" Color="#F93920" /> <SolidColorBrush x:Key="ButtonDefaultDangerForeground" Color="#F93920" />
<SolidColorBrush x:Key="ButtonDefaultDisabledForeground" Opacity="0.35" Color="#1C1F23" /> <SolidColorBrush x:Key="ButtonDefaultDisabledForeground" Opacity="0.35" Color="#1C1F23" />
@@ -50,6 +51,10 @@
<SolidColorBrush x:Key="ButtonSolidTertiaryPointeroverBackground" Color="#555B61" /> <SolidColorBrush x:Key="ButtonSolidTertiaryPointeroverBackground" Color="#555B61" />
<SolidColorBrush x:Key="ButtonSolidTertiaryPressedBackground" Color="#41464C" /> <SolidColorBrush x:Key="ButtonSolidTertiaryPressedBackground" Color="#41464C" />
<SolidColorBrush x:Key="ButtonSolidSuccessBackground" Color="#3BB346" />
<SolidColorBrush x:Key="ButtonSolidSuccessPointeroverBackground" Color="#30953B" />
<SolidColorBrush x:Key="ButtonSolidSuccessPressedBackground" Color="#25772F" />
<SolidColorBrush x:Key="ButtonSolidWarningBackground" Color="#FC8800" /> <SolidColorBrush x:Key="ButtonSolidWarningBackground" Color="#FC8800" />
<SolidColorBrush x:Key="ButtonSolidWarningPointeroverBackground" Color="#D26700" /> <SolidColorBrush x:Key="ButtonSolidWarningPointeroverBackground" Color="#D26700" />
<SolidColorBrush x:Key="ButtonSolidWarningPressedBackground" Color="#A84A00" /> <SolidColorBrush x:Key="ButtonSolidWarningPressedBackground" Color="#A84A00" />
@@ -72,6 +77,10 @@
<SolidColorBrush x:Key="ButtonSolidTertiaryPointeroverBorderBrush" Color="#555B61" /> <SolidColorBrush x:Key="ButtonSolidTertiaryPointeroverBorderBrush" Color="#555B61" />
<SolidColorBrush x:Key="ButtonSolidTertiaryPressedBorderBrush" Color="#41464C" /> <SolidColorBrush x:Key="ButtonSolidTertiaryPressedBorderBrush" Color="#41464C" />
<SolidColorBrush x:Key="ButtonSolidSuccessBorderBrush" Color="#3BB346" />
<SolidColorBrush x:Key="ButtonSolidSuccessPointeroverBorderBrush" Color="#30953B" />
<SolidColorBrush x:Key="ButtonSolidSuccessPressedBorderBrush" Color="#25772F" />
<SolidColorBrush x:Key="ButtonSolidWarningBorderBrush" Color="#FC8800" /> <SolidColorBrush x:Key="ButtonSolidWarningBorderBrush" Color="#FC8800" />
<SolidColorBrush x:Key="ButtonSolidWarningPointeroverBorderBrush" Color="#D26700" /> <SolidColorBrush x:Key="ButtonSolidWarningPointeroverBorderBrush" Color="#D26700" />
<SolidColorBrush x:Key="ButtonSolidWarningPressedBorderBrush" Color="#A84A00" /> <SolidColorBrush x:Key="ButtonSolidWarningPressedBorderBrush" Color="#A84A00" />

View File

@@ -10,15 +10,15 @@
<SolidColorBrush x:Key="CheckBoxDefaultBackground" Color="Transparent" /> <SolidColorBrush x:Key="CheckBoxDefaultBackground" Color="Transparent" />
<SolidColorBrush x:Key="CheckBoxDefaultBorderBrush" Opacity="0.35" Color="#1C1F23" /> <SolidColorBrush x:Key="CheckBoxDefaultBorderBrush" Opacity="0.35" Color="#1C1F23" />
<SolidColorBrush x:Key="CheckBoxPointOverBackground" Opacity="0.05" Color="#2E3238" /> <SolidColorBrush x:Key="CheckBoxPointeroverBackground" Opacity="0.05" Color="#2E3238" />
<SolidColorBrush x:Key="CheckBoxPointOverBorderBrush" Color="#0077FA" /> <SolidColorBrush x:Key="CheckBoxPointeroverBorderBrush" Color="#0077FA" />
<SolidColorBrush x:Key="CheckBoxPressedBackground" Color="#004FB3" /> <SolidColorBrush x:Key="CheckBoxPressedBackground" Color="#004FB3" />
<SolidColorBrush x:Key="CheckBoxPressedBorderBrush" Color="#004FB3" /> <SolidColorBrush x:Key="CheckBoxPressedBorderBrush" Color="#004FB3" />
<SolidColorBrush x:Key="CheckBoxCheckedDefaultBackground" Color="#0077FA" /> <SolidColorBrush x:Key="CheckBoxCheckedDefaultBackground" Color="#0077FA" />
<SolidColorBrush x:Key="CheckBoxCheckedDefaultBorderBrush" Color="#0077FA" /> <SolidColorBrush x:Key="CheckBoxCheckedDefaultBorderBrush" Color="#0077FA" />
<SolidColorBrush x:Key="CheckBoxCheckedPointOverBackground" Color="#0062D6" /> <SolidColorBrush x:Key="CheckBoxCheckedPointeroverBackground" Color="#0062D6" />
<SolidColorBrush x:Key="CheckBoxCheckedPointOverBorderBrush" Color="#0062D6" /> <SolidColorBrush x:Key="CheckBoxCheckedPointeroverBorderBrush" Color="#0062D6" />
<SolidColorBrush x:Key="CheckBoxCheckedPressedBackground" Color="#004FB3" /> <SolidColorBrush x:Key="CheckBoxCheckedPressedBackground" Color="#004FB3" />
<SolidColorBrush x:Key="CheckBoxCheckedPressedBorderBrush" Color="#004FB3" /> <SolidColorBrush x:Key="CheckBoxCheckedPressedBorderBrush" Color="#004FB3" />

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