Compare commits

...

32 Commits

Author SHA1 Message Date
rabbitism
8e65334652 misc: bump version. 2024-08-04 01:16:16 +08:00
rabbitism
c8acf08936 feat: make sure locale dictionary is linked to class.
(cherry picked from commit 8ad89d094e)
2024-08-04 01:15:49 +08:00
Dong Bin
2a363edeee Merge pull request #399 from irihitech/upgrade
Upgrade to 11.0.7.5
2024-08-01 20:53:48 +08:00
Zhang Dian
72ed2d442d misc: Semi.Avalonia.TreeDataGrid upgrade to 11.0.10. 2024-08-01 20:47:02 +08:00
Zhang Dian
5a095a9321 misc: Semi.Avalonia upgrade to 11.0.7.5. 2024-08-01 20:46:25 +08:00
Zhang Dian
b0f4777aff fix: remove NumericUpDown ContextFlyout redundant arrow buttons.
(cherry picked from commit 2957521ef8)
2024-08-01 20:01:58 +08:00
MakesYT
7347aff7f9 独立背景颜色为资源
(cherry picked from commit e1bef9fd04)
(cherry picked from commit d90d7b9fe1)
2024-08-01 20:01:33 +08:00
Dong Bin
e2ca3f31b1 Merge pull request #390 from irihitech/release/11.0.x-temp
Backport: 11.1.0-rc2.1 to 11.0.x
2024-07-30 00:53:05 +08:00
Zhang Dian
d759570259 misc: version, trim, web demo. 2024-07-23 11:36:19 +08:00
Zhang Dian
2b37df580f feat: Button Outline theme & colors.
* add Outline Theme to Button.
* :disabled, Tertiary Classes Button color.
2024-07-23 11:33:36 +08:00
Zhang Dian
d41d1ff9d4 feat: CheckBox :pressed Background.
(cherry picked from commit ccc25b4801)
2024-07-19 12:03:47 +08:00
Zhang Dian
c127544bc7 feat: Typography.
(cherry picked from commit d7fce5c180)
2024-07-19 10:33:27 +08:00
Zhang Dian
a614002ead feat: add size Classes to ToggleSwitch.
(cherry picked from commit d3c909a83c)
2024-07-19 10:30:20 +08:00
Zhang Dian
fe5c51599f feat: unify Calendar MinHeight/Width in default Theme.
(cherry picked from commit 8afe3a87bd)
2024-07-19 10:27:36 +08:00
Zhang Dian
d318975d73 feat: extract DataGrid & TreeDataGrid Margin.
(cherry picked from commit b5f4bacece)
2024-07-19 10:27:34 +08:00
Zhang Dian
504d6a1927 feat: add Danger Classes to replace Error Classes in ProgressBar.
(cherry picked from commit 2da1ecf5a0)
2024-07-19 10:27:09 +08:00
Zhang Dian
253f88d982 feat: add active colors to palette
(cherry picked from commit 694dd863fa)
2024-07-19 10:26:15 +08:00
rabbitism
8005997332 misc: bump 11.0.x package version. 2024-06-28 22:47:35 +08:00
Gehongyan
ae0375f194 fix: fix CheckBoxGlyphDisabledFill does not work
Issue #368

(cherry picked from commit 57646f5390)
2024-06-28 22:45:56 +08:00
Zhang Dian
28b04705aa fix: fix TopLevelMenuItem HeaderTemplate.
(cherry picked from commit 0fb1e585db)
2024-06-28 22:01:58 +08:00
Zhang Dian
84a255656b fix: add ContentTemplate to MenuItem Header.
(cherry picked from commit ec070d2f67)
2024-05-30 12:46:58 +08:00
rabbitism
11c3109ae1 misc: bump 11.0.x package version. 2024-05-18 14:09:00 +08:00
Zhang Dian
34674599ec feat: add AdornerLayer control.
(cherry picked from commit f65ec4bb05)
2024-05-18 14:05:38 +08:00
rabbitism
004067d10b misc: bump version. 2024-03-29 19:46:12 +08:00
Zhang Dian
afacdf2c56 Merge pull request #334 from irihitech/20240329-backport
20240329 backport
2024-03-29 19:37:21 +08:00
Zhang Dian
047c9f953e fix: fix SplitViewDemo PanePlacement Binding mode, revert DatePicker locale. 2024-03-29 19:35:04 +08:00
Zhang Dian
ef3d40bc6d feat: add TopCenter and BottomCenter position.
(cherry picked from commit 627aa65e1f)
2024-03-29 18:23:00 +08:00
Zhang Dian
7bd6c08e94 feat: update package info.
(cherry picked from commit 41662706ab)
2024-03-29 18:07:51 +08:00
Zhang Dian
e484dbfd21 feat: redesign SplitViewDemo.
(cherry picked from commit 38958c1326)
2024-03-29 18:04:03 +08:00
rabbitism
c2bf03c337 feat: backport localization from #332 2024-03-29 17:51:40 +08:00
rabbitism
7df583b81c feat: backport combobox placeholder fix from #329. 2024-03-29 17:42:07 +08:00
Soar360
efc7870554 TextBox.TextArea
(cherry picked from commit 48235b63a2)
2024-03-27 22:18:13 +08:00
94 changed files with 1040 additions and 505 deletions

View File

@@ -2,7 +2,7 @@ name: Deploy to GitHub Pages
env:
PROJECT_PATH: demo/Semi.Avalonia.Demo.Web/Semi.Avalonia.Demo.Web.csproj
OUTPUT_PATH: demo/Semi.Avalonia.Demo.Web/bin/Release/net7.0/browser-wasm/AppBundle
OUTPUT_PATH: demo/Semi.Avalonia.Demo.Web/bin/Release/net8.0-browser/publish/wwwroot
on:
push:
branches: [ "action/deploy" ]
@@ -16,19 +16,16 @@ jobs:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Setup .NET 7
- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.405
dotnet-version: 8.0.x
- name: Install wasm-tools
run: dotnet workload install wasm-tools wasm-tools-net7
- name: Install DotNetCompress
run: dotnet tool install --global DotNetCompress --version 3.0.0 --no-cache
run: dotnet workload install wasm-tools
- name: Publish .NET Project
run: dotnet publish $PROJECT_PATH -c Release -o release --nologo
run: dotnet publish $PROJECT_PATH -c Release --nologo
- name: Change base-tag in index.html
run: sed -i 's/<base href="\/" \/>/<base href="\/Semi.Avalonia\/" \/>/g' $OUTPUT_PATH/index.html
@@ -36,12 +33,6 @@ jobs:
- name: copy index.html to 404.html
run: cp $OUTPUT_PATH/index.html $OUTPUT_PATH/404.html
- name: Compress Output using Brotli
run: DotNetCompress -d $OUTPUT_PATH -p "*.dll" "*.js" "*.wasm" --format br --threads 4
- name: Compress Output using GZip
run: DotNetCompress -d $OUTPUT_PATH -p "*.dll" "*.js" "*.wasm" --format gz --threads 4
- name: Add .nojekyll file
run: touch $OUTPUT_PATH/.nojekyll

View File

@@ -49,7 +49,7 @@ jobs:
run: dotnet restore
- name: Build
run: dotnet publish ./demo/Semi.Avalonia.Demo.Android -c Release -f net7.0-android --no-restore
run: dotnet publish ./demo/Semi.Avalonia.Demo.Android -c Release -f net8.0-android --no-restore
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.3.1

View File

@@ -1,6 +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" />
<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/net8.0/win-x64/publish" target_framework="net8.0" uuid_high="3088527218258560748" uuid_low="-8649338673481336678" />
<method v="2" />
</configuration>
</component>

View File

