Merge pull request #390 from irihitech/release/11.0.x-temp
Backport: 11.1.0-rc2.1 to 11.0.x
This commit is contained in:
commit
e2ca3f31b1
19
.github/workflows/deploy.yml
vendored
19
.github/workflows/deploy.yml
vendored
@ -2,7 +2,7 @@ name: Deploy to GitHub Pages
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
PROJECT_PATH: demo/Semi.Avalonia.Demo.Web/Semi.Avalonia.Demo.Web.csproj
|
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:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "action/deploy" ]
|
branches: [ "action/deploy" ]
|
||||||
@ -16,19 +16,16 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4.1.1
|
uses: actions/checkout@v4.1.1
|
||||||
|
|
||||||
- name: Setup .NET 7
|
- name: Setup .NET 8
|
||||||
uses: actions/setup-dotnet@v4
|
uses: actions/setup-dotnet@v4
|
||||||
with:
|
with:
|
||||||
dotnet-version: 7.0.405
|
dotnet-version: 8.0.x
|
||||||
|
|
||||||
- name: Install wasm-tools
|
- name: Install wasm-tools
|
||||||
run: dotnet workload install wasm-tools wasm-tools-net7
|
run: dotnet workload install wasm-tools
|
||||||
|
|
||||||
- name: Install DotNetCompress
|
|
||||||
run: dotnet tool install --global DotNetCompress --version 3.0.0 --no-cache
|
|
||||||
|
|
||||||
- name: Publish .NET Project
|
- 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
|
- name: Change base-tag in index.html
|
||||||
run: sed -i 's/<base href="\/" \/>/<base href="\/Semi.Avalonia\/" \/>/g' $OUTPUT_PATH/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
|
- name: copy index.html to 404.html
|
||||||
run: cp $OUTPUT_PATH/index.html $OUTPUT_PATH/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
|
- name: Add .nojekyll file
|
||||||
run: touch $OUTPUT_PATH/.nojekyll
|
run: touch $OUTPUT_PATH/.nojekyll
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ jobs:
|
|||||||
run: dotnet restore
|
run: dotnet restore
|
||||||
|
|
||||||
- name: Build
|
- 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
|
- name: Upload a Build Artifact
|
||||||
uses: actions/upload-artifact@v4.3.1
|
uses: actions/upload-artifact@v4.3.1
|
@ -1,6 +1,6 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
<component name="ProjectRunConfigurationManager">
|
||||||
<configuration default="false" name="SC-Single" type="DotNetFolderPublish" factoryName="Publish to folder">
|
<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" />
|
<method v="2" />
|
||||||
</configuration>
|
</configuration>
|
||||||
</component>
|
</component>
|
@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0-android</TargetFramework>
|
<TargetFramework>net8.0-android</TargetFramework>
|
||||||
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
|
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
|
||||||
<ApplicationId>com.irihitech.Semi.Avalonia</ApplicationId>
|
<ApplicationId>com.irihitech.Semi.Avalonia</ApplicationId>
|
||||||
<ApplicationVersion>1</ApplicationVersion>
|
<ApplicationVersion>1</ApplicationVersion>
|
||||||
|
3
demo/Semi.Avalonia.Demo.Desktop/Roots.xml
Normal file
3
demo/Semi.Avalonia.Demo.Desktop/Roots.xml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<linker>
|
||||||
|
<assembly fullname="Semi.Avalonia.Demo" preserve="All"/>
|
||||||
|
</linker>
|
@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
||||||
<!-- Uncomment below to enable Native AOT compilation-->
|
<!-- Uncomment below to enable Native AOT compilation-->
|
||||||
@ -11,12 +11,17 @@
|
|||||||
-->
|
-->
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
|
||||||
|
<IsTrimmable>true</IsTrimmable>
|
||||||
|
<PublishTrimmed>true</PublishTrimmed>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<RdXmlFile Include="rd.xml" />
|
<TrimmerRootDescriptor Include="Roots.xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -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>
|
|
16
demo/Semi.Avalonia.Demo.Web/AvaloniaAppBuilderExtensions.cs
Normal file
16
demo/Semi.Avalonia.Demo.Web/AvaloniaAppBuilderExtensions.cs
Normal 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) } }
|
||||||
|
});
|
||||||
|
}
|
@ -7,9 +7,10 @@ using Avalonia.Browser;
|
|||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Web;
|
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");
|
.StartBrowserAppAsync("out");
|
||||||
|
|
||||||
public static AppBuilder BuildAvaloniaApp()
|
public static AppBuilder BuildAvaloniaApp()
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk.WebAssembly">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
|
||||||
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
|
|
||||||
<WasmMainJSPath>AppBundle\main.js</WasmMainJSPath>
|
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>net8.0-browser</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<WasmExtraFilesToDeploy Include="AppBundle\**" />
|
<AvaloniaResource Include="Assets\**"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 172 KiB After Width: | Height: | Size: 172 KiB |
@ -7,8 +7,8 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<base href="/" />
|
<base href="/" />
|
||||||
<link rel="modulepreload" href="./main.js" />
|
<link rel="modulepreload" href="./main.js" />
|
||||||
<link rel="modulepreload" href="./dotnet.js" />
|
<link rel="modulepreload" href="./_framework/dotnet.js" />
|
||||||
<link rel="modulepreload" href="./avalonia.js" />
|
<link rel="modulepreload" href="./_framework/avalonia.js" />
|
||||||
<link rel="stylesheet" href="./app.css" />
|
<link rel="stylesheet" href="./app.css" />
|
||||||
</head>
|
</head>
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
import { dotnet } from './dotnet.js'
|
import { dotnet } from './_framework/dotnet.js'
|
||||||
|
|
||||||
const is_browser = typeof window != "undefined";
|
const is_browser = typeof window != "undefined";
|
||||||
if (!is_browser) throw new Error(`Expected to be running in a browser`);
|
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();
|
const config = dotnetRuntime.getConfig();
|
||||||
|
|
||||||
await dotnetRuntime.runMainAndExit(config.mainAssemblyName, [window.location.search]);
|
await dotnetRuntime.runMain(config.mainAssemblyName, [window.location.search]);
|
@ -4,10 +4,36 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
d:DesignHeight="450"
|
|
||||||
d:DesignWidth="800"
|
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
|
<ScrollViewer>
|
||||||
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
<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>
|
<TextBlock>Light (Default)</TextBlock>
|
||||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||||
<Button Classes="Primary">Primary</Button>
|
<Button Classes="Primary">Primary</Button>
|
||||||
@ -16,7 +42,7 @@
|
|||||||
<Button Classes="Success">Success</Button>
|
<Button Classes="Success">Success</Button>
|
||||||
<Button Classes="Warning">Warning</Button>
|
<Button Classes="Warning">Warning</Button>
|
||||||
<Button Classes="Danger">Danger</Button>
|
<Button Classes="Danger">Danger</Button>
|
||||||
<Button Classes="Primary" IsEnabled="False">Danger</Button>
|
<Button Classes="Danger" IsEnabled="False">Disabled</Button>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<TextBlock>Solid</TextBlock>
|
<TextBlock>Solid</TextBlock>
|
||||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||||
@ -27,12 +53,22 @@
|
|||||||
<Button Classes="Warning" Theme="{DynamicResource SolidButton}">Warning</Button>
|
<Button Classes="Warning" Theme="{DynamicResource SolidButton}">Warning</Button>
|
||||||
<Button Classes="Danger" Theme="{DynamicResource SolidButton}">Danger</Button>
|
<Button Classes="Danger" Theme="{DynamicResource SolidButton}">Danger</Button>
|
||||||
<Button
|
<Button
|
||||||
Classes="Primary"
|
Classes="Danger"
|
||||||
IsEnabled="False"
|
IsEnabled="False"
|
||||||
Theme="{DynamicResource SolidButton}">
|
Theme="{DynamicResource SolidButton}">
|
||||||
Danger
|
Disabled
|
||||||
</Button>
|
</Button>
|
||||||
</StackPanel>
|
</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>
|
<TextBlock>Borderless</TextBlock>
|
||||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||||
<Button Classes="Primary" Theme="{DynamicResource BorderlessButton}">Primary</Button>
|
<Button Classes="Primary" Theme="{DynamicResource BorderlessButton}">Primary</Button>
|
||||||
@ -42,76 +78,102 @@
|
|||||||
<Button Classes="Warning" Theme="{DynamicResource BorderlessButton}">Warning</Button>
|
<Button Classes="Warning" Theme="{DynamicResource BorderlessButton}">Warning</Button>
|
||||||
<Button Classes="Danger" Theme="{DynamicResource BorderlessButton}">Danger</Button>
|
<Button Classes="Danger" Theme="{DynamicResource BorderlessButton}">Danger</Button>
|
||||||
<Button
|
<Button
|
||||||
Classes="Primary"
|
Classes="Danger"
|
||||||
IsEnabled="False"
|
IsEnabled="False"
|
||||||
Theme="{DynamicResource BorderlessButton}">
|
Theme="{DynamicResource BorderlessButton}">
|
||||||
Danger
|
Disabled
|
||||||
</Button>
|
</Button>
|
||||||
</StackPanel>
|
</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>
|
<TextBlock>DropDownButton</TextBlock>
|
||||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||||
<DropDownButton Content="Submit">
|
<DropDownButton Content="Primary" />
|
||||||
<DropDownButton.Flyout>
|
<DropDownButton Classes="Secondary" Content="Secondary" />
|
||||||
<MenuFlyout Placement="BottomEdgeAlignedRight">
|
<DropDownButton Classes="Tertiary" Content="Tertiary" />
|
||||||
<MenuItem Header="Submit All" />
|
<DropDownButton Classes="Success" Content="Success" />
|
||||||
<MenuItem Header="Submit Updated" />
|
<DropDownButton Classes="Warning" Content="Warning" />
|
||||||
</MenuFlyout>
|
<DropDownButton Classes="Danger" Content="Danger" />
|
||||||
</DropDownButton.Flyout>
|
<DropDownButton
|
||||||
</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"
|
Classes="Danger"
|
||||||
Content="Submit"
|
Content="Disabled"
|
||||||
IsEnabled="False" />
|
IsEnabled="False" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Orientation="Horizontal" Spacing="8">
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||||
<ToggleSplitButton Content="Submit">
|
<DropDownButton Content="Default" Classes="Success"/>
|
||||||
<ToggleSplitButton.Flyout>
|
<DropDownButton Content="Solid" Theme="{DynamicResource SolidDropDownButton}" Classes="Success"/>
|
||||||
<MenuFlyout Placement="BottomEdgeAlignedRight">
|
<DropDownButton Content="Outline" Theme="{DynamicResource OutlineDropDownButton}" Classes="Success"/>
|
||||||
<MenuItem Header="Submit All" />
|
<DropDownButton Content="Borderless" Theme="{DynamicResource BorderlessDropDownButton}" Classes="Success"/>
|
||||||
<MenuItem Header="Submit Updated" />
|
<DropDownButton Content="Default" Classes="Success" IsEnabled="False"/>
|
||||||
</MenuFlyout>
|
<DropDownButton Content="Solid" Theme="{DynamicResource SolidDropDownButton}" Classes="Success" IsEnabled="False"/>
|
||||||
</ToggleSplitButton.Flyout>
|
<DropDownButton Content="Outline" Theme="{DynamicResource OutlineDropDownButton}" Classes="Success" IsEnabled="False"/>
|
||||||
</ToggleSplitButton>
|
<DropDownButton Content="Borderless" Theme="{DynamicResource BorderlessDropDownButton}" Classes="Success" IsEnabled="False"/>
|
||||||
<ToggleSplitButton Classes="Secondary" Content="Submit" />
|
</StackPanel>
|
||||||
<ToggleSplitButton Classes="Tertiary" Content="Submit" />
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||||
<ToggleSplitButton Classes="Success" Content="Submit" />
|
<DropDownButton Classes="Small" Content="Small" />
|
||||||
<ToggleSplitButton Classes="Warning" Content="Submit" />
|
<DropDownButton Content="Default" />
|
||||||
<ToggleSplitButton Classes="Danger" Content="Submit" />
|
<DropDownButton Classes="Large" Content="Large" />
|
||||||
<ToggleSplitButton
|
</StackPanel>
|
||||||
Classes="Danger"
|
|
||||||
Content="Submit"
|
<TextBlock>SplitButton</TextBlock>
|
||||||
IsEnabled="False" />
|
<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>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
</ScrollViewer>
|
||||||
</UserControl>
|
</UserControl>
|
@ -78,8 +78,8 @@
|
|||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<Border HorizontalAlignment="Left" Theme="{StaticResource RadioButtonGroupBorder}">
|
<Border HorizontalAlignment="Left" Theme="{StaticResource RadioButtonGroupBorder}">
|
||||||
<ListBox Theme="{DynamicResource ButtonRadioGroupListBox}">
|
<ListBox Theme="{DynamicResource ButtonRadioGroupListBox}">
|
||||||
<ListBoxItem Classes="Large" IsSelected="True">Small 1</ListBoxItem>
|
<ListBoxItem Classes="Large" IsSelected="True">Large 1</ListBoxItem>
|
||||||
<ListBoxItem Classes="Large">Small 2</ListBoxItem>
|
<ListBoxItem Classes="Large">Large 2</ListBoxItem>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
</Border>
|
</Border>
|
||||||
<Border
|
<Border
|
||||||
@ -87,8 +87,8 @@
|
|||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
Theme="{StaticResource RadioButtonGroupBorder}">
|
Theme="{StaticResource RadioButtonGroupBorder}">
|
||||||
<ListBox Theme="{DynamicResource ButtonRadioGroupListBox}" IsEnabled="False">
|
<ListBox Theme="{DynamicResource ButtonRadioGroupListBox}" IsEnabled="False">
|
||||||
<ListBoxItem Classes="Large" IsSelected="True">Small 1</ListBoxItem>
|
<ListBoxItem Classes="Large" IsSelected="True">Large 1</ListBoxItem>
|
||||||
<ListBoxItem Classes="Large">Small 2</ListBoxItem>
|
<ListBoxItem Classes="Large">Large 2</ListBoxItem>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
</Border>
|
</Border>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
@ -155,7 +155,7 @@
|
|||||||
Value="60" />
|
Value="60" />
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
Width="200"
|
Width="200"
|
||||||
Classes="Error"
|
Classes="Danger"
|
||||||
Maximum="100"
|
Maximum="100"
|
||||||
Minimum="0"
|
Minimum="0"
|
||||||
ShowProgressText="True"
|
ShowProgressText="True"
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
<RepeatButton Classes="Success">Success</RepeatButton>
|
<RepeatButton Classes="Success">Success</RepeatButton>
|
||||||
<RepeatButton Classes="Warning">Warning</RepeatButton>
|
<RepeatButton Classes="Warning">Warning</RepeatButton>
|
||||||
<RepeatButton Classes="Danger">Danger</RepeatButton>
|
<RepeatButton Classes="Danger">Danger</RepeatButton>
|
||||||
<RepeatButton Classes="Primary" IsEnabled="False">Danger</RepeatButton>
|
<RepeatButton Classes="Danger" IsEnabled="False">Disabled</RepeatButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<TextBlock>Solid</TextBlock>
|
<TextBlock>Solid</TextBlock>
|
||||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||||
@ -27,10 +27,25 @@
|
|||||||
<RepeatButton Classes="Warning" Theme="{DynamicResource SolidRepeatButton}">Warning</RepeatButton>
|
<RepeatButton Classes="Warning" Theme="{DynamicResource SolidRepeatButton}">Warning</RepeatButton>
|
||||||
<RepeatButton Classes="Danger" Theme="{DynamicResource SolidRepeatButton}">Danger</RepeatButton>
|
<RepeatButton Classes="Danger" Theme="{DynamicResource SolidRepeatButton}">Danger</RepeatButton>
|
||||||
<RepeatButton
|
<RepeatButton
|
||||||
Classes="Primary"
|
Classes="Danger"
|
||||||
IsEnabled="False"
|
IsEnabled="False"
|
||||||
Theme="{DynamicResource SolidRepeatButton}">
|
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>
|
</RepeatButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<TextBlock>Borderless</TextBlock>
|
<TextBlock>Borderless</TextBlock>
|
||||||
@ -42,11 +57,24 @@
|
|||||||
<RepeatButton Classes="Warning" Theme="{DynamicResource BorderlessRepeatButton}">Warning</RepeatButton>
|
<RepeatButton Classes="Warning" Theme="{DynamicResource BorderlessRepeatButton}">Warning</RepeatButton>
|
||||||
<RepeatButton Classes="Danger" Theme="{DynamicResource BorderlessRepeatButton}">Danger</RepeatButton>
|
<RepeatButton Classes="Danger" Theme="{DynamicResource BorderlessRepeatButton}">Danger</RepeatButton>
|
||||||
<RepeatButton
|
<RepeatButton
|
||||||
Classes="Primary"
|
Classes="Danger"
|
||||||
IsEnabled="False"
|
IsEnabled="False"
|
||||||
Theme="{DynamicResource BorderlessRepeatButton}">
|
Theme="{DynamicResource BorderlessRepeatButton}">
|
||||||
Danger
|
Disabled
|
||||||
</RepeatButton>
|
</RepeatButton>
|
||||||
</StackPanel>
|
</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>
|
</StackPanel>
|
||||||
</UserControl>
|
</UserControl>
|
@ -17,7 +17,7 @@
|
|||||||
<ToggleButton Classes="Success">Success</ToggleButton>
|
<ToggleButton Classes="Success">Success</ToggleButton>
|
||||||
<ToggleButton Classes="Warning">Warning</ToggleButton>
|
<ToggleButton Classes="Warning">Warning</ToggleButton>
|
||||||
<ToggleButton Classes="Danger">Danger</ToggleButton>
|
<ToggleButton Classes="Danger">Danger</ToggleButton>
|
||||||
<ToggleButton Classes="Danger" IsEnabled="False">Danger</ToggleButton>
|
<ToggleButton Classes="Danger" IsEnabled="False">Disabled</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<TextBlock Text="Toggle Button Checked State" />
|
<TextBlock Text="Toggle Button Checked State" />
|
||||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||||
@ -28,18 +28,71 @@
|
|||||||
<ToggleButton Classes="Success" IsChecked="True">Success</ToggleButton>
|
<ToggleButton Classes="Success" IsChecked="True">Success</ToggleButton>
|
||||||
<ToggleButton Classes="Warning" IsChecked="True">Warning</ToggleButton>
|
<ToggleButton Classes="Warning" IsChecked="True">Warning</ToggleButton>
|
||||||
<ToggleButton Classes="Danger" IsChecked="True">Danger</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>
|
</StackPanel>
|
||||||
<TextBlock Text="Toggle Button Three State" />
|
<TextBlock Text="Toggle Button Three State" />
|
||||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||||
<ToggleButton IsThreeState="True" IsChecked="{x:Null}">Default</ToggleButton>
|
<ToggleButton IsChecked="{x:Null}" IsThreeState="True">Default</ToggleButton>
|
||||||
<ToggleButton Classes="Primary" IsThreeState="True" IsChecked="{x:Null}">Primary</ToggleButton>
|
<ToggleButton
|
||||||
<ToggleButton Classes="Secondary" IsThreeState="True" IsChecked="{x:Null}">Secondary</ToggleButton>
|
Classes="Primary"
|
||||||
<ToggleButton Classes="Tertiary" IsThreeState="True" IsChecked="{x:Null}">Tertiary</ToggleButton>
|
IsChecked="{x:Null}"
|
||||||
<ToggleButton Classes="Success" IsThreeState="True" IsChecked="{x:Null}">Success</ToggleButton>
|
IsThreeState="True">
|
||||||
<ToggleButton Classes="Warning" IsThreeState="True" IsChecked="{x:Null}">Warning</ToggleButton>
|
Primary
|
||||||
<ToggleButton Classes="Danger" IsThreeState="True" IsChecked="{x:Null}">Danger</ToggleButton>
|
</ToggleButton>
|
||||||
<ToggleButton Classes="Danger" IsThreeState="True" IsChecked="{x:Null}" IsEnabled="False">Danger</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>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</UserControl>
|
</UserControl>
|
@ -7,7 +7,7 @@
|
|||||||
d:DesignHeight="450"
|
d:DesignHeight="450"
|
||||||
d:DesignWidth="800"
|
d:DesignWidth="800"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<StackPanel Spacing="20">
|
<StackPanel Spacing="8" Margin="20">
|
||||||
<ToggleSwitch
|
<ToggleSwitch
|
||||||
Content="Content"
|
Content="Content"
|
||||||
OffContent="OffContent"
|
OffContent="OffContent"
|
||||||
@ -24,11 +24,19 @@
|
|||||||
IsEnabled="False"
|
IsEnabled="False"
|
||||||
OffContent="OffContent"
|
OffContent="OffContent"
|
||||||
OnContent="OnContent" />
|
OnContent="OnContent" />
|
||||||
<ToggleSwitch
|
<StackPanel Orientation="Horizontal">
|
||||||
Theme="{DynamicResource SimpleToggleSwitch}"
|
<ToggleSwitch Theme="{StaticResource SimpleToggleSwitch}" Classes="Small" />
|
||||||
Content="Content"
|
<ToggleSwitch Theme="{StaticResource SimpleToggleSwitch}" Classes="Small" IsChecked="True"/>
|
||||||
OffContent="OffContent"
|
</StackPanel>
|
||||||
OnContent="OnContent" />
|
<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 Theme="{DynamicResource ButtonToggleSwitch}">
|
||||||
<ToggleSwitch.OnContent>
|
<ToggleSwitch.OnContent>
|
||||||
<PathIcon
|
<PathIcon
|
||||||
|
@ -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>
|
|
@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<AvaloniaResource Include="Assets\**" />
|
<AvaloniaResource Include="Assets\**" />
|
||||||
<TrimmerRootDescriptor Include="Roots.xml" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -47,8 +47,8 @@ public class PaletteDemoViewModel: ObservableObject
|
|||||||
|
|
||||||
public PaletteDemoViewModel()
|
public PaletteDemoViewModel()
|
||||||
{
|
{
|
||||||
_lightResourceDictionary = AvaloniaXamlLoader.Load(new Uri("avares://Semi.Avalonia/Themes/Light/Palette.axaml")) as ResourceDictionary;
|
_lightResourceDictionary = new Light.Palette();
|
||||||
_darkResourceDictionary = AvaloniaXamlLoader.Load(new Uri("avares://Semi.Avalonia/Themes/Dark/Palette.axaml")) as ResourceDictionary;
|
_darkResourceDictionary = new Dark.Palette();
|
||||||
WeakReferenceMessenger.Default.Register<PaletteDemoViewModel, ColorItemViewModel>(this, OnClickColorItem);
|
WeakReferenceMessenger.Default.Register<PaletteDemoViewModel, ColorItemViewModel>(this, OnClickColorItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -251,7 +251,7 @@ public static class ColorTokens
|
|||||||
{
|
{
|
||||||
new ("SemiColorPrimary", "Primary"),
|
new ("SemiColorPrimary", "Primary"),
|
||||||
new ("SemiColorPrimaryPointerover", "Primary Pointerover"),
|
new ("SemiColorPrimaryPointerover", "Primary Pointerover"),
|
||||||
new ("SemiColorPrimaryPressed", "Primary Pressed"),
|
new ("SemiColorPrimaryActive", "Primary Active"),
|
||||||
new ("SemiColorPrimaryDisabled", "Primary Disabled"),
|
new ("SemiColorPrimaryDisabled", "Primary Disabled"),
|
||||||
new ("SemiColorPrimaryLight", "Primary Light"),
|
new ("SemiColorPrimaryLight", "Primary Light"),
|
||||||
new ("SemiColorPrimaryLightPointerover", "Primary Light Pointerover"),
|
new ("SemiColorPrimaryLightPointerover", "Primary Light Pointerover"),
|
||||||
@ -262,7 +262,7 @@ public static class ColorTokens
|
|||||||
{
|
{
|
||||||
new ("SemiColorSecondary", "Secondary"),
|
new ("SemiColorSecondary", "Secondary"),
|
||||||
new ("SemiColorSecondaryPointerover", "Secondary Pointerover"),
|
new ("SemiColorSecondaryPointerover", "Secondary Pointerover"),
|
||||||
new ("SemiColorSecondaryPressed", "Secondary Pressed"),
|
new ("SemiColorSecondaryActive", "Secondary Active"),
|
||||||
new ("SemiColorSecondaryDisabled", "Secondary Disabled"),
|
new ("SemiColorSecondaryDisabled", "Secondary Disabled"),
|
||||||
new ("SemiColorSecondaryLight", "Secondary Light"),
|
new ("SemiColorSecondaryLight", "Secondary Light"),
|
||||||
new ("SemiColorSecondaryLightPointerover", "Secondary Light Pointerover"),
|
new ("SemiColorSecondaryLightPointerover", "Secondary Light Pointerover"),
|
||||||
@ -273,7 +273,7 @@ public static class ColorTokens
|
|||||||
{
|
{
|
||||||
new ("SemiColorTertiary", "Tertiary"),
|
new ("SemiColorTertiary", "Tertiary"),
|
||||||
new ("SemiColorTertiaryPointerover", "Tertiary Pointerover"),
|
new ("SemiColorTertiaryPointerover", "Tertiary Pointerover"),
|
||||||
new ("SemiColorTertiaryPressed", "Tertiary Pressed"),
|
new ("SemiColorTertiaryActive", "Tertiary Active"),
|
||||||
new ("SemiColorTertiaryLight", "Tertiary Light"),
|
new ("SemiColorTertiaryLight", "Tertiary Light"),
|
||||||
new ("SemiColorTertiaryLightPointerover", "Tertiary Light Pointerover"),
|
new ("SemiColorTertiaryLightPointerover", "Tertiary Light Pointerover"),
|
||||||
new ("SemiColorTertiaryLightActive", "Tertiary Light Active"),
|
new ("SemiColorTertiaryLightActive", "Tertiary Light Active"),
|
||||||
@ -283,7 +283,7 @@ public static class ColorTokens
|
|||||||
{
|
{
|
||||||
new ("SemiColorInformation", "Information"),
|
new ("SemiColorInformation", "Information"),
|
||||||
new ("SemiColorInformationPointerover", "Information Pointerover"),
|
new ("SemiColorInformationPointerover", "Information Pointerover"),
|
||||||
new ("SemiColorInformationPressed", "Information Pressed"),
|
new ("SemiColorInformationActive", "Information Active"),
|
||||||
new ("SemiColorInformationDisabled", "Information Disabled"),
|
new ("SemiColorInformationDisabled", "Information Disabled"),
|
||||||
new ("SemiColorInformationLight", "Information Light"),
|
new ("SemiColorInformationLight", "Information Light"),
|
||||||
new ("SemiColorInformationLightPointerover", "Information Light Pointerover"),
|
new ("SemiColorInformationLightPointerover", "Information Light Pointerover"),
|
||||||
@ -294,7 +294,7 @@ public static class ColorTokens
|
|||||||
{
|
{
|
||||||
new ("SemiColorSuccess", "Success"),
|
new ("SemiColorSuccess", "Success"),
|
||||||
new ("SemiColorSuccessPointerover", "Success Pointerover"),
|
new ("SemiColorSuccessPointerover", "Success Pointerover"),
|
||||||
new ("SemiColorSuccessPressed", "Success Pressed"),
|
new ("SemiColorSuccessActive", "Success Active"),
|
||||||
new ("SemiColorSuccessDisabled", "Success Disabled"),
|
new ("SemiColorSuccessDisabled", "Success Disabled"),
|
||||||
new ("SemiColorSuccessLight", "Success Light"),
|
new ("SemiColorSuccessLight", "Success Light"),
|
||||||
new ("SemiColorSuccessLightPointerover", "Success Light Pointerover"),
|
new ("SemiColorSuccessLightPointerover", "Success Light Pointerover"),
|
||||||
@ -305,7 +305,7 @@ public static class ColorTokens
|
|||||||
{
|
{
|
||||||
new ("SemiColorWarning", "Warning"),
|
new ("SemiColorWarning", "Warning"),
|
||||||
new ("SemiColorWarningPointerover", "Warning Pointerover"),
|
new ("SemiColorWarningPointerover", "Warning Pointerover"),
|
||||||
new ("SemiColorWarningPressed", "Warning Pressed"),
|
new ("SemiColorWarningActive", "Warning Active"),
|
||||||
new ("SemiColorWarningLight", "Warning Light"),
|
new ("SemiColorWarningLight", "Warning Light"),
|
||||||
new ("SemiColorWarningLightPointerover", "Warning Light Pointerover"),
|
new ("SemiColorWarningLightPointerover", "Warning Light Pointerover"),
|
||||||
new ("SemiColorWarningLightActive", "Warning Light Active"),
|
new ("SemiColorWarningLightActive", "Warning Light Active"),
|
||||||
@ -315,7 +315,7 @@ public static class ColorTokens
|
|||||||
{
|
{
|
||||||
new ("SemiColorDanger", "Danger"),
|
new ("SemiColorDanger", "Danger"),
|
||||||
new ("SemiColorDangerPointerover", "Danger Pointerover"),
|
new ("SemiColorDangerPointerover", "Danger Pointerover"),
|
||||||
new ("SemiColorDangerPressed", "Danger Pressed"),
|
new ("SemiColorDangerActive", "Danger Active"),
|
||||||
new ("SemiColorDangerLight", "Danger Light"),
|
new ("SemiColorDangerLight", "Danger Light"),
|
||||||
new ("SemiColorDangerLightPointerover", "Danger Light Pointerover"),
|
new ("SemiColorDangerLightPointerover", "Danger Light Pointerover"),
|
||||||
new ("SemiColorDangerLightActive", "Danger Light Active"),
|
new ("SemiColorDangerLightActive", "Danger Light Active"),
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"sdk": {
|
"sdk": {
|
||||||
"version": "7.0.0",
|
"version": "8.0.0",
|
||||||
"rollForward": "latestMajor",
|
"rollForward": "latestMajor",
|
||||||
"allowPrerelease": true
|
"allowPrerelease": true
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
|
<TargetFrameworks>net6.0;net8.0;netstandard2.0</TargetFrameworks>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<Version>11.0.7.4</Version>
|
<Version>11.0.7.4</Version>
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
<Styles.Resources>
|
<Styles.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
<ResourceDictionary.ThemeDictionaries>
|
<ResourceDictionary.ThemeDictionaries>
|
||||||
<MergeResourceInclude x:Key="Default" Source="avares://Semi.Avalonia.ColorPicker/Light.axaml" />
|
<ResourceInclude x:Key="Default" Source="avares://Semi.Avalonia.ColorPicker/Light.axaml" />
|
||||||
<MergeResourceInclude x:Key="Dark" Source="avares://Semi.Avalonia.ColorPicker/Dark.axaml" />
|
<ResourceInclude x:Key="Dark" Source="avares://Semi.Avalonia.ColorPicker/Dark.axaml" />
|
||||||
</ResourceDictionary.ThemeDictionaries>
|
</ResourceDictionary.ThemeDictionaries>
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia.ColorPicker/Controls/ColorPicker.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia.ColorPicker/Controls/ColorPicker.axaml" />
|
||||||
|
@ -7,6 +7,10 @@
|
|||||||
<PackageReleaseNotes>Update to 11.0.7</PackageReleaseNotes>
|
<PackageReleaseNotes>Update to 11.0.7</PackageReleaseNotes>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
|
||||||
|
<IsAotCompatible>true</IsAotCompatible>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Avalonia" Version="$(AvaloniaVersion)"/>
|
<PackageReference Include="Avalonia" Version="$(AvaloniaVersion)"/>
|
||||||
<PackageReference Include="Avalonia.Controls.ColorPicker" Version="$(AvaloniaVersion)"/>
|
<PackageReference Include="Avalonia.Controls.ColorPicker" Version="$(AvaloniaVersion)"/>
|
||||||
|
@ -292,7 +292,7 @@
|
|||||||
Name="BackgroundBorder"
|
Name="BackgroundBorder"
|
||||||
Grid.RowSpan="2"
|
Grid.RowSpan="2"
|
||||||
Grid.ColumnSpan="2"
|
Grid.ColumnSpan="2"
|
||||||
Margin="2"
|
Margin="{DynamicResource DataGridRowMargin}"
|
||||||
Background="{DynamicResource DataGridRowBackground}"
|
Background="{DynamicResource DataGridRowBackground}"
|
||||||
CornerRadius="3" />
|
CornerRadius="3" />
|
||||||
<Rectangle
|
<Rectangle
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
<Styles.Resources>
|
<Styles.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
<ResourceDictionary.ThemeDictionaries>
|
<ResourceDictionary.ThemeDictionaries>
|
||||||
<MergeResourceInclude x:Key="Default" Source="avares://Semi.Avalonia.DataGrid/Light.axaml" />
|
<ResourceInclude x:Key="Default" Source="avares://Semi.Avalonia.DataGrid/Light.axaml" />
|
||||||
<MergeResourceInclude x:Key="Dark" Source="avares://Semi.Avalonia.DataGrid/Dark.axaml" />
|
<ResourceInclude x:Key="Dark" Source="avares://Semi.Avalonia.DataGrid/Dark.axaml" />
|
||||||
</ResourceDictionary.ThemeDictionaries>
|
</ResourceDictionary.ThemeDictionaries>
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia.DataGrid/DataGrid.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia.DataGrid/DataGrid.axaml" />
|
||||||
|
@ -7,6 +7,10 @@
|
|||||||
<PackageReleaseNotes>Update to 11.0.7</PackageReleaseNotes>
|
<PackageReleaseNotes>Update to 11.0.7</PackageReleaseNotes>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
|
||||||
|
<IsAotCompatible>true</IsAotCompatible>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Avalonia" Version="$(AvaloniaVersion)"/>
|
<PackageReference Include="Avalonia" Version="$(AvaloniaVersion)"/>
|
||||||
<PackageReference Include="Avalonia.Controls.DataGrid" Version="$(AvaloniaVersion)"/>
|
<PackageReference Include="Avalonia.Controls.DataGrid" Version="$(AvaloniaVersion)"/>
|
||||||
|
@ -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>
|
<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="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>
|
<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>
|
||||||
|
|
||||||
|
@ -14,6 +14,10 @@
|
|||||||
<AvaloniaVersion>11.0.0</AvaloniaVersion>
|
<AvaloniaVersion>11.0.0</AvaloniaVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
|
||||||
|
<IsAotCompatible>true</IsAotCompatible>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Avalonia.Controls.TreeDataGrid" Version="$(AvaloniaVersion)"/>
|
<PackageReference Include="Avalonia.Controls.TreeDataGrid" Version="$(AvaloniaVersion)"/>
|
||||||
<None Include="irihi.png" Pack="true" PackagePath=""/>
|
<None Include="irihi.png" Pack="true" PackagePath=""/>
|
||||||
|
@ -5,4 +5,5 @@
|
|||||||
</StreamGeometry>
|
</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="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>
|
<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>
|
</ResourceDictionary>
|
||||||
|
@ -149,7 +149,7 @@
|
|||||||
<Panel>
|
<Panel>
|
||||||
<Border
|
<Border
|
||||||
Name="RowBorder"
|
Name="RowBorder"
|
||||||
Margin="2"
|
Margin="{DynamicResource TreeDataGridRowMargin}"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Stretch"
|
VerticalAlignment="Stretch"
|
||||||
Background="{TemplateBinding Background}"
|
Background="{TemplateBinding Background}"
|
||||||
@ -183,8 +183,7 @@
|
|||||||
<CheckBox
|
<CheckBox
|
||||||
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
IsChecked="{TemplateBinding Value,
|
IsChecked="{TemplateBinding Value, Mode=TwoWay}"
|
||||||
Mode=TwoWay}"
|
|
||||||
IsEnabled="{Binding !IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}"
|
IsEnabled="{Binding !IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}"
|
||||||
IsThreeState="{TemplateBinding IsThreeState}"
|
IsThreeState="{TemplateBinding IsThreeState}"
|
||||||
Theme="{DynamicResource SimpleCheckBox}" />
|
Theme="{DynamicResource SimpleCheckBox}" />
|
||||||
@ -239,8 +238,7 @@
|
|||||||
DockPanel.Dock="Left">
|
DockPanel.Dock="Left">
|
||||||
<ToggleButton
|
<ToggleButton
|
||||||
Focusable="False"
|
Focusable="False"
|
||||||
IsChecked="{TemplateBinding IsExpanded,
|
IsChecked="{TemplateBinding IsExpanded, Mode=TwoWay}"
|
||||||
Mode=TwoWay}"
|
|
||||||
IsVisible="{TemplateBinding ShowExpander}"
|
IsVisible="{TemplateBinding ShowExpander}"
|
||||||
Theme="{StaticResource TreeDataGridExpandCollapseChevron}" />
|
Theme="{StaticResource TreeDataGridExpandCollapseChevron}" />
|
||||||
</Border>
|
</Border>
|
||||||
@ -287,8 +285,7 @@
|
|||||||
<TextBox
|
<TextBox
|
||||||
Name="PART_Edit"
|
Name="PART_Edit"
|
||||||
Classes="Small"
|
Classes="Small"
|
||||||
Text="{TemplateBinding Value,
|
Text="{TemplateBinding Value, Mode=TwoWay}" />
|
||||||
Mode=TwoWay}" />
|
|
||||||
</Border>
|
</Border>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
xmlns="https://github.com/avaloniaui"
|
xmlns="https://github.com/avaloniaui"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
x:CompileBindings="True">
|
x:CompileBindings="True">
|
||||||
<!-- Button Theme Key: Solid Light Border Borderless; Default is Light -->
|
<!-- Button Theme Key: Light, Solid, Outline, Borderless; Default is Light -->
|
||||||
<!-- Button Default Classes: Primary Secondary, Tertiary, Warning, Danger; Default is Primary -->
|
<!-- Button Default Classes: Primary, Secondary, Tertiary, Success, Warning, Danger; Default is Primary -->
|
||||||
<!-- State: default pointerover pressed disabled -->
|
<!-- State: default, pointerover, pressed, disabled -->
|
||||||
|
|
||||||
<!-- Button Light -->
|
<!-- Button Light -->
|
||||||
<ControlTheme x:Key="{x:Type Button}" TargetType="Button">
|
<ControlTheme x:Key="{x:Type Button}" TargetType="Button">
|
||||||
@ -76,7 +76,6 @@
|
|||||||
|
|
||||||
<Style Selector="^:disabled">
|
<Style Selector="^:disabled">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonDefaultDisabledBackground}" />
|
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
@ -186,7 +185,37 @@
|
|||||||
|
|
||||||
<Style Selector="^:disabled">
|
<Style Selector="^:disabled">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
|
<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}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
<ControlTheme x:Key="{x:Type CalendarItem}" TargetType="CalendarItem">
|
<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.MinHeight" Value="{DynamicResource CalendarMinHeight}" />
|
||||||
<Setter Property="CalendarItem.DayTitleTemplate">
|
<Setter Property="CalendarItem.DayTitleTemplate">
|
||||||
<Template>
|
<Template>
|
||||||
@ -53,7 +54,7 @@
|
|||||||
BorderThickness="{TemplateBinding BorderThickness}"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
CornerRadius="{TemplateBinding CornerRadius}">
|
CornerRadius="{TemplateBinding CornerRadius}">
|
||||||
<Grid
|
<Grid
|
||||||
MinWidth="{DynamicResource CalendarMinWidth}"
|
MinWidth="{TemplateBinding MinWidth}"
|
||||||
MinHeight="{TemplateBinding MinHeight}"
|
MinHeight="{TemplateBinding MinHeight}"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Stretch"
|
VerticalAlignment="Stretch"
|
||||||
|
@ -88,7 +88,6 @@
|
|||||||
|
|
||||||
<Style Selector="^:disabled">
|
<Style Selector="^:disabled">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonDefaultDisabledBackground}" />
|
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
@ -235,7 +234,37 @@
|
|||||||
|
|
||||||
<Style Selector="^:disabled">
|
<Style Selector="^:disabled">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
|
<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}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
@ -185,6 +185,10 @@
|
|||||||
<Style Selector="^.Warning">
|
<Style Selector="^.Warning">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ProgressBarWarningForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ProgressBarWarningForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
<Style Selector="^.Danger">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource ProgressBarDangerForeground}" />
|
||||||
|
</Style>
|
||||||
|
<!-- Error style is obsolete, use Danger instead -->
|
||||||
<Style Selector="^.Error">
|
<Style Selector="^.Error">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ProgressBarErrorForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ProgressBarErrorForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
@ -411,6 +415,10 @@
|
|||||||
<Style Selector="^.Warning">
|
<Style Selector="^.Warning">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ProgressBarWarningForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ProgressBarWarningForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
<Style Selector="^.Danger">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource ProgressBarDangerForeground}" />
|
||||||
|
</Style>
|
||||||
|
<!-- Error style is obsolete, use Danger instead -->
|
||||||
<Style Selector="^.Error">
|
<Style Selector="^.Error">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ProgressBarErrorForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ProgressBarErrorForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
@ -71,7 +71,6 @@
|
|||||||
|
|
||||||
<Style Selector="^:disabled">
|
<Style Selector="^:disabled">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonDefaultDisabledBackground}" />
|
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
@ -172,7 +171,37 @@
|
|||||||
|
|
||||||
<Style Selector="^:disabled">
|
<Style Selector="^:disabled">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
|
<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}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
@ -124,9 +124,12 @@
|
|||||||
<Setter Property="Padding" Value="{DynamicResource ButtonSmallPadding}" />
|
<Setter Property="Padding" Value="{DynamicResource ButtonSmallPadding}" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:disabled /template/ Button">
|
<Style Selector="^:disabled /template/ Button">
|
||||||
<Setter Property="Background" Value="{DynamicResource ButtonDefaultDisabledBackground}" />
|
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
<!-- only for ToggleSplitButton -->
|
||||||
|
<Style Selector="^:checked:disabled /template/ Button">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonSolidDisabledBackground}" />
|
||||||
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
<ControlTheme
|
<ControlTheme
|
||||||
@ -206,7 +209,37 @@
|
|||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:disabled /template/ Button">
|
<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}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
@ -67,6 +67,7 @@
|
|||||||
|
|
||||||
<Style Selector="^:disabled">
|
<Style Selector="^:disabled">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ToggleButtonDefaultDisabledBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ToggleButtonDefaultDisabledBorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ToggleButtonDefaultBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^.Primary">
|
<Style Selector="^.Primary">
|
||||||
@ -153,6 +154,7 @@
|
|||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:disabled">
|
<Style Selector="^:disabled">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ToggleButtonDefaultDisabledBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ToggleButtonDefaultDisabledBorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ToggleButtonCheckedDisabledBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
@ -242,12 +244,12 @@
|
|||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:disabled">
|
<Style Selector="^:disabled">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource ToggleButtonIndeterminateDisabledBorderBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource ToggleButtonIndeterminateDisabledBorderBrush}" />
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ToggleButtonDefaultBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:disabled">
|
<Style Selector="^:disabled">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ToggleButtonDefaultDisabledForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ToggleButtonDefaultDisabledForeground}" />
|
||||||
<Setter Property="Background" Value="{DynamicResource ToggleButtonDefaultDisabledBackground}" />
|
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^.Large">
|
<Style Selector="^.Large">
|
||||||
|
@ -36,8 +36,7 @@
|
|||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
Content="{TemplateBinding Content}"
|
Content="{TemplateBinding Content}"
|
||||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||||
IsVisible="{TemplateBinding Content,
|
IsVisible="{TemplateBinding Content, Converter={x:Static ObjectConverters.IsNotNull}}"
|
||||||
Converter={x:Static ObjectConverters.IsNotNull}}"
|
|
||||||
RecognizesAccessKey="True" />
|
RecognizesAccessKey="True" />
|
||||||
<Grid
|
<Grid
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
@ -48,38 +47,34 @@
|
|||||||
Grid.ColumnSpan="2"
|
Grid.ColumnSpan="2"
|
||||||
TemplatedControl.IsTemplateFocusTarget="True" />
|
TemplatedControl.IsTemplateFocusTarget="True" />
|
||||||
<Border
|
<Border
|
||||||
Name="SwitchBackgroundBorder"
|
x:Name="SwitchBackgroundBorder"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Width="40"
|
Width="{DynamicResource ToggleSwitchDefaultWidth}"
|
||||||
Height="20"
|
Height="{DynamicResource ToggleSwitchDefaultHeight}"
|
||||||
CornerRadius="100">
|
CornerRadius="100">
|
||||||
<Border.Transitions>
|
<Border.Transitions>
|
||||||
<Transitions>
|
<Transitions>
|
||||||
<BrushTransition Property="Background" Duration="0:0:0.2" />
|
<BrushTransition Property="Background" Duration="0:0:0.2" />
|
||||||
</Transitions>
|
</Transitions>
|
||||||
</Border.Transitions>
|
</Border.Transitions>
|
||||||
</Border>
|
|
||||||
<Canvas
|
<Canvas
|
||||||
x:Name="PART_SwitchKnob"
|
x:Name="PART_SwitchKnob"
|
||||||
Grid.Column="0"
|
Width="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
|
||||||
Width="20"
|
Height="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
|
||||||
Height="20"
|
|
||||||
HorizontalAlignment="Left">
|
HorizontalAlignment="Left">
|
||||||
<Grid
|
<Grid
|
||||||
x:Name="PART_MovingKnobs"
|
x:Name="PART_MovingKnobs"
|
||||||
Width="20"
|
Width="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
|
||||||
Height="20">
|
Height="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
|
||||||
|
Margin="{DynamicResource ToggleSwitchIndicatorDefaultMargin}">
|
||||||
<Border
|
<Border
|
||||||
x:Name="SwitchKnobIndicator"
|
x:Name="SwitchKnobIndicator"
|
||||||
Width="14"
|
|
||||||
Height="14"
|
|
||||||
Background="White"
|
Background="White"
|
||||||
BorderBrush="{DynamicResource ToggleSwitchIndicatorBorderBrush}"
|
|
||||||
BorderThickness="0.5"
|
|
||||||
BoxShadow="0 0 1 1 #222E3238"
|
BoxShadow="0 0 1 1 #222E3238"
|
||||||
CornerRadius="100" />
|
CornerRadius="100" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Canvas>
|
</Canvas>
|
||||||
|
</Border>
|
||||||
|
|
||||||
<ContentPresenter
|
<ContentPresenter
|
||||||
x:Name="PART_OnContentPresenter"
|
x:Name="PART_OnContentPresenter"
|
||||||
@ -154,6 +149,36 @@
|
|||||||
<Setter Property="Background" Value="{DynamicResource ToggleSwitchContainerCheckedDisabledBackground}" />
|
<Setter Property="Background" Value="{DynamicResource ToggleSwitchContainerCheckedDisabledBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</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>
|
||||||
|
|
||||||
<ControlTheme
|
<ControlTheme
|
||||||
@ -205,49 +230,40 @@
|
|||||||
<Grid
|
<Grid
|
||||||
Background="{TemplateBinding Background}"
|
Background="{TemplateBinding Background}"
|
||||||
Cursor="Hand"
|
Cursor="Hand"
|
||||||
RowDefinitions="*">
|
|
||||||
<Grid
|
|
||||||
Grid.Row="0"
|
|
||||||
Background="Transparent"
|
|
||||||
ColumnDefinitions="Auto, *">
|
ColumnDefinitions="Auto, *">
|
||||||
<Grid
|
<Grid
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Grid.ColumnSpan="2"
|
Grid.ColumnSpan="2"
|
||||||
TemplatedControl.IsTemplateFocusTarget="True" />
|
TemplatedControl.IsTemplateFocusTarget="True" />
|
||||||
<Border
|
<Border
|
||||||
Name="SwitchBackgroundBorder"
|
x:Name="SwitchBackgroundBorder"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Width="40"
|
Width="{DynamicResource ToggleSwitchDefaultWidth}"
|
||||||
Height="20"
|
Height="{DynamicResource ToggleSwitchDefaultHeight}"
|
||||||
CornerRadius="100">
|
CornerRadius="100">
|
||||||
<Border.Transitions>
|
<Border.Transitions>
|
||||||
<Transitions>
|
<Transitions>
|
||||||
<BrushTransition Property="Background" Duration="0:0:0.2" />
|
<BrushTransition Property="Background" Duration="0:0:0.2" />
|
||||||
</Transitions>
|
</Transitions>
|
||||||
</Border.Transitions>
|
</Border.Transitions>
|
||||||
</Border>
|
|
||||||
<Canvas
|
<Canvas
|
||||||
x:Name="PART_SwitchKnob"
|
x:Name="PART_SwitchKnob"
|
||||||
Grid.Column="0"
|
Width="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
|
||||||
Width="20"
|
Height="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
|
||||||
Height="20"
|
|
||||||
HorizontalAlignment="Left">
|
HorizontalAlignment="Left">
|
||||||
<Grid
|
<Grid
|
||||||
x:Name="PART_MovingKnobs"
|
x:Name="PART_MovingKnobs"
|
||||||
Width="20"
|
Width="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
|
||||||
Height="20">
|
Height="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
|
||||||
|
Margin="{DynamicResource ToggleSwitchIndicatorDefaultMargin}">
|
||||||
<Border
|
<Border
|
||||||
x:Name="SwitchKnobIndicator"
|
x:Name="SwitchKnobIndicator"
|
||||||
Width="14"
|
|
||||||
Height="14"
|
|
||||||
Background="White"
|
Background="White"
|
||||||
BorderBrush="{DynamicResource ToggleSwitchIndicatorBorderBrush}"
|
|
||||||
BorderThickness="0.5"
|
|
||||||
BoxShadow="0 0 1 1 #222E3238"
|
BoxShadow="0 0 1 1 #222E3238"
|
||||||
CornerRadius="100" />
|
CornerRadius="100" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Canvas>
|
</Canvas>
|
||||||
</Grid>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
|
8
src/Semi.Avalonia/Locale/en-us.axaml.cs
Normal file
8
src/Semi.Avalonia/Locale/en-us.axaml.cs
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
using Avalonia.Controls;
|
||||||
|
|
||||||
|
namespace Semi.Avalonia.Locale;
|
||||||
|
|
||||||
|
public class en_us: ResourceDictionary
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
8
src/Semi.Avalonia/Locale/zh-cn.axaml.cs
Normal file
8
src/Semi.Avalonia/Locale/zh-cn.axaml.cs
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
using Avalonia.Controls;
|
||||||
|
|
||||||
|
namespace Semi.Avalonia.Locale;
|
||||||
|
|
||||||
|
public class zh_cn: ResourceDictionary
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
@ -7,6 +7,10 @@
|
|||||||
<PackageReleaseNotes>Update to 11.0.7</PackageReleaseNotes>
|
<PackageReleaseNotes>Update to 11.0.7</PackageReleaseNotes>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
|
||||||
|
<IsAotCompatible>true</IsAotCompatible>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Avalonia" Version="$(AvaloniaVersion)"/>
|
<PackageReference Include="Avalonia" Version="$(AvaloniaVersion)"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<!-- Light -->
|
<!-- Light -->
|
||||||
<SolidColorBrush x:Key="ButtonDefaultPrimaryForeground" Color="#54A9FF" />
|
<SolidColorBrush x:Key="ButtonDefaultPrimaryForeground" Color="#54A9FF" />
|
||||||
<SolidColorBrush x:Key="ButtonDefaultSecondaryForeground" Color="#40B4F3" />
|
<SolidColorBrush x:Key="ButtonDefaultSecondaryForeground" Color="#40B4F3" />
|
||||||
<SolidColorBrush x:Key="ButtonDefaultTertiaryForeground" Color="#888D92" />
|
<SolidColorBrush x:Key="ButtonDefaultTertiaryForeground" Opacity="0.8" Color="#F9F9F9" />
|
||||||
<SolidColorBrush x:Key="ButtonDefaultSuccessForeground" Color="#5DC264" />
|
<SolidColorBrush x:Key="ButtonDefaultSuccessForeground" Color="#5DC264" />
|
||||||
<SolidColorBrush x:Key="ButtonDefaultWarningForeground" Color="#FFAE43" />
|
<SolidColorBrush x:Key="ButtonDefaultWarningForeground" Color="#FFAE43" />
|
||||||
<SolidColorBrush x:Key="ButtonDefaultDangerForeground" Color="#FC725A" />
|
<SolidColorBrush x:Key="ButtonDefaultDangerForeground" Color="#FC725A" />
|
||||||
@ -11,7 +11,6 @@
|
|||||||
<SolidColorBrush x:Key="ButtonDefaultBackground" Opacity="0.12" Color="White" />
|
<SolidColorBrush x:Key="ButtonDefaultBackground" Opacity="0.12" Color="White" />
|
||||||
<SolidColorBrush x:Key="ButtonDefaultPointeroverBackground" Opacity="0.16" Color="White" />
|
<SolidColorBrush x:Key="ButtonDefaultPointeroverBackground" Opacity="0.16" Color="White" />
|
||||||
<SolidColorBrush x:Key="ButtonDefaultPressedBackground" Opacity="0.20" 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="ButtonDefaultBorderBrush" Color="Transparent" />
|
||||||
<SolidColorBrush x:Key="ButtonDefaultPointeroverBorderBrush" Color="Transparent" />
|
<SolidColorBrush x:Key="ButtonDefaultPointeroverBorderBrush" Color="Transparent" />
|
||||||
@ -69,8 +68,20 @@
|
|||||||
<SolidColorBrush x:Key="ButtonSolidDangerBorderBrush" Color="#FC725A" />
|
<SolidColorBrush x:Key="ButtonSolidDangerBorderBrush" Color="#FC725A" />
|
||||||
<SolidColorBrush x:Key="ButtonSolidDangerPointeroverBorderBrush" Color="#FD9983" />
|
<SolidColorBrush x:Key="ButtonSolidDangerPointeroverBorderBrush" Color="#FD9983" />
|
||||||
<SolidColorBrush x:Key="ButtonSolidDangerPressedBorderBrush" Color="#FDBEAC" />
|
<SolidColorBrush x:Key="ButtonSolidDangerPressedBorderBrush" Color="#FDBEAC" />
|
||||||
|
|
||||||
|
<SolidColorBrush x:Key="ButtonSolidDisabledBackground" Color="#2E3238" />
|
||||||
<!-- end Solid -->
|
<!-- 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="ButtonInputInnerForeground" Color="#888D92" />
|
||||||
<SolidColorBrush x:Key="ButtonInputInnerPointeroverForeground" Color="#A7ABB0" />
|
<SolidColorBrush x:Key="ButtonInputInnerPointeroverForeground" Color="#A7ABB0" />
|
||||||
<SolidColorBrush x:Key="ButtonInputInnerPressedForeground" Color="#C6CACD" />
|
<SolidColorBrush x:Key="ButtonInputInnerPressedForeground" Color="#C6CACD" />
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
<SolidColorBrush x:Key="CheckBoxDefaultBorderBrush" Opacity="0.35" Color="#F9F9F9" />
|
<SolidColorBrush x:Key="CheckBoxDefaultBorderBrush" Opacity="0.35" Color="#F9F9F9" />
|
||||||
<SolidColorBrush x:Key="CheckBoxPointeroverBackground" Opacity="0.12" Color="White" />
|
<SolidColorBrush x:Key="CheckBoxPointeroverBackground" Opacity="0.12" Color="White" />
|
||||||
<SolidColorBrush x:Key="CheckBoxPointeroverBorderBrush" Color="#54A9FF" />
|
<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="CheckBoxPressedBorderBrush" Color="#A9D7FF" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="CheckBoxCheckedDefaultBackground" Color="#54A9FF" />
|
<SolidColorBrush x:Key="CheckBoxCheckedDefaultBackground" Color="#54A9FF" />
|
||||||
|
@ -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 Resources -->
|
||||||
<Color x:Key="SemiRed0Color">#6C090B</Color>
|
<Color x:Key="SemiRed0Color">#6C090B</Color>
|
||||||
<Color x:Key="SemiRed1Color">#901110</Color>
|
<Color x:Key="SemiRed1Color">#901110</Color>
|
||||||
@ -326,6 +326,7 @@
|
|||||||
<SolidColorBrush x:Key="SemiColorPrimary" Color="{StaticResource SemiBlue5Color}" />
|
<SolidColorBrush x:Key="SemiColorPrimary" Color="{StaticResource SemiBlue5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorPrimaryPointerover" Color="{StaticResource SemiBlue6Color}" />
|
<SolidColorBrush x:Key="SemiColorPrimaryPointerover" Color="{StaticResource SemiBlue6Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorPrimaryPressed" Color="{StaticResource SemiBlue7Color}" />
|
<SolidColorBrush x:Key="SemiColorPrimaryPressed" Color="{StaticResource SemiBlue7Color}" />
|
||||||
|
<SolidColorBrush x:Key="SemiColorPrimaryActive" Color="{StaticResource SemiBlue7Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorPrimaryDisabled" Color="{StaticResource SemiBlue2Color}" />
|
<SolidColorBrush x:Key="SemiColorPrimaryDisabled" Color="{StaticResource SemiBlue2Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorPrimaryLight" Opacity="0.2" Color="{StaticResource SemiBlue5Color}" />
|
<SolidColorBrush x:Key="SemiColorPrimaryLight" Opacity="0.2" Color="{StaticResource SemiBlue5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorPrimaryLightPointerover" Opacity="0.3" Color="{StaticResource SemiBlue5Color}" />
|
<SolidColorBrush x:Key="SemiColorPrimaryLightPointerover" Opacity="0.3" Color="{StaticResource SemiBlue5Color}" />
|
||||||
@ -334,6 +335,7 @@
|
|||||||
<SolidColorBrush x:Key="SemiColorSecondary" Color="{StaticResource SemiLightBlue5Color}" />
|
<SolidColorBrush x:Key="SemiColorSecondary" Color="{StaticResource SemiLightBlue5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSecondaryPointerover" Color="{StaticResource SemiLightBlue6Color}" />
|
<SolidColorBrush x:Key="SemiColorSecondaryPointerover" Color="{StaticResource SemiLightBlue6Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSecondaryPressed" Color="{StaticResource SemiLightBlue7Color}" />
|
<SolidColorBrush x:Key="SemiColorSecondaryPressed" Color="{StaticResource SemiLightBlue7Color}" />
|
||||||
|
<SolidColorBrush x:Key="SemiColorSecondaryActive" Color="{StaticResource SemiLightBlue7Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSecondaryDisabled" Color="{StaticResource SemiLightBlue2Color}" />
|
<SolidColorBrush x:Key="SemiColorSecondaryDisabled" Color="{StaticResource SemiLightBlue2Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSecondaryLight" Opacity="0.2" Color="{StaticResource SemiLightBlue5Color}" />
|
<SolidColorBrush x:Key="SemiColorSecondaryLight" Opacity="0.2" Color="{StaticResource SemiLightBlue5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSecondaryLightPointerover" Opacity="0.3"
|
<SolidColorBrush x:Key="SemiColorSecondaryLightPointerover" Opacity="0.3"
|
||||||
@ -343,6 +345,7 @@
|
|||||||
<SolidColorBrush x:Key="SemiColorTertiary" Color="{StaticResource SemiGrey5Color}" />
|
<SolidColorBrush x:Key="SemiColorTertiary" Color="{StaticResource SemiGrey5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorTertiaryPointerover" Color="{StaticResource SemiGrey6Color}" />
|
<SolidColorBrush x:Key="SemiColorTertiaryPointerover" Color="{StaticResource SemiGrey6Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorTertiaryPressed" Color="{StaticResource SemiGrey7Color}" />
|
<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="SemiColorTertiaryLight" Opacity="0.2" Color="{StaticResource SemiGrey5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorTertiaryLightPointerover" Opacity="0.3" Color="{StaticResource SemiGrey5Color}" />
|
<SolidColorBrush x:Key="SemiColorTertiaryLightPointerover" Opacity="0.3" Color="{StaticResource SemiGrey5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorTertiaryLightActive" Opacity="0.4" Color="{StaticResource SemiGrey5Color}" />
|
<SolidColorBrush x:Key="SemiColorTertiaryLightActive" Opacity="0.4" Color="{StaticResource SemiGrey5Color}" />
|
||||||
@ -350,6 +353,7 @@
|
|||||||
<SolidColorBrush x:Key="SemiColorInformation" Color="{StaticResource SemiBlue5Color}" />
|
<SolidColorBrush x:Key="SemiColorInformation" Color="{StaticResource SemiBlue5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorInformationPointerover" Color="{StaticResource SemiBlue6Color}" />
|
<SolidColorBrush x:Key="SemiColorInformationPointerover" Color="{StaticResource SemiBlue6Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorInformationPressed" Color="{StaticResource SemiBlue7Color}" />
|
<SolidColorBrush x:Key="SemiColorInformationPressed" Color="{StaticResource SemiBlue7Color}" />
|
||||||
|
<SolidColorBrush x:Key="SemiColorInformationActive" Color="{StaticResource SemiBlue7Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorInformationDisabled" Color="{StaticResource SemiBlue2Color}" />
|
<SolidColorBrush x:Key="SemiColorInformationDisabled" Color="{StaticResource SemiBlue2Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorInformationLight" Opacity="0.2" Color="{StaticResource SemiBlue5Color}" />
|
<SolidColorBrush x:Key="SemiColorInformationLight" Opacity="0.2" Color="{StaticResource SemiBlue5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorInformationLightPointerover" Opacity="0.3" Color="{StaticResource SemiBlue5Color}" />
|
<SolidColorBrush x:Key="SemiColorInformationLightPointerover" Opacity="0.3" Color="{StaticResource SemiBlue5Color}" />
|
||||||
@ -358,6 +362,7 @@
|
|||||||
<SolidColorBrush x:Key="SemiColorSuccess" Color="{StaticResource SemiGreen5Color}" />
|
<SolidColorBrush x:Key="SemiColorSuccess" Color="{StaticResource SemiGreen5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSuccessPointerover" Color="{StaticResource SemiGreen6Color}" />
|
<SolidColorBrush x:Key="SemiColorSuccessPointerover" Color="{StaticResource SemiGreen6Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSuccessPressed" Color="{StaticResource SemiGreen7Color}" />
|
<SolidColorBrush x:Key="SemiColorSuccessPressed" Color="{StaticResource SemiGreen7Color}" />
|
||||||
|
<SolidColorBrush x:Key="SemiColorSuccessActive" Color="{StaticResource SemiGreen7Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSuccessDisabled" Color="{StaticResource SemiGreen2Color}" />
|
<SolidColorBrush x:Key="SemiColorSuccessDisabled" Color="{StaticResource SemiGreen2Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSuccessLight" Opacity="0.2" Color="{StaticResource SemiGreen5Color}" />
|
<SolidColorBrush x:Key="SemiColorSuccessLight" Opacity="0.2" Color="{StaticResource SemiGreen5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSuccessLightPointerover" Opacity="0.3" Color="{StaticResource SemiGreen5Color}" />
|
<SolidColorBrush x:Key="SemiColorSuccessLightPointerover" Opacity="0.3" Color="{StaticResource SemiGreen5Color}" />
|
||||||
@ -366,6 +371,7 @@
|
|||||||
<SolidColorBrush x:Key="SemiColorWarning" Color="{StaticResource SemiOrange5Color}" />
|
<SolidColorBrush x:Key="SemiColorWarning" Color="{StaticResource SemiOrange5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorWarningPointerover" Color="{StaticResource SemiOrange6Color}" />
|
<SolidColorBrush x:Key="SemiColorWarningPointerover" Color="{StaticResource SemiOrange6Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorWarningPressed" Color="{StaticResource SemiOrange7Color}" />
|
<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="SemiColorWarningLight" Opacity="0.2" Color="{StaticResource SemiOrange5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorWarningLightPointerover" Opacity="0.3" Color="{StaticResource SemiOrange5Color}" />
|
<SolidColorBrush x:Key="SemiColorWarningLightPointerover" Opacity="0.3" Color="{StaticResource SemiOrange5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorWarningLightActive" Opacity="0.4" Color="{StaticResource SemiOrange5Color}" />
|
<SolidColorBrush x:Key="SemiColorWarningLightActive" Opacity="0.4" Color="{StaticResource SemiOrange5Color}" />
|
||||||
@ -373,6 +379,7 @@
|
|||||||
<SolidColorBrush x:Key="SemiColorDanger" Color="{StaticResource SemiRed5Color}" />
|
<SolidColorBrush x:Key="SemiColorDanger" Color="{StaticResource SemiRed5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorDangerPointerover" Color="{StaticResource SemiRed6Color}" />
|
<SolidColorBrush x:Key="SemiColorDangerPointerover" Color="{StaticResource SemiRed6Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorDangerPressed" Color="{StaticResource SemiRed7Color}" />
|
<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="SemiColorDangerLight" Opacity="0.2" Color="{StaticResource SemiRed5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorDangerLightPointerover" Opacity="0.3" Color="{StaticResource SemiRed5Color}" />
|
<SolidColorBrush x:Key="SemiColorDangerLightPointerover" Opacity="0.3" Color="{StaticResource SemiRed5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorDangerLightActive" Opacity="0.4" Color="{StaticResource SemiRed5Color}" />
|
<SolidColorBrush x:Key="SemiColorDangerLightActive" Opacity="0.4" Color="{StaticResource SemiRed5Color}" />
|
||||||
|
9
src/Semi.Avalonia/Themes/Dark/Palette.axaml.cs
Normal file
9
src/Semi.Avalonia/Themes/Dark/Palette.axaml.cs
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
|
namespace Semi.Avalonia.Dark;
|
||||||
|
|
||||||
|
public class Palette: ResourceDictionary
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
@ -9,5 +9,7 @@
|
|||||||
<SolidColorBrush x:Key="ProgressBarTertiaryForeground" Color="#888D92" />
|
<SolidColorBrush x:Key="ProgressBarTertiaryForeground" Color="#888D92" />
|
||||||
<SolidColorBrush x:Key="ProgressBarSuccessForeground" Color="#5DC264" />
|
<SolidColorBrush x:Key="ProgressBarSuccessForeground" Color="#5DC264" />
|
||||||
<SolidColorBrush x:Key="ProgressBarWarningForeground" Color="#FFAE43" />
|
<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" />
|
<SolidColorBrush x:Key="ProgressBarErrorForeground" Color="#FC725A" />
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
@ -7,10 +7,10 @@
|
|||||||
<SolidColorBrush x:Key="TextBlockWarningForeground" Color="#FFAE43" />
|
<SolidColorBrush x:Key="TextBlockWarningForeground" Color="#FFAE43" />
|
||||||
<SolidColorBrush x:Key="TextBlockDangerForeground" Color="#FC725A" />
|
<SolidColorBrush x:Key="TextBlockDangerForeground" Color="#FC725A" />
|
||||||
<SolidColorBrush x:Key="TextBlockDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
|
<SolidColorBrush x:Key="TextBlockDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
|
||||||
<SolidColorBrush x:Key="TextBlockCodeForeground" Opacity="0.68" Color="#F9F9F9" />
|
<SolidColorBrush x:Key="TextBlockMarkBackground" Opacity="0.2" Color="#54A9FF" />
|
||||||
<SolidColorBrush x:Key="TextBlockMarkBackground" Color="#053170" />
|
<SolidColorBrush x:Key="TextBlockCodeForeground" Opacity="0.6" Color="#F9F9F9" />
|
||||||
<SolidColorBrush x:Key="TextBlockCodeBackground" Opacity="0.1" Color="#E6E8EA" />
|
<SolidColorBrush x:Key="TextBlockCodeBackground" Opacity="0.16" Color="White" />
|
||||||
<SolidColorBrush x:Key="TextBlockCodeBorderBrush" Opacity="0.2" Color="#E6E8EA" />
|
<SolidColorBrush x:Key="TextBlockCodeBorderBrush" Opacity="0.08" Color="White" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="TextBlockSelectionBackground" Opacity="0.2" Color="#54A9FF" />
|
<SolidColorBrush x:Key="TextBlockSelectionBackground" Opacity="0.2" Color="#54A9FF" />
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
@ -2,7 +2,6 @@
|
|||||||
<SolidColorBrush x:Key="ToggleButtonDefaultBackground" Opacity="0.12" Color="White" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultBackground" Opacity="0.12" Color="White" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultPointeroverBackground" Opacity="0.16" Color="White" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultPointeroverBackground" Opacity="0.16" Color="White" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultPressedBackground" Opacity="0.20" Color="White" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultPressedBackground" Opacity="0.20" Color="White" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledBackground" Opacity="0.04" Color="#E6E8EA" />
|
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledBorderBrush" Color="Transparent" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledBorderBrush" Color="Transparent" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
|
||||||
|
|
||||||
@ -10,7 +9,7 @@
|
|||||||
|
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultPrimaryForeground" Color="#54A9FF" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultPrimaryForeground" Color="#54A9FF" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultSecondaryForeground" Color="#40B4F3" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultSecondaryForeground" Color="#40B4F3" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultTertiaryForeground" Color="#888D92" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultTertiaryForeground" Opacity="0.8" Color="#F9F9F9" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultSuccessForeground" Color="#5DC264" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultSuccessForeground" Color="#5DC264" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultWarningForeground" Color="#FFAE43" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultWarningForeground" Color="#FFAE43" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultDangerForeground" Color="#FC725A" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultDangerForeground" Color="#FC725A" />
|
||||||
@ -37,6 +36,7 @@
|
|||||||
<SolidColorBrush x:Key="ToggleButtonDangerCheckedPressedBackground" Color="#FDBEAC" />
|
<SolidColorBrush x:Key="ToggleButtonDangerCheckedPressedBackground" Color="#FDBEAC" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="ToggleButtonCheckedForeground" Color="White" />
|
<SolidColorBrush x:Key="ToggleButtonCheckedForeground" Color="White" />
|
||||||
|
<SolidColorBrush x:Key="ToggleButtonCheckedDisabledBackground" Color="#2E3238" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="ToggleButtonPrimaryIndeterminateBackground" Color="#053170" />
|
<SolidColorBrush x:Key="ToggleButtonPrimaryIndeterminateBackground" Color="#053170" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonSecondaryIndeterminateBackground" Color="#003761" />
|
<SolidColorBrush x:Key="ToggleButtonSecondaryIndeterminateBackground" Color="#003761" />
|
||||||
|
@ -4,12 +4,10 @@
|
|||||||
<SolidColorBrush x:Key="ToggleSwitchContainerUnCheckedPressedBackground" Opacity="0.20" Color="White" />
|
<SolidColorBrush x:Key="ToggleSwitchContainerUnCheckedPressedBackground" Opacity="0.20" Color="White" />
|
||||||
<SolidColorBrush x:Key="ToggleSwitchContainerUnCheckedDisabledBackground" Color="Transparent" />
|
<SolidColorBrush x:Key="ToggleSwitchContainerUnCheckedDisabledBackground" Color="Transparent" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="ToggleSwitchContainerUnCheckedDisabledBorderBrush" Opacity="0.09" Color="#F9F9F9" />
|
<SolidColorBrush x:Key="ToggleSwitchContainerUnCheckedDisabledBorderBrush" Opacity="0.16" Color="#F9F9F9" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedDefaultBackground" Color="#5FB346" />
|
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedDefaultBackground" Color="#5DC264" />
|
||||||
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedPointeroverBackground" Color="#7FD184" />
|
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedPointeroverBackground" Color="#7FD184" />
|
||||||
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedPressedBackground" Color="#A6E1A8" />
|
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedPressedBackground" Color="#A6E1A8" />
|
||||||
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedDisabledBackground" Color="#277731" />
|
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedDisabledBackground" Color="#277731" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="ToggleSwitchIndicatorBorderBrush" Opacity="0.09" Color="#F9F9F9" />
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
@ -2,8 +2,8 @@
|
|||||||
<Styles.Resources>
|
<Styles.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
<ResourceDictionary.ThemeDictionaries>
|
<ResourceDictionary.ThemeDictionaries>
|
||||||
<MergeResourceInclude x:Key="Default" Source="avares://Semi.Avalonia/Themes/Light/_index.axaml" />
|
<ResourceInclude 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="Dark" Source="avares://Semi.Avalonia/Themes/Dark/_index.axaml" />
|
||||||
</ResourceDictionary.ThemeDictionaries>
|
</ResourceDictionary.ThemeDictionaries>
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/_index.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Controls/_index.axaml" />
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<!-- Light -->
|
<!-- Light -->
|
||||||
<SolidColorBrush x:Key="ButtonDefaultPrimaryForeground" Color="#0077FA" />
|
<SolidColorBrush x:Key="ButtonDefaultPrimaryForeground" Color="#0077FA" />
|
||||||
<SolidColorBrush x:Key="ButtonDefaultSecondaryForeground" Color="#0095EE" />
|
<SolidColorBrush x:Key="ButtonDefaultSecondaryForeground" Color="#0095EE" />
|
||||||
<SolidColorBrush x:Key="ButtonDefaultTertiaryForeground" Color="#6B7075" />
|
<SolidColorBrush x:Key="ButtonDefaultTertiaryForeground" Opacity="0.8" Color="#1C1F23" />
|
||||||
<SolidColorBrush x:Key="ButtonDefaultSuccessForeground" Color="#3BB346" />
|
<SolidColorBrush x:Key="ButtonDefaultSuccessForeground" Color="#3BB346" />
|
||||||
<SolidColorBrush x:Key="ButtonDefaultWarningForeground" Color="#FC8800" />
|
<SolidColorBrush x:Key="ButtonDefaultWarningForeground" Color="#FC8800" />
|
||||||
<SolidColorBrush x:Key="ButtonDefaultDangerForeground" Color="#F93920" />
|
<SolidColorBrush x:Key="ButtonDefaultDangerForeground" Color="#F93920" />
|
||||||
@ -11,7 +11,6 @@
|
|||||||
<SolidColorBrush x:Key="ButtonDefaultBackground" Opacity="0.05" Color="#2E3238" />
|
<SolidColorBrush x:Key="ButtonDefaultBackground" Opacity="0.05" Color="#2E3238" />
|
||||||
<SolidColorBrush x:Key="ButtonDefaultPointeroverBackground" Opacity="0.09" Color="#2E3238" />
|
<SolidColorBrush x:Key="ButtonDefaultPointeroverBackground" Opacity="0.09" Color="#2E3238" />
|
||||||
<SolidColorBrush x:Key="ButtonDefaultPressedBackground" Opacity="0.13" 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="ButtonDefaultBorderBrush" Color="Transparent" />
|
||||||
<SolidColorBrush x:Key="ButtonDefaultPointeroverBorderBrush" Color="Transparent" />
|
<SolidColorBrush x:Key="ButtonDefaultPointeroverBorderBrush" Color="Transparent" />
|
||||||
@ -69,8 +68,20 @@
|
|||||||
<SolidColorBrush x:Key="ButtonSolidDangerBorderBrush" Color="#F93920" />
|
<SolidColorBrush x:Key="ButtonSolidDangerBorderBrush" Color="#F93920" />
|
||||||
<SolidColorBrush x:Key="ButtonSolidDangerPointeroverBorderBrush" Color="#D52515" />
|
<SolidColorBrush x:Key="ButtonSolidDangerPointeroverBorderBrush" Color="#D52515" />
|
||||||
<SolidColorBrush x:Key="ButtonSolidDangerPressedBorderBrush" Color="#B2140C" />
|
<SolidColorBrush x:Key="ButtonSolidDangerPressedBorderBrush" Color="#B2140C" />
|
||||||
|
|
||||||
|
<SolidColorBrush x:Key="ButtonSolidDisabledBackground" Color="#E6E8EA" />
|
||||||
<!-- end Solid -->
|
<!-- 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="ButtonInputInnerForeground" Color="#6B7075" />
|
||||||
<SolidColorBrush x:Key="ButtonInputInnerPointeroverForeground" Color="#555B61" />
|
<SolidColorBrush x:Key="ButtonInputInnerPointeroverForeground" Color="#555B61" />
|
||||||
<SolidColorBrush x:Key="ButtonInputInnerPressedForeground" Color="#41464C" />
|
<SolidColorBrush x:Key="ButtonInputInnerPressedForeground" Color="#41464C" />
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
<SolidColorBrush x:Key="CheckBoxDefaultBorderBrush" Opacity="0.35" Color="#1C1F23" />
|
<SolidColorBrush x:Key="CheckBoxDefaultBorderBrush" Opacity="0.35" Color="#1C1F23" />
|
||||||
<SolidColorBrush x:Key="CheckBoxPointeroverBackground" Opacity="0.05" Color="#2E3238" />
|
<SolidColorBrush x:Key="CheckBoxPointeroverBackground" Opacity="0.05" Color="#2E3238" />
|
||||||
<SolidColorBrush x:Key="CheckBoxPointeroverBorderBrush" Color="#0077FA" />
|
<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="CheckBoxPressedBorderBrush" Color="#004FB3" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="CheckBoxCheckedDefaultBackground" Color="#0077FA" />
|
<SolidColorBrush x:Key="CheckBoxCheckedDefaultBackground" Color="#0077FA" />
|
||||||
|
@ -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 Resources -->
|
||||||
<Color x:Key="SemiRed0Color">#FEF2ED</Color>
|
<Color x:Key="SemiRed0Color">#FEF2ED</Color>
|
||||||
<Color x:Key="SemiRed1Color">#FEDDD2</Color>
|
<Color x:Key="SemiRed1Color">#FEDDD2</Color>
|
||||||
@ -326,6 +326,7 @@
|
|||||||
<SolidColorBrush x:Key="SemiColorPrimary" Color="{StaticResource SemiBlue5Color}" />
|
<SolidColorBrush x:Key="SemiColorPrimary" Color="{StaticResource SemiBlue5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorPrimaryPointerover" Color="{StaticResource SemiBlue6Color}" />
|
<SolidColorBrush x:Key="SemiColorPrimaryPointerover" Color="{StaticResource SemiBlue6Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorPrimaryPressed" Color="{StaticResource SemiBlue7Color}" />
|
<SolidColorBrush x:Key="SemiColorPrimaryPressed" Color="{StaticResource SemiBlue7Color}" />
|
||||||
|
<SolidColorBrush x:Key="SemiColorPrimaryActive" Color="{StaticResource SemiBlue7Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorPrimaryDisabled" Color="{StaticResource SemiBlue2Color}" />
|
<SolidColorBrush x:Key="SemiColorPrimaryDisabled" Color="{StaticResource SemiBlue2Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorPrimaryLight" Color="{StaticResource SemiBlue0Color}" />
|
<SolidColorBrush x:Key="SemiColorPrimaryLight" Color="{StaticResource SemiBlue0Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorPrimaryLightPointerover" Color="{StaticResource SemiBlue1Color}" />
|
<SolidColorBrush x:Key="SemiColorPrimaryLightPointerover" Color="{StaticResource SemiBlue1Color}" />
|
||||||
@ -334,6 +335,7 @@
|
|||||||
<SolidColorBrush x:Key="SemiColorSecondary" Color="{StaticResource SemiLightBlue5Color}" />
|
<SolidColorBrush x:Key="SemiColorSecondary" Color="{StaticResource SemiLightBlue5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSecondaryPointerover" Color="{StaticResource SemiLightBlue6Color}" />
|
<SolidColorBrush x:Key="SemiColorSecondaryPointerover" Color="{StaticResource SemiLightBlue6Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSecondaryPressed" Color="{StaticResource SemiLightBlue7Color}" />
|
<SolidColorBrush x:Key="SemiColorSecondaryPressed" Color="{StaticResource SemiLightBlue7Color}" />
|
||||||
|
<SolidColorBrush x:Key="SemiColorSecondaryActive" Color="{StaticResource SemiLightBlue7Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSecondaryDisabled" Color="{StaticResource SemiLightBlue2Color}" />
|
<SolidColorBrush x:Key="SemiColorSecondaryDisabled" Color="{StaticResource SemiLightBlue2Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSecondaryLight" Color="{StaticResource SemiLightBlue0Color}" />
|
<SolidColorBrush x:Key="SemiColorSecondaryLight" Color="{StaticResource SemiLightBlue0Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSecondaryLightPointerover" Color="{StaticResource SemiLightBlue1Color}" />
|
<SolidColorBrush x:Key="SemiColorSecondaryLightPointerover" Color="{StaticResource SemiLightBlue1Color}" />
|
||||||
@ -342,6 +344,7 @@
|
|||||||
<SolidColorBrush x:Key="SemiColorTertiary" Color="{StaticResource SemiGrey5Color}" />
|
<SolidColorBrush x:Key="SemiColorTertiary" Color="{StaticResource SemiGrey5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorTertiaryPointerover" Color="{StaticResource SemiGrey6Color}" />
|
<SolidColorBrush x:Key="SemiColorTertiaryPointerover" Color="{StaticResource SemiGrey6Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorTertiaryPressed" Color="{StaticResource SemiGrey7Color}" />
|
<SolidColorBrush x:Key="SemiColorTertiaryPressed" Color="{StaticResource SemiGrey7Color}" />
|
||||||
|
<SolidColorBrush x:Key="SemiColorTertiaryActive" Color="{StaticResource SemiGrey7Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorTertiaryLight" Color="{StaticResource SemiGrey0Color}" />
|
<SolidColorBrush x:Key="SemiColorTertiaryLight" Color="{StaticResource SemiGrey0Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorTertiaryLightPointerover" Color="{StaticResource SemiGrey1Color}" />
|
<SolidColorBrush x:Key="SemiColorTertiaryLightPointerover" Color="{StaticResource SemiGrey1Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorTertiaryLightActive" Color="{StaticResource SemiGrey2Color}" />
|
<SolidColorBrush x:Key="SemiColorTertiaryLightActive" Color="{StaticResource SemiGrey2Color}" />
|
||||||
@ -349,6 +352,7 @@
|
|||||||
<SolidColorBrush x:Key="SemiColorInformation" Color="{StaticResource SemiBlue5Color}" />
|
<SolidColorBrush x:Key="SemiColorInformation" Color="{StaticResource SemiBlue5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorInformationPointerover" Color="{StaticResource SemiBlue6Color}" />
|
<SolidColorBrush x:Key="SemiColorInformationPointerover" Color="{StaticResource SemiBlue6Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorInformationPressed" Color="{StaticResource SemiBlue7Color}" />
|
<SolidColorBrush x:Key="SemiColorInformationPressed" Color="{StaticResource SemiBlue7Color}" />
|
||||||
|
<SolidColorBrush x:Key="SemiColorInformationActive" Color="{StaticResource SemiBlue7Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorInformationDisabled" Color="{StaticResource SemiBlue2Color}" />
|
<SolidColorBrush x:Key="SemiColorInformationDisabled" Color="{StaticResource SemiBlue2Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorInformationLight" Color="{StaticResource SemiBlue0Color}" />
|
<SolidColorBrush x:Key="SemiColorInformationLight" Color="{StaticResource SemiBlue0Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorInformationLightPointerover" Color="{StaticResource SemiBlue1Color}" />
|
<SolidColorBrush x:Key="SemiColorInformationLightPointerover" Color="{StaticResource SemiBlue1Color}" />
|
||||||
@ -357,6 +361,7 @@
|
|||||||
<SolidColorBrush x:Key="SemiColorSuccess" Color="{StaticResource SemiGreen5Color}" />
|
<SolidColorBrush x:Key="SemiColorSuccess" Color="{StaticResource SemiGreen5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSuccessPointerover" Color="{StaticResource SemiGreen6Color}" />
|
<SolidColorBrush x:Key="SemiColorSuccessPointerover" Color="{StaticResource SemiGreen6Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSuccessPressed" Color="{StaticResource SemiGreen7Color}" />
|
<SolidColorBrush x:Key="SemiColorSuccessPressed" Color="{StaticResource SemiGreen7Color}" />
|
||||||
|
<SolidColorBrush x:Key="SemiColorSuccessActive" Color="{StaticResource SemiGreen7Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSuccessDisabled" Color="{StaticResource SemiGreen2Color}" />
|
<SolidColorBrush x:Key="SemiColorSuccessDisabled" Color="{StaticResource SemiGreen2Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSuccessLight" Color="{StaticResource SemiGreen0Color}" />
|
<SolidColorBrush x:Key="SemiColorSuccessLight" Color="{StaticResource SemiGreen0Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorSuccessLightPointerover" Color="{StaticResource SemiGreen1Color}" />
|
<SolidColorBrush x:Key="SemiColorSuccessLightPointerover" Color="{StaticResource SemiGreen1Color}" />
|
||||||
@ -365,6 +370,7 @@
|
|||||||
<SolidColorBrush x:Key="SemiColorWarning" Color="{StaticResource SemiOrange5Color}" />
|
<SolidColorBrush x:Key="SemiColorWarning" Color="{StaticResource SemiOrange5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorWarningPointerover" Color="{StaticResource SemiOrange6Color}" />
|
<SolidColorBrush x:Key="SemiColorWarningPointerover" Color="{StaticResource SemiOrange6Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorWarningPressed" Color="{StaticResource SemiOrange7Color}" />
|
<SolidColorBrush x:Key="SemiColorWarningPressed" Color="{StaticResource SemiOrange7Color}" />
|
||||||
|
<SolidColorBrush x:Key="SemiColorWarningActive" Color="{StaticResource SemiOrange7Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorWarningLight" Color="{StaticResource SemiOrange0Color}" />
|
<SolidColorBrush x:Key="SemiColorWarningLight" Color="{StaticResource SemiOrange0Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorWarningLightPointerover" Color="{StaticResource SemiOrange1Color}" />
|
<SolidColorBrush x:Key="SemiColorWarningLightPointerover" Color="{StaticResource SemiOrange1Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorWarningLightActive" Color="{StaticResource SemiOrange2Color}" />
|
<SolidColorBrush x:Key="SemiColorWarningLightActive" Color="{StaticResource SemiOrange2Color}" />
|
||||||
@ -372,6 +378,7 @@
|
|||||||
<SolidColorBrush x:Key="SemiColorDanger" Color="{StaticResource SemiRed5Color}" />
|
<SolidColorBrush x:Key="SemiColorDanger" Color="{StaticResource SemiRed5Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorDangerPointerover" Color="{StaticResource SemiRed6Color}" />
|
<SolidColorBrush x:Key="SemiColorDangerPointerover" Color="{StaticResource SemiRed6Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorDangerPressed" Color="{StaticResource SemiRed7Color}" />
|
<SolidColorBrush x:Key="SemiColorDangerPressed" Color="{StaticResource SemiRed7Color}" />
|
||||||
|
<SolidColorBrush x:Key="SemiColorDangerActive" Color="{StaticResource SemiRed7Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorDangerLight" Color="{StaticResource SemiRed0Color}" />
|
<SolidColorBrush x:Key="SemiColorDangerLight" Color="{StaticResource SemiRed0Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorDangerLightPointerover" Color="{StaticResource SemiRed1Color}" />
|
<SolidColorBrush x:Key="SemiColorDangerLightPointerover" Color="{StaticResource SemiRed1Color}" />
|
||||||
<SolidColorBrush x:Key="SemiColorDangerLightActive" Color="{StaticResource SemiRed2Color}" />
|
<SolidColorBrush x:Key="SemiColorDangerLightActive" Color="{StaticResource SemiRed2Color}" />
|
||||||
|
9
src/Semi.Avalonia/Themes/Light/Palette.axaml.cs
Normal file
9
src/Semi.Avalonia/Themes/Light/Palette.axaml.cs
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
|
namespace Semi.Avalonia.Light;
|
||||||
|
|
||||||
|
public class Palette: ResourceDictionary
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
@ -9,5 +9,7 @@
|
|||||||
<SolidColorBrush x:Key="ProgressBarTertiaryForeground" Color="#6B7075" />
|
<SolidColorBrush x:Key="ProgressBarTertiaryForeground" Color="#6B7075" />
|
||||||
<SolidColorBrush x:Key="ProgressBarSuccessForeground" Color="#3BB346" />
|
<SolidColorBrush x:Key="ProgressBarSuccessForeground" Color="#3BB346" />
|
||||||
<SolidColorBrush x:Key="ProgressBarWarningForeground" Color="#FC8800" />
|
<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" />
|
<SolidColorBrush x:Key="ProgressBarErrorForeground" Color="#F93920" />
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
@ -7,10 +7,10 @@
|
|||||||
<SolidColorBrush x:Key="TextBlockWarningForeground" Color="#FC8800" />
|
<SolidColorBrush x:Key="TextBlockWarningForeground" Color="#FC8800" />
|
||||||
<SolidColorBrush x:Key="TextBlockDangerForeground" Color="#F93920" />
|
<SolidColorBrush x:Key="TextBlockDangerForeground" Color="#F93920" />
|
||||||
<SolidColorBrush x:Key="TextBlockDisabledForeground" Opacity="0.35" Color="#1C1F23" />
|
<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="TextBlockMarkBackground" Color="#EAF5FF" />
|
||||||
<SolidColorBrush x:Key="TextBlockCodeBackground" Opacity="0.1" Color="#2E3238" />
|
<SolidColorBrush x:Key="TextBlockCodeForeground" Opacity="0.62" Color="#1C1F23" />
|
||||||
<SolidColorBrush x:Key="TextBlockCodeBorderBrush" Opacity="0.2" Color="#2E3238" />
|
<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" />
|
<SolidColorBrush x:Key="TextBlockSelectionBackground" Opacity="0.2" Color="#0077FA" />
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
@ -2,7 +2,6 @@
|
|||||||
<SolidColorBrush x:Key="ToggleButtonDefaultBackground" Opacity="0.05" Color="#2E3238" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultBackground" Opacity="0.05" Color="#2E3238" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultPointeroverBackground" Opacity="0.09" Color="#2E3238" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultPointeroverBackground" Opacity="0.09" Color="#2E3238" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultPressedBackground" Opacity="0.13" 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="ToggleButtonDefaultDisabledBorderBrush" Color="Transparent" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledForeground" Opacity="0.35" Color="#1C1F23" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledForeground" Opacity="0.35" Color="#1C1F23" />
|
||||||
|
|
||||||
@ -10,7 +9,7 @@
|
|||||||
|
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultPrimaryForeground" Color="#0077FA" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultPrimaryForeground" Color="#0077FA" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultSecondaryForeground" Color="#0095EE" />
|
<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="ToggleButtonDefaultSuccessForeground" Color="#3BB346" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultWarningForeground" Color="#FC8800" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultWarningForeground" Color="#FC8800" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultDangerForeground" Color="#F93920" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultDangerForeground" Color="#F93920" />
|
||||||
@ -37,6 +36,7 @@
|
|||||||
<SolidColorBrush x:Key="ToggleButtonDangerCheckedPressedBackground" Color="#B2140C" />
|
<SolidColorBrush x:Key="ToggleButtonDangerCheckedPressedBackground" Color="#B2140C" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="ToggleButtonCheckedForeground" Color="White" />
|
<SolidColorBrush x:Key="ToggleButtonCheckedForeground" Color="White" />
|
||||||
|
<SolidColorBrush x:Key="ToggleButtonCheckedDisabledBackground" Color="#E6E8EA" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="ToggleButtonPrimaryIndeterminateBackground" Color="#EAF5FF" />
|
<SolidColorBrush x:Key="ToggleButtonPrimaryIndeterminateBackground" Color="#EAF5FF" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonSecondaryIndeterminateBackground" Color="#E9F7FD" />
|
<SolidColorBrush x:Key="ToggleButtonSecondaryIndeterminateBackground" Color="#E9F7FD" />
|
||||||
|
@ -6,10 +6,8 @@
|
|||||||
|
|
||||||
<SolidColorBrush x:Key="ToggleSwitchContainerUnCheckedDisabledBorderBrush" Opacity="0.09" Color="#1C1F23" />
|
<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="ToggleSwitchContainerCheckedPointeroverBackground" Color="#30953B" />
|
||||||
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedPressedBackground" Color="#25772F" />
|
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedPressedBackground" Color="#25772F" />
|
||||||
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedDisabledBackground" Color="#A4E0A7" />
|
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedDisabledBackground" Color="#A4E0A7" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="ToggleSwitchIndicatorBorderBrush" Opacity="0.09" Color="#1C1F23" />
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
@ -2,8 +2,8 @@
|
|||||||
<Styles.Resources>
|
<Styles.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
<ResourceDictionary.ThemeDictionaries>
|
<ResourceDictionary.ThemeDictionaries>
|
||||||
<MergeResourceInclude x:Key="Default" Source="avares://Semi.Avalonia/Themes/Light/_index.axaml" />
|
<ResourceInclude 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="Dark" Source="avares://Semi.Avalonia/Themes/Dark/_index.axaml" />
|
||||||
</ResourceDictionary.ThemeDictionaries>
|
</ResourceDictionary.ThemeDictionaries>
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/_index.axaml" />
|
<ResourceInclude Source="avares://Semi.Avalonia/Controls/_index.axaml" />
|
||||||
|
@ -4,15 +4,16 @@ using System.Globalization;
|
|||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
using Avalonia.Styling;
|
using Avalonia.Styling;
|
||||||
|
using Semi.Avalonia.Locale;
|
||||||
|
|
||||||
namespace Semi.Avalonia;
|
namespace Semi.Avalonia;
|
||||||
|
|
||||||
public class SemiTheme: Styles
|
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("zh-cn"), new zh_cn() },
|
||||||
{ new CultureInfo("en-US"), "avares://Semi.Avalonia/Locale/en-US.axaml" },
|
{ new CultureInfo("en-us"), new en_us() },
|
||||||
};
|
};
|
||||||
|
|
||||||
private readonly IServiceProvider? sp;
|
private readonly IServiceProvider? sp;
|
||||||
@ -30,26 +31,24 @@ public class SemiTheme: Styles
|
|||||||
{
|
{
|
||||||
_locale = value;
|
_locale = value;
|
||||||
var resource = TryGetLocaleResource(value);
|
var resource = TryGetLocaleResource(value);
|
||||||
var d = AvaloniaXamlLoader.Load(sp, new Uri(resource)) as ResourceDictionary;
|
if(resource is null) return;
|
||||||
if (d is null) return;
|
foreach (var kv in resource)
|
||||||
foreach (var kv in d)
|
|
||||||
{
|
{
|
||||||
this.Resources.Add(kv);
|
this.Resources.Add(kv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string TryGetLocaleResource(CultureInfo? locale)
|
private static ResourceDictionary? TryGetLocaleResource(CultureInfo? locale)
|
||||||
{
|
{
|
||||||
if (locale is null)
|
if (locale is null)
|
||||||
{
|
{
|
||||||
return _localeToResource[new CultureInfo("zh-CN")];
|
return _localeToResource[new CultureInfo("zh-cn")];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_localeToResource.TryGetValue(locale, out var resource))
|
if (_localeToResource.TryGetValue(locale, out var resource))
|
||||||
{
|
{
|
||||||
return resource;
|
return resource;
|
||||||
}
|
}
|
||||||
return _localeToResource[new CultureInfo("zh-CN")];
|
return _localeToResource[new CultureInfo("zh-cn")];
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -8,6 +8,9 @@
|
|||||||
<x:Double x:Key="ToggleSwitchIndicatorDefaultWidth">18</x:Double>
|
<x:Double x:Key="ToggleSwitchIndicatorDefaultWidth">18</x:Double>
|
||||||
<x:Double x:Key="ToggleSwitchIndicatorSmallWidth">12</x:Double>
|
<x:Double x:Key="ToggleSwitchIndicatorSmallWidth">12</x:Double>
|
||||||
<x:Double x:Key="ToggleSwitchIndicatorLargeWidth">24</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="ToggleSwitchDefaultFontSize">12</x:Double>
|
||||||
<x:Double x:Key="ToggleSwitchLargeFontSize">14</x:Double>
|
<x:Double x:Key="ToggleSwitchLargeFontSize">14</x:Double>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user