@@ -9,7 +9,7 @@ Avalonia Theme inspired by Semi Design
## Installation
```bash
dotnet add package Semi.Avalonia --version 11.0.7
dotnet add package Semi.Avalonia
```
Include Semi Design Styles in application:
@@ -23,9 +23,9 @@ That's all.
ColorPicker, DataGrid and TreeDataGrid are distributed in separated packages. Please install if you need.
```bash
dotnet add package Semi.Avalonia.ColorPicker --version 11.0.7
dotnet add package Semi.Avalonia.DataGrid --version 11.0.7
dotnet add package Semi.Avalonia.TreeDataGrid --version 11.0.7
dotnet add package Semi.Avalonia.ColorPicker
dotnet add package Semi.Avalonia.DataGrid
dotnet add package Semi.Avalonia.TreeDataGrid
```
```xaml
<Application.Styles>

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0-android</TargetFramework>
<TargetFramework>net8.0-android</TargetFramework>
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
<ApplicationId>com.irihitech.Semi.Avalonia</ApplicationId>
<ApplicationVersion>1</ApplicationVersion>
@@ -15,11 +15,11 @@
<Import Project="../Directory.Build.props" />
<ItemGroup>
<PackageReference Include="Avalonia.Android" Version="$(AvaloniaVersion)" />
<PackageReference Include="Avalonia.Android" Version="$(AvaloniaVersion)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Semi.Avalonia.Demo\Semi.Avalonia.Demo.csproj" />
<ProjectReference Include="..\Semi.Avalonia.Demo\Semi.Avalonia.Demo.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,3 @@
<linker>
<assembly fullname="Semi.Avalonia.Demo" preserve="All"/>
</linker>

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
<!-- Uncomment below to enable Native AOT compilation-->
@@ -11,12 +11,17 @@
-->
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
<IsTrimmable>true</IsTrimmable>
<PublishTrimmed>true</PublishTrimmed>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<RdXmlFile Include="rd.xml" />
<TrimmerRootDescriptor Include="Roots.xml" />
</ItemGroup>
<ItemGroup>

View File

@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Directives>
<!--
This file is part of RdXmlLibrary project.
Visit https://github.com/kant2002/rdxmllibrary for latest version.
If you have modifications specific to this Nuget package,
please contribute back.
-->
<Application>
<Assembly Name="Avalonia.Markup.Xaml" Dynamic="Required All"/>
<Assembly Name="Semi.Avalonia" Dynamic="Required All"/>
<Assembly Name="Semi.Avalonia.DataGrid" Dynamic="Required All"/>
<Assembly Name="Semi.Avalonia.ColorPicker" Dynamic="Required All"/>
<Assembly Name="Semi.Avalonia.Demo" Dynamic="Required All"/>
</Application>
</Directives>

View File

@@ -0,0 +1,16 @@
using Avalonia;
using Avalonia.Media;
namespace Semi.Avalonia.Demo.Web;
public static class AvaloniaAppBuilderExtensions
{
private static string DefaultFontFamily => "avares://Semi.Avalonia.Demo.Web/Assets#Source Han Sans CN";
public static AppBuilder WithSourceHanSansCNFont(this AppBuilder builder) =>
builder.With(new FontManagerOptions
{
DefaultFamilyName = DefaultFontFamily,
FontFallbacks = new[] { new FontFallback { FontFamily = new FontFamily(DefaultFontFamily) } }
});
}

View File

@@ -7,9 +7,10 @@ using Avalonia.Browser;
namespace Semi.Avalonia.Demo.Web;
internal partial class Program
internal sealed partial class Program
{
private static async Task Main(string[] args) => await BuildAvaloniaApp()
private static Task Main(string[] args) => BuildAvaloniaApp()
.WithSourceHanSansCNFont()
.StartBrowserAppAsync("out");
public static AppBuilder BuildAvaloniaApp()

View File

@@ -1,20 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk.WebAssembly">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
<WasmMainJSPath>AppBundle\main.js</WasmMainJSPath>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0-browser</TargetFramework>
</PropertyGroup>
<ItemGroup>
<WasmExtraFilesToDeploy Include="AppBundle\**" />
<AvaloniaResource Include="Assets\**"/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia.Browser" Version="$(AvaloniaVersion)" />
<PackageReference Include="Avalonia.Browser" Version="$(AvaloniaVersion)"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Semi.Avalonia.Demo\Semi.Avalonia.Demo.csproj" />
<ProjectReference Include="..\Semi.Avalonia.Demo\Semi.Avalonia.Demo.csproj"/>
</ItemGroup>
</Project>

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 172 KiB

After

Width:  |  Height:  |  Size: 172 KiB

View File

@@ -7,8 +7,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="/" />
<link rel="modulepreload" href="./main.js" />
<link rel="modulepreload" href="./dotnet.js" />
<link rel="modulepreload" href="./avalonia.js" />
<link rel="modulepreload" href="./_framework/dotnet.js" />
<link rel="modulepreload" href="./_framework/avalonia.js" />
<link rel="stylesheet" href="./app.css" />
</head>

View File

@@ -1,4 +1,4 @@
import { dotnet } from './dotnet.js'
import { dotnet } from './_framework/dotnet.js'
const is_browser = typeof window != "undefined";
if (!is_browser) throw new Error(`Expected to be running in a browser`);
@@ -10,4 +10,4 @@ const dotnetRuntime = await dotnet
const config = dotnetRuntime.getConfig();
await dotnetRuntime.runMainAndExit(config.mainAssemblyName, [window.location.search]);
await dotnetRuntime.runMain(config.mainAssemblyName, [window.location.search]);

View File

@@ -4,114 +4,176 @@
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 HorizontalAlignment="Left" Spacing="20">
<TextBlock>Light (Default)</TextBlock>
<StackPanel Orientation="Horizontal" Spacing="20">
<Button Classes="Primary">Primary</Button>
<Button Classes="Secondary">Secondary</Button>
<Button Classes="Tertiary">Tertiary</Button>
<Button Classes="Success">Success</Button>
<Button Classes="Warning">Warning</Button>
<Button Classes="Danger">Danger</Button>
<Button Classes="Primary" IsEnabled="False">Danger</Button>
<ScrollViewer>
<StackPanel HorizontalAlignment="Left" Spacing="20">
<StackPanel.Styles>
<Style Selector="SplitButton">
<Setter Property="Flyout">
<MenuFlyout Placement="BottomEdgeAlignedRight">
<MenuItem Header="Submit All" />
<MenuItem Header="Submit Updated" />
</MenuFlyout>
</Setter>
</Style>
<Style Selector="DropDownButton">
<Setter Property="Flyout">
<MenuFlyout Placement="BottomEdgeAlignedRight">
<MenuItem Header="Submit All" />
<MenuItem Header="Submit Updated" />
</MenuFlyout>
</Setter>
</Style>
<Style Selector="ToggleSplitButton">
<Setter Property="Flyout">
<MenuFlyout Placement="BottomEdgeAlignedRight">
<MenuItem Header="Submit All" />
<MenuItem Header="Submit Updated" />
</MenuFlyout>
</Setter>
</Style>
</StackPanel.Styles>
<TextBlock>Light (Default)</TextBlock>
<StackPanel Orientation="Horizontal" Spacing="20">
<Button Classes="Primary">Primary</Button>
<Button Classes="Secondary">Secondary</Button>
<Button Classes="Tertiary">Tertiary</Button>
<Button Classes="Success">Success</Button>
<Button Classes="Warning">Warning</Button>
<Button Classes="Danger">Danger</Button>
<Button Classes="Danger" IsEnabled="False">Disabled</Button>
</StackPanel>
<TextBlock>Solid</TextBlock>
<StackPanel Orientation="Horizontal" Spacing="20">
<Button Classes="Primary" Theme="{DynamicResource SolidButton}">Primary</Button>
<Button Classes="Secondary" Theme="{DynamicResource SolidButton}">Secondary</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="Danger" Theme="{DynamicResource SolidButton}">Danger</Button>
<Button
Classes="Danger"
IsEnabled="False"
Theme="{DynamicResource SolidButton}">
Disabled
</Button>
</StackPanel>
<TextBlock>Outline</TextBlock>
<StackPanel Orientation="Horizontal" Spacing="20">
<Button Classes="Primary" Theme="{DynamicResource OutlineButton}">Primary</Button>
<Button Classes="Secondary" Theme="{DynamicResource OutlineButton}">Secondary</Button>
<Button Classes="Tertiary" Theme="{DynamicResource OutlineButton}">Tertiary</Button>
<Button Classes="Success" Theme="{DynamicResource OutlineButton}">Success</Button>
<Button Classes="Warning" Theme="{DynamicResource OutlineButton}">Warning</Button>
<Button Classes="Danger" Theme="{DynamicResource OutlineButton}">Danger</Button>
<Button Classes="Danger" Theme="{DynamicResource OutlineButton}" IsEnabled="False">Disabled</Button>
</StackPanel>
<TextBlock>Borderless</TextBlock>
<StackPanel Orientation="Horizontal" Spacing="20">
<Button Classes="Primary" Theme="{DynamicResource BorderlessButton}">Primary</Button>
<Button Classes="Secondary" Theme="{DynamicResource BorderlessButton}">Secondary</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="Danger" Theme="{DynamicResource BorderlessButton}">Danger</Button>
<Button
Classes="Danger"
IsEnabled="False"
Theme="{DynamicResource BorderlessButton}">
Disabled
</Button>
</StackPanel>
<TextBlock>Disabled</TextBlock>
<StackPanel Background="{DynamicResource SemiColorBackground1}" Orientation="Horizontal" Spacing="20">
<Button IsEnabled="False">Light</Button>
<Button IsEnabled="False" Theme="{DynamicResource SolidButton}">Solid</Button>
<Button IsEnabled="False" Theme="{DynamicResource OutlineButton}">Outline</Button>
<Button IsEnabled="False" Theme="{DynamicResource BorderlessButton}">Borderless</Button>
</StackPanel>
<TextBlock>Size Classes</TextBlock>
<StackPanel Orientation="Horizontal" Spacing="20">
<Button Classes="Primary Small">Small</Button>
<Button Classes="Primary">Default</Button>
<Button Classes="Primary Large">Large</Button>
</StackPanel>
<TextBlock>DropDownButton</TextBlock>
<StackPanel Orientation="Horizontal" Spacing="8">
<DropDownButton Content="Primary" />
<DropDownButton Classes="Secondary" Content="Secondary" />
<DropDownButton Classes="Tertiary" Content="Tertiary" />
<DropDownButton Classes="Success" Content="Success" />
<DropDownButton Classes="Warning" Content="Warning" />
<DropDownButton Classes="Danger" Content="Danger" />
<DropDownButton
Classes="Danger"
Content="Disabled"
IsEnabled="False" />
</StackPanel>
<StackPanel Orientation="Horizontal" Spacing="8">
<DropDownButton Content="Default" Classes="Success"/>
<DropDownButton Content="Solid" Theme="{DynamicResource SolidDropDownButton}" Classes="Success"/>
<DropDownButton Content="Outline" Theme="{DynamicResource OutlineDropDownButton}" Classes="Success"/>
<DropDownButton Content="Borderless" Theme="{DynamicResource BorderlessDropDownButton}" Classes="Success"/>
<DropDownButton Content="Default" Classes="Success" IsEnabled="False"/>
<DropDownButton Content="Solid" Theme="{DynamicResource SolidDropDownButton}" Classes="Success" IsEnabled="False"/>
<DropDownButton Content="Outline" Theme="{DynamicResource OutlineDropDownButton}" Classes="Success" IsEnabled="False"/>
<DropDownButton Content="Borderless" Theme="{DynamicResource BorderlessDropDownButton}" Classes="Success" IsEnabled="False"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Spacing="8">
<DropDownButton Classes="Small" Content="Small" />
<DropDownButton Content="Default" />
<DropDownButton Classes="Large" Content="Large" />
</StackPanel>
<TextBlock>SplitButton</TextBlock>
<StackPanel Orientation="Horizontal" Spacing="8">
<SplitButton Content="Primary" />
<SplitButton Classes="Secondary" Content="Secondary" />
<SplitButton Classes="Tertiary" Content="Tertiary" />
<SplitButton Classes="Success" Content="Success" />
<SplitButton Classes="Warning" Content="Warning" />
<SplitButton Classes="Danger" Content="Danger" />
<SplitButton Classes="Danger" Content="Disabled" IsEnabled="False" />
</StackPanel>
<StackPanel Orientation="Horizontal" Spacing="8">
<SplitButton Content="Default" Classes="Success" />
<SplitButton Content="Solid" Theme="{DynamicResource SolidSplitButton}" Classes="Success" />
<SplitButton Content="Outline" Theme="{DynamicResource OutlineSplitButton}" Classes="Success" />
<SplitButton Content="Borderless" Theme="{DynamicResource BorderlessSplitButton}" Classes="Success" />
<SplitButton Content="Default" Classes="Success" IsEnabled="False" />
<SplitButton Content="Solid" Theme="{DynamicResource SolidSplitButton}" Classes="Success" IsEnabled="False" />
<SplitButton Content="Outline" Theme="{DynamicResource OutlineSplitButton}" Classes="Success" IsEnabled="False" />
<SplitButton Content="Borderless" Theme="{DynamicResource BorderlessSplitButton}" Classes="Success" IsEnabled="False" />
</StackPanel>
<StackPanel Orientation="Horizontal" Spacing="8">
<SplitButton Classes="Small" Content="Small" />
<SplitButton Content="Default" />
<SplitButton Classes="Large" Content="Large" />
</StackPanel>
<TextBlock>ToggleSplitButton</TextBlock>
<StackPanel Orientation="Horizontal" Spacing="8">
<ToggleSplitButton Content="Primary" />
<ToggleSplitButton Classes="Secondary" Content="Secondary" />
<ToggleSplitButton Classes="Tertiary" Content="Tertiary" />
<ToggleSplitButton Classes="Success" Content="Success" />
<ToggleSplitButton Classes="Warning" Content="Warning" />
<ToggleSplitButton Classes="Danger" Content="Danger" />
<ToggleSplitButton Classes="Danger" Content="Disabled" IsEnabled="False" />
</StackPanel>
<StackPanel Orientation="Horizontal" Spacing="8">
<ToggleSplitButton Content="Default" Classes="Success" />
<ToggleSplitButton Content="Checked" Classes="Success" IsChecked="True" />
<ToggleSplitButton Content="Default" Classes="Success" IsEnabled="False" />
<ToggleSplitButton Content="Checked" Classes="Success" IsChecked="True" IsEnabled="False" />
</StackPanel>
<StackPanel Orientation="Horizontal" Spacing="8">
<ToggleSplitButton Classes="Small" Content="Small" />
<ToggleSplitButton Content="Default" />
<ToggleSplitButton Classes="Large" Content="Large" />
</StackPanel>
</StackPanel>
<TextBlock>Solid</TextBlock>
<StackPanel Orientation="Horizontal" Spacing="20">
<Button Classes="Primary" Theme="{DynamicResource SolidButton}">Primary</Button>
<Button Classes="Secondary" Theme="{DynamicResource SolidButton}">Secondary</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="Danger" Theme="{DynamicResource SolidButton}">Danger</Button>
<Button
Classes="Primary"
IsEnabled="False"
Theme="{DynamicResource SolidButton}">
Danger
</Button>
</StackPanel>
<TextBlock>Borderless</TextBlock>
<StackPanel Orientation="Horizontal" Spacing="20">
<Button Classes="Primary" Theme="{DynamicResource BorderlessButton}">Primary</Button>
<Button Classes="Secondary" Theme="{DynamicResource BorderlessButton}">Secondary</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="Danger" Theme="{DynamicResource BorderlessButton}">Danger</Button>
<Button
Classes="Primary"
IsEnabled="False"
Theme="{DynamicResource BorderlessButton}">
Danger
</Button>
</StackPanel>
<TextBlock>DropDownButton</TextBlock>
<StackPanel Orientation="Horizontal" Spacing="8">
<DropDownButton Content="Submit">
<DropDownButton.Flyout>
<MenuFlyout Placement="BottomEdgeAlignedRight">
<MenuItem Header="Submit All" />
<MenuItem Header="Submit Updated" />
</MenuFlyout>
</DropDownButton.Flyout>
</DropDownButton>
<DropDownButton Content="Submit" Theme="{DynamicResource SolidDropDownButton}">
<DropDownButton.Flyout>
<MenuFlyout Placement="BottomEdgeAlignedRight">
<MenuItem Header="Submit All" />
<MenuItem Header="Submit Updated" />
</MenuFlyout>
</DropDownButton.Flyout>
</DropDownButton>
<DropDownButton Content="Submit" Theme="{DynamicResource BorderlessDropDownButton}">
<DropDownButton.Flyout>
<MenuFlyout Placement="BottomEdgeAlignedRight">
<MenuItem Header="Submit All" />
<MenuItem Header="Submit Updated" />
</MenuFlyout>
</DropDownButton.Flyout>
</DropDownButton>
</StackPanel>
<StackPanel Orientation="Horizontal" Spacing="8">
<SplitButton Content="Submit">
<SplitButton.Flyout>
<MenuFlyout Placement="BottomEdgeAlignedRight">
<MenuItem Header="Submit All" />
<MenuItem Header="Submit Updated" />
</MenuFlyout>
</SplitButton.Flyout>
</SplitButton>
<SplitButton Classes="Secondary" Content="Submit" />
<SplitButton Classes="Tertiary" Content="Submit" />
<SplitButton Classes="Success" Content="Submit" />
<SplitButton Classes="Warning" Content="Submit" />
<SplitButton Classes="Danger" Content="Submit" />
<SplitButton
Classes="Danger"
Content="Submit"
IsEnabled="False" />
</StackPanel>
<StackPanel Orientation="Horizontal" Spacing="8">
<ToggleSplitButton Content="Submit">
<ToggleSplitButton.Flyout>
<MenuFlyout Placement="BottomEdgeAlignedRight">
<MenuItem Header="Submit All" />
<MenuItem Header="Submit Updated" />
</MenuFlyout>
</ToggleSplitButton.Flyout>
</ToggleSplitButton>
<ToggleSplitButton Classes="Secondary" Content="Submit" />
<ToggleSplitButton Classes="Tertiary" Content="Submit" />
<ToggleSplitButton Classes="Success" Content="Submit" />
<ToggleSplitButton Classes="Warning" Content="Submit" />
<ToggleSplitButton Classes="Danger" Content="Submit" />
<ToggleSplitButton
Classes="Danger"
Content="Submit"
IsEnabled="False" />
</StackPanel>
</StackPanel>
</UserControl>
</ScrollViewer>
</UserControl>

View File

@@ -78,8 +78,8 @@
<StackPanel Orientation="Horizontal">
<Border HorizontalAlignment="Left" Theme="{StaticResource RadioButtonGroupBorder}">
<ListBox Theme="{DynamicResource ButtonRadioGroupListBox}">
<ListBoxItem Classes="Large" IsSelected="True">Small 1</ListBoxItem>
<ListBoxItem Classes="Large">Small 2</ListBoxItem>
<ListBoxItem Classes="Large" IsSelected="True">Large 1</ListBoxItem>
<ListBoxItem Classes="Large">Large 2</ListBoxItem>
</ListBox>
</Border>
<Border
@@ -87,8 +87,8 @@
HorizontalAlignment="Left"
Theme="{StaticResource RadioButtonGroupBorder}">
<ListBox Theme="{DynamicResource ButtonRadioGroupListBox}" IsEnabled="False">
<ListBoxItem Classes="Large" IsSelected="True">Small 1</ListBoxItem>
<ListBoxItem Classes="Large">Small 2</ListBoxItem>
<ListBoxItem Classes="Large" IsSelected="True">Large 1</ListBoxItem>
<ListBoxItem Classes="Large">Large 2</ListBoxItem>
</ListBox>
</Border>
</StackPanel>

View File

@@ -155,7 +155,7 @@
Value="60" />
<ProgressBar
Width="200"
Classes="Error"
Classes="Danger"
Maximum="100"
Minimum="0"
ShowProgressText="True"

View File

@@ -16,7 +16,7 @@
<RepeatButton Classes="Success">Success</RepeatButton>
<RepeatButton Classes="Warning">Warning</RepeatButton>
<RepeatButton Classes="Danger">Danger</RepeatButton>
<RepeatButton Classes="Primary" IsEnabled="False">Danger</RepeatButton>
<RepeatButton Classes="Danger" IsEnabled="False">Disabled</RepeatButton>
</StackPanel>
<TextBlock>Solid</TextBlock>
<StackPanel Orientation="Horizontal" Spacing="20">
@@ -27,10 +27,25 @@
<RepeatButton Classes="Warning" Theme="{DynamicResource SolidRepeatButton}">Warning</RepeatButton>
<RepeatButton Classes="Danger" Theme="{DynamicResource SolidRepeatButton}">Danger</RepeatButton>
<RepeatButton
Classes="Primary"
Classes="Danger"
IsEnabled="False"
Theme="{DynamicResource SolidRepeatButton}">
Danger
Disabled
</RepeatButton>
</StackPanel>
<TextBlock>Outline</TextBlock>
<StackPanel Orientation="Horizontal" Spacing="20">
<RepeatButton Classes="Primary" Theme="{DynamicResource OutlineRepeatButton}">Primary</RepeatButton>
<RepeatButton Classes="Secondary" Theme="{DynamicResource OutlineRepeatButton}">Secondary</RepeatButton>
<RepeatButton Classes="Tertiary" Theme="{DynamicResource OutlineRepeatButton}">Tertiary</RepeatButton>
<RepeatButton Classes="Success" Theme="{DynamicResource OutlineRepeatButton}">Success</RepeatButton>
<RepeatButton Classes="Warning" Theme="{DynamicResource OutlineRepeatButton}">Warning</RepeatButton>
<RepeatButton Classes="Danger" Theme="{DynamicResource OutlineRepeatButton}">Danger</RepeatButton>
<RepeatButton
Classes="Danger"
IsEnabled="False"
Theme="{DynamicResource OutlineRepeatButton}">
Disabled
</RepeatButton>
</StackPanel>
<TextBlock>Borderless</TextBlock>
@@ -42,11 +57,24 @@
<RepeatButton Classes="Warning" Theme="{DynamicResource BorderlessRepeatButton}">Warning</RepeatButton>
<RepeatButton Classes="Danger" Theme="{DynamicResource BorderlessRepeatButton}">Danger</RepeatButton>
<RepeatButton
Classes="Primary"
Classes="Danger"
IsEnabled="False"
Theme="{DynamicResource BorderlessRepeatButton}">
Danger
Disabled
</RepeatButton>
</StackPanel>
<TextBlock>Disabled</TextBlock>
<StackPanel Background="{DynamicResource SemiColorBackground1}" Orientation="Horizontal" Spacing="20">
<Button IsEnabled="False">Light</Button>
<Button IsEnabled="False" Theme="{DynamicResource SolidButton}">Solid</Button>
<Button IsEnabled="False" Theme="{DynamicResource OutlineButton}">Outline</Button>
<Button IsEnabled="False" Theme="{DynamicResource BorderlessButton}">Borderless</Button>
</StackPanel>
<TextBlock>Size Classes</TextBlock>
<StackPanel Orientation="Horizontal" Spacing="20">
<RepeatButton Classes="Small">Small</RepeatButton>
<RepeatButton>Default</RepeatButton>
<RepeatButton Classes="Large">Large</RepeatButton>
</StackPanel>
</StackPanel>
</UserControl>
</UserControl>

View File

@@ -4,147 +4,194 @@
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"
xmlns:pages="clr-namespace:Semi.Avalonia.Demo.Pages"
d:DesignHeight="1000"
d:DesignWidth="800"
mc:Ignorable="d">
<Design.DataContext>
<pages:SplitViewDemoViewModel />
</Design.DataContext>
<UserControl.Resources>
<ResourceDictionary>
<StreamGeometry x:Key="NavigationMenuExpandIconGlyph">M5 2H19C20.6569 2 22 3.34315 22 5V19C22 20.6569 20.6569 22 19 22H5C3.34315 22 2 20.6569 2 19V5C2 3.34315 3.34315 2 5 2ZM6 4C5.44772 4 5 4.44772 5 5V19C5 19.5523 5.44772 20 6 20H9C9.55229 20 10 19.5523 10 19V5C10 4.44772 9.55229 4 9 4H6Z</StreamGeometry>
</ResourceDictionary>
</UserControl.Resources>
<Border>
<Grid ColumnDefinitions="*,400">
<StackPanel
Grid.Column="1"
Orientation="Vertical"
Spacing="4">
<ToggleButton
Name="PaneOpenButton"
Content="IsPaneOpen"
IsChecked="{Binding IsPaneOpen, ElementName=SplitView}" />
<Border Grid.Column="1" VerticalAlignment="Top" Margin="10 0 0 0">
<Grid RowDefinitions="*, *, *, *, *, *" ColumnDefinitions="Auto, *">
<Label
Grid.Row="0" Grid.Column="0"
VerticalAlignment="Center"
Content="IsPaneOpen" />
<ToggleSwitch
Grid.Row="0" Grid.Column="1"
Name="PaneOpenButton"
IsChecked="{Binding #SplitView.IsPaneOpen}" />
<ToggleButton
Name="UseLightDismissOverlayModeButton"
Content="UseLightDismissOverlayMode"
IsChecked="{Binding UseLightDismissOverlayMode, ElementName=SplitView}" />
<Label
Grid.Row="1" Grid.Column="0"
VerticalAlignment="Center"
Content="UseLightDismissOverlayMode" />
<ToggleSwitch
Grid.Row="1" Grid.Column="1"
Name="UseLightDismissOverlayModeButton"
IsChecked="{Binding #SplitView.UseLightDismissOverlayMode}" />
<ToggleSwitch
Content="Placement"
OffContent="Left"
OnContent="Right" />
<Label
Grid.Row="2" Grid.Column="0"
VerticalAlignment="Center"
Content="Placement" />
<ToggleSwitch
Grid.Row="2" Grid.Column="1"
OffContent="Left"
OnContent="Right"
IsChecked="{Binding #SplitView.PanePlacement, Mode=OneWayToSource}" />
<TextBlock Text="DisplayMode" />
<ComboBox
Name="DisplayModeSelector"
Width="170"
Margin="10"
SelectedIndex="{Binding DisplayMode}">
<ComboBoxItem>Inline</ComboBoxItem>
<ComboBoxItem>CompactInline</ComboBoxItem>
<ComboBoxItem>Overlay</ComboBoxItem>
<ComboBoxItem>CompactOverlay</ComboBoxItem>
</ComboBox>
<Label
Grid.Row="3" Grid.Column="0"
VerticalAlignment="Center"
Content="DisplayMode" />
<ComboBox
Grid.Row="3" Grid.Column="1"
Name="DisplayModeSelector"
HorizontalAlignment="Stretch"
ItemsSource="{Binding DisplayModes}"
SelectedIndex="{Binding #SplitView.DisplayMode}" />
<TextBlock Text="PaneBackground" />
<ComboBox
Name="PaneBackgroundSelector"
Width="170"
Margin="10"
SelectedIndex="0">
<ComboBoxItem Tag="White">White</ComboBoxItem>
<ComboBoxItem Tag="Red">Red</ComboBoxItem>
<ComboBoxItem Tag="Blue">Blue</ComboBoxItem>
<ComboBoxItem Tag="Green">Green</ComboBoxItem>
</ComboBox>
<Label
Grid.Row="4" Grid.Column="0"
VerticalAlignment="Center"
Content="{Binding #CompactPaneLengthSlider.Value, StringFormat='{}CompactPaneLength: {0}'}" />
<Slider
Grid.Row="4" Grid.Column="1"
Name="CompactPaneLengthSlider"
Maximum="128"
Minimum="0"
TickFrequency="1"
IsSnapToTickEnabled="True"
Value="{Binding #SplitView.CompactPaneLength}" />
<TextBlock Text="{Binding Value, ElementName=OpenPaneLengthSlider, StringFormat='{}OpenPaneLength: {0}'}" />
<Slider
Name="OpenPaneLengthSlider"
Width="150"
Maximum="500"
Minimum="128"
Value="256" />
<TextBlock Text="{Binding Value, ElementName=CompactPaneLengthSlider, StringFormat='{}CompactPaneLength: {0}'}" />
<Slider
Name="CompactPaneLengthSlider"
Width="150"
Maximum="128"
Minimum="24"
Value="48" />
</StackPanel>
<Border BorderBrush="{DynamicResource SystemControlHighlightBaseLowBrush}" BorderThickness="1">
<!-- {Binding SelectedItem.Tag, ElementName=PaneBackgroundSelector} -->
<Label
Grid.Row="5" Grid.Column="0"
VerticalAlignment="Center"
Content="{Binding #OpenPaneLengthSlider.Value,StringFormat='{}OpenPaneLength: {0}'}" />
<Slider
Grid.Row="5" Grid.Column="1"
Name="OpenPaneLengthSlider"
Maximum="500"
Minimum="128"
TickFrequency="1"
IsSnapToTickEnabled="True"
Value="{Binding #SplitView.OpenPaneLength}" />
</Grid>
</Border>
<Border
Grid.Column="0"
BorderBrush="{DynamicResource SemiGrey1}"
BorderThickness="1">
<SplitView
Name="SplitView"
CompactPaneLength="{Binding Value, ElementName=CompactPaneLengthSlider}"
DisplayMode="CompactOverlay"
OpenPaneLength="{Binding Value, ElementName=OpenPaneLengthSlider}"
PaneBackground="{Binding SelectedItem.Tag, ElementName=PaneBackgroundSelector}"
PanePlacement="{Binding PanePlacement}">
CompactPaneLength="48"
OpenPaneLength="256">
<SplitView.Background>
<LinearGradientBrush StartPoint="0%,0%" EndPoint="0%,100%">
<GradientStop Color="#6b4c1b" Offset="0" />
<GradientStop Color="#291e10" Offset="1" />
</LinearGradientBrush>
</SplitView.Background>
<SplitView.Pane>
<Grid RowDefinitions="Auto,Auto,*,Auto">
<Grid RowDefinitions="Auto,*,Auto">
<TextBlock
Grid.Row="0"
Name="PaneHeader"
Margin="5,12,0,0"
Margin="8,12"
FontWeight="Bold"
Text="PANE CONTENT" />
<ComboBox Grid.Row="1" Width="150">
<ComboBoxItem Content="Item1" />
<ComboBoxItem Content="Item2" />
<ComboBoxItem Content="Item3" />
</ComboBox>
<ListBoxItem
Text="Playlist" />
<ListBox
Grid.Row="1"
ItemsSource="{Binding Songs}" />
<ToggleSwitch
Grid.Row="2"
Margin="0,10"
VerticalAlignment="Top">
<StackPanel Orientation="Horizontal">
<!-- Path glyph from materialdesignicons.com -->
<Border Width="48">
<Viewbox
Width="24"
Height="24"
HorizontalAlignment="Left">
<Canvas Width="24" Height="24">
<Path Data="M16 17V19H2V17S2 13 9 13 16 17 16 17M12.5 7.5A3.5 3.5 0 1 0 9 11A3.5 3.5 0 0 0 12.5 7.5M15.94 13A5.32 5.32 0 0 1 18 17V19H22V17S22 13.37 15.94 13M15 4A3.39 3.39 0 0 0 13.07 4.59A5 5 0 0 1 13.07 10.41A3.39 3.39 0 0 0 15 11A3.5 3.5 0 0 0 15 4Z" Fill="{DynamicResource SystemControlForegroundBaseHighBrush}" />
</Canvas>
</Viewbox>
</Border>
<TextBlock VerticalAlignment="Center" Text="People" />
</StackPanel>
</ListBoxItem>
<TextBlock
Grid.Row="3"
Margin="60,12"
Text="Item at bottom" />
Theme="{DynamicResource ButtonToggleSwitch}"
IsChecked="{Binding #SplitView.IsPaneOpen}">
<ToggleSwitch.OnContent>
<PathIcon
Width="16"
Height="16"
Data="{StaticResource NavigationMenuExpandIconGlyph}" />
</ToggleSwitch.OnContent>
<ToggleSwitch.OffContent>
<PathIcon
Width="16"
Height="16"
Data="{StaticResource NavigationMenuExpandIconGlyph}" />
</ToggleSwitch.OffContent>
</ToggleSwitch>
</Grid>
</SplitView.Pane>
<Grid>
<Grid.Styles>
<Style Selector="TextBlock">
<Setter Property="FontSize" Value="14" />
<Setter Property="FontWeight" Value="700" />
<Panel>
<Panel.Styles>
<Style Selector="Image#AlbumCover">
<Style.Animations>
<Animation IterationCount="Infinite" Duration="0:0:40">
<KeyFrame Cue="0%">
<Setter Property="RotateTransform.Angle" Value="0" />
</KeyFrame>
<KeyFrame Cue="100%">
<Setter Property="RotateTransform.Angle" Value="360" />
</KeyFrame>
</Animation>
</Style.Animations>
</Style>
</Grid.Styles>
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="SplitViewContent" />
<TextBlock Text="SplitViewContent" TextAlignment="Left" />
<TextBlock
HorizontalAlignment="Right"
Text="SplitViewContent"
TextAlignment="Left" />
<TextBlock
VerticalAlignment="Bottom"
Text="SplitViewContent"
TextAlignment="Left" />
<TextBlock
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
Text="SplitViewContent"
TextAlignment="Left" />
</Grid>
</Panel.Styles>
<Image
Source="/Assets/WORLD.png"
Name="AlbumCover"
Width="200"
Height="200" />
<Arc
Width="290"
Height="290"
StartAngle="0"
SweepAngle="360"
StrokeJoin="Round"
StrokeLineCap="Round"
StrokeThickness="45">
<Arc.Stroke>
<LinearGradientBrush StartPoint="0%,0%" EndPoint="100%,0%">
<GradientStop Color="#010101" Offset="0" />
<GradientStop Color="#363636" Offset="0.5" />
<GradientStop Color="#010101" Offset="1" />
</LinearGradientBrush>
</Arc.Stroke>
</Arc>
<Arc
Width="294"
Height="294"
StartAngle="0"
SweepAngle="360"
StrokeJoin="Round"
StrokeLineCap="Round"
StrokeThickness="4"
Stroke="Black" />
<Arc
Width="310"
Height="310"
StartAngle="0"
SweepAngle="360"
StrokeJoin="Round"
StrokeLineCap="Round"
StrokeThickness="10"
Stroke="#C6CACD"
Opacity="0.1" />
</Panel>
</SplitView>
</Border>
</Grid>
</Border>
</UserControl>
</UserControl>

View File

@@ -1,6 +1,7 @@
using Avalonia;
using System.Collections.ObjectModel;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using CommunityToolkit.Mvvm.ComponentModel;
namespace Semi.Avalonia.Demo.Pages;
@@ -9,10 +10,35 @@ public partial class SplitViewDemo : UserControl
public SplitViewDemo()
{
InitializeComponent();
this.DataContext = new SplitViewDemoViewModel();
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}
public class SplitViewDemoViewModel : ObservableObject
{
public ObservableCollection<string> Songs { get; set; } =
[
"320万年前",
"隐德来希",
"孔明",
"锦鲤卟噜噜",
"指鹿为马",
"热带季风Remix",
"加州梦境",
"渐近自由",
"世界所有的烂漫",
];
public ObservableCollection<SplitViewDisplayMode> DisplayModes { get; set; } =
[
SplitViewDisplayMode.Inline,
SplitViewDisplayMode.CompactInline,
SplitViewDisplayMode.Overlay,
SplitViewDisplayMode.CompactOverlay,
];
}

View File

@@ -42,6 +42,7 @@
InnerLeftContent="http://"
InnerRightContent=".com"
IsEnabled="False" />
<TextBox Width="300" Classes="TextArea" />
</StackPanel>
</ScrollViewer>
</UserControl>

View File

@@ -17,7 +17,7 @@
<ToggleButton Classes="Success">Success</ToggleButton>
<ToggleButton Classes="Warning">Warning</ToggleButton>
<ToggleButton Classes="Danger">Danger</ToggleButton>
<ToggleButton Classes="Danger" IsEnabled="False">Danger</ToggleButton>
<ToggleButton Classes="Danger" IsEnabled="False">Disabled</ToggleButton>
</StackPanel>
<TextBlock Text="Toggle Button Checked State" />
<StackPanel Orientation="Horizontal" Spacing="20">
@@ -28,18 +28,71 @@
<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>
<ToggleButton
Classes="Danger"
IsChecked="True"
IsEnabled="False">
Disabled
</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>
<ToggleButton IsChecked="{x:Null}" IsThreeState="True">Default</ToggleButton>
<ToggleButton
Classes="Primary"
IsChecked="{x:Null}"
IsThreeState="True">
Primary
</ToggleButton>
<ToggleButton
Classes="Secondary"
IsChecked="{x:Null}"
IsThreeState="True">
Secondary
</ToggleButton>
<ToggleButton
Classes="Tertiary"
IsChecked="{x:Null}"
IsThreeState="True">
Tertiary
</ToggleButton>
<ToggleButton
Classes="Success"
IsChecked="{x:Null}"
IsThreeState="True">
Success
</ToggleButton>
<ToggleButton
Classes="Warning"
IsChecked="{x:Null}"
IsThreeState="True">
Warning
</ToggleButton>
<ToggleButton
Classes="Danger"
IsChecked="{x:Null}"
IsThreeState="True">
Danger
</ToggleButton>
<ToggleButton
Classes="Danger"
IsChecked="{x:Null}"
IsEnabled="False"
IsThreeState="True">
Disabled
</ToggleButton>
</StackPanel>
<TextBlock Text="Toggle Button Disabled State" />
<StackPanel Background="{DynamicResource SemiColorBackground1}" Orientation="Horizontal" Spacing="20">
<ToggleButton IsThreeState="True" IsEnabled="False">Default</ToggleButton>
<ToggleButton IsThreeState="True" IsEnabled="False" IsChecked="True">Checked</ToggleButton>
<ToggleButton IsThreeState="True" IsEnabled="False" IsChecked="{x:Null}">Indeterminate</ToggleButton>
</StackPanel>
<TextBlock Text="Toggle Button Size" />
<StackPanel Orientation="Horizontal" Spacing="20">
<ToggleButton Classes="Small" IsThreeState="True">Small</ToggleButton>
<ToggleButton IsThreeState="True">Default</ToggleButton>
<ToggleButton Classes="Large" IsThreeState="True">Large</ToggleButton>
</StackPanel>
</StackPanel>
</UserControl>

View File

@@ -7,7 +7,7 @@
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
<StackPanel Spacing="20">
<StackPanel Spacing="8" Margin="20">
<ToggleSwitch
Content="Content"
OffContent="OffContent"
@@ -24,11 +24,19 @@
IsEnabled="False"
OffContent="OffContent"
OnContent="OnContent" />
<ToggleSwitch
Theme="{DynamicResource SimpleToggleSwitch}"
Content="Content"
OffContent="OffContent"
OnContent="OnContent" />
<StackPanel Orientation="Horizontal">
<ToggleSwitch Theme="{StaticResource SimpleToggleSwitch}" Classes="Small" />
<ToggleSwitch Theme="{StaticResource SimpleToggleSwitch}" Classes="Small" IsChecked="True"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<ToggleSwitch Theme="{StaticResource SimpleToggleSwitch}" />
<ToggleSwitch Theme="{StaticResource SimpleToggleSwitch}" IsChecked="True" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<ToggleSwitch Theme="{StaticResource SimpleToggleSwitch}" Classes="Large" />
<ToggleSwitch Theme="{StaticResource SimpleToggleSwitch}" Classes="Large" IsChecked="True"/>
</StackPanel>
<ToggleSwitch Theme="{DynamicResource ButtonToggleSwitch}">
<ToggleSwitch.OnContent>
<PathIcon

View File

@@ -1,5 +0,0 @@
<linker>
<!-- Can be removed if CompiledBinding and no reflection are used -->
<assembly fullname="Semi.Avalonia.Demo" preserve="All" />
<assembly fullname="Avalonia.Themes.Fluent" preserve="All" />
</linker>

View File

@@ -4,10 +4,9 @@
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
<AvaloniaResource Include="Assets\**" />
<TrimmerRootDescriptor Include="Roots.xml" />
</ItemGroup>
<ItemGroup>
@@ -19,8 +18,8 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Semi.Avalonia.ColorPicker\Semi.Avalonia.ColorPicker.csproj" />
<ProjectReference Include="..\..\src\Semi.Avalonia.DataGrid\Semi.Avalonia.DataGrid.csproj" />
<ProjectReference Include="..\..\src\Semi.Avalonia\Semi.Avalonia.csproj" />
<ProjectReference Include="..\..\src\Semi.Avalonia.ColorPicker\Semi.Avalonia.ColorPicker.csproj" />
<ProjectReference Include="..\..\src\Semi.Avalonia.DataGrid\Semi.Avalonia.DataGrid.csproj" />
<ProjectReference Include="..\..\src\Semi.Avalonia\Semi.Avalonia.csproj" />
</ItemGroup>
</Project>

View File

@@ -121,7 +121,7 @@ public class Song
new("指鹿为马", "熊猫堂ProducePandas", 3, 12, "W.O.R.L.D.", 74, 2063175272),
new("热带季风Remix", "熊猫堂ProducePandas", 3, 22, "W.O.R.L.D.", 23, 2063173319),
new("加州梦境", "熊猫堂ProducePandas", 2, 56, "W.O.R.L.D.", 1662, 2063173324),
new("渐自由", "熊猫堂ProducePandas", 4, 19, "W.O.R.L.D.", 124, 2063173321),
new("渐自由", "熊猫堂ProducePandas", 4, 19, "W.O.R.L.D.", 124, 2063173321),
new("世界所有的烂漫", "熊猫堂ProducePandas", 3, 30, "W.O.R.L.D.", 335, 2053388775),
};
}

View File

@@ -47,8 +47,8 @@ public class PaletteDemoViewModel: ObservableObject
public PaletteDemoViewModel()
{
_lightResourceDictionary = AvaloniaXamlLoader.Load(new Uri("avares://Semi.Avalonia/Themes/Light/Palette.axaml")) as ResourceDictionary;
_darkResourceDictionary = AvaloniaXamlLoader.Load(new Uri("avares://Semi.Avalonia/Themes/Dark/Palette.axaml")) as ResourceDictionary;
_lightResourceDictionary = new Light.Palette();
_darkResourceDictionary = new Dark.Palette();
WeakReferenceMessenger.Default.Register<PaletteDemoViewModel, ColorItemViewModel>(this, OnClickColorItem);
}
@@ -251,7 +251,7 @@ public static class ColorTokens
{
new ("SemiColorPrimary", "Primary"),
new ("SemiColorPrimaryPointerover", "Primary Pointerover"),
new ("SemiColorPrimaryPressed", "Primary Pressed"),
new ("SemiColorPrimaryActive", "Primary Active"),
new ("SemiColorPrimaryDisabled", "Primary Disabled"),
new ("SemiColorPrimaryLight", "Primary Light"),
new ("SemiColorPrimaryLightPointerover", "Primary Light Pointerover"),
@@ -262,7 +262,7 @@ public static class ColorTokens
{
new ("SemiColorSecondary", "Secondary"),
new ("SemiColorSecondaryPointerover", "Secondary Pointerover"),
new ("SemiColorSecondaryPressed", "Secondary Pressed"),
new ("SemiColorSecondaryActive", "Secondary Active"),
new ("SemiColorSecondaryDisabled", "Secondary Disabled"),
new ("SemiColorSecondaryLight", "Secondary Light"),
new ("SemiColorSecondaryLightPointerover", "Secondary Light Pointerover"),
@@ -273,7 +273,7 @@ public static class ColorTokens
{
new ("SemiColorTertiary", "Tertiary"),
new ("SemiColorTertiaryPointerover", "Tertiary Pointerover"),
new ("SemiColorTertiaryPressed", "Tertiary Pressed"),
new ("SemiColorTertiaryActive", "Tertiary Active"),
new ("SemiColorTertiaryLight", "Tertiary Light"),
new ("SemiColorTertiaryLightPointerover", "Tertiary Light Pointerover"),
new ("SemiColorTertiaryLightActive", "Tertiary Light Active"),
@@ -283,7 +283,7 @@ public static class ColorTokens
{
new ("SemiColorInformation", "Information"),
new ("SemiColorInformationPointerover", "Information Pointerover"),
new ("SemiColorInformationPressed", "Information Pressed"),
new ("SemiColorInformationActive", "Information Active"),
new ("SemiColorInformationDisabled", "Information Disabled"),
new ("SemiColorInformationLight", "Information Light"),
new ("SemiColorInformationLightPointerover", "Information Light Pointerover"),
@@ -294,7 +294,7 @@ public static class ColorTokens
{
new ("SemiColorSuccess", "Success"),
new ("SemiColorSuccessPointerover", "Success Pointerover"),
new ("SemiColorSuccessPressed", "Success Pressed"),
new ("SemiColorSuccessActive", "Success Active"),
new ("SemiColorSuccessDisabled", "Success Disabled"),
new ("SemiColorSuccessLight", "Success Light"),
new ("SemiColorSuccessLightPointerover", "Success Light Pointerover"),
@@ -305,7 +305,7 @@ public static class ColorTokens
{
new ("SemiColorWarning", "Warning"),
new ("SemiColorWarningPointerover", "Warning Pointerover"),
new ("SemiColorWarningPressed", "Warning Pressed"),
new ("SemiColorWarningActive", "Warning Active"),
new ("SemiColorWarningLight", "Warning Light"),
new ("SemiColorWarningLightPointerover", "Warning Light Pointerover"),
new ("SemiColorWarningLightActive", "Warning Light Active"),
@@ -315,7 +315,7 @@ public static class ColorTokens
{
new ("SemiColorDanger", "Danger"),
new ("SemiColorDangerPointerover", "Danger Pointerover"),
new ("SemiColorDangerPressed", "Danger Pressed"),
new ("SemiColorDangerActive", "Danger Active"),
new ("SemiColorDangerLight", "Danger Light"),
new ("SemiColorDangerLightPointerover", "Danger Light Pointerover"),
new ("SemiColorDangerLightActive", "Danger Light Active"),

View File

@@ -1,5 +1,5 @@
{
"sdk": {
"version": "7.0"
"version": "8.0"
}
}

View File

@@ -1,6 +1,6 @@
{
"sdk": {
"version": "7.0.0",
"version": "8.0.0",
"rollForward": "latestMajor",
"allowPrerelease": true
}

View File

@@ -1,14 +1,19 @@
<Project>
<PropertyGroup>
<TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net6.0;net8.0;netstandard2.0</TargetFrameworks>
<Nullable>enable</Nullable>
<LangVersion>11</LangVersion>
<Version>11.0.7.1</Version>
<Authors>IRIHI Technology</Authors>
<LangVersion>latest</LangVersion>
<Version>11.0.7.6</Version>
<Authors>IRIHI Technology Co., Ltd.</Authors>
<Description>Avalonia Theme inspired by Semi Design.</Description>
<RepositoryUrl>https://github.com/irihitech/Semi.Avalonia</RepositoryUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIcon>irihi.png</PackageIcon>
<PackageProjectUrl>https://github.com/irihitech/Semi.Avalonia</PackageProjectUrl>
<AvaloniaVersion>11.0.7</AvaloniaVersion>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
</PropertyGroup>
<ItemGroup>
<None Include="irihi.png" Pack="true" PackagePath=""/>
</ItemGroup>
</Project>

View File

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

View File

@@ -7,6 +7,10 @@
<PackageReleaseNotes>Update to 11.0.7</PackageReleaseNotes>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
<IsAotCompatible>true</IsAotCompatible>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="$(AvaloniaVersion)"/>
<PackageReference Include="Avalonia.Controls.ColorPicker" Version="$(AvaloniaVersion)"/>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -292,7 +292,7 @@
Name="BackgroundBorder"
Grid.RowSpan="2"
Grid.ColumnSpan="2"
Margin="2"
Margin="{DynamicResource DataGridRowMargin}"
Background="{DynamicResource DataGridRowBackground}"
CornerRadius="3" />
<Rectangle

View File

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

View File

@@ -1,12 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../Package.props"/>
<PropertyGroup>
<Title>Semi.Avalonia.DataGrid</Title>
<PackageReleaseNotes>Update to 11.0.7</PackageReleaseNotes>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
<IsAotCompatible>true</IsAotCompatible>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="$(AvaloniaVersion)"/>
<PackageReference Include="Avalonia.Controls.DataGrid" Version="$(AvaloniaVersion)"/>

View File

@@ -12,6 +12,7 @@
<StreamGeometry x:Key="DataGridColumnHeaderDescendingGlyph">M17.549 15.659L12.753 21.139C12.6591 21.2464 12.5434 21.3325 12.4135 21.3915C12.2836 21.4505 12.1427 21.481 12 21.481C11.8574 21.481 11.7164 21.4505 11.5865 21.3915C11.4566 21.3325 11.3409 21.2464 11.247 21.139L6.45101 15.659C5.88501 15.011 6.34501 14 7.20401 14H16.796C17.656 14 18.115 15.012 17.549 15.659Z</StreamGeometry>
<Thickness x:Key="DataGridRowHeaderMargin">8 0</Thickness>
<Thickness x:Key="DataGridRowMargin">2</Thickness>
<StreamGeometry x:Key="DataGridRowGroupHeaderExpandIconGlyph">M7.43934 19.7957C6.85355 19.2099 6.85355 18.2601 7.43934 17.6744L13.0962 12.0175L7.43934 6.36065C6.85355 5.77486 6.85355 4.82511 7.43934 4.23933C8.02513 3.65354 8.97487 3.65354 9.56066 4.23933L16.2782 10.9568C16.864 11.5426 16.864 12.4924 16.2782 13.0782L9.56066 19.7957C8.97487 20.3815 8.02513 20.3815 7.43934 19.7957Z</StreamGeometry>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -3,17 +3,24 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<LangVersion>11</LangVersion>
<Version>11.0.1</Version>
<Authors>IRIHI Technology</Authors>
<LangVersion>latest</LangVersion>
<Version>11.0.10</Version>
<Authors>IRIHI Technology Co., Ltd.</Authors>
<Description>Avalonia Theme inspired by Semi Design.</Description>
<PackageProjectUrl>https://github.com/irihitech/Semi.Avalonia</PackageProjectUrl>
<AvaloniaVersion>11.0.0</AvaloniaVersion>
<RepositoryUrl>https://github.com/irihitech/Semi.Avalonia</RepositoryUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIcon>irihi.png</PackageIcon>
<PackageProjectUrl>https://github.com/irihitech/Semi.Avalonia</PackageProjectUrl>
<AvaloniaVersion>11.0.10</AvaloniaVersion>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
<IsAotCompatible>true</IsAotCompatible>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Avalonia.Controls.TreeDataGrid" Version="$(AvaloniaVersion)"/>
<None Include="irihi.png" Pack="true" PackagePath=""/>
</ItemGroup>
</Project>

View File

@@ -5,4 +5,5 @@
</StreamGeometry>
<StreamGeometry x:Key="TreeDataGridSortIconAscendingPath">M6.45096 8.34102L11.247 2.86102C11.3408 2.75361 11.4566 2.66753 11.5865 2.60854C11.7163 2.54956 11.8573 2.51904 12 2.51904C12.1426 2.51904 12.2836 2.54956 12.4135 2.60854C12.5433 2.66753 12.6591 2.75361 12.753 2.86102L17.549 8.34102C18.115 8.98802 17.655 10 16.796 10H7.20396C6.34396 10 5.88496 8.98802 6.45096 8.34102Z</StreamGeometry>
<StreamGeometry x:Key="TreeDataGridItemCollapsedChevronPathData">M9.65618 3.44015L18.6322 11.2454C19.0906 11.644 19.0906 12.356 18.6322 12.7546L9.65618 20.5598C9.00895 21.1226 8 20.6629 8 19.8052V4.19475C8 3.33705 9.00895 2.87734 9.65618 3.44015Z</StreamGeometry>
<Thickness x:Key="TreeDataGridRowMargin">2</Thickness>
</ResourceDictionary>

View File

@@ -149,7 +149,7 @@
<Panel>
<Border
Name="RowBorder"
Margin="2"
Margin="{DynamicResource TreeDataGridRowMargin}"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="{TemplateBinding Background}"
@@ -183,8 +183,7 @@
<CheckBox
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
VerticalAlignment="Center"
IsChecked="{TemplateBinding Value,
Mode=TwoWay}"
IsChecked="{TemplateBinding Value, Mode=TwoWay}"
IsEnabled="{Binding !IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}"
IsThreeState="{TemplateBinding IsThreeState}"
Theme="{DynamicResource SimpleCheckBox}" />
@@ -239,8 +238,7 @@
DockPanel.Dock="Left">
<ToggleButton
Focusable="False"
IsChecked="{TemplateBinding IsExpanded,
Mode=TwoWay}"
IsChecked="{TemplateBinding IsExpanded, Mode=TwoWay}"
IsVisible="{TemplateBinding ShowExpander}"
Theme="{StaticResource TreeDataGridExpandCollapseChevron}" />
</Border>
@@ -287,8 +285,7 @@
<TextBox
Name="PART_Edit"
Classes="Small"
Text="{TemplateBinding Value,
Mode=TwoWay}" />
Text="{TemplateBinding Value, Mode=TwoWay}" />
</Border>
</ControlTemplate>
</Setter>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -0,0 +1,16 @@
<ResourceDictionary
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:ClassModifier="internal">
<ControlTheme x:Key="{x:Type AdornerLayer}" TargetType="AdornerLayer">
<Setter Property="DefaultFocusAdorner">
<FocusAdornerTemplate>
<Rectangle
Margin="{DynamicResource AdornerLayerMargin}"
Stroke="{DynamicResource AdornerLayerBackground}"
StrokeDashArray="1,2"
StrokeThickness="{DynamicResource AdornerLayerThickness}" />
</FocusAdornerTemplate>
</Setter>
</ControlTheme>
</ResourceDictionary>

View File

@@ -2,9 +2,9 @@
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:CompileBindings="True">
<!-- Button Theme Key: Solid Light Border Borderless; Default is Light -->
<!-- Button Default Classes: Primary Secondary, Tertiary, Warning, Danger; Default is Primary -->
<!-- State default pointerover pressed disabled -->
<!-- Button Theme Key: Light, Solid, Outline, Borderless; Default is Light -->
<!-- Button Default Classes: Primary, Secondary, Tertiary, Success, Warning, Danger; Default is Primary -->
<!-- State: default, pointerover, pressed, disabled -->
<!-- Button Light -->
<ControlTheme x:Key="{x:Type Button}" TargetType="Button">
@@ -76,7 +76,6 @@
<Style Selector="^:disabled">
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource ButtonDefaultDisabledBackground}" />
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
</Style>
@@ -186,7 +185,37 @@
<Style Selector="^:disabled">
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource ButtonDefaultDisabledBackground}" />
<Setter Property="Background" Value="{DynamicResource ButtonSolidDisabledBackground}" />
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
</Style>
</ControlTheme>
<ControlTheme
x:Key="OutlineButton"
BasedOn="{StaticResource {x:Type Button}}"
TargetType="Button">
<Setter Property="Background" Value="{DynamicResource ButtonOutlineBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
<Style Selector="^:pointerover">
<Setter Property="Background" Value="{DynamicResource ButtonOutlinePointeroverBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
</Style>
<Style Selector="^:pressed">
<Setter Property="Background" Value="{DynamicResource ButtonOutlinePressedBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
</Style>
<Style Selector="^.Success">
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineSuccessBorderBrush}" />
</Style>
<Style Selector="^.Warning">
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineWarningBorderBrush}" />
</Style>
<Style Selector="^.Danger">
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineDangerBorderBrush}" />
</Style>
<Style Selector="^:disabled">
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource ButtonOutlineBackground}" />
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
</Style>
</ControlTheme>

View File

@@ -41,7 +41,6 @@
<Setter Property="ButtonSpinner.BorderBrush" Value="{DynamicResource ButtonSpinnerRepeatButtonBorderBrush}" />
<Setter Property="ButtonSpinner.BorderThickness" Value="0" />
<Setter Property="ButtonSpinner.MinWidth" Value="300" />
<!-- Add Resource -->
<Setter Property="ButtonSpinner.Template">
<ControlTemplate TargetType="ButtonSpinner">
<Grid ColumnDefinitions="Auto, *, Auto">
@@ -49,8 +48,7 @@
Grid.Column="1"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}"
UseLayoutRounding="False">
CornerRadius="{TemplateBinding CornerRadius}">
<ContentPresenter
Name="PART_ContentPresenter"
Padding="{TemplateBinding Padding}"

View File

@@ -31,6 +31,7 @@
</ControlTheme>
<ControlTheme x:Key="{x:Type CalendarItem}" TargetType="CalendarItem">
<Setter Property="CalendarItem.MinWidth" Value="{DynamicResource CalendarMinWidth}" />
<Setter Property="CalendarItem.MinHeight" Value="{DynamicResource CalendarMinHeight}" />
<Setter Property="CalendarItem.DayTitleTemplate">
<Template>
@@ -53,7 +54,7 @@
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}">
<Grid
MinWidth="{DynamicResource CalendarMinWidth}"
MinWidth="{TemplateBinding MinWidth}"
MinHeight="{TemplateBinding MinHeight}"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"

View File

@@ -123,8 +123,8 @@
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
</Style>
<Style Selector="^ /template/ Path#CheckGlyph">
<Setter Property="Fill" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
<Style Selector="^ /template/ PathIcon#CheckGlyph">
<Setter Property="Foreground" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
</Style>
</Style>
</Style>
@@ -166,8 +166,8 @@
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
</Style>
<Style Selector="^ /template/ Path#CheckGlyph">
<Setter Property="Fill" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
<Style Selector="^ /template/ PathIcon#CheckGlyph">
<Setter Property="Foreground" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
</Style>
</Style>
</Style>
@@ -275,8 +275,8 @@
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
</Style>
<Style Selector="^ /template/ Path#CheckGlyph">
<Setter Property="Fill" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
<Style Selector="^ /template/ PathIcon#CheckGlyph">
<Setter Property="Foreground" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
</Style>
</Style>
</Style>
@@ -315,8 +315,8 @@
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
</Style>
<Style Selector="^ /template/ Path#CheckGlyph">
<Setter Property="Fill" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
<Style Selector="^ /template/ PathIcon#CheckGlyph">
<Setter Property="Foreground" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
</Style>
</Style>
</Style>
@@ -457,8 +457,8 @@
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
</Style>
<Style Selector="^ /template/ Path#CheckGlyph">
<Setter Property="Fill" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
<Style Selector="^ /template/ PathIcon#CheckGlyph">
<Setter Property="Foreground" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
</Style>
</Style>
</Style>
@@ -512,8 +512,8 @@
<Setter Property="Background" Value="{DynamicResource CheckBoxCheckedDisabledBackground}" />
</Style>
<Style Selector="^ /template/ Path#CheckGlyph">
<Setter Property="Fill" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
<Style Selector="^ /template/ PathIcon#CheckGlyph">
<Setter Property="Foreground" Value="{DynamicResource CheckBoxGlyphDisabledFill}" />
</Style>
</Style>
</Style>

View File

@@ -61,6 +61,7 @@
Margin="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
TextTrimming="CharacterEllipsis"
Foreground="{TemplateBinding Foreground}"
IsVisible="{TemplateBinding SelectionBoxItem,
Converter={x:Static ObjectConverters.IsNull}}"

View File

@@ -88,7 +88,6 @@
<Style Selector="^:disabled">
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource ButtonDefaultDisabledBackground}" />
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
</Style>
@@ -235,7 +234,37 @@
<Style Selector="^:disabled">
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource ButtonDefaultDisabledBackground}" />
<Setter Property="Background" Value="{DynamicResource ButtonSolidDisabledBackground}" />
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
</Style>
</ControlTheme>
<ControlTheme
x:Key="OutlineDropDownButton"
BasedOn="{StaticResource {x:Type DropDownButton}}"
TargetType="DropDownButton">
<Setter Property="Background" Value="{DynamicResource ButtonOutlineBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
<Style Selector="^:pointerover">
<Setter Property="Background" Value="{DynamicResource ButtonOutlinePointeroverBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
</Style>
<Style Selector="^:pressed">
<Setter Property="Background" Value="{DynamicResource ButtonOutlinePressedBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
</Style>
<Style Selector="^.Success">
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineSuccessBorderBrush}" />
</Style>
<Style Selector="^.Warning">
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineWarningBorderBrush}" />
</Style>
<Style Selector="^.Danger">
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineDangerBorderBrush}" />
</Style>
<Style Selector="^:disabled">
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource ButtonOutlineBackground}" />
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
</Style>
</ControlTheme>

View File

@@ -131,13 +131,13 @@
<ColumnDefinition Width="200" SharedSizeGroup="Size" />
</Grid.ColumnDefinitions>
<GridSplitter Grid.Column="1" Width="1" />
<TextBlock Grid.Column="2" Text="Name" />
<TextBlock Grid.Column="2" Text="{DynamicResource STRING_CHOOSER_NAME_COLUMN}" />
<GridSplitter Grid.Column="3" Width="1" />
<TextBlock Grid.Column="4" Text="Date Modified" />
<TextBlock Grid.Column="4" Text="{DynamicResource STRING_CHOOSER_DATEMODIFIED_COLUMN}" />
<GridSplitter Grid.Column="5" Width="1" />
<TextBlock Grid.Column="6" Text="Type" />
<TextBlock Grid.Column="6" Text="{DynamicResource STRING_CHOOSER_TYPE_COLUMN}" />
<GridSplitter Grid.Column="7" Width="1" />
<TextBlock Grid.Column="8" Text="Size" />
<TextBlock Grid.Column="8" Text="{DynamicResource STRING_CHOOSER_SIZE_COLUMN}" />
</Grid>
<ListBox
Name="PART_Files"

View File

@@ -147,6 +147,7 @@
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
Content="{TemplateBinding Header}"
ContentTemplate="{TemplateBinding HeaderTemplate}"
RecognizesAccessKey="True" />
<TextBlock
x:Name="PART_InputGestureText"
@@ -267,6 +268,7 @@
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
Content="{TemplateBinding Header}"
ContentTemplate="{TemplateBinding HeaderTemplate}"
RecognizesAccessKey="True" />
<Popup
Name="PART_Popup"

View File

@@ -185,6 +185,10 @@
<Style Selector="^.Warning">
<Setter Property="Foreground" Value="{DynamicResource ProgressBarWarningForeground}" />
</Style>
<Style Selector="^.Danger">
<Setter Property="Foreground" Value="{DynamicResource ProgressBarDangerForeground}" />
</Style>
<!-- Error style is obsolete, use Danger instead -->
<Style Selector="^.Error">
<Setter Property="Foreground" Value="{DynamicResource ProgressBarErrorForeground}" />
</Style>
@@ -411,6 +415,10 @@
<Style Selector="^.Warning">
<Setter Property="Foreground" Value="{DynamicResource ProgressBarWarningForeground}" />
</Style>
<Style Selector="^.Danger">
<Setter Property="Foreground" Value="{DynamicResource ProgressBarDangerForeground}" />
</Style>
<!-- Error style is obsolete, use Danger instead -->
<Style Selector="^.Error">
<Setter Property="Foreground" Value="{DynamicResource ProgressBarErrorForeground}" />
</Style>

View File

@@ -71,7 +71,6 @@
<Style Selector="^:disabled">
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource ButtonDefaultDisabledBackground}" />
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
</Style>
@@ -172,7 +171,37 @@
<Style Selector="^:disabled">
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource ButtonDefaultDisabledBackground}" />
<Setter Property="Background" Value="{DynamicResource ButtonSolidDisabledBackground}" />
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
</Style>
</ControlTheme>
<ControlTheme
x:Key="OutlineRepeatButton"
BasedOn="{StaticResource {x:Type RepeatButton}}"
TargetType="RepeatButton">
<Setter Property="Background" Value="{DynamicResource ButtonOutlineBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
<Style Selector="^:pointerover">
<Setter Property="Background" Value="{DynamicResource ButtonOutlinePointeroverBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
</Style>
<Style Selector="^:pressed">
<Setter Property="Background" Value="{DynamicResource ButtonOutlinePressedBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
</Style>
<Style Selector="^.Success">
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineSuccessBorderBrush}" />
</Style>
<Style Selector="^.Warning">
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineWarningBorderBrush}" />
</Style>
<Style Selector="^.Danger">
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineDangerBorderBrush}" />
</Style>
<Style Selector="^:disabled">
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource ButtonOutlineBackground}" />
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
</Style>
</ControlTheme>

View File

@@ -124,9 +124,12 @@
<Setter Property="Padding" Value="{DynamicResource ButtonSmallPadding}" />
</Style>
<Style Selector="^:disabled /template/ Button">
<Setter Property="Background" Value="{DynamicResource ButtonDefaultDisabledBackground}" />
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
</Style>
<!-- only for ToggleSplitButton -->
<Style Selector="^:checked:disabled /template/ Button">
<Setter Property="Background" Value="{DynamicResource ButtonSolidDisabledBackground}" />
</Style>
</ControlTheme>
<ControlTheme
@@ -206,7 +209,37 @@
</Style>
<Style Selector="^:disabled /template/ Button">
<Setter Property="Background" Value="{DynamicResource ButtonDefaultDisabledBackground}" />
<Setter Property="Background" Value="{DynamicResource ButtonSolidDisabledBackground}" />
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
</Style>
</ControlTheme>
<ControlTheme
x:Key="OutlineSplitButton"
BasedOn="{StaticResource {x:Type SplitButton}}"
TargetType="SplitButton">
<Setter Property="Background" Value="{DynamicResource ButtonOutlineBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
<Style Selector="^ /template/ Button">
<Style Selector="^:pointerover">
<Setter Property="Background" Value="{DynamicResource ButtonOutlinePointeroverBackground}" />
</Style>
<Style Selector="^:pressed">
<Setter Property="Background" Value="{DynamicResource ButtonOutlinePressedBackground}" />
</Style>
</Style>
<Style Selector="^.Success /template/ Button">
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineSuccessBorderBrush}" />
</Style>
<Style Selector="^.Warning /template/ Button">
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineWarningBorderBrush}" />
</Style>
<Style Selector="^.Danger /template/ Button">
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineDangerBorderBrush}" />
</Style>
<Style Selector="^:disabled /template/ Button">
<Setter Property="BorderBrush" Value="{DynamicResource ButtonOutlineBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource ButtonOutlineBackground}" />
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
</Style>
</ControlTheme>

View File

@@ -240,6 +240,13 @@
</Style>
</Style>
</Style>
<Style Selector="^.TextArea">
<Setter Property="AcceptsReturn" Value="True"></Setter>
<Setter Property="VerticalContentAlignment" Value="Top"></Setter>
<Setter Property="TextBox.Padding" Value="{DynamicResource TextBoxTextAreaContentPadding}"></Setter>
<Setter Property="MinHeight" Value="{DynamicResource TextBoxTextAreaHeight}"></Setter>
</Style>
</ControlTheme>
<ControlTheme x:Key="NonErrorTextBox" TargetType="TextBox">

View File

@@ -67,6 +67,7 @@
<Style Selector="^:disabled">
<Setter Property="BorderBrush" Value="{DynamicResource ToggleButtonDefaultDisabledBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource ToggleButtonDefaultBackground}" />
</Style>
<Style Selector="^.Primary">
@@ -153,6 +154,7 @@
</Style>
<Style Selector="^:disabled">
<Setter Property="BorderBrush" Value="{DynamicResource ToggleButtonDefaultDisabledBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource ToggleButtonCheckedDisabledBackground}" />
</Style>
</Style>
@@ -242,12 +244,12 @@
</Style>
<Style Selector="^:disabled">
<Setter Property="BorderBrush" Value="{DynamicResource ToggleButtonIndeterminateDisabledBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource ToggleButtonDefaultBackground}" />
</Style>
</Style>
<Style Selector="^:disabled">
<Setter Property="Foreground" Value="{DynamicResource ToggleButtonDefaultDisabledForeground}" />
<Setter Property="Background" Value="{DynamicResource ToggleButtonDefaultDisabledBackground}" />
</Style>
<Style Selector="^.Large">

View File

@@ -36,8 +36,7 @@
VerticalAlignment="Top"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
IsVisible="{TemplateBinding Content,
Converter={x:Static ObjectConverters.IsNotNull}}"
IsVisible="{TemplateBinding Content, Converter={x:Static ObjectConverters.IsNotNull}}"
RecognizesAccessKey="True" />
<Grid
Grid.Row="1"
@@ -48,38 +47,34 @@
Grid.ColumnSpan="2"
TemplatedControl.IsTemplateFocusTarget="True" />
<Border
Name="SwitchBackgroundBorder"
x:Name="SwitchBackgroundBorder"
Grid.Column="0"
Width="40"
Height="20"
Width="{DynamicResource ToggleSwitchDefaultWidth}"
Height="{DynamicResource ToggleSwitchDefaultHeight}"
CornerRadius="100">
<Border.Transitions>
<Transitions>
<BrushTransition Property="Background" Duration="0:0:0.2" />
</Transitions>
</Border.Transitions>
<Canvas
x:Name="PART_SwitchKnob"
Width="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
Height="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
HorizontalAlignment="Left">
<Grid
x:Name="PART_MovingKnobs"
Width="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
Height="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
Margin="{DynamicResource ToggleSwitchIndicatorDefaultMargin}">
<Border
x:Name="SwitchKnobIndicator"
Background="White"
BoxShadow="0 0 1 1 #222E3238"
CornerRadius="100" />
</Grid>
</Canvas>
</Border>
<Canvas
x:Name="PART_SwitchKnob"
Grid.Column="0"
Width="20"
Height="20"
HorizontalAlignment="Left">
<Grid
x:Name="PART_MovingKnobs"
Width="20"
Height="20">
<Border
x:Name="SwitchKnobIndicator"
Width="14"
Height="14"
Background="White"
BorderBrush="{DynamicResource ToggleSwitchIndicatorBorderBrush}"
BorderThickness="0.5"
BoxShadow="0 0 1 1 #222E3238"
CornerRadius="100" />
</Grid>
</Canvas>
<ContentPresenter
x:Name="PART_OnContentPresenter"
@@ -154,6 +149,36 @@
<Setter Property="Background" Value="{DynamicResource ToggleSwitchContainerCheckedDisabledBackground}" />
</Style>
</Style>
<Style Selector="^.Small">
<Style Selector="^ /template/ Border#SwitchBackgroundBorder">
<Setter Property="Width" Value="{DynamicResource ToggleSwitchSmallWidth}" />
<Setter Property="Height" Value="{DynamicResource ToggleSwitchSmallHeight}" />
</Style>
<Style Selector="^ /template/ Canvas#PART_SwitchKnob">
<Setter Property="Width" Value="{DynamicResource ToggleSwitchIndicatorSmallWidth}" />
<Setter Property="Height" Value="{DynamicResource ToggleSwitchIndicatorSmallWidth}" />
</Style>
<Style Selector="^ /template/ Grid#PART_MovingKnobs">
<Setter Property="Width" Value="{DynamicResource ToggleSwitchIndicatorSmallWidth}" />
<Setter Property="Height" Value="{DynamicResource ToggleSwitchIndicatorSmallWidth}" />
<Setter Property="Margin" Value="{DynamicResource ToggleSwitchIndicatorSmallMargin}"/>
</Style>
</Style>
<Style Selector="^.Large">
<Style Selector="^ /template/ Border#SwitchBackgroundBorder">
<Setter Property="Width" Value="{DynamicResource ToggleSwitchLargeWidth}" />
<Setter Property="Height" Value="{DynamicResource ToggleSwitchLargeHeight}" />
</Style>
<Style Selector="^ /template/ Canvas#PART_SwitchKnob">
<Setter Property="Width" Value="{DynamicResource ToggleSwitchIndicatorLargeWidth}" />
<Setter Property="Height" Value="{DynamicResource ToggleSwitchIndicatorLargeWidth}" />
</Style>
<Style Selector="^ /template/ Grid#PART_MovingKnobs">
<Setter Property="Width" Value="{DynamicResource ToggleSwitchIndicatorLargeWidth}" />
<Setter Property="Height" Value="{DynamicResource ToggleSwitchIndicatorLargeWidth}" />
<Setter Property="Margin" Value="{DynamicResource ToggleSwitchIndicatorLargeMargin}"/>
</Style>
</Style>
</ControlTheme>
<ControlTheme
@@ -205,49 +230,40 @@
<Grid
Background="{TemplateBinding Background}"
Cursor="Hand"
RowDefinitions="*">
ColumnDefinitions="Auto, *">
<Grid
Grid.Row="0"
Background="Transparent"
ColumnDefinitions="Auto, *">
<Grid
Grid.Column="0"
Grid.ColumnSpan="2"
TemplatedControl.IsTemplateFocusTarget="True" />
<Border
Name="SwitchBackgroundBorder"
Grid.Column="0"
Width="40"
Height="20"
CornerRadius="100">
<Border.Transitions>
<Transitions>
<BrushTransition Property="Background" Duration="0:0:0.2" />
</Transitions>
</Border.Transitions>
</Border>
Grid.Column="0"
Grid.ColumnSpan="2"
TemplatedControl.IsTemplateFocusTarget="True" />
<Border
x:Name="SwitchBackgroundBorder"
Grid.Column="0"
Width="{DynamicResource ToggleSwitchDefaultWidth}"
Height="{DynamicResource ToggleSwitchDefaultHeight}"
CornerRadius="100">
<Border.Transitions>
<Transitions>
<BrushTransition Property="Background" Duration="0:0:0.2" />
</Transitions>
</Border.Transitions>
<Canvas
x:Name="PART_SwitchKnob"
Grid.Column="0"
Width="20"
Height="20"
Width="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
Height="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
HorizontalAlignment="Left">
<Grid
x:Name="PART_MovingKnobs"
Width="20"
Height="20">
Width="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
Height="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
Margin="{DynamicResource ToggleSwitchIndicatorDefaultMargin}">
<Border
x:Name="SwitchKnobIndicator"
Width="14"
Height="14"
Background="White"
BorderBrush="{DynamicResource ToggleSwitchIndicatorBorderBrush}"
BorderThickness="0.5"
BoxShadow="0 0 1 1 #222E3238"
CornerRadius="100" />
</Grid>
</Canvas>
</Grid>
</Border>
</Grid>
</ControlTemplate>
</Setter>

View File

@@ -21,6 +21,11 @@
<Setter Property="HorizontalAlignment" Value="Right" />
</Style>
<Style Selector="^:topcenter /template/ ReversibleStackPanel#PART_Items">
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="HorizontalAlignment" Value="Center" />
</Style>
<Style Selector="^:bottomleft /template/ ReversibleStackPanel#PART_Items">
<Setter Property="ReverseOrder" Value="True" />
<Setter Property="VerticalAlignment" Value="Bottom" />
@@ -32,5 +37,11 @@
<Setter Property="VerticalAlignment" Value="Bottom" />
<Setter Property="HorizontalAlignment" Value="Right" />
</Style>
<Style Selector="^:bottomcenter /template/ ReversibleStackPanel#PART_Items">
<Setter Property="ReverseOrder" Value="True" />
<Setter Property="VerticalAlignment" Value="Bottom" />
<Setter Property="HorizontalAlignment" Value="Center" />
</Style>
</ControlTheme>
</ResourceDictionary>

View File

@@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:CompileBindings="True">
<ResourceDictionary.MergedDictionaries>
<ResourceInclude Source="avares://Semi.Avalonia/Controls/AdornerLayer.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Controls/AutoCompleteBox.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Controls/Border.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Controls/Button.axaml" />

View File

@@ -1,10 +1,17 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
x:Class="Semi.Avalonia.Locale.en_us"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- TextBox/SelectableTextBox flyout -->
<x:String x:Key="STRING_MENU_CUT">Cut</x:String>
<x:String x:Key="STRING_MENU_COPY">Copy</x:String>
<x:String x:Key="STRING_MENU_PASTE">Paste</x:String>
<!-- ManagedFileChooser -->
<x:String x:Key="STRING_CHOOSER_FILE_NAME">File name</x:String>
<x:String x:Key="STRING_CHOOSER_SHOW_HIDDEN_FILES">Show hidden flies</x:String>
<x:String x:Key="STRING_CHOOSER_DIALOG_OK">OK</x:String>
<x:String x:Key="STRING_CHOOSER_DIALOG_CANCEL">Cancel</x:String>
<x:String x:Key="STRING_MENU_CUT">Cut</x:String>
<x:String x:Key="STRING_MENU_COPY">Copy</x:String>
<x:String x:Key="STRING_MENU_PASTE">Paste</x:String>
<x:String x:Key="STRING_CHOOSER_NAME_COLUMN">Name</x:String>
<x:String x:Key="STRING_CHOOSER_DATEMODIFIED_COLUMN">Date Modified</x:String>
<x:String x:Key="STRING_CHOOSER_TYPE_COLUMN">Type</x:String>
<x:String x:Key="STRING_CHOOSER_SIZE_COLUMN">Size</x:String>
</ResourceDictionary>

View File

@@ -0,0 +1,8 @@
using Avalonia.Controls;
namespace Semi.Avalonia.Locale;
public class en_us: ResourceDictionary
{
}

View File

@@ -1,10 +1,17 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
x:Class="Semi.Avalonia.Locale.zh_cn"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- TextBox/SelectableTextBox flyout -->
<x:String x:Key="STRING_MENU_CUT">剪切</x:String>
<x:String x:Key="STRING_MENU_COPY">复制</x:String>
<x:String x:Key="STRING_MENU_PASTE">粘贴</x:String>
<!-- ManagedFileChooser -->
<x:String x:Key="STRING_CHOOSER_FILE_NAME">文件名</x:String>
<x:String x:Key="STRING_CHOOSER_SHOW_HIDDEN_FILES">显示隐藏文件</x:String>
<x:String x:Key="STRING_CHOOSER_DIALOG_OK">确认</x:String>
<x:String x:Key="STRING_CHOOSER_DIALOG_CANCEL">取消</x:String>
<x:String x:Key="STRING_MENU_CUT">剪切</x:String>
<x:String x:Key="STRING_MENU_COPY">复制</x:String>
<x:String x:Key="STRING_MENU_PASTE">粘贴</x:String>
<x:String x:Key="STRING_CHOOSER_NAME_COLUMN">名称</x:String>
<x:String x:Key="STRING_CHOOSER_DATEMODIFIED_COLUMN">修改日期</x:String>
<x:String x:Key="STRING_CHOOSER_TYPE_COLUMN">类型</x:String>
<x:String x:Key="STRING_CHOOSER_SIZE_COLUMN">大小</x:String>
</ResourceDictionary>

View File

@@ -0,0 +1,8 @@
using Avalonia.Controls;
namespace Semi.Avalonia.Locale;
public class zh_cn: ResourceDictionary
{
}

View File

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

View File

@@ -0,0 +1,3 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SolidColorBrush x:Key="AdornerLayerBackground" Color="White" />
</ResourceDictionary>

View File

@@ -2,7 +2,7 @@
<!-- Light -->
<SolidColorBrush x:Key="ButtonDefaultPrimaryForeground" Color="#54A9FF" />
<SolidColorBrush x:Key="ButtonDefaultSecondaryForeground" Color="#40B4F3" />
<SolidColorBrush x:Key="ButtonDefaultTertiaryForeground" Color="#888D92" />
<SolidColorBrush x:Key="ButtonDefaultTertiaryForeground" Opacity="0.8" Color="#F9F9F9" />
<SolidColorBrush x:Key="ButtonDefaultSuccessForeground" Color="#5DC264" />
<SolidColorBrush x:Key="ButtonDefaultWarningForeground" Color="#FFAE43" />
<SolidColorBrush x:Key="ButtonDefaultDangerForeground" Color="#FC725A" />
@@ -11,7 +11,6 @@
<SolidColorBrush x:Key="ButtonDefaultBackground" Opacity="0.12" Color="White" />
<SolidColorBrush x:Key="ButtonDefaultPointeroverBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="ButtonDefaultPressedBackground" Opacity="0.20" Color="White" />
<SolidColorBrush x:Key="ButtonDefaultDisabledBackground" Opacity="0.04" Color="#E6E8EA" />
<SolidColorBrush x:Key="ButtonDefaultBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="ButtonDefaultPointeroverBorderBrush" Color="Transparent" />
@@ -69,8 +68,20 @@
<SolidColorBrush x:Key="ButtonSolidDangerBorderBrush" Color="#FC725A" />
<SolidColorBrush x:Key="ButtonSolidDangerPointeroverBorderBrush" Color="#FD9983" />
<SolidColorBrush x:Key="ButtonSolidDangerPressedBorderBrush" Color="#FDBEAC" />
<SolidColorBrush x:Key="ButtonSolidDisabledBackground" Color="#2E3238" />
<!-- end Solid -->
<!-- Outline -->
<SolidColorBrush x:Key="ButtonOutlineBackground" Color="Transparent" />
<SolidColorBrush x:Key="ButtonOutlineBorderBrush" Opacity="0.08" Color="White" />
<SolidColorBrush x:Key="ButtonOutlinePointeroverBackground" Opacity="0.12" Color="White" />
<SolidColorBrush x:Key="ButtonOutlinePressedBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="ButtonOutlineSuccessBorderBrush" Color="#5DC264" />
<SolidColorBrush x:Key="ButtonOutlineWarningBorderBrush" Color="#FFAE43" />
<SolidColorBrush x:Key="ButtonOutlineDangerBorderBrush" Color="#FC725A" />
<!-- end Outline -->
<SolidColorBrush x:Key="ButtonInputInnerForeground" Color="#888D92" />
<SolidColorBrush x:Key="ButtonInputInnerPointeroverForeground" Color="#A7ABB0" />
<SolidColorBrush x:Key="ButtonInputInnerPressedForeground" Color="#C6CACD" />

View File

@@ -9,7 +9,7 @@
<SolidColorBrush x:Key="CheckBoxDefaultBorderBrush" Opacity="0.35" Color="#F9F9F9" />
<SolidColorBrush x:Key="CheckBoxPointeroverBackground" Opacity="0.12" Color="White" />
<SolidColorBrush x:Key="CheckBoxPointeroverBorderBrush" Color="#54A9FF" />
<SolidColorBrush x:Key="CheckBoxPressedBackground" Color="#A9D7FF" />
<SolidColorBrush x:Key="CheckBoxPressedBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="CheckBoxPressedBorderBrush" Color="#A9D7FF" />
<SolidColorBrush x:Key="CheckBoxCheckedDefaultBackground" Color="#54A9FF" />

View File

@@ -1,4 +1,4 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary x:Class="Semi.Avalonia.Dark.Palette" xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- Color Resources -->
<Color x:Key="SemiRed0Color">#6C090B</Color>
<Color x:Key="SemiRed1Color">#901110</Color>
@@ -160,6 +160,11 @@
<Color x:Key="SemiGrey7Color">#C6CACD</Color>
<Color x:Key="SemiGrey8Color">#E6E8EA</Color>
<Color x:Key="SemiGrey9Color">#F9F9F9</Color>
<Color x:Key="SemiBackground0Color">#16161A</Color>
<Color x:Key="SemiBackground1Color">#232429</Color>
<Color x:Key="SemiBackground2Color">#35363C</Color>
<Color x:Key="SemiBackground3Color">#43444A</Color>
<Color x:Key="SemiBackground4Color">#4F5159</Color>
<SolidColorBrush x:Key="SemiRed0" Color="{StaticResource SemiRed0Color}" />
<SolidColorBrush x:Key="SemiRed1" Color="{StaticResource SemiRed1Color}" />
@@ -326,6 +331,7 @@
<SolidColorBrush x:Key="SemiColorPrimary" Color="{StaticResource SemiBlue5Color}" />
<SolidColorBrush x:Key="SemiColorPrimaryPointerover" Color="{StaticResource SemiBlue6Color}" />
<SolidColorBrush x:Key="SemiColorPrimaryPressed" Color="{StaticResource SemiBlue7Color}" />
<SolidColorBrush x:Key="SemiColorPrimaryActive" Color="{StaticResource SemiBlue7Color}" />
<SolidColorBrush x:Key="SemiColorPrimaryDisabled" Color="{StaticResource SemiBlue2Color}" />
<SolidColorBrush x:Key="SemiColorPrimaryLight" Opacity="0.2" Color="{StaticResource SemiBlue5Color}" />
<SolidColorBrush x:Key="SemiColorPrimaryLightPointerover" Opacity="0.3" Color="{StaticResource SemiBlue5Color}" />
@@ -334,15 +340,16 @@
<SolidColorBrush x:Key="SemiColorSecondary" Color="{StaticResource SemiLightBlue5Color}" />
<SolidColorBrush x:Key="SemiColorSecondaryPointerover" Color="{StaticResource SemiLightBlue6Color}" />
<SolidColorBrush x:Key="SemiColorSecondaryPressed" Color="{StaticResource SemiLightBlue7Color}" />
<SolidColorBrush x:Key="SemiColorSecondaryActive" Color="{StaticResource SemiLightBlue7Color}" />
<SolidColorBrush x:Key="SemiColorSecondaryDisabled" Color="{StaticResource SemiLightBlue2Color}" />
<SolidColorBrush x:Key="SemiColorSecondaryLight" Opacity="0.2" Color="{StaticResource SemiLightBlue5Color}" />
<SolidColorBrush x:Key="SemiColorSecondaryLightPointerover" Opacity="0.3"
Color="{StaticResource SemiLightBlue5Color}" />
<SolidColorBrush x:Key="SemiColorSecondaryLightPointerover" Opacity="0.3" Color="{StaticResource SemiLightBlue5Color}" />
<SolidColorBrush x:Key="SemiColorSecondaryLightActive" Opacity="0.4" Color="{StaticResource SemiLightBlue5Color}" />
<!-- Tertiary -->
<SolidColorBrush x:Key="SemiColorTertiary" Color="{StaticResource SemiGrey5Color}" />
<SolidColorBrush x:Key="SemiColorTertiaryPointerover" Color="{StaticResource SemiGrey6Color}" />
<SolidColorBrush x:Key="SemiColorTertiaryPressed" Color="{StaticResource SemiGrey7Color}" />
<SolidColorBrush x:Key="SemiColorTertiaryActive" Color="{StaticResource SemiGrey7Color}" />
<SolidColorBrush x:Key="SemiColorTertiaryLight" Opacity="0.2" Color="{StaticResource SemiGrey5Color}" />
<SolidColorBrush x:Key="SemiColorTertiaryLightPointerover" Opacity="0.3" Color="{StaticResource SemiGrey5Color}" />
<SolidColorBrush x:Key="SemiColorTertiaryLightActive" Opacity="0.4" Color="{StaticResource SemiGrey5Color}" />
@@ -350,6 +357,7 @@
<SolidColorBrush x:Key="SemiColorInformation" Color="{StaticResource SemiBlue5Color}" />
<SolidColorBrush x:Key="SemiColorInformationPointerover" Color="{StaticResource SemiBlue6Color}" />
<SolidColorBrush x:Key="SemiColorInformationPressed" Color="{StaticResource SemiBlue7Color}" />
<SolidColorBrush x:Key="SemiColorInformationActive" Color="{StaticResource SemiBlue7Color}" />
<SolidColorBrush x:Key="SemiColorInformationDisabled" Color="{StaticResource SemiBlue2Color}" />
<SolidColorBrush x:Key="SemiColorInformationLight" Opacity="0.2" Color="{StaticResource SemiBlue5Color}" />
<SolidColorBrush x:Key="SemiColorInformationLightPointerover" Opacity="0.3" Color="{StaticResource SemiBlue5Color}" />
@@ -358,6 +366,7 @@
<SolidColorBrush x:Key="SemiColorSuccess" Color="{StaticResource SemiGreen5Color}" />
<SolidColorBrush x:Key="SemiColorSuccessPointerover" Color="{StaticResource SemiGreen6Color}" />
<SolidColorBrush x:Key="SemiColorSuccessPressed" Color="{StaticResource SemiGreen7Color}" />
<SolidColorBrush x:Key="SemiColorSuccessActive" Color="{StaticResource SemiGreen7Color}" />
<SolidColorBrush x:Key="SemiColorSuccessDisabled" Color="{StaticResource SemiGreen2Color}" />
<SolidColorBrush x:Key="SemiColorSuccessLight" Opacity="0.2" Color="{StaticResource SemiGreen5Color}" />
<SolidColorBrush x:Key="SemiColorSuccessLightPointerover" Opacity="0.3" Color="{StaticResource SemiGreen5Color}" />
@@ -366,6 +375,7 @@
<SolidColorBrush x:Key="SemiColorWarning" Color="{StaticResource SemiOrange5Color}" />
<SolidColorBrush x:Key="SemiColorWarningPointerover" Color="{StaticResource SemiOrange6Color}" />
<SolidColorBrush x:Key="SemiColorWarningPressed" Color="{StaticResource SemiOrange7Color}" />
<SolidColorBrush x:Key="SemiColorWarningActive" Color="{StaticResource SemiOrange7Color}" />
<SolidColorBrush x:Key="SemiColorWarningLight" Opacity="0.2" Color="{StaticResource SemiOrange5Color}" />
<SolidColorBrush x:Key="SemiColorWarningLightPointerover" Opacity="0.3" Color="{StaticResource SemiOrange5Color}" />
<SolidColorBrush x:Key="SemiColorWarningLightActive" Opacity="0.4" Color="{StaticResource SemiOrange5Color}" />
@@ -373,6 +383,7 @@
<SolidColorBrush x:Key="SemiColorDanger" Color="{StaticResource SemiRed5Color}" />
<SolidColorBrush x:Key="SemiColorDangerPointerover" Color="{StaticResource SemiRed6Color}" />
<SolidColorBrush x:Key="SemiColorDangerPressed" Color="{StaticResource SemiRed7Color}" />
<SolidColorBrush x:Key="SemiColorDangerActive" Color="{StaticResource SemiRed7Color}" />
<SolidColorBrush x:Key="SemiColorDangerLight" Opacity="0.2" Color="{StaticResource SemiRed5Color}" />
<SolidColorBrush x:Key="SemiColorDangerLightPointerover" Opacity="0.3" Color="{StaticResource SemiRed5Color}" />
<SolidColorBrush x:Key="SemiColorDangerLightActive" Opacity="0.4" Color="{StaticResource SemiRed5Color}" />
@@ -390,11 +401,11 @@
<SolidColorBrush x:Key="SemiColorLinkVisited" Color="{StaticResource SemiBlue5Color}" />
<!-- Background -->
<SolidColorBrush x:Key="SemiColorBackground0" Color="#FF16161A" />
<SolidColorBrush x:Key="SemiColorBackground1" Color="#FF232429" />
<SolidColorBrush x:Key="SemiColorBackground2" Color="#FF35363C" />
<SolidColorBrush x:Key="SemiColorBackground3" Color="#FF43444A" />
<SolidColorBrush x:Key="SemiColorBackground4" Color="#FF4F5159" />
<SolidColorBrush x:Key="SemiColorBackground0" Color="{StaticResource SemiBackground0Color}" />
<SolidColorBrush x:Key="SemiColorBackground1" Color="{StaticResource SemiBackground1Color}" />
<SolidColorBrush x:Key="SemiColorBackground2" Color="{StaticResource SemiBackground2Color}" />
<SolidColorBrush x:Key="SemiColorBackground3" Color="{StaticResource SemiBackground3Color}" />
<SolidColorBrush x:Key="SemiColorBackground4" Color="{StaticResource SemiBackground4Color}" />
<!-- Fill -->
<SolidColorBrush x:Key="SemiColorFill0" Opacity="0.12" Color="White" />
@@ -408,6 +419,6 @@
<SolidColorBrush x:Key="SemiColorDisabledText" Opacity="0.35" Color="{StaticResource SemiGrey9Color}" />
<SolidColorBrush x:Key="SemiColorDisabledBorder" Color="{StaticResource SemiGrey1Color}" />
<SolidColorBrush x:Key="SemiColorDisabledBackground" Color="{StaticResource SemiGrey1Color}" />
<SolidColorBrush x:Key="SemiColorDisabledFill" Opacity="0.04" Color="{StaticResource SemiGrey8Color}" />
<SolidColorBrush x:Key="SemiColorDisabledFill" Opacity="0.04" Color="{StaticResource SemiGrey8Color}" />
</ResourceDictionary>

View File

@@ -0,0 +1,9 @@
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Semi.Avalonia.Dark;
public class Palette: ResourceDictionary
{
}

View File

@@ -9,5 +9,7 @@
<SolidColorBrush x:Key="ProgressBarTertiaryForeground" Color="#888D92" />
<SolidColorBrush x:Key="ProgressBarSuccessForeground" Color="#5DC264" />
<SolidColorBrush x:Key="ProgressBarWarningForeground" Color="#FFAE43" />
<SolidColorBrush x:Key="ProgressBarDangerForeground" Color="#FC725A" />
<!-- Error style is obsolete, use Danger instead -->
<SolidColorBrush x:Key="ProgressBarErrorForeground" Color="#FC725A" />
</ResourceDictionary>

View File

@@ -7,10 +7,10 @@
<SolidColorBrush x:Key="TextBlockWarningForeground" Color="#FFAE43" />
<SolidColorBrush x:Key="TextBlockDangerForeground" Color="#FC725A" />
<SolidColorBrush x:Key="TextBlockDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
<SolidColorBrush x:Key="TextBlockCodeForeground" Opacity="0.68" Color="#F9F9F9" />
<SolidColorBrush x:Key="TextBlockMarkBackground" Color="#053170" />
<SolidColorBrush x:Key="TextBlockCodeBackground" Opacity="0.1" Color="#E6E8EA" />
<SolidColorBrush x:Key="TextBlockCodeBorderBrush" Opacity="0.2" Color="#E6E8EA" />
<SolidColorBrush x:Key="TextBlockMarkBackground" Opacity="0.2" Color="#54A9FF" />
<SolidColorBrush x:Key="TextBlockCodeForeground" Opacity="0.6" Color="#F9F9F9" />
<SolidColorBrush x:Key="TextBlockCodeBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="TextBlockCodeBorderBrush" Opacity="0.08" Color="White" />
<SolidColorBrush x:Key="TextBlockSelectionBackground" Opacity="0.2" Color="#54A9FF" />
</ResourceDictionary>

View File

@@ -2,7 +2,6 @@
<SolidColorBrush x:Key="ToggleButtonDefaultBackground" Opacity="0.12" Color="White" />
<SolidColorBrush x:Key="ToggleButtonDefaultPointeroverBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="ToggleButtonDefaultPressedBackground" Opacity="0.20" 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" />
@@ -10,7 +9,7 @@
<SolidColorBrush x:Key="ToggleButtonDefaultPrimaryForeground" Color="#54A9FF" />
<SolidColorBrush x:Key="ToggleButtonDefaultSecondaryForeground" Color="#40B4F3" />
<SolidColorBrush x:Key="ToggleButtonDefaultTertiaryForeground" Color="#888D92" />
<SolidColorBrush x:Key="ToggleButtonDefaultTertiaryForeground" Opacity="0.8" Color="#F9F9F9" />
<SolidColorBrush x:Key="ToggleButtonDefaultSuccessForeground" Color="#5DC264" />
<SolidColorBrush x:Key="ToggleButtonDefaultWarningForeground" Color="#FFAE43" />
<SolidColorBrush x:Key="ToggleButtonDefaultDangerForeground" Color="#FC725A" />
@@ -37,6 +36,7 @@
<SolidColorBrush x:Key="ToggleButtonDangerCheckedPressedBackground" Color="#FDBEAC" />
<SolidColorBrush x:Key="ToggleButtonCheckedForeground" Color="White" />
<SolidColorBrush x:Key="ToggleButtonCheckedDisabledBackground" Color="#2E3238" />
<SolidColorBrush x:Key="ToggleButtonPrimaryIndeterminateBackground" Color="#053170" />
<SolidColorBrush x:Key="ToggleButtonSecondaryIndeterminateBackground" Color="#003761" />

View File

@@ -4,12 +4,10 @@
<SolidColorBrush x:Key="ToggleSwitchContainerUnCheckedPressedBackground" Opacity="0.20" Color="White" />
<SolidColorBrush x:Key="ToggleSwitchContainerUnCheckedDisabledBackground" Color="Transparent" />
<SolidColorBrush x:Key="ToggleSwitchContainerUnCheckedDisabledBorderBrush" Opacity="0.09" Color="#F9F9F9" />
<SolidColorBrush x:Key="ToggleSwitchContainerUnCheckedDisabledBorderBrush" Opacity="0.16" Color="#F9F9F9" />
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedDefaultBackground" Color="#5FB346" />
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedDefaultBackground" Color="#5DC264" />
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedPointeroverBackground" Color="#7FD184" />
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedPressedBackground" Color="#A6E1A8" />
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedDisabledBackground" Color="#277731" />
<SolidColorBrush x:Key="ToggleSwitchIndicatorBorderBrush" Opacity="0.09" Color="#F9F9F9" />
</ResourceDictionary>

View File

@@ -2,6 +2,7 @@
<ResourceDictionary.MergedDictionaries>
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Palette.axaml" />
<!-- Controls -->
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/AdornerLayer.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/AutoCompleteBox.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Border.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Button.axaml" />

View File

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

View File

@@ -0,0 +1,3 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SolidColorBrush x:Key="AdornerLayerBackground" Color="#1C1F23" />
</ResourceDictionary>

View File

@@ -2,7 +2,7 @@
<!-- Light -->
<SolidColorBrush x:Key="ButtonDefaultPrimaryForeground" Color="#0077FA" />
<SolidColorBrush x:Key="ButtonDefaultSecondaryForeground" Color="#0095EE" />
<SolidColorBrush x:Key="ButtonDefaultTertiaryForeground" Color="#6B7075" />
<SolidColorBrush x:Key="ButtonDefaultTertiaryForeground" Opacity="0.8" Color="#1C1F23" />
<SolidColorBrush x:Key="ButtonDefaultSuccessForeground" Color="#3BB346" />
<SolidColorBrush x:Key="ButtonDefaultWarningForeground" Color="#FC8800" />
<SolidColorBrush x:Key="ButtonDefaultDangerForeground" Color="#F93920" />
@@ -11,7 +11,6 @@
<SolidColorBrush x:Key="ButtonDefaultBackground" Opacity="0.05" Color="#2E3238" />
<SolidColorBrush x:Key="ButtonDefaultPointeroverBackground" Opacity="0.09" Color="#2E3238" />
<SolidColorBrush x:Key="ButtonDefaultPressedBackground" Opacity="0.13" Color="#2E3238" />
<SolidColorBrush x:Key="ButtonDefaultDisabledBackground" Color="#E6E8EA" />
<SolidColorBrush x:Key="ButtonDefaultBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="ButtonDefaultPointeroverBorderBrush" Color="Transparent" />
@@ -69,8 +68,20 @@
<SolidColorBrush x:Key="ButtonSolidDangerBorderBrush" Color="#F93920" />
<SolidColorBrush x:Key="ButtonSolidDangerPointeroverBorderBrush" Color="#D52515" />
<SolidColorBrush x:Key="ButtonSolidDangerPressedBorderBrush" Color="#B2140C" />
<SolidColorBrush x:Key="ButtonSolidDisabledBackground" Color="#E6E8EA" />
<!-- end Solid -->
<!-- Outline -->
<SolidColorBrush x:Key="ButtonOutlineBackground" Color="Transparent" />
<SolidColorBrush x:Key="ButtonOutlineBorderBrush" Opacity="0.08" Color="#1C1F23" />
<SolidColorBrush x:Key="ButtonOutlinePointeroverBackground" Opacity="0.05" Color="#2E3238" />
<SolidColorBrush x:Key="ButtonOutlinePressedBackground" Opacity="0.09" Color="#2E3238" />
<SolidColorBrush x:Key="ButtonOutlineSuccessBorderBrush" Color="#3BB346" />
<SolidColorBrush x:Key="ButtonOutlineWarningBorderBrush" Color="#FC8800" />
<SolidColorBrush x:Key="ButtonOutlineDangerBorderBrush" Color="#F93920" />
<!-- end Outline -->
<SolidColorBrush x:Key="ButtonInputInnerForeground" Color="#6B7075" />
<SolidColorBrush x:Key="ButtonInputInnerPointeroverForeground" Color="#555B61" />
<SolidColorBrush x:Key="ButtonInputInnerPressedForeground" Color="#41464C" />

View File

@@ -11,7 +11,7 @@
<SolidColorBrush x:Key="CheckBoxDefaultBorderBrush" Opacity="0.35" Color="#1C1F23" />
<SolidColorBrush x:Key="CheckBoxPointeroverBackground" Opacity="0.05" Color="#2E3238" />
<SolidColorBrush x:Key="CheckBoxPointeroverBorderBrush" Color="#0077FA" />
<SolidColorBrush x:Key="CheckBoxPressedBackground" Color="#004FB3" />
<SolidColorBrush x:Key="CheckBoxPressedBackground" Opacity="0.09" Color="#2E3238" />
<SolidColorBrush x:Key="CheckBoxPressedBorderBrush" Color="#004FB3" />
<SolidColorBrush x:Key="CheckBoxCheckedDefaultBackground" Color="#0077FA" />

View File

@@ -1,4 +1,4 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary x:Class="Semi.Avalonia.Light.Palette" xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- Color Resources -->
<Color x:Key="SemiRed0Color">#FEF2ED</Color>
<Color x:Key="SemiRed1Color">#FEDDD2</Color>
@@ -160,6 +160,11 @@
<Color x:Key="SemiGrey7Color">#41464C</Color>
<Color x:Key="SemiGrey8Color">#2E3238</Color>
<Color x:Key="SemiGrey9Color">#1C1F23</Color>
<Color x:Key="SemiBackground0Color">White</Color>
<Color x:Key="SemiBackground1Color">White</Color>
<Color x:Key="SemiBackground2Color">White</Color>
<Color x:Key="SemiBackground3Color">White</Color>
<Color x:Key="SemiBackground4Color">White</Color>
<SolidColorBrush x:Key="SemiRed0" Color="{StaticResource SemiRed0Color}" />
<SolidColorBrush x:Key="SemiRed1" Color="{StaticResource SemiRed1Color}" />
@@ -326,6 +331,7 @@
<SolidColorBrush x:Key="SemiColorPrimary" Color="{StaticResource SemiBlue5Color}" />
<SolidColorBrush x:Key="SemiColorPrimaryPointerover" Color="{StaticResource SemiBlue6Color}" />
<SolidColorBrush x:Key="SemiColorPrimaryPressed" Color="{StaticResource SemiBlue7Color}" />
<SolidColorBrush x:Key="SemiColorPrimaryActive" Color="{StaticResource SemiBlue7Color}" />
<SolidColorBrush x:Key="SemiColorPrimaryDisabled" Color="{StaticResource SemiBlue2Color}" />
<SolidColorBrush x:Key="SemiColorPrimaryLight" Color="{StaticResource SemiBlue0Color}" />
<SolidColorBrush x:Key="SemiColorPrimaryLightPointerover" Color="{StaticResource SemiBlue1Color}" />
@@ -334,6 +340,7 @@
<SolidColorBrush x:Key="SemiColorSecondary" Color="{StaticResource SemiLightBlue5Color}" />
<SolidColorBrush x:Key="SemiColorSecondaryPointerover" Color="{StaticResource SemiLightBlue6Color}" />
<SolidColorBrush x:Key="SemiColorSecondaryPressed" Color="{StaticResource SemiLightBlue7Color}" />
<SolidColorBrush x:Key="SemiColorSecondaryActive" Color="{StaticResource SemiLightBlue7Color}" />
<SolidColorBrush x:Key="SemiColorSecondaryDisabled" Color="{StaticResource SemiLightBlue2Color}" />
<SolidColorBrush x:Key="SemiColorSecondaryLight" Color="{StaticResource SemiLightBlue0Color}" />
<SolidColorBrush x:Key="SemiColorSecondaryLightPointerover" Color="{StaticResource SemiLightBlue1Color}" />
@@ -342,6 +349,7 @@
<SolidColorBrush x:Key="SemiColorTertiary" Color="{StaticResource SemiGrey5Color}" />
<SolidColorBrush x:Key="SemiColorTertiaryPointerover" Color="{StaticResource SemiGrey6Color}" />
<SolidColorBrush x:Key="SemiColorTertiaryPressed" Color="{StaticResource SemiGrey7Color}" />
<SolidColorBrush x:Key="SemiColorTertiaryActive" Color="{StaticResource SemiGrey7Color}" />
<SolidColorBrush x:Key="SemiColorTertiaryLight" Color="{StaticResource SemiGrey0Color}" />
<SolidColorBrush x:Key="SemiColorTertiaryLightPointerover" Color="{StaticResource SemiGrey1Color}" />
<SolidColorBrush x:Key="SemiColorTertiaryLightActive" Color="{StaticResource SemiGrey2Color}" />
@@ -349,6 +357,7 @@
<SolidColorBrush x:Key="SemiColorInformation" Color="{StaticResource SemiBlue5Color}" />
<SolidColorBrush x:Key="SemiColorInformationPointerover" Color="{StaticResource SemiBlue6Color}" />
<SolidColorBrush x:Key="SemiColorInformationPressed" Color="{StaticResource SemiBlue7Color}" />
<SolidColorBrush x:Key="SemiColorInformationActive" Color="{StaticResource SemiBlue7Color}" />
<SolidColorBrush x:Key="SemiColorInformationDisabled" Color="{StaticResource SemiBlue2Color}" />
<SolidColorBrush x:Key="SemiColorInformationLight" Color="{StaticResource SemiBlue0Color}" />
<SolidColorBrush x:Key="SemiColorInformationLightPointerover" Color="{StaticResource SemiBlue1Color}" />
@@ -357,6 +366,7 @@
<SolidColorBrush x:Key="SemiColorSuccess" Color="{StaticResource SemiGreen5Color}" />
<SolidColorBrush x:Key="SemiColorSuccessPointerover" Color="{StaticResource SemiGreen6Color}" />
<SolidColorBrush x:Key="SemiColorSuccessPressed" Color="{StaticResource SemiGreen7Color}" />
<SolidColorBrush x:Key="SemiColorSuccessActive" Color="{StaticResource SemiGreen7Color}" />
<SolidColorBrush x:Key="SemiColorSuccessDisabled" Color="{StaticResource SemiGreen2Color}" />
<SolidColorBrush x:Key="SemiColorSuccessLight" Color="{StaticResource SemiGreen0Color}" />
<SolidColorBrush x:Key="SemiColorSuccessLightPointerover" Color="{StaticResource SemiGreen1Color}" />
@@ -365,6 +375,7 @@
<SolidColorBrush x:Key="SemiColorWarning" Color="{StaticResource SemiOrange5Color}" />
<SolidColorBrush x:Key="SemiColorWarningPointerover" Color="{StaticResource SemiOrange6Color}" />
<SolidColorBrush x:Key="SemiColorWarningPressed" Color="{StaticResource SemiOrange7Color}" />
<SolidColorBrush x:Key="SemiColorWarningActive" Color="{StaticResource SemiOrange7Color}" />
<SolidColorBrush x:Key="SemiColorWarningLight" Color="{StaticResource SemiOrange0Color}" />
<SolidColorBrush x:Key="SemiColorWarningLightPointerover" Color="{StaticResource SemiOrange1Color}" />
<SolidColorBrush x:Key="SemiColorWarningLightActive" Color="{StaticResource SemiOrange2Color}" />
@@ -372,6 +383,7 @@
<SolidColorBrush x:Key="SemiColorDanger" Color="{StaticResource SemiRed5Color}" />
<SolidColorBrush x:Key="SemiColorDangerPointerover" Color="{StaticResource SemiRed6Color}" />
<SolidColorBrush x:Key="SemiColorDangerPressed" Color="{StaticResource SemiRed7Color}" />
<SolidColorBrush x:Key="SemiColorDangerActive" Color="{StaticResource SemiRed7Color}" />
<SolidColorBrush x:Key="SemiColorDangerLight" Color="{StaticResource SemiRed0Color}" />
<SolidColorBrush x:Key="SemiColorDangerLightPointerover" Color="{StaticResource SemiRed1Color}" />
<SolidColorBrush x:Key="SemiColorDangerLightActive" Color="{StaticResource SemiRed2Color}" />
@@ -389,11 +401,11 @@
<SolidColorBrush x:Key="SemiColorLinkVisited" Color="{StaticResource SemiBlue5Color}" />
<!-- Background -->
<SolidColorBrush x:Key="SemiColorBackground0" Color="White" />
<SolidColorBrush x:Key="SemiColorBackground1" Color="White" />
<SolidColorBrush x:Key="SemiColorBackground2" Color="White" />
<SolidColorBrush x:Key="SemiColorBackground3" Color="White" />
<SolidColorBrush x:Key="SemiColorBackground4" Color="White" />
<SolidColorBrush x:Key="SemiColorBackground0" Color="{StaticResource SemiBackground0Color}" />
<SolidColorBrush x:Key="SemiColorBackground1" Color="{StaticResource SemiBackground1Color}" />
<SolidColorBrush x:Key="SemiColorBackground2" Color="{StaticResource SemiBackground2Color}" />
<SolidColorBrush x:Key="SemiColorBackground3" Color="{StaticResource SemiBackground3Color}" />
<SolidColorBrush x:Key="SemiColorBackground4" Color="{StaticResource SemiBackground4Color}" />
<!-- Fill -->
<SolidColorBrush x:Key="SemiColorFill0" Opacity="0.05" Color="{StaticResource SemiGrey8Color}" />
@@ -407,5 +419,6 @@
<SolidColorBrush x:Key="SemiColorDisabledText" Opacity="0.35" Color="{StaticResource SemiGrey9Color}" />
<SolidColorBrush x:Key="SemiColorDisabledBorder" Color="{StaticResource SemiGrey1Color}" />
<SolidColorBrush x:Key="SemiColorDisabledBackground" Color="{StaticResource SemiGrey1Color}" />
<!-- Official Opacity=0.04 -->
<SolidColorBrush x:Key="SemiColorDisabledFill" Opacity="0.02" Color="{StaticResource SemiGrey8Color}" />
</ResourceDictionary>

View File

@@ -0,0 +1,9 @@
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Semi.Avalonia.Light;
public class Palette: ResourceDictionary
{
}

View File

@@ -9,5 +9,7 @@
<SolidColorBrush x:Key="ProgressBarTertiaryForeground" Color="#6B7075" />
<SolidColorBrush x:Key="ProgressBarSuccessForeground" Color="#3BB346" />
<SolidColorBrush x:Key="ProgressBarWarningForeground" Color="#FC8800" />
<SolidColorBrush x:Key="ProgressBarDangerForeground" Color="#F93920" />
<!-- Error style is obsolete, use Danger instead -->
<SolidColorBrush x:Key="ProgressBarErrorForeground" Color="#F93920" />
</ResourceDictionary>

View File

@@ -7,10 +7,10 @@
<SolidColorBrush x:Key="TextBlockWarningForeground" Color="#FC8800" />
<SolidColorBrush x:Key="TextBlockDangerForeground" Color="#F93920" />
<SolidColorBrush x:Key="TextBlockDisabledForeground" Opacity="0.35" Color="#1C1F23" />
<SolidColorBrush x:Key="TextBlockCodeForeground" Opacity="0.68" Color="#1C1F23" />
<SolidColorBrush x:Key="TextBlockMarkBackground" Color="#EAF5FF" />
<SolidColorBrush x:Key="TextBlockCodeBackground" Opacity="0.1" Color="#2E3238" />
<SolidColorBrush x:Key="TextBlockCodeBorderBrush" Opacity="0.2" Color="#2E3238" />
<SolidColorBrush x:Key="TextBlockCodeForeground" Opacity="0.62" Color="#1C1F23" />
<SolidColorBrush x:Key="TextBlockCodeBackground" Opacity="0.09" Color="#2E3238" />
<SolidColorBrush x:Key="TextBlockCodeBorderBrush" Opacity="0.08" Color="#1C1F23" />
<SolidColorBrush x:Key="TextBlockSelectionBackground" Opacity="0.2" Color="#0077FA" />
</ResourceDictionary>

View File

@@ -2,7 +2,6 @@
<SolidColorBrush x:Key="ToggleButtonDefaultBackground" Opacity="0.05" Color="#2E3238" />
<SolidColorBrush x:Key="ToggleButtonDefaultPointeroverBackground" Opacity="0.09" Color="#2E3238" />
<SolidColorBrush x:Key="ToggleButtonDefaultPressedBackground" Opacity="0.13" Color="#2E3238" />
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledBackground" Color="#E6E8EA" />
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledForeground" Opacity="0.35" Color="#1C1F23" />
@@ -10,7 +9,7 @@
<SolidColorBrush x:Key="ToggleButtonDefaultPrimaryForeground" Color="#0077FA" />
<SolidColorBrush x:Key="ToggleButtonDefaultSecondaryForeground" Color="#0095EE" />
<SolidColorBrush x:Key="ToggleButtonDefaultTertiaryForeground" Color="#6B7075" />
<SolidColorBrush x:Key="ToggleButtonDefaultTertiaryForeground" Opacity="0.8" Color="#1C1F23" />
<SolidColorBrush x:Key="ToggleButtonDefaultSuccessForeground" Color="#3BB346" />
<SolidColorBrush x:Key="ToggleButtonDefaultWarningForeground" Color="#FC8800" />
<SolidColorBrush x:Key="ToggleButtonDefaultDangerForeground" Color="#F93920" />
@@ -37,6 +36,7 @@
<SolidColorBrush x:Key="ToggleButtonDangerCheckedPressedBackground" Color="#B2140C" />
<SolidColorBrush x:Key="ToggleButtonCheckedForeground" Color="White" />
<SolidColorBrush x:Key="ToggleButtonCheckedDisabledBackground" Color="#E6E8EA" />
<SolidColorBrush x:Key="ToggleButtonPrimaryIndeterminateBackground" Color="#EAF5FF" />
<SolidColorBrush x:Key="ToggleButtonSecondaryIndeterminateBackground" Color="#E9F7FD" />

View File

@@ -6,10 +6,8 @@
<SolidColorBrush x:Key="ToggleSwitchContainerUnCheckedDisabledBorderBrush" Opacity="0.09" Color="#1C1F23" />
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedDefaultBackground" Color="#5FB346" />
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedDefaultBackground" Color="#3BB346" />
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedPointeroverBackground" Color="#30953B" />
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedPressedBackground" Color="#25772F" />
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedDisabledBackground" Color="#A4E0A7" />
<SolidColorBrush x:Key="ToggleSwitchIndicatorBorderBrush" Opacity="0.09" Color="#1C1F23" />
</ResourceDictionary>

View File

@@ -2,6 +2,7 @@
<ResourceDictionary.MergedDictionaries>
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/Palette.axaml" />
<!-- Controls -->
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/AdornerLayer.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/AutoCompleteBox.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/Border.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/Button.axaml" />

View File

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

View File

@@ -4,15 +4,16 @@ using System.Globalization;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using Avalonia.Styling;
using Semi.Avalonia.Locale;
namespace Semi.Avalonia;
public class SemiTheme: Styles
{
private static readonly Dictionary<CultureInfo, string> _localeToResource = new()
private static readonly Dictionary<CultureInfo, ResourceDictionary> _localeToResource = new()
{
{ new CultureInfo("zh-CN"), "avares://Semi.Avalonia/Locale/zh-CN.axaml" },
{ new CultureInfo("en-US"), "avares://Semi.Avalonia/Locale/en-US.axaml" },
{ new CultureInfo("zh-cn"), new zh_cn() },
{ new CultureInfo("en-us"), new en_us() },
};
private readonly IServiceProvider? sp;
@@ -30,26 +31,24 @@ public class SemiTheme: Styles
{
_locale = value;
var resource = TryGetLocaleResource(value);
var d = AvaloniaXamlLoader.Load(sp, new Uri(resource)) as ResourceDictionary;
if (d is null) return;
foreach (var kv in d)
if(resource is null) return;
foreach (var kv in resource)
{
this.Resources.Add(kv);
}
}
}
private static string TryGetLocaleResource(CultureInfo? locale)
private static ResourceDictionary? TryGetLocaleResource(CultureInfo? locale)
{
if (locale is null)
{
return _localeToResource[new CultureInfo("zh-CN")];
return _localeToResource[new CultureInfo("zh-cn")];
}
if (_localeToResource.TryGetValue(locale, out var resource))
{
return resource;
}
return _localeToResource[new CultureInfo("zh-CN")];
return _localeToResource[new CultureInfo("zh-cn")];
}
}

View File

@@ -0,0 +1,4 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Thickness x:Key="AdornerLayerMargin">1</Thickness>
<x:Double x:Key="AdornerLayerThickness">1</x:Double>
</ResourceDictionary>

View File

@@ -10,6 +10,9 @@
<Thickness x:Key="TextBoxInnerRightContentPadding">8 0 0 0</Thickness>
<Thickness x:Key="TextBoxContentPadding">8 0</Thickness>
<Thickness x:Key="TextBoxBorderThickness">1</Thickness>
<Thickness x:Key="TextBoxTextAreaContentPadding">12 5</Thickness>
<x:Double x:Key="TextBoxTextAreaHeight">90</x:Double>
<StreamGeometry x:Key="PasswordBoxRevealButtonData">M12 4C5 4 1 10 1 12C1 14 5 20 12 20C19 20 23 14 23 12C23 10 19 4 12 4ZM17 12C17 14.7614 14.7614 17 12 17C9.23858 17 7 14.7614 7 12C7 9.23858 9.23858 7 12 7C14.7614 7 17 9.23858 17 12ZM12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15Z</StreamGeometry>
<StreamGeometry x:Key="PasswordBoxHideButtonData">M2.02949 4.67856C2.7593 4.28654 3.66871 4.56038 4.06073 5.29018C6.21313 9.29726 8.83179 11.5 12.0001 11.5C15.1685 11.5 17.7871 9.29726 19.9395 5.29018C20.3315 4.56038 21.241 4.28655 21.9708 4.67856C22.7006 5.07058 22.9744 5.97999 22.5824 6.7098C21.9049 7.97104 21.1385 9.15419 20.2743 10.199L23.2001 14.1C23.6971 14.7627 23.5628 15.7029 22.9001 16.2C22.2373 16.697 21.2971 16.5627 20.8001 15.9L18.1186 12.3246C17.448 12.8501 16.7322 13.2957 15.9687 13.6441L17.4046 17.4733C17.6955 18.249 17.3025 19.1136 16.5268 19.4045C15.7511 19.6954 14.8865 19.3024 14.5956 18.5267L13.0956 14.5267C13.0852 14.4988 13.0756 14.4709 13.0669 14.4428C12.7193 14.4806 12.3638 14.5 12.0001 14.5C11.6365 14.5 11.281 14.4806 10.9333 14.4428C10.9246 14.4709 10.9151 14.4988 10.9046 14.5267L9.40463 18.5267C9.11375 19.3024 8.24913 19.6954 7.47345 19.4045C6.69777 19.1136 6.30476 18.249 6.59564 17.4733L8.03159 13.6441C7.26806 13.2957 6.55223 12.8501 5.88163 12.3246L3.20009 15.9C2.70303 16.5627 1.76283 16.697 1.10009 16.2C0.437347 15.7029 0.303032 14.7627 0.800088 14.1L3.72589 10.1989C2.86177 9.15415 2.09533 7.97101 1.41787 6.70979C1.02585 5.97999 1.29969 5.07057 2.02949 4.67856Z</StreamGeometry>

View File

@@ -8,6 +8,9 @@
<x:Double x:Key="ToggleSwitchIndicatorDefaultWidth">18</x:Double>
<x:Double x:Key="ToggleSwitchIndicatorSmallWidth">12</x:Double>
<x:Double x:Key="ToggleSwitchIndicatorLargeWidth">24</x:Double>
<Thickness x:Key="ToggleSwitchIndicatorDefaultMargin">2 0 0 0</Thickness>
<Thickness x:Key="ToggleSwitchIndicatorSmallMargin">1 0 0 0</Thickness>
<Thickness x:Key="ToggleSwitchIndicatorLargeMargin">3 0 0 0</Thickness>
<x:Double x:Key="ToggleSwitchDefaultFontSize">12</x:Double>
<x:Double x:Key="ToggleSwitchLargeFontSize">14</x:Double>

View File

@@ -2,6 +2,7 @@
<ResourceDictionary.MergedDictionaries>
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Shared/Palette.axaml" />
<!-- Controls -->
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Shared/AdornerLayer.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Shared/AutoCompleteBox.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Shared/Border.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Shared/Button.axaml" />

BIN
src/Semi.Avalonia/irihi.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB