Compare commits

..

1 Commits

Author SHA1 Message Date
rabbitism
cc7d55b49d feat: change render mode in browser demo. 2024-09-01 17:00:26 +08:00
158 changed files with 558 additions and 1551 deletions

View File

@@ -1,4 +1,4 @@
name: Pack Nuget name: Pack
on: on:
push: push:
@@ -7,8 +7,8 @@ on:
branches: [ "action/pack" ] branches: [ "action/pack" ]
jobs: jobs:
nuget: nuget_desktop:
runs-on: ubuntu-latest runs-on: windows-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4.1.1 uses: actions/checkout@v4.1.1
@@ -25,8 +25,34 @@ jobs:
- name: Nuget Semi.Avalonia.TreeDataGrid - name: Nuget Semi.Avalonia.TreeDataGrid
run: dotnet pack ./src/Semi.Avalonia.TreeDataGrid -o ./nugets run: dotnet pack ./src/Semi.Avalonia.TreeDataGrid -o ./nugets
- name: Desktop
run: dotnet publish ./demo/Semi.Avalonia.Demo.Desktop -r win-x64 -c Release /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true --self-contained true
- name: Upload a Build Artifact - name: Upload a Build Artifact
uses: actions/upload-artifact@v4.3.1 uses: actions/upload-artifact@v4.3.1
with: with:
name: nugets name: nuget_desktop
path: ./nugets path: |
./nugets
./**/publish/*.exe
android:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: CD Android
run: cd ./demo/Semi.Avalonia.Demo.Android
- name: Restore Dependencies
run: dotnet restore
- name: Build
run: dotnet publish ./demo/Semi.Avalonia.Demo.Android -c Release -f net8.0-android --no-restore
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.3.1
with:
name: android
path: ./**/publish/*Signed.apk

View File

@@ -1,92 +0,0 @@
name: Publish Demo
on:
push:
branches: [ "action/publish" ]
pull_request:
branches: [ "action/publish" ]
jobs:
windows:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Make upload directory
run: mkdir upload
- name: Publish win-x64
run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r win-x64 -c Release --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/win64
- name: Zip win-x64
run: |
$files = Get-ChildItem -Path ./publish/win64/* -Recurse -Exclude *.pdb
Compress-Archive -Path $files.FullName -DestinationPath ./upload/Semi.Avalonia.Demo.Desktop.win-x64.zip
- name: Enable Native AOT in .csproj
run: |
sed -i 's#<!--<PublishAot>true</PublishAot>-->#<PublishAot>true</PublishAot>#' demo/Semi.Avalonia.Demo.Desktop/Semi.Avalonia.Demo.Desktop.csproj
sed -i 's#<!--<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>-->#<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>#' demo/Semi.Avalonia.Demo.Desktop/Semi.Avalonia.Demo.Desktop.csproj
- name: Publish win-x64 AOT
run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r win-x64 -c Release -o ./publish/win64-aot
- name: Zip win-x64 AOT
run: |
$files = Get-ChildItem -Path ./publish/win64-aot/* -Recurse -Exclude *.pdb
Compress-Archive -Path $files.FullName -DestinationPath ./upload/Semi.Avalonia.Demo.Desktop.win-x64.NativeAOT.zip
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.3.1
with:
name: windows
path: ./upload
linux:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Make upload directory
run: mkdir upload
- name: Publish linux-x64
run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r linux-x64 -c Release --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/linux64
- name: Zip linux-x64
run: zip -j -r ./upload/Semi.Avalonia.Demo.Desktop.linux-x64.zip ./publish/linux64 -x "*.pdb"
- name: Publish linux-x64 DRM
run: dotnet publish demo/Semi.Avalonia.Demo.Drm -r linux-x64 -c Release --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/drm
- name: Zip linux-x64 DRM
run: zip -j -r ./upload/Semi.Avalonia.Demo.Drm.linux-x64.zip ./publish/drm -x "*.pdb"
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.3.1
with:
name: linux
path: ./upload
android:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: CD Android
run: cd ./demo/Semi.Avalonia.Demo.Android
- name: Restore Dependencies
run: dotnet restore
- name: Publish Android
run: dotnet publish demo/Semi.Avalonia.Demo.Android -c Release -f net8.0-android --no-restore -o ./publish
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.3.1
with:
name: android
path: ./publish/*Signed.apk

View File

@@ -26,13 +26,11 @@ dotnet add package Semi.Avalonia
Include Semi Design Styles in application: Include Semi Design Styles in application:
```xaml ```xaml
<Application <Application.Styles>
... <!-- You can still reference in old way. -->
xmlns:semi="https://irihi.tech/semi"> <!-- <StyleInclude Source="avares://Semi.Avalonia/Themes/Index.axaml" /> -->
<Application.Styles> <semi:SemiTheme Locale="zh-cn" />
<semi:SemiTheme Locale="zh-CN" /> </Application.Styles>
</Application.Styles>
</Application>
``` ```
That's all. That's all.

View File

@@ -26,13 +26,11 @@ dotnet add package Semi.Avalonia
在样式中引用 Semi 主题: 在样式中引用 Semi 主题:
```xaml ```xaml
<Application <Application.Styles>
... <!-- 您仍然可以使用旧版方式引用 -->
xmlns:semi="https://irihi.tech/semi"> <!-- <StyleInclude Source="avares://Semi.Avalonia/Themes/Index.axaml" /> -->
<Application.Styles> <semi:SemiTheme Locale="zh-cn" />
<semi:SemiTheme Locale="zh-CN" /> </Application.Styles>
</Application.Styles>
</Application>
``` ```
这样就可以了。 这样就可以了。

View File

@@ -1,6 +1,6 @@
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<AvaloniaVersion>11.2.0</AvaloniaVersion> <AvaloniaVersion>11.1.3</AvaloniaVersion>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@@ -5,8 +5,10 @@
<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-->
<!--<PublishAot>true</PublishAot>--> <!--
<!--<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>--> <PublishAot>true</PublishAot>
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
-->
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))"> <PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">

View File

@@ -5,8 +5,10 @@
<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-->
<!--<PublishAot>true</PublishAot>--> <!--
<!--<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>--> <PublishAot>true</PublishAot>
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
-->
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))"> <PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">

View File

@@ -11,7 +11,10 @@ internal sealed partial class Program
{ {
private static Task Main(string[] args) => BuildAvaloniaApp() private static Task Main(string[] args) => BuildAvaloniaApp()
.WithSourceHanSansCNFont() .WithSourceHanSansCNFont()
.StartBrowserAppAsync("out"); .StartBrowserAppAsync("out", new BrowserPlatformOptions
{
RenderingMode = [ BrowserRenderingMode.WebGL2, BrowserRenderingMode.WebGL1, BrowserRenderingMode.Software2D],
});
public static AppBuilder BuildAvaloniaApp() public static AppBuilder BuildAvaloniaApp()
=> AppBuilder.Configure<App>(); => AppBuilder.Configure<App>();

View File

@@ -7,6 +7,7 @@
x:DataType="viewModels:ColorItemViewModel"> x:DataType="viewModels:ColorItemViewModel">
<StreamGeometry x:Key="CopyIcon">M5 7C3.89543 7 3 7.89543 3 9V19C3 20.1046 3.89543 21 5 21H15C16.1046 21 17 20.1046 17 19V9C17 7.89543 16.1046 7 15 7H5Z,M7 4C7 2.89543 7.89543 2 9 2H20C21.1046 2 22 2.89543 22 4V15C22 16.1046 21.1046 17 20 17H19V8C19 6 18 5 16 5H7V4Z</StreamGeometry> <StreamGeometry x:Key="CopyIcon">M5 7C3.89543 7 3 7.89543 3 9V19C3 20.1046 3.89543 21 5 21H15C16.1046 21 17 20.1046 17 19V9C17 7.89543 16.1046 7 15 7H5Z,M7 4C7 2.89543 7.89543 2 9 2H20C21.1046 2 22 2.89543 22 4V15C22 16.1046 21.1046 17 20 17H19V8C19 6 18 5 16 5H7V4Z</StreamGeometry>
<ControlTheme x:Key="{x:Type controls:ColorDetailControl}" TargetType="controls:ColorDetailControl"> <ControlTheme x:Key="{x:Type controls:ColorDetailControl}" TargetType="controls:ColorDetailControl">
<!-- Add Resources Here -->
<Setter Property="controls:ColorDetailControl.Template"> <Setter Property="controls:ColorDetailControl.Template">
<ControlTemplate TargetType="controls:ColorDetailControl"> <ControlTemplate TargetType="controls:ColorDetailControl">
<StackPanel> <StackPanel>

View File

@@ -5,7 +5,9 @@
xmlns:viewModels="clr-namespace:Semi.Avalonia.Demo.ViewModels" xmlns:viewModels="clr-namespace:Semi.Avalonia.Demo.ViewModels"
x:CompileBindings="True" x:CompileBindings="True"
x:DataType="viewModels:FunctionalColorGroupViewModel"> x:DataType="viewModels:FunctionalColorGroupViewModel">
<!-- Add Resources Here -->
<ControlTheme x:Key="{x:Type controls:FunctionalColorGroupControl}" TargetType="controls:FunctionalColorGroupControl"> <ControlTheme x:Key="{x:Type controls:FunctionalColorGroupControl}" TargetType="controls:FunctionalColorGroupControl">
<!-- Add Resources Here -->
<Setter Property="controls:FunctionalColorGroupControl.Template"> <Setter Property="controls:FunctionalColorGroupControl.Template">
<ControlTemplate x:DataType="viewModels:FunctionalColorGroupViewModel" TargetType="controls:FunctionalColorGroupControl"> <ControlTemplate x:DataType="viewModels:FunctionalColorGroupViewModel" TargetType="controls:FunctionalColorGroupControl">
<Grid RowDefinitions="Auto, *"> <Grid RowDefinitions="Auto, *">

View File

@@ -19,74 +19,42 @@
<ColorView ColorSpectrumShape="Box" /> <ColorView ColorSpectrumShape="Box" />
<ColorView Palette="{DynamicResource SemiColorPalette}" /> <ColorView Palette="{DynamicResource SemiColorPalette}" />
</StackPanel> </StackPanel>
<StackPanel VerticalAlignment="Top" Orientation="Horizontal"> <StackPanel
VerticalAlignment="Top"
Orientation="Horizontal">
<ColorView <ColorView
Name="SimpleColorViewTest" Name="SimpleColorViewTest"
HsvColor="hsv(120,11%,10%)" Theme="{StaticResource SimpleColorView}"
IsAlphaVisible="True" IsAlphaVisible="True"
Theme="{StaticResource SimpleColorView}" /> HsvColor="hsv(120,11%,10%)" />
<StackPanel> <StackPanel>
<TextBlock Text="{Binding #SimpleColorViewTest.HsvColor}" /> <TextBlock Text="{Binding #SimpleColorViewTest.HsvColor}" />
<TextBlock Text="{Binding #SimpleColorViewTest.Color}" /> <TextBlock Text="{Binding #SimpleColorViewTest.Color}" />
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal"> <StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
<ColorPicker Margin="8" ColorSpectrumShape="Ring"> <ColorPicker ColorSpectrumShape="Ring">
<ColorPicker.Palette> <ColorPicker.Palette>
<controls:FlatHalfColorPalette /> <controls:FlatHalfColorPalette />
</ColorPicker.Palette> </ColorPicker.Palette>
</ColorPicker> </ColorPicker>
<ColorPicker Margin="8" ColorSpectrumShape="Box"> <ColorPicker ColorSpectrumShape="Box">
<ColorPicker.Palette> <ColorPicker.Palette>
<colorPicker:SemiColorLightPalette /> <colorPicker:SemiColorLightPalette />
</ColorPicker.Palette> </ColorPicker.Palette>
</ColorPicker> </ColorPicker>
<ColorPicker <ColorPicker ColorSpectrumShape="Box" Theme="{DynamicResource HexColorPicker}">
Margin="8"
ColorSpectrumShape="Box"
Theme="{DynamicResource HexColorPicker}">
<ColorPicker.Palette> <ColorPicker.Palette>
<colorPicker:SemiColorLightPalette /> <colorPicker:SemiColorLightPalette />
</ColorPicker.Palette> </ColorPicker.Palette>
</ColorPicker> </ColorPicker>
</StackPanel> </StackPanel>
<StackPanel HorizontalAlignment="Left" >
<TextBlock Text="Use Style to customize button"></TextBlock>
<ColorPicker
Margin="8"
Width="32"
HsvColor="hsv(120,11%,10%)"
>
<ColorPicker.Content>
<Border
Margin="1"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="{Binding $parent[ColorPicker].HsvColor,
Converter={StaticResource ToBrushConverter}}"
CornerRadius="1" />
</ColorPicker.Content>
<ColorPicker.Styles>
<Style Selector="DropDownButton">
<Setter Property="Padding" Value="0"/>
<Style Selector="^ /template/ PathIcon">
<Setter Property="IsVisible" Value="False"/>
</Style>
</Style>
</ColorPicker.Styles>
</ColorPicker>
</StackPanel>
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal"> <StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
<ColorPicker <ColorPicker Theme="{StaticResource SimpleColorPicker}"
Margin="8" HsvColor="hsv(120,11%,10%)" />
HsvColor="hsv(120,11%,10%)" <ColorPicker Theme="{StaticResource HexSimpleColorPicker}"
Theme="{StaticResource SimpleColorPicker}" /> HsvColor="hsv(120,11%,10%)" />
<ColorPicker
Margin="8"
HsvColor="hsv(120,11%,10%)"
Theme="{StaticResource HexSimpleColorPicker}" />
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</ScrollViewer> </ScrollViewer>

View File

@@ -8,7 +8,7 @@
d:DesignWidth="800" d:DesignWidth="800"
mc:Ignorable="d"> mc:Ignorable="d">
<StackPanel Spacing="20"> <StackPanel Spacing="20">
<UniformGrid Rows="2" Columns="3" Width="500" HorizontalAlignment="Left"> <UniformGrid Rows="3" Columns="3" Width="500" HorizontalAlignment="Left">
<UniformGrid.Styles> <UniformGrid.Styles>
<Style Selector="RadioButton"> <Style Selector="RadioButton">
<Setter Property="Theme" Value="{DynamicResource PureCardRadioButton}" /> <Setter Property="Theme" Value="{DynamicResource PureCardRadioButton}" />

View File

@@ -13,16 +13,17 @@ public partial class PaletteDemo : UserControl
public PaletteDemo() public PaletteDemo()
{ {
InitializeComponent(); InitializeComponent();
this.DataContext = new PaletteDemoViewModel();
} }
protected override async void OnApplyTemplate(TemplateAppliedEventArgs e) protected override async void OnApplyTemplate(TemplateAppliedEventArgs e)
{ {
base.OnApplyTemplate(e); base.OnApplyTemplate(e);
PaletteDemoViewModel? vm = this.DataContext as PaletteDemoViewModel; PaletteDemoViewModel? vm = new PaletteDemoViewModel();
await Dispatcher.UIThread.InvokeAsync(() => await Dispatcher.UIThread.InvokeAsync(() =>
{ {
vm?.InitializeResources(); vm.InitializeResources();
}); });
DataContext = vm;
} }
} }

View File

@@ -9,7 +9,6 @@
mc:Ignorable="d"> mc:Ignorable="d">
<StackPanel Spacing="20"> <StackPanel Spacing="20">
<TimePicker /> <TimePicker />
<TimePicker UseSeconds="True" />
<TimePicker Classes="ClearButton" /> <TimePicker Classes="ClearButton" />
<TimePicker MinuteIncrement="15" /> <TimePicker MinuteIncrement="15" />
<TimePicker ClockIdentifier="24HourClock" /> <TimePicker ClockIdentifier="24HourClock" />

View File

@@ -1,6 +1,8 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- Add Resources Here -->
<ControlTheme x:Key="NavigationTab" TargetType="TabControl"> <ControlTheme x:Key="NavigationTab" TargetType="TabControl">
<Setter Property="TabControl.Template"> <Setter Property="TabControl.Template">
<!-- -->
<ControlTemplate TargetType="TabControl"> <ControlTemplate TargetType="TabControl">
<Border <Border
HorizontalAlignment="{TemplateBinding HorizontalAlignment}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}"

View File

@@ -1,4 +1,5 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- Add Resources Here -->
<ControlTheme x:Key="SplitViewToggleButton" TargetType="ToggleButton"> <ControlTheme x:Key="SplitViewToggleButton" TargetType="ToggleButton">
<Setter Property="ToggleButton.Template"> <Setter Property="ToggleButton.Template">
<ControlTemplate TargetType="ToggleButton"> <ControlTemplate TargetType="ToggleButton">

View File

@@ -5,11 +5,8 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:pages="using:Semi.Avalonia.Demo.Pages" xmlns:pages="using:Semi.Avalonia.Demo.Pages"
xmlns:views="clr-namespace:Semi.Avalonia.Demo.Views"
d:DesignHeight="450" d:DesignHeight="450"
d:DesignWidth="800" d:DesignWidth="800"
x:CompileBindings="True"
x:DataType="views:MainViewModel"
mc:Ignorable="d"> mc:Ignorable="d">
<UserControl.Resources> <UserControl.Resources>
<ResourceDictionary> <ResourceDictionary>
@@ -39,29 +36,43 @@
Margin="8,0" Margin="8,0"
VerticalAlignment="Center" VerticalAlignment="Center"
Classes="Secondary" Classes="Secondary"
Text="{ReflectionBinding #tab.SelectedItem.Header}" /> Text="{Binding #tab.SelectedItem.Header}" />
</StackPanel> </StackPanel>
<StackPanel Grid.Column="1" Orientation="Horizontal"> <StackPanel Grid.Column="1" Orientation="Horizontal">
<Button Click="OpenDocumentation" Theme="{DynamicResource BorderlessButton}"> <Button Theme="{DynamicResource BorderlessButton}" Click="OpenDocumentation">
<PathIcon <PathIcon
Width="16" Width="16"
Height="16" Height="16"
Data="M12 21.5C10.65 20.65 8.2 20 6.5 20C4.85 20 3.15 20.3 1.75 21.05C1.65 21.1 1.6 21.1 1.5 21.1C1.25 21.1 1 20.85 1 20.6V6C1.6 5.55 2.25 5.25 3 5C4.11 4.65 5.33 4.5 6.5 4.5C8.45 4.5 10.55 4.9 12 6C13.45 4.9 15.55 4.5 17.5 4.5C18.67 4.5 19.89 4.65 21 5C21.75 5.25 22.4 5.55 23 6V20.6C23 20.85 22.75 21.1 22.5 21.1C22.4 21.1 22.35 21.1 22.25 21.05C20.85 20.3 19.15 20 17.5 20C15.8 20 13.35 20.65 12 21.5M12 8V19.5C13.35 18.65 15.8 18 17.5 18C18.7 18 19.9 18.15 21 18.5V7C19.9 6.65 18.7 6.5 17.5 6.5C15.8 6.5 13.35 7.15 12 8M13 11.5C14.11 10.82 15.6 10.5 17.5 10.5C18.41 10.5 19.26 10.59 20 10.78V9.23C19.13 9.08 18.29 9 17.5 9C15.73 9 14.23 9.28 13 9.84V11.5M17.5 11.67C15.79 11.67 14.29 11.93 13 12.46V14.15C14.11 13.5 15.6 13.16 17.5 13.16C18.54 13.16 19.38 13.24 20 13.4V11.9C19.13 11.74 18.29 11.67 17.5 11.67M20 14.57C19.13 14.41 18.29 14.33 17.5 14.33C15.67 14.33 14.17 14.6 13 15.13V16.82C14.11 16.16 15.6 15.83 17.5 15.83C18.54 15.83 19.38 15.91 20 16.07V14.57Z" Data="M12 21.5C10.65 20.65 8.2 20 6.5 20C4.85 20 3.15 20.3 1.75 21.05C1.65 21.1 1.6 21.1 1.5 21.1C1.25 21.1 1 20.85 1 20.6V6C1.6 5.55 2.25 5.25 3 5C4.11 4.65 5.33 4.5 6.5 4.5C8.45 4.5 10.55 4.9 12 6C13.45 4.9 15.55 4.5 17.5 4.5C18.67 4.5 19.89 4.65 21 5C21.75 5.25 22.4 5.55 23 6V20.6C23 20.85 22.75 21.1 22.5 21.1C22.4 21.1 22.35 21.1 22.25 21.05C20.85 20.3 19.15 20 17.5 20C15.8 20 13.35 20.65 12 21.5M12 8V19.5C13.35 18.65 15.8 18 17.5 18C18.7 18 19.9 18.15 21 18.5V7C19.9 6.65 18.7 6.5 17.5 6.5C15.8 6.5 13.35 7.15 12 8M13 11.5C14.11 10.82 15.6 10.5 17.5 10.5C18.41 10.5 19.26 10.59 20 10.78V9.23C19.13 9.08 18.29 9 17.5 9C15.73 9 14.23 9.28 13 9.84V11.5M17.5 11.67C15.79 11.67 14.29 11.93 13 12.46V14.15C14.11 13.5 15.6 13.16 17.5 13.16C18.54 13.16 19.38 13.24 20 13.4V11.9C19.13 11.74 18.29 11.67 17.5 11.67M20 14.57C19.13 14.41 18.29 14.33 17.5 14.33C15.67 14.33 14.17 14.6 13 15.13V16.82C14.11 16.16 15.6 15.83 17.5 15.83C18.54 15.83 19.38 15.91 20 16.07V14.57Z"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" /> Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button> </Button>
<Button Click="OpenRepository" Theme="{DynamicResource BorderlessButton}"> <Button Theme="{DynamicResource BorderlessButton}" Click="OpenRepository">
<PathIcon <PathIcon
Width="16" Width="16"
Height="16" Height="16"
Data="M12,2A10,10 0 0,0 2,12C2,16.42 4.87,20.17 8.84,21.5C9.34,21.58 9.5,21.27 9.5,21C9.5,20.77 9.5,20.14 9.5,19.31C6.73,19.91 6.14,17.97 6.14,17.97C5.68,16.81 5.03,16.5 5.03,16.5C4.12,15.88 5.1,15.9 5.1,15.9C6.1,15.97 6.63,16.93 6.63,16.93C7.5,18.45 8.97,18 9.54,17.76C9.63,17.11 9.89,16.67 10.17,16.42C7.95,16.17 5.62,15.31 5.62,11.5C5.62,10.39 6,9.5 6.65,8.79C6.55,8.54 6.2,7.5 6.75,6.15C6.75,6.15 7.59,5.88 9.5,7.17C10.29,6.95 11.15,6.84 12,6.84C12.85,6.84 13.71,6.95 14.5,7.17C16.41,5.88 17.25,6.15 17.25,6.15C17.8,7.5 17.45,8.54 17.35,8.79C18,9.5 18.38,10.39 18.38,11.5C18.38,15.32 16.04,16.16 13.81,16.41C14.17,16.72 14.5,17.33 14.5,18.26C14.5,19.6 14.5,20.68 14.5,21C14.5,21.27 14.66,21.59 15.17,21.5C19.14,20.16 22,16.42 22,12A10,10 0 0,0 12,2Z" Data="M12,2A10,10 0 0,0 2,12C2,16.42 4.87,20.17 8.84,21.5C9.34,21.58 9.5,21.27 9.5,21C9.5,20.77 9.5,20.14 9.5,19.31C6.73,19.91 6.14,17.97 6.14,17.97C5.68,16.81 5.03,16.5 5.03,16.5C4.12,15.88 5.1,15.9 5.1,15.9C6.1,15.97 6.63,16.93 6.63,16.93C7.5,18.45 8.97,18 9.54,17.76C9.63,17.11 9.89,16.67 10.17,16.42C7.95,16.17 5.62,15.31 5.62,11.5C5.62,10.39 6,9.5 6.65,8.79C6.55,8.54 6.2,7.5 6.75,6.15C6.75,6.15 7.59,5.88 9.5,7.17C10.29,6.95 11.15,6.84 12,6.84C12.85,6.84 13.71,6.95 14.5,7.17C16.41,5.88 17.25,6.15 17.25,6.15C17.8,7.5 17.45,8.54 17.35,8.79C18,9.5 18.38,10.39 18.38,11.5C18.38,15.32 16.04,16.16 13.81,16.41C14.17,16.72 14.5,17.33 14.5,18.26C14.5,19.6 14.5,20.68 14.5,21C14.5,21.27 14.66,21.59 15.17,21.5C19.14,20.16 22,16.42 22,12A10,10 0 0,0 12,2Z"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" /> Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</Button> </Button>
<ComboBox <ToggleSwitch
MinWidth="100" Grid.Column="1"
PlaceholderText="Select a theme" Padding="4"
DisplayMemberBinding="{Binding Name}" IsCheckedChanged="ToggleButton_OnIsCheckedChanged"
ItemsSource="{Binding Themes}" Theme="{DynamicResource ButtonToggleSwitch}">
SelectedItem="{Binding SelectedTheme}" /> <ToggleSwitch.OnContent>
<PathIcon
Width="16"
Height="16"
Data="M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23ZM17 15C17.476 15 17.9408 14.9525 18.3901 14.862C17.296 17.3011 14.8464 19 12 19C8.13401 19 5 15.866 5 12C5 8.60996 7.40983 5.78277 10.6099 5.13803C10.218 6.01173 10 6.98041 10 8C10 11.866 13.134 15 17 15Z"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</ToggleSwitch.OnContent>
<ToggleSwitch.OffContent>
<PathIcon
Width="16"
Height="16"
Data="M3.55 19.09L4.96 20.5L6.76 18.71L5.34 17.29M12 6C8.69 6 6 8.69 6 12S8.69 18 12 18 18 15.31 18 12C18 8.68 15.31 6 12 6M20 13H23V11H20M17.24 18.71L19.04 20.5L20.45 19.09L18.66 17.29M20.45 5L19.04 3.6L17.24 5.39L18.66 6.81M13 1H11V4H13M6.76 5.39L4.96 3.6L3.55 5L5.34 6.81L6.76 5.39M1 13H4V11H1M13 20H11V23H13"
Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
</ToggleSwitch.OffContent>
</ToggleSwitch>
</StackPanel> </StackPanel>
</Grid> </Grid>

View File

@@ -1,10 +1,8 @@
using System; using System;
using System.Collections.ObjectModel;
using Avalonia; using Avalonia;
using Avalonia.Controls; using Avalonia.Controls;
using Avalonia.Interactivity; using Avalonia.Interactivity;
using Avalonia.Styling; using Avalonia.Styling;
using CommunityToolkit.Mvvm.ComponentModel;
namespace Semi.Avalonia.Demo.Views; namespace Semi.Avalonia.Demo.Views;
@@ -13,7 +11,6 @@ public partial class MainView : UserControl
public MainView() public MainView()
{ {
InitializeComponent(); InitializeComponent();
this.DataContext = new MainViewModel();
} }
private void ToggleButton_OnIsCheckedChanged(object sender, RoutedEventArgs e) private void ToggleButton_OnIsCheckedChanged(object sender, RoutedEventArgs e)
@@ -41,36 +38,4 @@ public partial class MainView : UserControl
var launcher = top.Launcher; var launcher = top.Launcher;
await launcher.LaunchUriAsync(new Uri("https://docs.irihi.tech/semi")); await launcher.LaunchUriAsync(new Uri("https://docs.irihi.tech/semi"));
} }
}
public partial class MainViewModel: ObservableObject
{
public ObservableCollection<ThemeItem> Themes { get; } = new()
{
new ThemeItem("Light", ThemeVariant.Light),
new ThemeItem("Dark", ThemeVariant.Dark),
new ThemeItem("Aquatic", SemiTheme.Aquatic),
new ThemeItem("Desert", SemiTheme.Desert),
new ThemeItem("Dust", SemiTheme.Dust),
new ThemeItem("NightSky", SemiTheme.NightSky),
};
[ObservableProperty] private ThemeItem? _selectedTheme;
partial void OnSelectedThemeChanged(ThemeItem? oldValue, ThemeItem? newValue)
{
if (newValue is null) return;
var app = Application.Current;
if (app is not null)
{
app.RequestedThemeVariant = newValue.Theme;
}
}
}
public class ThemeItem(string name, ThemeVariant theme)
{
public string Name { get; set; } = name;
public ThemeVariant Theme { get; set; } = theme;
} }

View File

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

View File

@@ -5,6 +5,7 @@
xmlns:converters="using:Avalonia.Controls.Converters" xmlns:converters="using:Avalonia.Controls.Converters"
xmlns:primitives="using:Avalonia.Controls.Primitives" xmlns:primitives="using:Avalonia.Controls.Primitives"
x:CompileBindings="True"> x:CompileBindings="True">
<!-- Add Resources Here -->
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<ResourceInclude Source="avares://Semi.Avalonia.ColorPicker/Controls/ColorPreviewer.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia.ColorPicker/Controls/ColorPreviewer.axaml" />
<ResourceInclude Source="avares://Semi.Avalonia.ColorPicker/Controls/ColorSlider.axaml" /> <ResourceInclude Source="avares://Semi.Avalonia.ColorPicker/Controls/ColorSlider.axaml" />
@@ -51,6 +52,7 @@
<DropDownButton <DropDownButton
Width="{TemplateBinding Width}" Width="{TemplateBinding Width}"
Height="{TemplateBinding Height}" Height="{TemplateBinding Height}"
Padding="0,0,10,0"
HorizontalContentAlignment="Stretch" HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
ClipToBounds="True" ClipToBounds="True"
@@ -472,10 +474,6 @@
</DropDownButton> </DropDownButton>
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
<Style Selector="^ /template/ DropDownButton">
<Setter Property="Padding" Value="0 0 10 0"></Setter>
</Style>
</ControlTheme> </ControlTheme>
<ControlTheme <ControlTheme
@@ -526,6 +524,7 @@
<DropDownButton <DropDownButton
Width="{TemplateBinding Width}" Width="{TemplateBinding Width}"
Height="{TemplateBinding Height}" Height="{TemplateBinding Height}"
Padding="0,0,10,0"
HorizontalContentAlignment="Stretch" HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
ClipToBounds="True" ClipToBounds="True"

View File

@@ -4,6 +4,7 @@
xmlns:converters="using:Avalonia.Controls.Converters" xmlns:converters="using:Avalonia.Controls.Converters"
xmlns:pc="using:Avalonia.Controls.Primitives.Converters" xmlns:pc="using:Avalonia.Controls.Primitives.Converters"
x:CompileBindings="True"> x:CompileBindings="True">
<!-- Add Resources Here -->
<pc:AccentColorConverter x:Key="AccentColorConverter" /> <pc:AccentColorConverter x:Key="AccentColorConverter" />
<converters:CornerRadiusFilterConverter x:Key="LeftCornerRadiusFilterConverter" Filter="TopLeft, BottomLeft" /> <converters:CornerRadiusFilterConverter x:Key="LeftCornerRadiusFilterConverter" Filter="TopLeft, BottomLeft" />
<converters:CornerRadiusFilterConverter x:Key="RightCornerRadiusFilterConverter" Filter="TopRight, BottomRight" /> <converters:CornerRadiusFilterConverter x:Key="RightCornerRadiusFilterConverter" Filter="TopRight, BottomRight" />

View File

@@ -3,6 +3,8 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="using:Avalonia.Controls.Converters" xmlns:converters="using:Avalonia.Controls.Converters"
x:CompileBindings="True"> x:CompileBindings="True">
<!-- Add Resources Here -->
<converters:CornerRadiusToDoubleConverter x:Key="TopLeftCornerRadiusConverter" Corner="TopLeft" /> <converters:CornerRadiusToDoubleConverter x:Key="TopLeftCornerRadiusConverter" Corner="TopLeft" />
<converters:CornerRadiusToDoubleConverter x:Key="BottomRightCornerRadiusConverter" Corner="BottomRight" /> <converters:CornerRadiusToDoubleConverter x:Key="BottomRightCornerRadiusConverter" Corner="BottomRight" />

View File

@@ -4,6 +4,7 @@
xmlns:controls="using:Avalonia.Controls" xmlns:controls="using:Avalonia.Controls"
xmlns:converters="using:Avalonia.Controls.Converters" xmlns:converters="using:Avalonia.Controls.Converters"
x:CompileBindings="True"> x:CompileBindings="True">
<!-- Add Resources Here -->
<converters:EnumToBoolConverter x:Key="EnumToBoolConverter" /> <converters:EnumToBoolConverter x:Key="EnumToBoolConverter" />
<converters:CornerRadiusToDoubleConverter x:Key="TopLeftCornerRadiusConverter" Corner="TopLeft" /> <converters:CornerRadiusToDoubleConverter x:Key="TopLeftCornerRadiusConverter" Corner="TopLeft" />
<converters:CornerRadiusToDoubleConverter x:Key="BottomRightCornerRadiusConverter" Corner="BottomRight" /> <converters:CornerRadiusToDoubleConverter x:Key="BottomRightCornerRadiusConverter" Corner="BottomRight" />

View File

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

View File

@@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:collections="using:Avalonia.Collections" xmlns:collections="using:Avalonia.Collections"
x:CompileBindings="True"> x:CompileBindings="True">
<!-- Add Resources Here -->
<ControlTheme x:Key="DataGridCellTextBlockTheme" TargetType="TextBlock"> <ControlTheme x:Key="DataGridCellTextBlockTheme" TargetType="TextBlock">
<Setter Property="Margin" Value="{DynamicResource DataGridCellTextBlockDefaultMargin}" /> <Setter Property="Margin" Value="{DynamicResource DataGridCellTextBlockDefaultMargin}" />
<Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="VerticalAlignment" Value="Center" />
@@ -406,11 +407,10 @@
Margin="4,0,0,0" Margin="4,0,0,0"
Foreground="{TemplateBinding Foreground}" Foreground="{TemplateBinding Foreground}"
IsVisible="{TemplateBinding IsPropertyNameVisible}" /> IsVisible="{TemplateBinding IsPropertyNameVisible}" />
<ContentControl <TextBlock
Name="PART_GroupKeyContentControl"
Margin="4,0,0,0" Margin="4,0,0,0"
Foreground="{TemplateBinding Foreground}" Foreground="{TemplateBinding Foreground}"
Content="{Binding Key}" /> Text="{Binding Key}" />
<TextBlock <TextBlock
Name="PART_ItemCountElement" Name="PART_ItemCountElement"
Margin="4,0,0,0" Margin="4,0,0,0"

View File

@@ -18,8 +18,8 @@
<SolidColorBrush x:Key="DataGridDetailsPresenterBackground" Color="Transparent" /> <SolidColorBrush x:Key="DataGridDetailsPresenterBackground" Color="Transparent" />
<SolidColorBrush x:Key="DataGridRowPointeroverBackground" Opacity="0.09" Color="#2E3238" /> <SolidColorBrush x:Key="DataGridRowPointeroverBackground" Opacity="0.09" Color="#2E3238" />
<SolidColorBrush x:Key="DataGridRowSelectedBackground" Color="#EAF5FF" /> <SolidColorBrush x:Key="DataGridRowSelectedBackground" Opacity="0.2" Color="#EAF5FF" />
<SolidColorBrush x:Key="DataGridRowSelectedPointeroverBackground" Color="#CBE7FE" /> <SolidColorBrush x:Key="DataGridRowSelectedPointeroverBackground" Opacity="0.3" Color="#CBE7FE" />
<SolidColorBrush x:Key="DataGridRowGroupHeaderExpandIconForeground" Opacity="0.62" Color="#1C1F23" /> <SolidColorBrush x:Key="DataGridRowGroupHeaderExpandIconForeground" Opacity="0.62" Color="#1C1F23" />
<SolidColorBrush x:Key="DataGridRowGroupHeaderBackground" Opacity="0.05" Color="#2E3238" /> <SolidColorBrush x:Key="DataGridRowGroupHeaderBackground" Opacity="0.05" Color="#2E3238" />

View File

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

View File

@@ -1,4 +1,5 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- Add Resources Here -->
<SolidColorBrush x:Key="TreeDataGridGridLinesBrush" Opacity="0.08" Color="White" /> <SolidColorBrush x:Key="TreeDataGridGridLinesBrush" Opacity="0.08" Color="White" />
<SolidColorBrush x:Key="TreeDataGridHeaderPointerOverBackground" Opacity="0.16" Color="White" /> <SolidColorBrush x:Key="TreeDataGridHeaderPointerOverBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="TreeDataGridHeaderPressedBackground" Opacity="0.20" Color="White" /> <SolidColorBrush x:Key="TreeDataGridHeaderPressedBackground" Opacity="0.20" Color="White" />

View File

@@ -1,4 +1,5 @@
<Styles xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Styles xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- Add Resources Here -->
<Styles.Resources> <Styles.Resources>
<ResourceDictionary> <ResourceDictionary>
<ResourceDictionary.ThemeDictionaries> <ResourceDictionary.ThemeDictionaries>

View File

@@ -1,4 +1,5 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- Add Resources Here -->
<SolidColorBrush x:Key="TreeDataGridGridLinesBrush" Opacity="0.08" Color="#1C1F23" /> <SolidColorBrush x:Key="TreeDataGridGridLinesBrush" Opacity="0.08" Color="#1C1F23" />
<SolidColorBrush x:Key="TreeDataGridHeaderPointerOverBackground" Opacity="0.09" Color="#2E3238" /> <SolidColorBrush x:Key="TreeDataGridHeaderPointerOverBackground" Opacity="0.09" Color="#2E3238" />
<SolidColorBrush x:Key="TreeDataGridHeaderPressedBackground" Opacity="0.13" Color="#2E3238" /> <SolidColorBrush x:Key="TreeDataGridHeaderPressedBackground" Opacity="0.13" Color="#2E3238" />

View File

@@ -1,4 +1,5 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- Add Resources Here -->
<StreamGeometry x:Key="TreeDataGridSortIconDescendingPath"> <StreamGeometry x:Key="TreeDataGridSortIconDescendingPath">
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 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>

View File

@@ -2,6 +2,7 @@
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:conv="clr-namespace:Avalonia.Controls.Converters;assembly=Avalonia.Controls.TreeDataGrid"> xmlns:conv="clr-namespace:Avalonia.Controls.Converters;assembly=Avalonia.Controls.TreeDataGrid">
<!-- Add Resources Here -->
<Design.PreviewWith> <Design.PreviewWith>
<StackPanel Margin="20"> <StackPanel Margin="20">
<TreeDataGridColumnHeader Header="123" /> <TreeDataGridColumnHeader Header="123" />

View File

@@ -9,9 +9,9 @@
</StackPanel> </StackPanel>
</Design.PreviewWith> </Design.PreviewWith>
<ControlTheme x:Key="{x:Type AutoCompleteBox}" TargetType="AutoCompleteBox"> <ControlTheme x:Key="{x:Type AutoCompleteBox}" TargetType="AutoCompleteBox">
<Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="AutoCompleteBox.VerticalAlignment" Value="Center" />
<Setter Property="MinHeight" Value="{DynamicResource AutoCompleteBoxDefaultHeight}" /> <Setter Property="AutoCompleteBox.MinHeight" Value="{DynamicResource AutoCompleteBoxDefaultHeight}" />
<Setter Property="MaxDropDownHeight" Value="{DynamicResource AutoCompleteMaxDropdownHeight}" /> <Setter Property="AutoCompleteBox.MaxDropDownHeight" Value="{DynamicResource AutoCompleteMaxDropdownHeight}" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="AutoCompleteBox"> <ControlTemplate TargetType="AutoCompleteBox">
<DataValidationErrors> <DataValidationErrors>

View File

@@ -16,6 +16,11 @@
</StackPanel> </StackPanel>
</Design.PreviewWith> </Design.PreviewWith>
<ControlTheme x:Key="RadioButtonGroupBorder" TargetType="Border">
<Setter Property="Border.CornerRadius" Value="{DynamicResource RadioButtonGroupCornerRadius}" />
<Setter Property="Border.Background" Value="{DynamicResource RadioButtonGroupBackground}" />
</ControlTheme>
<ControlTheme x:Key="CardBorder" TargetType="Border"> <ControlTheme x:Key="CardBorder" TargetType="Border">
<Setter Property="Border.Padding" Value="{DynamicResource ThicknessCardPadding}" /> <Setter Property="Border.Padding" Value="{DynamicResource ThicknessCardPadding}" />
<Setter Property="Border.BorderBrush" Value="{DynamicResource BorderCardBorderBrush}" /> <Setter Property="Border.BorderBrush" Value="{DynamicResource BorderCardBorderBrush}" />

View File

@@ -113,7 +113,6 @@
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPointeroverBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPointeroverBorderBrush}" />
</Style> </Style>
<Style Selector="^:pressed /template/ ContentPresenter#PART_ContentPresenter"> <Style Selector="^:pressed /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidPrimaryPressedForeground}" />
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryPressedBackground}" /> <Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryPressedBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPressedBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPressedBorderBrush}" />
</Style> </Style>
@@ -129,7 +128,6 @@
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPointeroverBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPointeroverBorderBrush}" />
</Style> </Style>
<Style Selector="^:pressed /template/ ContentPresenter#PART_ContentPresenter"> <Style Selector="^:pressed /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidPrimaryPressedForeground}" />
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryPressedBackground}" /> <Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryPressedBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPressedBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPressedBorderBrush}" />
</Style> </Style>
@@ -211,9 +209,9 @@
</Style> </Style>
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter"> <Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidDisabledForeground}" /> <Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource ButtonSolidDisabledBackground}" /> <Setter Property="Background" Value="{DynamicResource ButtonSolidDisabledBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidDisabledBorderBrush}" /> <Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
</Style> </Style>
</ControlTheme> </ControlTheme>
@@ -254,12 +252,12 @@
BasedOn="{StaticResource {x:Type Button}}" BasedOn="{StaticResource {x:Type Button}}"
TargetType="Button"> TargetType="Button">
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter"> <Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderlessBorderBrush}" /> <Setter Property="Background" Value="Transparent" />
<Setter Property="Background" Value="{DynamicResource ButtonBorderlessBackground}" /> <Setter Property="BorderBrush" Value="Transparent" />
</Style> </Style>
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter"> <Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderlessBorderBrush}" /> <Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="Background" Value="{DynamicResource ButtonBorderlessBackground}" /> <Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" /> <Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
</Style> </Style>

View File

@@ -8,9 +8,9 @@
</StackPanel> </StackPanel>
</Design.PreviewWith> </Design.PreviewWith>
<ControlTheme x:Key="ButtonSpinnerRepeatButton" TargetType="RepeatButton"> <ControlTheme x:Key="ButtonSpinnerRepeatButton" TargetType="RepeatButton">
<Setter Property="Background" Value="{DynamicResource ButtonSpinnerRepeatButtonBackground}" /> <Setter Property="RepeatButton.Background" Value="{DynamicResource ButtonSpinnerRepeatButtonBackground}" />
<Setter Property="Cursor" Value="Hand" /> <Setter Property="RepeatButton.Cursor" Value="Hand" />
<Setter Property="Template"> <Setter Property="RepeatButton.Template">
<ControlTemplate> <ControlTemplate>
<ContentPresenter <ContentPresenter
x:Name="PART_ContentPresenter" x:Name="PART_ContentPresenter"
@@ -38,10 +38,10 @@
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="{x:Type ButtonSpinner}" TargetType="ButtonSpinner"> <ControlTheme x:Key="{x:Type ButtonSpinner}" TargetType="ButtonSpinner">
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSpinnerRepeatButtonBorderBrush}" /> <Setter Property="ButtonSpinner.BorderBrush" Value="{DynamicResource ButtonSpinnerRepeatButtonBorderBrush}" />
<Setter Property="BorderThickness" Value="0" /> <Setter Property="ButtonSpinner.BorderThickness" Value="0" />
<Setter Property="MinWidth" Value="300" /> <Setter Property="ButtonSpinner.MinWidth" Value="300" />
<Setter Property="Template"> <Setter Property="ButtonSpinner.Template">
<ControlTemplate TargetType="ButtonSpinner"> <ControlTemplate TargetType="ButtonSpinner">
<Grid ColumnDefinitions="Auto, *, Auto"> <Grid ColumnDefinitions="Auto, *, Auto">
<Border <Border
@@ -97,8 +97,5 @@
<Setter Property="Grid.Column" Value="0" /> <Setter Property="Grid.Column" Value="0" />
<Setter Property="Margin" Value="0 0 4 0" /> <Setter Property="Margin" Value="0 0 4 0" />
</Style> </Style>
<Style Selector="^:pointerover /template/ Border#ButtonGroup">
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSpinnerRepeatButtonPointeroverBorderBrush}"/>
</Style>
</ControlTheme> </ControlTheme>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -2,12 +2,14 @@
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">
<!-- Add Resources Here -->
<ControlTheme x:Key="{x:Type Calendar}" TargetType="Calendar"> <ControlTheme x:Key="{x:Type Calendar}" TargetType="Calendar">
<Setter Property="Foreground" Value="{DynamicResource CalendarForeground}" /> <Setter Property="Foreground" Value="{DynamicResource CalendarForeground}" />
<Setter Property="Background" Value="{DynamicResource CalendarBackground}" /> <Setter Property="Background" Value="{DynamicResource CalendarBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource CalendarBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource CalendarBorderBrush}" />
<Setter Property="BorderThickness" Value="{DynamicResource CalendarBorderThickness}" /> <Setter Property="BorderThickness" Value="{DynamicResource CalendarBorderThickness}" />
<Setter Property="CornerRadius" Value="{DynamicResource CalendarCornerRadius}" /> <Setter Property="Calendar.CornerRadius" Value="{DynamicResource CalendarCornerRadius}" />
<Setter Property="HorizontalAlignment" Value="Left" /> <Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Template"> <Setter Property="Template">
@@ -29,9 +31,9 @@
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="{x:Type CalendarItem}" TargetType="CalendarItem"> <ControlTheme x:Key="{x:Type CalendarItem}" TargetType="CalendarItem">
<Setter Property="MinWidth" Value="{DynamicResource CalendarMinWidth}" /> <Setter Property="CalendarItem.MinWidth" Value="{DynamicResource CalendarMinWidth}" />
<Setter Property="MinHeight" Value="{DynamicResource CalendarMinHeight}" /> <Setter Property="CalendarItem.MinHeight" Value="{DynamicResource CalendarMinHeight}" />
<Setter Property="DayTitleTemplate"> <Setter Property="CalendarItem.DayTitleTemplate">
<Template> <Template>
<TextBlock <TextBlock
HorizontalAlignment="Center" HorizontalAlignment="Center"
@@ -43,7 +45,7 @@
</Template> </Template>
</Setter> </Setter>
<Setter Property="Template"> <Setter Property="CalendarItem.Template">
<ControlTemplate TargetType="CalendarItem"> <ControlTemplate TargetType="CalendarItem">
<Border <Border
Padding="16" Padding="16"
@@ -144,13 +146,13 @@
<Setter Property="Foreground" Value="{DynamicResource CalendarItemCalendarButtonForeground}" /> <Setter Property="Foreground" Value="{DynamicResource CalendarItemCalendarButtonForeground}" />
<Setter Property="Background" Value="{DynamicResource CalendarItemCalendarButtonBackground}" /> <Setter Property="Background" Value="{DynamicResource CalendarItemCalendarButtonBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource CalendarItemCalendarButtonBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource CalendarItemCalendarButtonBorderBrush}" />
<Setter Property="CornerRadius" Value="{DynamicResource CalendarItemCalendarButtonCornerRadius}" /> <Setter Property="CalendarButton.CornerRadius" Value="{DynamicResource CalendarItemCalendarButtonCornerRadius}" />
<Setter Property="BorderThickness" Value="0" /> <Setter Property="BorderThickness" Value="0" />
<Setter Property="ClipToBounds" Value="False" /> <Setter Property="ClipToBounds" Value="False" />
<Setter Property="HorizontalContentAlignment" Value="Center" /> <Setter Property="CalendarButton.HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="CalendarButton.VerticalContentAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Stretch" /> <Setter Property="CalendarButton.HorizontalAlignment" Value="Stretch" />
<Setter Property="VerticalAlignment" Value="Stretch" /> <Setter Property="CalendarButton.VerticalAlignment" Value="Stretch" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="CalendarButton"> <ControlTemplate TargetType="CalendarButton">
<ContentControl <ContentControl

View File

@@ -2,6 +2,7 @@
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">
<!-- Add Resources Here -->
<ControlTheme x:Key="{x:Type CalendarDatePicker}" TargetType="CalendarDatePicker"> <ControlTheme x:Key="{x:Type CalendarDatePicker}" TargetType="CalendarDatePicker">
<Setter Property="Background" Value="{DynamicResource CalendarDatePickerBackground}" /> <Setter Property="Background" Value="{DynamicResource CalendarDatePickerBackground}" />
<Setter Property="Foreground" Value="{DynamicResource CalendarDatePickerForeground}" /> <Setter Property="Foreground" Value="{DynamicResource CalendarDatePickerForeground}" />
@@ -102,6 +103,7 @@
CornerRadius="{DynamicResource CalendarCornerRadius}"> CornerRadius="{DynamicResource CalendarCornerRadius}">
<Calendar <Calendar
Name="PART_Calendar" Name="PART_Calendar"
BorderThickness="0"
CornerRadius="{Binding $parent[Border].CornerRadius}" CornerRadius="{Binding $parent[Border].CornerRadius}"
DisplayDate="{TemplateBinding DisplayDate}" DisplayDate="{TemplateBinding DisplayDate}"
DisplayDateEnd="{TemplateBinding DisplayDateEnd}" DisplayDateEnd="{TemplateBinding DisplayDateEnd}"
@@ -139,7 +141,6 @@
<Style Selector="^:pointerover"> <Style Selector="^:pointerover">
<Style Selector="^ /template/ Border#Background"> <Style Selector="^ /template/ Border#Background">
<Setter Property="Background" Value="{DynamicResource CalendarDatePickerPointeroverBackground}" /> <Setter Property="Background" Value="{DynamicResource CalendarDatePickerPointeroverBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource CalendarDatePickerPointeroverBorderBrush}" />
</Style> </Style>
</Style> </Style>

View File

@@ -2,6 +2,8 @@
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">
<!-- Add Resources Here -->
<ControlTheme x:Key="CaptionButton" TargetType="Button"> <ControlTheme x:Key="CaptionButton" TargetType="Button">
<Setter Property="Background" Value="{DynamicResource CaptionButtonPointeroverBackground}" /> <Setter Property="Background" Value="{DynamicResource CaptionButtonPointeroverBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource CaptionButtonPressedBackground}" /> <Setter Property="BorderBrush" Value="{DynamicResource CaptionButtonPressedBackground}" />

View File

@@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="clr-namespace:Semi.Avalonia.Converters" xmlns:converters="clr-namespace:Semi.Avalonia.Converters"
x:CompileBindings="True"> x:CompileBindings="True">
<!-- Add Resources Here -->
<converters:ItemToObjectConverter x:Key="ItemsConverter" /> <converters:ItemToObjectConverter x:Key="ItemsConverter" />
<ControlTheme x:Key="{x:Type Carousel}" TargetType="Carousel"> <ControlTheme x:Key="{x:Type Carousel}" TargetType="Carousel">
<Setter Property="Template"> <Setter Property="Template">
@@ -12,7 +13,6 @@
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
BringIntoViewOnFocusChange="True"
HorizontalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Hidden"
VerticalScrollBarVisibility="Hidden"> VerticalScrollBarVisibility="Hidden">
<ItemsPresenter <ItemsPresenter
@@ -66,7 +66,8 @@
Name="Container" Name="Container"
Width="{DynamicResource CarouselIndicatorLineWidth}" Width="{DynamicResource CarouselIndicatorLineWidth}"
Height="{DynamicResource CarouselIndicatorLineHeight}" Height="{DynamicResource CarouselIndicatorLineHeight}"
Background="{TemplateBinding Background}" /> Background="{TemplateBinding Background}">
</Border>
</Border> </Border>
</Panel> </Panel>
</ControlTemplate> </ControlTemplate>
@@ -89,7 +90,8 @@
<ControlTemplate TargetType="ListBoxItem"> <ControlTemplate TargetType="ListBoxItem">
<Panel Background="Transparent"> <Panel Background="Transparent">
<Border Padding="2,0" Background="Transparent"> <Border Padding="2,0" Background="Transparent">
<Border Width="{DynamicResource CarouselIndicatorColumnarWidth}" Height="{DynamicResource CarouselIndicatorColumnarSelectedHeight}"> <Border Width="{DynamicResource CarouselIndicatorColumnarWidth}"
Height="{DynamicResource CarouselIndicatorColumnarSelectedHeight}">
<Rectangle <Rectangle
Name="Container" Name="Container"
Width="{DynamicResource CarouselIndicatorColumnarWidth}" Width="{DynamicResource CarouselIndicatorColumnarWidth}"
@@ -98,7 +100,7 @@
Fill="{TemplateBinding Background}"> Fill="{TemplateBinding Background}">
<Rectangle.Transitions> <Rectangle.Transitions>
<Transitions> <Transitions>
<DoubleTransition Property="Height" Duration="0:0:0.2" /> <DoubleTransition Property="Height" Duration="0:0:0.2"></DoubleTransition>
</Transitions> </Transitions>
</Rectangle.Transitions> </Rectangle.Transitions>
</Rectangle> </Rectangle>

View File

@@ -2,27 +2,19 @@
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">
<Design.PreviewWith>
<ThemeVariantScope RequestedThemeVariant="Dark">
<StackPanel Background="{DynamicResource SemiBackground0Color}">
<CheckBox>Hello</CheckBox>
<CheckBox>Hello</CheckBox>
<CheckBox Theme="{DynamicResource CardCheckBox}">Hello</CheckBox>
<CheckBox Theme="{DynamicResource PureCardCheckBox}">Hello</CheckBox>
</StackPanel>
</ThemeVariantScope>
</Design.PreviewWith>
<ControlTheme x:Key="{x:Type CheckBox}" TargetType="CheckBox"> <ControlTheme x:Key="{x:Type CheckBox}" TargetType="CheckBox">
<Setter Property="Padding" Value="8,0,0,0" />
<Setter Property="HorizontalAlignment" Value="Left" /> <Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Top" /> <Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="HorizontalContentAlignment" Value="Left" /> <Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="FontSize" Value="{DynamicResource CheckBoxFontSize}" /> <Setter Property="FontSize" Value="{DynamicResource CheckBoxFontSize}" />
<Setter Property="CornerRadius" Value="{DynamicResource CheckBoxBoxCornerRadius}" />
<Setter Property="MinHeight" Value="32" />
<Setter Property="Foreground" Value="{DynamicResource CheckBoxForeground}" /> <Setter Property="Foreground" Value="{DynamicResource CheckBoxForeground}" />
<Setter Property="Background" Value="{DynamicResource CheckBoxDefaultBackground}" /> <Setter Property="Background" Value="{DynamicResource CheckBoxDefaultBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxDefaultBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource CheckBoxDefaultBorderBrush}" />
<Setter Property="CornerRadius" Value="{DynamicResource CheckBoxBoxCornerRadius}" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="CheckBox"> <ControlTemplate TargetType="CheckBox">
<Border <Border
@@ -31,11 +23,12 @@
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}"> CornerRadius="{TemplateBinding CornerRadius}">
<Grid ColumnDefinitions="Auto,*"> <Grid x:Name="RootGrid" ColumnDefinitions="Auto,*">
<Panel <Grid
Grid.Column="0" Grid.Column="0"
TemplatedControl.IsTemplateFocusTarget="True" TemplatedControl.IsTemplateFocusTarget="True"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> Margin="0,0,0,0"
VerticalAlignment="Center">
<Border <Border
x:Name="NormalRectangle" x:Name="NormalRectangle"
Width="{DynamicResource CheckBoxBoxWidth}" Width="{DynamicResource CheckBoxBoxWidth}"
@@ -46,21 +39,20 @@
CornerRadius="{TemplateBinding CornerRadius}" CornerRadius="{TemplateBinding CornerRadius}"
UseLayoutRounding="False" /> UseLayoutRounding="False" />
<PathIcon <PathIcon
x:Name="CheckGlyph" Name="CheckGlyph"
Width="{DynamicResource CheckBoxBoxGlyphWidth}" Width="{DynamicResource CheckBoxBoxGlyphWidth}"
Height="{DynamicResource CheckBoxBoxGlyphHeight}" Height="{DynamicResource CheckBoxBoxGlyphHeight}"
Foreground="{DynamicResource CheckBoxGlyphFill}" /> Foreground="{DynamicResource CheckBoxGlyphFill}" />
</Panel> </Grid>
<ContentPresenter <ContentPresenter
x:Name="PART_ContentPresenter" x:Name="ContentPresenter"
Grid.Column="1" Grid.Column="1"
Margin="{DynamicResource CheckBoxContentMargin}" Margin="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" VerticalAlignment="Center"
Content="{TemplateBinding Content}" Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplate="{TemplateBinding ContentTemplate}"
IsVisible="{TemplateBinding Content,Converter={x:Static ObjectConverters.IsNotNull}}" IsVisible="{TemplateBinding Content,Converter={x:Static ObjectConverters.IsNotNull}}"
FontSize="{TemplateBinding FontSize}"
RecognizesAccessKey="True" RecognizesAccessKey="True"
TextWrapping="Wrap" /> TextWrapping="Wrap" />
</Grid> </Grid>
@@ -86,7 +78,7 @@
<!-- Unchecked Disabled state --> <!-- Unchecked Disabled state -->
<Style Selector="^:disabled"> <Style Selector="^:disabled">
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter"> <Style Selector="^ /template/ ContentPresenter#ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" /> <Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" />
</Style> </Style>
<Style Selector="^ /template/ Border#NormalRectangle"> <Style Selector="^ /template/ Border#NormalRectangle">
@@ -124,7 +116,7 @@
<!-- Checked Disabled State --> <!-- Checked Disabled State -->
<Style Selector="^:disabled"> <Style Selector="^:disabled">
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter"> <Style Selector="^ /template/ ContentPresenter#ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" /> <Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" />
</Style> </Style>
<Style Selector="^ /template/ Border#NormalRectangle"> <Style Selector="^ /template/ Border#NormalRectangle">
@@ -167,7 +159,7 @@
<!-- Checked Disabled State --> <!-- Checked Disabled State -->
<Style Selector="^:disabled"> <Style Selector="^:disabled">
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter"> <Style Selector="^ /template/ ContentPresenter#ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" /> <Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" />
</Style> </Style>
<Style Selector="^ /template/ Border#NormalRectangle"> <Style Selector="^ /template/ Border#NormalRectangle">
@@ -185,14 +177,14 @@
<ControlTheme x:Key="SimpleCheckBox" TargetType="CheckBox"> <ControlTheme x:Key="SimpleCheckBox" TargetType="CheckBox">
<Setter Property="HorizontalAlignment" Value="Left" /> <Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Top" /> <Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="HorizontalContentAlignment" Value="Left" /> <Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="FontSize" Value="{DynamicResource CheckBoxFontSize}" /> <Setter Property="FontSize" Value="{DynamicResource CheckBoxFontSize}" />
<Setter Property="CornerRadius" Value="{DynamicResource CheckBoxBoxCornerRadius}" />
<Setter Property="Foreground" Value="{DynamicResource CheckBoxForeground}" /> <Setter Property="Foreground" Value="{DynamicResource CheckBoxForeground}" />
<Setter Property="Background" Value="{DynamicResource CheckBoxDefaultBackground}" /> <Setter Property="Background" Value="{DynamicResource CheckBoxDefaultBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxDefaultBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource CheckBoxDefaultBorderBrush}" />
<Setter Property="CornerRadius" Value="{DynamicResource CheckBoxBoxCornerRadius}" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="CheckBox"> <ControlTemplate TargetType="CheckBox">
<Border <Border
@@ -201,11 +193,11 @@
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}"> CornerRadius="{TemplateBinding CornerRadius}">
<Grid ColumnDefinitions="Auto,*"> <Grid x:Name="RootGrid" ColumnDefinitions="Auto,*">
<Panel <Grid
Grid.Column="0" Grid.Column="0"
TemplatedControl.IsTemplateFocusTarget="True" Margin="0,0,0,0"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> VerticalAlignment="Center">
<Border <Border
x:Name="NormalRectangle" x:Name="NormalRectangle"
Width="{DynamicResource CheckBoxBoxWidth}" Width="{DynamicResource CheckBoxBoxWidth}"
@@ -216,11 +208,11 @@
CornerRadius="{TemplateBinding CornerRadius}" CornerRadius="{TemplateBinding CornerRadius}"
UseLayoutRounding="False" /> UseLayoutRounding="False" />
<PathIcon <PathIcon
x:Name="CheckGlyph" Name="CheckGlyph"
Width="{DynamicResource CheckBoxBoxGlyphWidth}" Width="{DynamicResource CheckBoxBoxGlyphWidth}"
Height="{DynamicResource CheckBoxBoxGlyphHeight}" Height="{DynamicResource CheckBoxBoxGlyphHeight}"
Foreground="{DynamicResource CheckBoxGlyphFill}" /> Foreground="{DynamicResource CheckBoxGlyphFill}" />
</Panel> </Grid>
</Grid> </Grid>
</Border> </Border>
</ControlTemplate> </ControlTemplate>
@@ -332,31 +324,27 @@
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="CardCheckBox" TargetType="CheckBox"> <ControlTheme x:Key="CardCheckBox" TargetType="CheckBox">
<Setter Property="HorizontalContentAlignment" Value="Left" /> <Setter Property="Cursor" Value="Hand" />
<Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Padding" Value="{DynamicResource CheckBoxCardPadding}" /> <Setter Property="Padding" Value="{DynamicResource CheckBoxCardPadding}" />
<Setter Property="FontSize" Value="{DynamicResource CheckBoxFontSize}" /> <Setter Property="BorderThickness" Value="{DynamicResource CheckBoxCardBorderThickness}" />
<Setter Property="CornerRadius" Value="{DynamicResource CheckBoxCardCornerRadius}" /> <Setter Property="CornerRadius" Value="{DynamicResource CheckBoxCardCornerRadius}" />
<Setter Property="Background" Value="Transparent" /> <Setter Property="Background" Value="Transparent" />
<Setter Property="BorderThickness" Value="{DynamicResource CheckBoxCardBorderThickness}" /> <Setter Property="CheckBox.Template">
<Setter Property="Cursor" Value="Hand" />
<Setter Property="Template">
<ControlTemplate TargetType="CheckBox"> <ControlTemplate TargetType="CheckBox">
<Border <Border
x:Name="RootBorder" Name="RootBorder"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}"> CornerRadius="{TemplateBinding CornerRadius}">
<Grid <Grid
x:Name="RootGrid"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
ColumnDefinitions="Auto,*"> ColumnDefinitions="Auto,*">
<Panel <Grid Grid.Column="0" VerticalAlignment="Top">
Grid.Column="0"
VerticalAlignment="Top"
Margin="{DynamicResource CheckBoxBoxMargin}">
<Border <Border
x:Name="NormalRectangle" x:Name="NormalRectangle"
Width="{DynamicResource CheckBoxBoxWidth}" Width="{DynamicResource CheckBoxBoxWidth}"
@@ -367,23 +355,21 @@
CornerRadius="{DynamicResource CheckBoxBoxCornerRadius}" CornerRadius="{DynamicResource CheckBoxBoxCornerRadius}"
UseLayoutRounding="False" /> UseLayoutRounding="False" />
<PathIcon <PathIcon
x:Name="CheckGlyph" Name="CheckGlyph"
Width="{DynamicResource CheckBoxBoxGlyphWidth}" Width="{DynamicResource CheckBoxBoxGlyphWidth}"
Height="{DynamicResource CheckBoxBoxGlyphHeight}" Height="{DynamicResource CheckBoxBoxGlyphHeight}"
Foreground="{DynamicResource CheckBoxGlyphFill}" /> Foreground="{DynamicResource CheckBoxGlyphFill}" />
</Panel>
</Grid>
<ContentPresenter <ContentPresenter
x:Name="PART_ContentPresenter" x:Name="ContentPresenter"
Grid.Column="1" Grid.Column="1"
Margin="{DynamicResource CheckBoxContentMargin}" Margin="8,0,0,0"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="Center"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding Content}" Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplate="{TemplateBinding ContentTemplate}"
Foreground="{TemplateBinding Foreground}" IsVisible="{TemplateBinding Content,
IsVisible="{TemplateBinding Content,Converter={x:Static ObjectConverters.IsNotNull}}" Converter={x:Static ObjectConverters.IsNotNull}}"
FontSize="{TemplateBinding FontSize}"
RecognizesAccessKey="True" RecognizesAccessKey="True"
TextWrapping="Wrap" /> TextWrapping="Wrap" />
</Grid> </Grid>
@@ -413,7 +399,7 @@
<!-- Unchecked Disabled state --> <!-- Unchecked Disabled state -->
<Style Selector="^:disabled"> <Style Selector="^:disabled">
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter"> <Style Selector="^ /template/ ContentPresenter#ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" /> <Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" />
</Style> </Style>
<Style Selector="^ /template/ Border#NormalRectangle"> <Style Selector="^ /template/ Border#NormalRectangle">
@@ -464,7 +450,7 @@
<Style Selector="^ /template/ Border#RootBorder"> <Style Selector="^ /template/ Border#RootBorder">
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedDisabledBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedDisabledBorderBrush}" />
</Style> </Style>
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter"> <Style Selector="^ /template/ ContentPresenter#ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" /> <Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" />
</Style> </Style>
<Style Selector="^ /template/ Border#NormalRectangle"> <Style Selector="^ /template/ Border#NormalRectangle">
@@ -519,7 +505,7 @@
<Style Selector="^ /template/ Border#RootBorder"> <Style Selector="^ /template/ Border#RootBorder">
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedDisabledBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedDisabledBorderBrush}" />
</Style> </Style>
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter"> <Style Selector="^ /template/ ContentPresenter#ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" /> <Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" />
</Style> </Style>
<Style Selector="^ /template/ Border#NormalRectangle"> <Style Selector="^ /template/ Border#NormalRectangle">
@@ -535,22 +521,20 @@
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="PureCardCheckBox" TargetType="CheckBox"> <ControlTheme x:Key="PureCardCheckBox" TargetType="CheckBox">
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Padding" Value="{DynamicResource CheckBoxCardPadding}" />
<Setter Property="FontSize" Value="{DynamicResource CheckBoxFontSize}" />
<Setter Property="CornerRadius" Value="{DynamicResource CheckBoxCardCornerRadius}" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderThickness" Value="{DynamicResource CheckBoxCardBorderThickness}" />
<Setter Property="Cursor" Value="Hand" /> <Setter Property="Cursor" Value="Hand" />
<Setter Property="Template"> <Setter Property="Padding" Value="{DynamicResource CheckBoxCardPadding}" />
<Setter Property="BorderThickness" Value="{DynamicResource CheckBoxCardBorderThickness}" />
<Setter Property="CornerRadius" Value="{DynamicResource CheckBoxCardCornerRadius}" />
<Setter Property="CheckBox.VerticalContentAlignment" Value="Center" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="CheckBox.Template">
<ControlTemplate TargetType="CheckBox"> <ControlTemplate TargetType="CheckBox">
<ContentPresenter <ContentPresenter
x:Name="PART_ContentPresenter" x:Name="PART_ContentPresenter"
Margin="{TemplateBinding Margin}"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
Foreground="{TemplateBinding Foreground}"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
@@ -558,8 +542,7 @@
ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplate="{TemplateBinding ContentTemplate}"
CornerRadius="{TemplateBinding CornerRadius}" CornerRadius="{TemplateBinding CornerRadius}"
RecognizesAccessKey="True" RecognizesAccessKey="True"
UseLayoutRounding="False" UseLayoutRounding="False" />
TextWrapping="Wrap" />
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>

View File

@@ -32,7 +32,6 @@
<Setter Property="FocusAdorner" Value="{x:Null}" /> <Setter Property="FocusAdorner" Value="{x:Null}" />
<Setter Property="MaxDropDownHeight" Value="504" /> <Setter Property="MaxDropDownHeight" Value="504" />
<Setter Property="Background" Value="{DynamicResource ComboBoxSelectorBackground}" /> <Setter Property="Background" Value="{DynamicResource ComboBoxSelectorBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource ComboBoxSelectorBorderBrush}" />
<Setter Property="BackgroundSizing" Value="OuterBorderEdge" /> <Setter Property="BackgroundSizing" Value="OuterBorderEdge" />
<Setter Property="BorderThickness" Value="1" /> <Setter Property="BorderThickness" Value="1" />
<Setter Property="Cursor" Value="Hand" /> <Setter Property="Cursor" Value="Hand" />
@@ -115,7 +114,8 @@
ClipToBounds="False" ClipToBounds="False"
InheritsTransform="True" InheritsTransform="True"
IsLightDismissEnabled="True" IsLightDismissEnabled="True"
IsOpen="{TemplateBinding IsDropDownOpen, Mode=TwoWay}" IsOpen="{TemplateBinding IsDropDownOpen,
Mode=TwoWay}"
PlacementTarget="Background" PlacementTarget="Background"
WindowManagerAddShadowHint="False"> WindowManagerAddShadowHint="False">
<Border <Border
@@ -194,7 +194,6 @@
<!-- Disabled State --> <!-- Disabled State -->
<Style Selector="^:disabled"> <Style Selector="^:disabled">
<Setter Property="Background" Value="{DynamicResource ComboBoxSelectorDisabledBackground}" /> <Setter Property="Background" Value="{DynamicResource ComboBoxSelectorDisabledBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource ComboBoxSelectorDisabledBorderBrush}" />
<Style Selector="^ /template/ ContentControl#ContentPresenter"> <Style Selector="^ /template/ ContentControl#ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource ComboBoxDisabledForeground}" /> <Setter Property="Foreground" Value="{DynamicResource ComboBoxDisabledForeground}" />
</Style> </Style>
@@ -300,12 +299,10 @@
</Setter> </Setter>
<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter"> <Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource ComboBoxItemPointeroverForeground}" />
<Setter Property="Background" Value="{DynamicResource ComboBoxItemPointeroverBackground}" /> <Setter Property="Background" Value="{DynamicResource ComboBoxItemPointeroverBackground}" />
</Style> </Style>
<Style Selector="^:focus /template/ ContentPresenter#PART_ContentPresenter"> <Style Selector="^:focus /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource ComboBoxItemFocusForeground}" />
<Setter Property="Background" Value="{DynamicResource ComboBoxItemFocusBackground}" /> <Setter Property="Background" Value="{DynamicResource ComboBoxItemFocusBackground}" />
</Style> </Style>
@@ -314,12 +311,10 @@
</Style> </Style>
<Style Selector="^:pressed /template/ ContentPresenter#PART_ContentPresenter"> <Style Selector="^:pressed /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource ComboBoxItemPressedForeground}" />
<Setter Property="Background" Value="{DynamicResource ComboBoxItemPressedBackground}" /> <Setter Property="Background" Value="{DynamicResource ComboBoxItemPressedBackground}" />
</Style> </Style>
<Style Selector="^:selected"> <Style Selector="^:selected">
<Setter Property="Foreground" Value="{DynamicResource ComboBoxItemSelectedForeground}" />
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter"> <Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Background" Value="{DynamicResource ComboBoxItemSelectedBackground}" /> <Setter Property="Background" Value="{DynamicResource ComboBoxItemSelectedBackground}" />
</Style> </Style>

View File

@@ -10,7 +10,6 @@
<Setter Property="ContextMenu.MaxWidth" Value="{DynamicResource MenuFlyoutMaxWidth}" /> <Setter Property="ContextMenu.MaxWidth" Value="{DynamicResource MenuFlyoutMaxWidth}" />
<Setter Property="ContextMenu.MinHeight" Value="{DynamicResource MenuFlyoutMinHeight}" /> <Setter Property="ContextMenu.MinHeight" Value="{DynamicResource MenuFlyoutMinHeight}" />
<Setter Property="ContextMenu.Padding" Value="{DynamicResource MenuFlyoutPadding}" /> <Setter Property="ContextMenu.Padding" Value="{DynamicResource MenuFlyoutPadding}" />
<Setter Property="Focusable" Value="True"></Setter>
<Setter Property="ContextMenu.HorizontalAlignment" Value="Stretch" /> <Setter Property="ContextMenu.HorizontalAlignment" Value="Stretch" />
<Setter Property="TextBlock.FontWeight" Value="Normal" /> <Setter Property="TextBlock.FontWeight" Value="Normal" />
<Setter Property="ContextMenu.WindowManagerAddShadowHint" Value="False" /> <Setter Property="ContextMenu.WindowManagerAddShadowHint" Value="False" />

View File

@@ -2,6 +2,7 @@
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:collections="clr-namespace:System.Collections;assembly=netstandard"> xmlns:collections="clr-namespace:System.Collections;assembly=netstandard">
<!-- Add Resources Here -->
<ControlTheme x:Key="{x:Type DataValidationErrors}" TargetType="DataValidationErrors"> <ControlTheme x:Key="{x:Type DataValidationErrors}" TargetType="DataValidationErrors">
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="DataValidationErrors"> <ControlTemplate TargetType="DataValidationErrors">

View File

@@ -2,14 +2,13 @@
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">
<!-- Add Resources Here -->
<ControlTheme x:Key="{x:Type DatePickerPresenter}" TargetType="DatePickerPresenter"> <ControlTheme x:Key="{x:Type DatePickerPresenter}" TargetType="DatePickerPresenter">
<Setter Property="Width" Value="296" /> <Setter Property="Width" Value="296" />
<Setter Property="MinWidth" Value="296" /> <Setter Property="MinWidth" Value="296" />
<Setter Property="MaxHeight" Value="300" /> <Setter Property="MaxHeight" Value="300" />
<Setter Property="FontWeight" Value="Normal" /> <Setter Property="FontWeight" Value="Normal" />
<Setter Property="Background" Value="{DynamicResource DateTimePickerPopupBackground}" /> <Setter Property="Background" Value="{DynamicResource DateTimePickerPopupBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource DateTimePickerPopupBorderBrush}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="CornerRadius" Value="6" /> <Setter Property="CornerRadius" Value="6" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="DatePickerPresenter"> <ControlTemplate TargetType="DatePickerPresenter">

View File

@@ -2,6 +2,8 @@
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">
<!-- Add Resources Here -->
<ControlTheme x:Key="DateTimePickerFlyoutButton" TargetType="Button"> <ControlTheme x:Key="DateTimePickerFlyoutButton" TargetType="Button">
<Setter Property="RenderTransform" Value="none" /> <Setter Property="RenderTransform" Value="none" />
<Setter Property="BackgroundSizing" Value="OuterBorderEdge" /> <Setter Property="BackgroundSizing" Value="OuterBorderEdge" />
@@ -24,7 +26,6 @@
<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter"> <Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Background" Value="{DynamicResource DateTimePickerButtonPointeroverBackground}" /> <Setter Property="Background" Value="{DynamicResource DateTimePickerButtonPointeroverBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource DateTimePickerButtonPointeroverBorderBrush}" />
</Style> </Style>
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter"> <Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">

View File

@@ -2,6 +2,7 @@
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">
<!-- Add Resources Here -->
<ControlTheme x:Key="{x:Type DropDownButton}" TargetType="DropDownButton"> <ControlTheme x:Key="{x:Type DropDownButton}" TargetType="DropDownButton">
<Setter Property="Background" Value="{DynamicResource ButtonDefaultBackground}" /> <Setter Property="Background" Value="{DynamicResource ButtonDefaultBackground}" />
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultPrimaryForeground}" /> <Setter Property="Foreground" Value="{DynamicResource ButtonDefaultPrimaryForeground}" />
@@ -229,11 +230,11 @@
</Style> </Style>
</Style> </Style>
<Style Selector="^:disabled /template/ Border#RootBorder"> <Style Selector="^:disabled /template/ Border#RootBorder">
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidDisabledBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource ButtonSolidDisabledBackground}" /> <Setter Property="Background" Value="{DynamicResource ButtonSolidDisabledBackground}" />
</Style> </Style>
<Style Selector="^:disabled"> <Style Selector="^:disabled">
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidDisabledForeground}" /> <Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
</Style> </Style>
</ControlTheme> </ControlTheme>

View File

@@ -1,4 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- Add Resources Here -->
<ControlTheme x:Key="{x:Type EmbeddableControlRoot}" TargetType="EmbeddableControlRoot"> <ControlTheme x:Key="{x:Type EmbeddableControlRoot}" TargetType="EmbeddableControlRoot">
<Setter Property="Background" Value="{DynamicResource WindowDefaultBackground}" /> <Setter Property="Background" Value="{DynamicResource WindowDefaultBackground}" />
<Setter Property="Foreground" Value="{DynamicResource WindowDefaultForeground}" /> <Setter Property="Foreground" Value="{DynamicResource WindowDefaultForeground}" />

View File

@@ -9,7 +9,7 @@
</StackPanel> </StackPanel>
</Design.PreviewWith> </Design.PreviewWith>
<ControlTheme x:Key="ExpanderHeaderToggleButtonTheme" TargetType="ToggleButton"> <ControlTheme x:Key="ExpanderHeaderToggleButtonTheme" TargetType="ToggleButton">
<Setter Property="Template"> <Setter Property="ToggleButton.Template">
<ControlTemplate TargetType="ToggleButton"> <ControlTemplate TargetType="ToggleButton">
<ContentPresenter <ContentPresenter
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
@@ -19,13 +19,13 @@
</Setter> </Setter>
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="{x:Type Expander}" TargetType="Expander"> <ControlTheme x:Key="{x:Type Expander}" TargetType="Expander">
<Setter Property="BorderThickness" Value="1" /> <Setter Property="Expander.BorderThickness" Value="1" />
<Setter Property="BorderBrush" Value="{DynamicResource ExpanderSeparatorBorderBrush}" /> <Setter Property="Expander.BorderBrush" Value="{DynamicResource ExpanderSeparatorBorderBrush}" />
<Setter Property="CornerRadius" Value="{DynamicResource ControlCornerRadius}" /> <Setter Property="Expander.CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
<Setter Property="HorizontalAlignment" Value="Stretch" /> <Setter Property="Expander.HorizontalAlignment" Value="Stretch" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" /> <Setter Property="Expander.HorizontalContentAlignment" Value="Stretch" />
<Setter Property="VerticalContentAlignment" Value="Stretch" /> <Setter Property="Expander.VerticalContentAlignment" Value="Stretch" />
<Setter Property="Template"> <Setter Property="Expander.Template">
<ControlTemplate TargetType="Expander"> <ControlTemplate TargetType="Expander">
<DockPanel> <DockPanel>
<LayoutTransformControl x:Name="ExpanderHeaderLayoutContainer" Margin="{DynamicResource ExpanderHeaderMargin}"> <LayoutTransformControl x:Name="ExpanderHeaderLayoutContainer" Margin="{DynamicResource ExpanderHeaderMargin}">
@@ -37,7 +37,8 @@
Background="{DynamicResource ExpanderHeaderDefaultBackground}" Background="{DynamicResource ExpanderHeaderDefaultBackground}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
IsChecked="{TemplateBinding IsExpanded, Mode=TwoWay}" IsChecked="{TemplateBinding IsExpanded,
Mode=TwoWay}"
IsEnabled="{TemplateBinding IsEnabled}" IsEnabled="{TemplateBinding IsEnabled}"
TextElement.FontWeight="{DynamicResource ExpanderHeaderFontWeight}" TextElement.FontWeight="{DynamicResource ExpanderHeaderFontWeight}"
TextElement.Foreground="{DynamicResource ExpanderHeaderForeground}" TextElement.Foreground="{DynamicResource ExpanderHeaderForeground}"
@@ -76,7 +77,8 @@
Content="{TemplateBinding Content}" Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplate="{TemplateBinding ContentTemplate}"
Foreground="{DynamicResource ExpanderContentForeground}" Foreground="{DynamicResource ExpanderContentForeground}"
IsVisible="{TemplateBinding IsExpanded, Mode=TwoWay}" /> IsVisible="{TemplateBinding IsExpanded,
Mode=TwoWay}" />
</Border> </Border>
</LayoutTransformControl> </LayoutTransformControl>
</DockPanel> </DockPanel>

View File

@@ -6,8 +6,8 @@
<Setter Property="Focusable" Value="True" /> <Setter Property="Focusable" Value="True" />
<Setter Property="MinWidth" Value="6" /> <Setter Property="MinWidth" Value="6" />
<Setter Property="MinHeight" Value="6" /> <Setter Property="MinHeight" Value="6" />
<Setter Property="ClipToBounds" Value="False" /> <Setter Property="GridSplitter.ClipToBounds" Value="False" />
<Setter Property="Padding" Value="2" /> <Setter Property="GridSplitter.Padding" Value="2" />
<Setter Property="Background" Value="{DynamicResource GridSplitterBackground}" /> <Setter Property="Background" Value="{DynamicResource GridSplitterBackground}" />
<Setter Property="PreviewContent"> <Setter Property="PreviewContent">
<Template> <Template>

View File

@@ -16,7 +16,7 @@
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" /> <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" /> <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
<Setter Property="ScrollViewer.IsScrollChainingEnabled" Value="True" /> <Setter Property="ScrollViewer.IsScrollChainingEnabled" Value="True" />
<Setter Property="Template"> <Setter Property="ListBox.Template">
<ControlTemplate TargetType="ListBox"> <ControlTemplate TargetType="ListBox">
<Border <Border
Name="border" Name="border"
@@ -43,10 +43,10 @@
</Setter> </Setter>
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="{x:Type ListBoxItem}" TargetType="ListBoxItem"> <ControlTheme x:Key="{x:Type ListBoxItem}" TargetType="ListBoxItem">
<Setter Property="Background" Value="{DynamicResource ListBoxItemDefaultBackground}" /> <Setter Property="ListBoxItem.Background" Value="{DynamicResource ListBoxItemDefaultBackground}" />
<Setter Property="Padding" Value="{DynamicResource ListBoxItemDefaultPadding}" /> <Setter Property="ListBoxItem.Padding" Value="{DynamicResource ListBoxItemDefaultPadding}" />
<Setter Property="CornerRadius" Value="{DynamicResource ListBoxItemCornerRadius}" /> <Setter Property="ListBoxItem.CornerRadius" Value="{DynamicResource ListBoxItemCornerRadius}" />
<Setter Property="Template"> <Setter Property="ListBoxItem.Template">
<ControlTemplate TargetType="ListBoxItem"> <ControlTemplate TargetType="ListBoxItem">
<ContentPresenter <ContentPresenter
Name="PART_ContentPresenter" Name="PART_ContentPresenter"
@@ -75,19 +75,16 @@
<!-- Pointerover State --> <!-- Pointerover State -->
<Style Selector="^:pointerover"> <Style Selector="^:pointerover">
<Setter Property="Foreground" Value="{DynamicResource ListBoxItemPointeroverForeground}" />
<Setter Property="Background" Value="{DynamicResource ListBoxItemPointeroverBackground}" /> <Setter Property="Background" Value="{DynamicResource ListBoxItemPointeroverBackground}" />
</Style> </Style>
<!-- Pressed State --> <!-- Pressed State -->
<Style Selector="^:pressed"> <Style Selector="^:pressed">
<Setter Property="Foreground" Value="{DynamicResource ListBoxItemPressedForeground}" />
<Setter Property="Background" Value="{DynamicResource ListBoxItemPressedBackground}" /> <Setter Property="Background" Value="{DynamicResource ListBoxItemPressedBackground}" />
</Style> </Style>
<!-- Selected State --> <!-- Selected State -->
<Style Selector="^:selected"> <Style Selector="^:selected">
<Setter Property="Foreground" Value="{DynamicResource ListBoxItemSelectedForeground}" />
<Setter Property="Background" Value="{DynamicResource ListBoxItemSelectedBackground}" /> <Setter Property="Background" Value="{DynamicResource ListBoxItemSelectedBackground}" />
<Style Selector="^:pointerover"> <Style Selector="^:pointerover">
<Setter Property="Background" <Setter Property="Background"
@@ -98,13 +95,13 @@
<!-- RadioGroup --> <!-- RadioGroup -->
<ControlTheme x:Key="RadioGroupListBox" TargetType="ListBox"> <ControlTheme x:Key="RadioGroupListBox" TargetType="ListBox">
<Setter Property="ItemContainerTheme" Value="{DynamicResource RadioGroupListBoxItem}" /> <Setter Property="ListBox.ItemContainerTheme" Value="{DynamicResource RadioGroupListBoxItem}" />
<Setter Property="ItemsPanel"> <Setter Property="ListBox.ItemsPanel">
<ItemsPanelTemplate> <ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" /> <StackPanel Orientation="Horizontal" />
</ItemsPanelTemplate> </ItemsPanelTemplate>
</Setter> </Setter>
<Setter Property="Template"> <Setter Property="ListBox.Template">
<ControlTemplate TargetType="ListBox"> <ControlTemplate TargetType="ListBox">
<Border <Border
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
@@ -120,17 +117,17 @@
</Setter> </Setter>
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="RadioGroupListBoxItem" TargetType="ListBoxItem"> <ControlTheme x:Key="RadioGroupListBoxItem" TargetType="ListBoxItem">
<Setter Property="HorizontalAlignment" Value="Left" /> <Setter Property="ListBoxItem.HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Top" /> <Setter Property="ListBoxItem.VerticalAlignment" Value="Top" />
<Setter Property="Cursor" Value="Hand" /> <Setter Property="ListBoxItem.Cursor" Value="Hand" />
<Setter Property="HorizontalContentAlignment" Value="Left" /> <Setter Property="ListBoxItem.HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="ListBoxItem.VerticalContentAlignment" Value="Center" />
<Setter Property="FontSize" Value="{DynamicResource ListBoxItemRadioGroupFontSize}" /> <Setter Property="ListBoxItem.FontSize" Value="{DynamicResource ListBoxItemRadioGroupFontSize}" />
<Setter Property="CornerRadius" Value="{DynamicResource ListBoxItemRadioGroupBoxCornerRadius}" /> <Setter Property="ListBoxItem.CornerRadius" Value="{DynamicResource ListBoxItemRadioGroupBoxCornerRadius}" />
<Setter Property="Foreground" Value="{DynamicResource ListBoxItemRadioGroupForeground}" /> <Setter Property="ListBoxItem.Foreground" Value="{DynamicResource ListBoxItemRadioGroupForeground}" />
<Setter Property="Background" Value="{DynamicResource ListBoxItemRadioGroupDefaultBackground}" /> <Setter Property="ListBoxItem.Background" Value="{DynamicResource ListBoxItemRadioGroupDefaultBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource ListBoxItemRadioGroupDefaultBorderBrush}" /> <Setter Property="ListBoxItem.BorderBrush" Value="{DynamicResource ListBoxItemRadioGroupDefaultBorderBrush}" />
<Setter Property="Template"> <Setter Property="ListBoxItem.Template">
<ControlTemplate TargetType="ListBoxItem"> <ControlTemplate TargetType="ListBoxItem">
<Border <Border
Name="RootBorder" Name="RootBorder"
@@ -283,18 +280,19 @@
<ControlTheme x:Key="ButtonRadioGroupListBox" <ControlTheme x:Key="ButtonRadioGroupListBox"
BasedOn="{StaticResource RadioGroupListBox}" BasedOn="{StaticResource RadioGroupListBox}"
TargetType="ListBox"> TargetType="ListBox">
<Setter Property="ItemContainerTheme" Value="{DynamicResource ButtonRadioGroupListBoxItem}" /> <Setter Property="ListBox.ItemContainerTheme" Value="{DynamicResource ButtonRadioGroupListBoxItem}" />
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="ButtonRadioGroupListBoxItem" TargetType="ListBoxItem"> <ControlTheme x:Key="ButtonRadioGroupListBoxItem" TargetType="ListBoxItem">
<Setter Property="CornerRadius" Value="{DynamicResource ListBoxItemRadioGroupButtonCornerRadius}" /> <Setter Property="ListBoxItem.CornerRadius" Value="{DynamicResource ListBoxItemRadioGroupButtonCornerRadius}" />
<Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="ListBoxItem.VerticalContentAlignment" Value="Center" />
<Setter Property="Margin" Value="2" /> <Setter Property="ListBoxItem.Margin" Value="2" />
<Setter Property="Cursor" Value="Hand" /> <Setter Property="ListBoxItem.Cursor" Value="Hand" />
<Setter Property="FontWeight" Value="{DynamicResource ListBoxItemRadioGroupButtonFontWeight}" /> <Setter Property="ListBoxItem.FontWeight" Value="{DynamicResource ListBoxItemRadioGroupButtonFontWeight}" />
<Setter Property="FontSize" Value="{DynamicResource ListBoxItemRadioGroupButtonDefaultFontSize}" /> <Setter Property="ListBoxItem.FontSize" Value="{DynamicResource ListBoxItemRadioGroupButtonDefaultFontSize}" />
<Setter Property="Padding" Value="{DynamicResource ListBoxItemRadioGroupButtonDefaultPadding}" /> <Setter Property="ListBoxItem.Padding" Value="{DynamicResource ListBoxItemRadioGroupButtonDefaultPadding}" />
<Setter Property="Foreground" Value="{DynamicResource ListBoxItemRadioGroupButtonUncheckedForeground}" /> <Setter Property="ListBoxItem.Foreground"
<Setter Property="Template"> Value="{DynamicResource ListBoxItemRadioGroupButtonUncheckedForeground}" />
<Setter Property="ListBoxItem.Template">
<ControlTemplate TargetType="ListBoxItem"> <ControlTemplate TargetType="ListBoxItem">
<ContentPresenter <ContentPresenter
x:Name="PART_ContentPresenter" x:Name="PART_ContentPresenter"
@@ -347,19 +345,19 @@
<ControlTheme x:Key="CardRadioGroupListBox" <ControlTheme x:Key="CardRadioGroupListBox"
BasedOn="{StaticResource RadioGroupListBox}" BasedOn="{StaticResource RadioGroupListBox}"
TargetType="ListBox"> TargetType="ListBox">
<Setter Property="ItemContainerTheme" Value="{DynamicResource CardRadioGroupListBoxItem}" /> <Setter Property="ListBox.ItemContainerTheme" Value="{DynamicResource CardRadioGroupListBoxItem}" />
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="CardRadioGroupListBoxItem" TargetType="ListBoxItem"> <ControlTheme x:Key="CardRadioGroupListBoxItem" TargetType="ListBoxItem">
<Setter Property="Padding" Value="{DynamicResource ListBoxItemRadioGroupCardPadding}" /> <Setter Property="ListBoxItem.Padding" Value="{DynamicResource ListBoxItemRadioGroupCardPadding}" />
<Setter Property="BorderThickness" Value="1" /> <Setter Property="ListBoxItem.BorderThickness" Value="1" />
<Setter Property="CornerRadius" Value="{DynamicResource ListBoxItemRadioGroupCardCornerRadius}" /> <Setter Property="ListBoxItem.CornerRadius" Value="{DynamicResource ListBoxItemRadioGroupCardCornerRadius}" />
<Setter Property="Cursor" Value="Hand" /> <Setter Property="ListBoxItem.Cursor" Value="Hand" />
<Setter Property="HorizontalAlignment" Value="Left" /> <Setter Property="ListBoxItem.HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="ListBoxItem.VerticalAlignment" Value="Center" />
<Setter Property="HorizontalContentAlignment" Value="Left" /> <Setter Property="ListBoxItem.HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="ListBoxItem.VerticalContentAlignment" Value="Center" />
<Setter Property="Background" Value="{DynamicResource ListBoxItemRadioGroupCardDefaultBackground}" /> <Setter Property="ListBoxItem.Background" Value="{DynamicResource ListBoxItemRadioGroupCardDefaultBackground}" />
<Setter Property="FontSize" Value="{DynamicResource ListBoxItemRadioGroupFontSize}" /> <Setter Property="ListBoxItem.FontSize" Value="{DynamicResource ListBoxItemRadioGroupFontSize}" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="ListBoxItem"> <ControlTemplate TargetType="ListBoxItem">
<Border <Border
@@ -533,17 +531,17 @@
<ControlTheme x:Key="PureCardRadioGroupListBox" <ControlTheme x:Key="PureCardRadioGroupListBox"
BasedOn="{StaticResource RadioGroupListBox}" BasedOn="{StaticResource RadioGroupListBox}"
TargetType="ListBox"> TargetType="ListBox">
<Setter Property="ItemContainerTheme" Value="{DynamicResource PureCardRadioGroupListBoxItem}" /> <Setter Property="ListBox.ItemContainerTheme" Value="{DynamicResource PureCardRadioGroupListBoxItem}" />
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="PureCardRadioGroupListBoxItem" TargetType="ListBoxItem"> <ControlTheme x:Key="PureCardRadioGroupListBoxItem" TargetType="ListBoxItem">
<Setter Property="CornerRadius" Value="{DynamicResource ListBoxItemRadioGroupCardCornerRadius}" /> <Setter Property="ListBoxItem.CornerRadius" Value="{DynamicResource ListBoxItemRadioGroupCardCornerRadius}" />
<Setter Property="Cursor" Value="Hand" /> <Setter Property="ListBoxItem.Cursor" Value="Hand" />
<Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="ListBoxItem.VerticalContentAlignment" Value="Center" />
<Setter Property="BorderThickness" Value="1" /> <Setter Property="ListBoxItem.BorderThickness" Value="1" />
<Setter Property="FontSize" Value="{DynamicResource ListBoxItemRadioGroupFontSize}" /> <Setter Property="ListBoxItem.FontSize" Value="{DynamicResource ListBoxItemRadioGroupFontSize}" />
<Setter Property="Padding" Value="{DynamicResource ListBoxItemRadioGroupCardPadding}" /> <Setter Property="ListBoxItem.Padding" Value="{DynamicResource ListBoxItemRadioGroupCardPadding}" />
<Setter Property="Background" Value="{DynamicResource ListBoxItemRadioGroupCardDefaultBackground}" /> <Setter Property="ListBoxItem.Background" Value="{DynamicResource ListBoxItemRadioGroupCardDefaultBackground}" />
<Setter Property="Template"> <Setter Property="ListBoxItem.Template">
<ControlTemplate TargetType="ListBoxItem"> <ControlTemplate TargetType="ListBoxItem">
<ContentPresenter <ContentPresenter
x:Name="PART_ContentPresenter" x:Name="PART_ContentPresenter"
@@ -605,7 +603,7 @@
<ControlTheme x:Key="CheckGroupListBox" <ControlTheme x:Key="CheckGroupListBox"
BasedOn="{StaticResource RadioGroupListBox}" BasedOn="{StaticResource RadioGroupListBox}"
TargetType="ListBox"> TargetType="ListBox">
<Setter Property="ItemContainerTheme" Value="{DynamicResource CheckGroupListBoxItem}" /> <Setter Property="ListBox.ItemContainerTheme" Value="{DynamicResource CheckGroupListBoxItem}" />
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="CheckGroupListBoxItem" TargetType="ListBoxItem"> <ControlTheme x:Key="CheckGroupListBoxItem" TargetType="ListBoxItem">
<Setter Property="Padding" Value="8,0,0,0" /> <Setter Property="Padding" Value="8,0,0,0" />
@@ -786,7 +784,7 @@
<ControlTheme x:Key="CardCheckGroupListBox" <ControlTheme x:Key="CardCheckGroupListBox"
BasedOn="{StaticResource RadioGroupListBox}" BasedOn="{StaticResource RadioGroupListBox}"
TargetType="ListBox"> TargetType="ListBox">
<Setter Property="ItemContainerTheme" Value="{DynamicResource CardCheckGroupListBoxItem}" /> <Setter Property="ListBox.ItemContainerTheme" Value="{DynamicResource CardCheckGroupListBoxItem}" />
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="CardCheckGroupListBoxItem" TargetType="ListBoxItem"> <ControlTheme x:Key="CardCheckGroupListBoxItem" TargetType="ListBoxItem">
<Setter Property="Cursor" Value="Hand" /> <Setter Property="Cursor" Value="Hand" />
@@ -795,7 +793,7 @@
<Setter Property="BorderThickness" Value="{DynamicResource ListBoxItemCheckCardBorderThickness}" /> <Setter Property="BorderThickness" Value="{DynamicResource ListBoxItemCheckCardBorderThickness}" />
<Setter Property="CornerRadius" Value="{DynamicResource ListBoxItemCheckCardCornerRadius}" /> <Setter Property="CornerRadius" Value="{DynamicResource ListBoxItemCheckCardCornerRadius}" />
<Setter Property="Background" Value="Transparent" /> <Setter Property="Background" Value="Transparent" />
<Setter Property="Template"> <Setter Property="ListBoxItem.Template">
<ControlTemplate TargetType="ListBoxItem"> <ControlTemplate TargetType="ListBoxItem">
<Border <Border
Name="RootBorder" Name="RootBorder"

View File

@@ -6,6 +6,7 @@
xmlns:internal="clr-namespace:Avalonia.Dialogs.Internal;assembly=Avalonia.Dialogs" xmlns:internal="clr-namespace:Avalonia.Dialogs.Internal;assembly=Avalonia.Dialogs"
xmlns:cvt="using:Avalonia.Controls.Converters" xmlns:cvt="using:Avalonia.Controls.Converters"
x:CompileBindings="True"> x:CompileBindings="True">
<!-- Add Resources Here -->
<Design.PreviewWith> <Design.PreviewWith>
<Border <Border
Width="800" Width="800"

View File

@@ -92,12 +92,12 @@
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="{x:Type Separator}" TargetType="Separator"> <ControlTheme x:Key="{x:Type Separator}" TargetType="Separator">
<Setter Property="Background" Value="{DynamicResource MenuItemSeparatorBackground}" /> <Setter Property="Separator.Background" Value="{DynamicResource MenuItemSeparatorBackground}" />
<Setter Property="Focusable" Value="False" /> <Setter Property="Separator.Focusable" Value="False" />
<Setter Property="Height" Value="{DynamicResource MenuItemSeparatorHeight}" /> <Setter Property="Separator.Height" Value="{DynamicResource MenuItemSeparatorHeight}" />
<Setter Property="HorizontalAlignment" Value="Stretch" /> <Setter Property="Separator.HorizontalAlignment" Value="Stretch" />
<Setter Property="Margin" Value="{DynamicResource MenuItemSeparatorMargin}" /> <Setter Property="Separator.Margin" Value="{DynamicResource MenuItemSeparatorMargin}" />
<Setter Property="Template"> <Setter Property="Separator.Template">
<ControlTemplate TargetType="Separator"> <ControlTemplate TargetType="Separator">
<Border <Border
Height="{TemplateBinding Height}" Height="{TemplateBinding Height}"
@@ -115,8 +115,7 @@
<ControlTheme x:Key="{x:Type MenuItem}" TargetType="MenuItem"> <ControlTheme x:Key="{x:Type MenuItem}" TargetType="MenuItem">
<Setter Property="Background" Value="{DynamicResource MenuItemBackground}" /> <Setter Property="Background" Value="{DynamicResource MenuItemBackground}" />
<Setter Property="Foreground" Value="{DynamicResource MenuItemForeground}" /> <Setter Property="Foreground" Value="{DynamicResource MenuItemForeground}" />
<Setter Property="CornerRadius" Value="{DynamicResource MenuItemCornerRadius}" /> <Setter Property="MenuItem.Cursor" Value="Hand" />
<Setter Property="Cursor" Value="Hand" />
<!-- Narrow padding should be used for mouse input, when non-narrow one should be used for touch input in future. --> <!-- Narrow padding should be used for mouse input, when non-narrow one should be used for touch input in future. -->
<Setter Property="Padding" Value="{DynamicResource MenuItemPadding}" /> <Setter Property="Padding" Value="{DynamicResource MenuItemPadding}" />
<Setter Property="Template"> <Setter Property="Template">
@@ -234,15 +233,6 @@
<Style Selector="^ /template/ Border#PART_LayoutRoot"> <Style Selector="^ /template/ Border#PART_LayoutRoot">
<Setter Property="Background" Value="{DynamicResource MenuItemPointeroverBackground}" /> <Setter Property="Background" Value="{DynamicResource MenuItemPointeroverBackground}" />
</Style> </Style>
<Style Selector="^ /template/ ContentPresenter#PART_HeaderPresenter">
<Setter Property="Foreground" Value="{DynamicResource MenuItemPointeroverForeground}" />
</Style>
<Style Selector="^ /template/ TextBlock#PART_InputGestureText">
<Setter Property="Foreground" Value="{DynamicResource MenuItemPointeroverForeground}" />
</Style>
<Style Selector="^ /template/ PathIcon#PART_ExpandIcon">
<Setter Property="Foreground" Value="{DynamicResource MenuItemPointeroverForeground}" />
</Style>
</Style> </Style>
<!-- Listen for PART_LayoutRoot:pointerover, so it will not be triggered when subitem is pressed --> <!-- Listen for PART_LayoutRoot:pointerover, so it will not be triggered when subitem is pressed -->
@@ -303,8 +293,7 @@
<ControlTheme x:Key="TopLevelMenuItem" TargetType="MenuItem"> <ControlTheme x:Key="TopLevelMenuItem" TargetType="MenuItem">
<Setter Property="Background" Value="{DynamicResource MenuItemBackground}" /> <Setter Property="Background" Value="{DynamicResource MenuItemBackground}" />
<Setter Property="Foreground" Value="{DynamicResource MenuItemForeground}" /> <Setter Property="Foreground" Value="{DynamicResource MenuItemForeground}" />
<Setter Property="Cursor" Value="Hand" /> <Setter Property="MenuItem.Cursor" Value="Hand" />
<Setter Property="CornerRadius" Value="{DynamicResource MenuItemCornerRadius}"/>
<!-- Narrow padding should be used for mouse input, when non-narrow one should be used for touch input in future. --> <!-- Narrow padding should be used for mouse input, when non-narrow one should be used for touch input in future. -->
<Setter Property="Padding" Value="{DynamicResource MenuItemPadding}" /> <Setter Property="Padding" Value="{DynamicResource MenuItemPadding}" />
<Setter Property="Template"> <Setter Property="Template">
@@ -365,9 +354,6 @@
<Style Selector="^ /template/ Border#PART_LayoutRoot"> <Style Selector="^ /template/ Border#PART_LayoutRoot">
<Setter Property="Background" Value="{DynamicResource MenuItemPointeroverBackground}" /> <Setter Property="Background" Value="{DynamicResource MenuItemPointeroverBackground}" />
</Style> </Style>
<Style Selector="^ /template/ ContentPresenter#PART_HeaderPresenter">
<Setter Property="Foreground" Value="{DynamicResource MenuItemPointeroverForeground}" />
</Style>
</Style> </Style>
<!-- Listen for PART_LayoutRoot:pointerover, so it will not be triggered when subitem is pressed --> <!-- Listen for PART_LayoutRoot:pointerover, so it will not be triggered when subitem is pressed -->
@@ -383,8 +369,8 @@
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="{x:Type Menu}" TargetType="Menu"> <ControlTheme x:Key="{x:Type Menu}" TargetType="Menu">
<Setter Property="Background" Value="{DynamicResource MenuBackground}" /> <Setter Property="Background" Value="Transparent" />
<Setter Property="ItemContainerTheme" Value="{StaticResource TopLevelMenuItem}" /> <Setter Property="Menu.ItemContainerTheme" Value="{StaticResource TopLevelMenuItem}" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="Menu"> <ControlTemplate TargetType="Menu">
<Border <Border

View File

@@ -5,17 +5,16 @@
<Design.PreviewWith> <Design.PreviewWith>
<ThemeVariantScope RequestedThemeVariant="Dark"> <ThemeVariantScope RequestedThemeVariant="Dark">
<StackPanel> <StackPanel>
<NotificationCard />
<NotificationCard> <NotificationCard>
Hello, Semi.Avalonia! Hello, Semi.Avalonia!
</NotificationCard> </NotificationCard>
<NotificationCard NotificationType="Success"> <NotificationCard NotificationType="Success">
<Notification Title="Welcome" Message="Hello, Semi.Avalonia!" /> <Notification Title="Welcome" Message="Hello, Semi.Avalonia!" />
</NotificationCard> </NotificationCard>
<NotificationCard NotificationType="Warning" Classes="Light"> <NotificationCard NotificationType="Warning">
<Notification Title="Welcome" /> <Notification Title="" Message="Hello, Semi.Avalonia!" />
</NotificationCard> </NotificationCard>
<NotificationCard NotificationType="Error" Classes="Light"> <NotificationCard NotificationType="Error">
<Notification Message="Hello, Semi.Avalonia!" /> <Notification Message="Hello, Semi.Avalonia!" />
</NotificationCard> </NotificationCard>
</StackPanel> </StackPanel>
@@ -23,7 +22,10 @@
</Design.PreviewWith> </Design.PreviewWith>
<ControlTheme x:Key="{x:Type NotificationCard}" TargetType="NotificationCard"> <ControlTheme x:Key="{x:Type NotificationCard}" TargetType="NotificationCard">
<Setter Property="UseLayoutRounding" Value="True" /> <Setter Property="UseLayoutRounding" Value="True" />
<Setter Property="MinWidth" Value="{DynamicResource NotificationCardMinWidth}" />
<Setter Property="RenderTransformOrigin" Value="50%,75%" />
<Setter Property="BorderThickness" Value="{DynamicResource NotificationCardBorderThickness}" /> <Setter Property="BorderThickness" Value="{DynamicResource NotificationCardBorderThickness}" />
<Setter Property="BorderBrush" Value="{DynamicResource NotificationCardBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource NotificationCardBackground}" /> <Setter Property="Background" Value="{DynamicResource NotificationCardBackground}" />
<Setter Property="CornerRadius" Value="{DynamicResource NotificationCardCornerRadius}" /> <Setter Property="CornerRadius" Value="{DynamicResource NotificationCardCornerRadius}" />
<Setter Property="Template"> <Setter Property="Template">
@@ -36,11 +38,11 @@
<Border <Border
x:Name="PART_RootBorder" x:Name="PART_RootBorder"
Padding="{DynamicResource NotificationCardPadding}" Padding="{DynamicResource NotificationCardPadding}"
BoxShadow="{DynamicResource NotificationCardBoxShadows}" BoxShadow="{DynamicResource NotificationCardBoxShadow}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}"> CornerRadius="{TemplateBinding CornerRadius}">
<DockPanel MinWidth="{DynamicResource NotificationCardMinWidth}"> <DockPanel>
<PathIcon <PathIcon
Name="NotificationIcon" Name="NotificationIcon"
Width="{DynamicResource NotificationCardIconWidth}" Width="{DynamicResource NotificationCardIconWidth}"
@@ -65,7 +67,6 @@
Foreground="{DynamicResource NotificationCardMessageForeground}" Foreground="{DynamicResource NotificationCardMessageForeground}"
FontSize="{DynamicResource NotificationCardMessageFontSize}" FontSize="{DynamicResource NotificationCardMessageFontSize}"
FontWeight="{DynamicResource NotificationCardMessageFontWeight}" FontWeight="{DynamicResource NotificationCardMessageFontWeight}"
IsVisible="{Binding Message, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
Text="{Binding Message}" Text="{Binding Message}"
TextWrapping="Wrap" /> TextWrapping="Wrap" />
</StackPanel> </StackPanel>
@@ -168,22 +169,22 @@
</Style> </Style>
<Style Selector="^.Light"> <Style Selector="^.Light">
<Setter Property="Background" Value="{DynamicResource NotificationCardLightBackground}" /> <Setter Property="Background" Value="{DynamicResource SemiColorBackground0}" />
<Style Selector="^:information /template/ Border#PART_RootBorder"> <Style Selector="^:information /template/ Border#PART_RootBorder">
<Setter Property="BorderBrush" Value="{DynamicResource NotificationCardLightInformationBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource SemiColorInformation}" />
<Setter Property="Background" Value="{DynamicResource NotificationCardLightInformationBackground}"/> <Setter Property="Background" Value="{DynamicResource SemiColorInformationLight}" />
</Style> </Style>
<Style Selector="^:success /template/ Border#PART_RootBorder"> <Style Selector="^:success /template/ Border#PART_RootBorder">
<Setter Property="BorderBrush" Value="{DynamicResource NotificationCardLightSuccessBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource SemiColorSuccess}" />
<Setter Property="Background" Value="{DynamicResource NotificationCardLightSuccessBackground}" /> <Setter Property="Background" Value="{DynamicResource SemiColorSuccessLight}" />
</Style> </Style>
<Style Selector="^:warning /template/ Border#PART_RootBorder"> <Style Selector="^:warning /template/ Border#PART_RootBorder">
<Setter Property="BorderBrush" Value="{DynamicResource NotificationCardLightWarningBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource SemiColorWarning}" />
<Setter Property="Background" Value="{DynamicResource NotificationCardLightWarningBackground}" /> <Setter Property="Background" Value="{DynamicResource SemiColorWarningLight}" />
</Style> </Style>
<Style Selector="^:error /template/ Border#PART_RootBorder"> <Style Selector="^:error /template/ Border#PART_RootBorder">
<Setter Property="BorderBrush" Value="{DynamicResource NotificationCardLightErrorBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource SemiColorDanger}" />
<Setter Property="Background" Value="{DynamicResource NotificationCardLightErrorBackground}" /> <Setter Property="Background" Value="{DynamicResource SemiColorDangerLight}" />
</Style> </Style>
</Style> </Style>
</ControlTheme> </ControlTheme>

View File

@@ -2,6 +2,7 @@
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">
<!-- Add Resources Here -->
<ControlTheme x:Key="{x:Type NumericUpDown}" TargetType="NumericUpDown"> <ControlTheme x:Key="{x:Type NumericUpDown}" TargetType="NumericUpDown">
<Setter Property="NumericUpDown.VerticalAlignment" Value="Center" /> <Setter Property="NumericUpDown.VerticalAlignment" Value="Center" />
<Setter Property="NumericUpDown.VerticalContentAlignment" Value="Center" /> <Setter Property="NumericUpDown.VerticalContentAlignment" Value="Center" />

View File

@@ -3,70 +3,78 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:CompileBindings="True"> x:CompileBindings="True">
<Design.PreviewWith> <Design.PreviewWith>
<ThemeVariantScope RequestedThemeVariant="Dark"> <StackPanel Margin="20">
<StackPanel Background="{DynamicResource SemiBackground0Color}"> <RadioButton>Hello Button2</RadioButton>
<RadioButton>Hello</RadioButton> <RadioButton>Hello Button3</RadioButton>
<RadioButton>Hello</RadioButton> <Border Theme="{StaticResource RadioButtonGroupBorder}">
<RadioButton Theme="{DynamicResource CardRadioButton}">Hello</RadioButton> <StackPanel Orientation="Horizontal">
<RadioButton Theme="{DynamicResource PureCardRadioButton}">Hello</RadioButton> <RadioButton Theme="{StaticResource ButtonRadioButton}">Hello Button2</RadioButton>
</StackPanel> <RadioButton Theme="{StaticResource ButtonRadioButton}">Hello Button3</RadioButton>
</ThemeVariantScope> </StackPanel>
</Border>
<RadioButton Theme="{StaticResource PureCardRadioButton}">Hello Button3</RadioButton>
<RadioButton Theme="{StaticResource PureCardRadioButton}">Hello Button3</RadioButton>
</StackPanel>
</Design.PreviewWith> </Design.PreviewWith>
<!-- Theme: Default, Button, Card, PureCard --> <!-- Theme: Default, Button, Card, PureCard -->
<ControlTheme x:Key="{x:Type RadioButton}" TargetType="RadioButton"> <ControlTheme x:Key="{x:Type RadioButton}" TargetType="RadioButton">
<Setter Property="HorizontalAlignment" Value="Left" /> <Setter Property="RadioButton.HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Top" /> <Setter Property="RadioButton.VerticalAlignment" Value="Top" />
<Setter Property="HorizontalContentAlignment" Value="Left" /> <Setter Property="RadioButton.Cursor" Value="Hand" />
<Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="RadioButton.HorizontalContentAlignment" Value="Left" />
<Setter Property="FontSize" Value="{DynamicResource RadioButtonFontSize}" /> <Setter Property="RadioButton.VerticalContentAlignment" Value="Center" />
<Setter Property="Foreground" Value="{DynamicResource RadioButtonForeground}" /> <Setter Property="RadioButton.FontSize" Value="{DynamicResource RadioButtonFontSize}" />
<Setter Property="Background" Value="{DynamicResource RadioButtonDefaultBackground}" /> <Setter Property="RadioButton.CornerRadius" Value="{DynamicResource RadioButtonBoxCornerRadius}" />
<Setter Property="BorderBrush" Value="{DynamicResource RadioButtonDefaultBorderBrush}" /> <Setter Property="RadioButton.Foreground" Value="{DynamicResource RadioButtonForeground}" />
<Setter Property="CornerRadius" Value="{DynamicResource RadioButtonBoxCornerRadius}" /> <Setter Property="RadioButton.Background" Value="{DynamicResource RadioButtonDefaultBackground}" />
<Setter Property="Cursor" Value="Hand" /> <Setter Property="RadioButton.BorderBrush" Value="{DynamicResource RadioButtonDefaultBorderBrush}" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="RadioButton"> <ControlTemplate TargetType="RadioButton">
<Border <Border
x:Name="RootBorder" Name="RootBorder"
Margin="{TemplateBinding Margin}"
Padding="{TemplateBinding Padding}"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}"> CornerRadius="{TemplateBinding CornerRadius}">
<Grid ColumnDefinitions="Auto,*"> <Grid ColumnDefinitions="Auto,*">
<Panel <Grid
Grid.Column="0" Grid.Column="0"
TemplatedControl.IsTemplateFocusTarget="True" TemplatedControl.IsTemplateFocusTarget="True"
Margin="{DynamicResource RadioButtonIconMargin}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
<Ellipse <Ellipse
x:Name="OuterEllipse" Name="OuterEllipse"
Width="{DynamicResource RadioButtonIconRadius}" Width="{DynamicResource RadioButtonIconRadius}"
Height="{DynamicResource RadioButtonIconRadius}" Height="{DynamicResource RadioButtonIconRadius}"
Fill="{DynamicResource RadioButtonUncheckIconDefaultBackground}" Fill="{DynamicResource RadioButtonUncheckIconDefaultBackground}"
Stroke="{DynamicResource RadioButtonUncheckIconDefaultBorderBrush}" Stroke="{DynamicResource RadioButtonUncheckIconDefaultBorderBrush}"
StrokeThickness="{DynamicResource RadioButtonUncheckIconDefaultThickness}" StrokeThickness="1"
UseLayoutRounding="False" /> UseLayoutRounding="False" />
<Ellipse <Ellipse
x:Name="CheckGlyph" Name="CheckGlyph"
Width="{DynamicResource RadioButtonGlyphRadius}" Width="{DynamicResource RadioButtonGlyphRadius}"
Height="{DynamicResource RadioButtonGlyphRadius}" Height="{DynamicResource RadioButtonGlyphRadius}"
Fill="{DynamicResource RadioButtonCheckGlyphFill}" Fill="{DynamicResource RadioButtonCheckGlyphFill}"
Opacity="0"
Stroke="{DynamicResource RadioButtonCheckGlyphFill}" Stroke="{DynamicResource RadioButtonCheckGlyphFill}"
StrokeThickness="0"
UseLayoutRounding="False" /> UseLayoutRounding="False" />
</Panel> </Grid>
<ContentPresenter <ContentPresenter
x:Name="PART_ContentPresenter" Name="PART_ContentPresenter"
Grid.Column="1" Grid.Column="1"
Margin="{DynamicResource RadioButtonContentMargin}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding Content}" Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplate="{TemplateBinding ContentTemplate}"
Foreground="{TemplateBinding Foreground}" Foreground="{TemplateBinding Foreground}"
IsVisible="{TemplateBinding Content,Converter={x:Static ObjectConverters.IsNotNull}}"
FontSize="{TemplateBinding FontSize}"
RecognizesAccessKey="True" RecognizesAccessKey="True"
TextWrapping="Wrap" /> TextElement.FontSize="{DynamicResource RadioButtonFontSize}"
TextElement.Foreground="{DynamicResource RadioButtonForeground}" />
</Grid> </Grid>
</Border> </Border>
</ControlTemplate> </ControlTemplate>
@@ -88,6 +96,9 @@
<Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconPointeroverBorderBrush}" /> <Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconPointeroverBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonUncheckIconPointeroverBackground}" /> <Setter Property="Fill" Value="{DynamicResource RadioButtonUncheckIconPointeroverBackground}" />
</Style> </Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Opacity" Value="0" />
</Style>
</Style> </Style>
<!-- Unchecked Pressed State --> <!-- Unchecked Pressed State -->
@@ -96,6 +107,9 @@
<Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconPressedBorderBrush}" /> <Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconPressedBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonUncheckIconPressedBackground}" /> <Setter Property="Fill" Value="{DynamicResource RadioButtonUncheckIconPressedBackground}" />
</Style> </Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Opacity" Value="0" />
</Style>
</Style> </Style>
<!-- Unchecked Disabled state --> <!-- Unchecked Disabled state -->
@@ -104,6 +118,9 @@
<Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconDisabledBorderBrush}" /> <Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconDisabledBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonUncheckIconDisabledBackground}" /> <Setter Property="Fill" Value="{DynamicResource RadioButtonUncheckIconDisabledBackground}" />
</Style> </Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Opacity" Value="0" />
</Style>
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter"> <Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource RadioButtonDisabledForeground}" /> <Setter Property="Foreground" Value="{DynamicResource RadioButtonDisabledForeground}" />
</Style> </Style>
@@ -126,6 +143,9 @@
<Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconPointeroverBorderBrush}" /> <Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconPointeroverBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconPointeroverBackground}" /> <Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconPointeroverBackground}" />
</Style> </Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Opacity" Value="1" />
</Style>
</Style> </Style>
<!-- Checked Pressed State --> <!-- Checked Pressed State -->
@@ -134,6 +154,9 @@
<Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconPressedBorderBrush}" /> <Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconPressedBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconPressedBackground}" /> <Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconPressedBackground}" />
</Style> </Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Opacity" Value="1" />
</Style>
</Style> </Style>
<!-- Checked Disabled State --> <!-- Checked Disabled State -->
@@ -142,6 +165,9 @@
<Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconDisabledBorderBrush}" /> <Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconDisabledBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconDisabledBackground}" /> <Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconDisabledBackground}" />
</Style> </Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Opacity" Value="1" />
</Style>
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter"> <Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource RadioButtonDisabledForeground}" /> <Setter Property="Foreground" Value="{DynamicResource RadioButtonDisabledForeground}" />
</Style> </Style>
@@ -149,21 +175,16 @@
</Style> </Style>
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="RadioButtonGroupBorder" TargetType="Border">
<Setter Property="CornerRadius" Value="{DynamicResource RadioButtonGroupCornerRadius}" />
<Setter Property="Background" Value="{DynamicResource RadioButtonGroupBackground}" />
</ControlTheme>
<ControlTheme x:Key="ButtonRadioButton" TargetType="RadioButton"> <ControlTheme x:Key="ButtonRadioButton" TargetType="RadioButton">
<Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="RadioButton.CornerRadius" Value="{DynamicResource RadioButtonButtonCornerRadius}" />
<Setter Property="Padding" Value="{DynamicResource RadioButtonButtonDefaultPadding}" /> <Setter Property="RadioButton.VerticalContentAlignment" Value="Center" />
<Setter Property="Margin" Value="2" /> <Setter Property="RadioButton.Margin" Value="2" />
<Setter Property="FontWeight" Value="{DynamicResource RadioButtonButtonFontWeight}" /> <Setter Property="RadioButton.Cursor" Value="Hand" />
<Setter Property="FontSize" Value="{DynamicResource RadioButtonButtonDefaultFontSize}" /> <Setter Property="RadioButton.FontWeight" Value="{DynamicResource RadioButtonButtonFontWeight}" />
<Setter Property="Foreground" Value="{DynamicResource RadioButtonButtonUncheckedForeground}" /> <Setter Property="RadioButton.FontSize" Value="{DynamicResource RadioButtonButtonDefaultFontSize}" />
<Setter Property="CornerRadius" Value="{DynamicResource RadioButtonButtonCornerRadius}" /> <Setter Property="RadioButton.Padding" Value="{DynamicResource RadioButtonButtonDefaultPadding}" />
<Setter Property="Cursor" Value="Hand" /> <Setter Property="RadioButton.Foreground" Value="{DynamicResource RadioButtonButtonUncheckedForeground}" />
<Setter Property="Template"> <Setter Property="RadioButton.Template">
<ControlTemplate TargetType="RadioButton"> <ControlTemplate TargetType="RadioButton">
<ContentPresenter <ContentPresenter
x:Name="PART_ContentPresenter" x:Name="PART_ContentPresenter"
@@ -210,18 +231,21 @@
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="CardRadioButton" TargetType="RadioButton"> <ControlTheme x:Key="CardRadioButton" TargetType="RadioButton">
<Setter Property="HorizontalContentAlignment" Value="Left" /> <Setter Property="RadioButton.Padding" Value="{DynamicResource RadioButtonCardPadding}" />
<Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="RadioButton.BorderThickness" Value="1" />
<Setter Property="Padding" Value="{DynamicResource RadioButtonCardPadding}" /> <Setter Property="RadioButton.CornerRadius" Value="{DynamicResource RadioButtonCardCornerRadius}" />
<Setter Property="FontSize" Value="{DynamicResource RadioButtonFontSize}" /> <Setter Property="RadioButton.Cursor" Value="Hand" />
<Setter Property="CornerRadius" Value="{DynamicResource RadioButtonCardCornerRadius}" /> <Setter Property="RadioButton.HorizontalAlignment" Value="Left" />
<Setter Property="Background" Value="{DynamicResource RadioButtonCardDefaultBackground}" /> <Setter Property="RadioButton.VerticalAlignment" Value="Center" />
<Setter Property="BorderThickness" Value="{DynamicResource RadioButtonBorderThickness}" /> <Setter Property="RadioButton.HorizontalContentAlignment" Value="Left" />
<Setter Property="Cursor" Value="Hand" /> <Setter Property="RadioButton.VerticalContentAlignment" Value="Center" />
<Setter Property="RadioButton.Background" Value="{DynamicResource RadioButtonCardDefaultBackground}" />
<Setter Property="RadioButton.FontSize" Value="{DynamicResource RadioButtonFontSize}" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="RadioButton"> <ControlTemplate TargetType="RadioButton">
<Border <Border
x:Name="RootBorder" Name="RootBorder"
Margin="{TemplateBinding Margin}"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
@@ -231,12 +255,9 @@
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
ColumnDefinitions="Auto,*"> ColumnDefinitions="Auto,*">
<Panel <Grid Margin="{DynamicResource RadioButtonIconMargin}" VerticalAlignment="Top">
Grid.Column="0"
VerticalAlignment="Top"
Margin="{DynamicResource RadioButtonIconMargin}">
<Ellipse <Ellipse
x:Name="OuterEllipse" Name="OuterEllipse"
Width="{DynamicResource RadioButtonIconRadius}" Width="{DynamicResource RadioButtonIconRadius}"
Height="{DynamicResource RadioButtonIconRadius}" Height="{DynamicResource RadioButtonIconRadius}"
Fill="{DynamicResource RadioButtonUncheckIconDefaultBackground}" Fill="{DynamicResource RadioButtonUncheckIconDefaultBackground}"
@@ -245,27 +266,26 @@
UseLayoutRounding="False" /> UseLayoutRounding="False" />
<Ellipse <Ellipse
x:Name="CheckGlyph" Name="CheckGlyph"
Width="{DynamicResource RadioButtonGlyphRadius}" Width="{DynamicResource RadioButtonGlyphRadius}"
Height="{DynamicResource RadioButtonGlyphRadius}" Height="{DynamicResource RadioButtonGlyphRadius}"
Fill="{DynamicResource RadioButtonCheckGlyphFill}" Fill="{DynamicResource RadioButtonCheckGlyphFill}"
Opacity="0"
Stroke="{DynamicResource RadioButtonCheckGlyphFill}" Stroke="{DynamicResource RadioButtonCheckGlyphFill}"
StrokeThickness="0"
UseLayoutRounding="False" /> UseLayoutRounding="False" />
</Panel> </Grid>
<ContentPresenter <ContentPresenter
x:Name="PART_ContentPresenter" Name="PART_ContentPresenter"
Grid.Column="1" Grid.Column="1"
Margin="{DynamicResource RadioButtonContentMargin}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding Content}" Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplate="{TemplateBinding ContentTemplate}"
Foreground="{TemplateBinding Foreground}" Foreground="{TemplateBinding Foreground}"
IsVisible="{TemplateBinding Content,Converter={x:Static ObjectConverters.IsNotNull}}"
RecognizesAccessKey="True" RecognizesAccessKey="True"
FontSize="{TemplateBinding FontSize}" TextElement.FontSize="{DynamicResource RadioButtonFontSize}"
TextWrapping="Wrap" /> TextElement.Foreground="{DynamicResource RadioButtonForeground}" />
</Grid> </Grid>
</Border> </Border>
</ControlTemplate> </ControlTemplate>
@@ -287,6 +307,9 @@
<Style Selector="^ /template/ Ellipse#OuterEllipse"> <Style Selector="^ /template/ Ellipse#OuterEllipse">
<Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconPointeroverBorderBrush}" /> <Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconPointeroverBorderBrush}" />
</Style> </Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Opacity" Value="0" />
</Style>
</Style> </Style>
<!-- Unchecked Pressed State --> <!-- Unchecked Pressed State -->
@@ -295,6 +318,9 @@
<Style Selector="^ /template/ Ellipse#OuterEllipse"> <Style Selector="^ /template/ Ellipse#OuterEllipse">
<Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconPressedBorderBrush}" /> <Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconPressedBorderBrush}" />
</Style> </Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Opacity" Value="0" />
</Style>
</Style> </Style>
<!-- Unchecked Disabled state --> <!-- Unchecked Disabled state -->
@@ -303,6 +329,9 @@
<Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconDisabledBorderBrush}" /> <Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconDisabledBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonUncheckIconDisabledBackground}" /> <Setter Property="Fill" Value="{DynamicResource RadioButtonUncheckIconDisabledBackground}" />
</Style> </Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Opacity" Value="0" />
</Style>
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter"> <Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource RadioButtonDisabledForeground}" /> <Setter Property="Foreground" Value="{DynamicResource RadioButtonDisabledForeground}" />
</Style> </Style>
@@ -332,6 +361,9 @@
<Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconPointeroverBorderBrush}" /> <Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconPointeroverBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconPointeroverBackground}" /> <Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconPointeroverBackground}" />
</Style> </Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Opacity" Value="1" />
</Style>
</Style> </Style>
<!-- Checked Pressed State --> <!-- Checked Pressed State -->
@@ -341,6 +373,9 @@
<Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconPressedBorderBrush}" /> <Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconPressedBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconPressedBackground}" /> <Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconPressedBackground}" />
</Style> </Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Opacity" Value="1" />
</Style>
</Style> </Style>
<!-- Checked Disabled State --> <!-- Checked Disabled State -->
@@ -349,6 +384,9 @@
<Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconDisabledBorderBrush}" /> <Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconDisabledBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconDisabledBackground}" /> <Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconDisabledBackground}" />
</Style> </Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Opacity" Value="1" />
</Style>
<Style Selector="^ /template/ Border#RootBorder"> <Style Selector="^ /template/ Border#RootBorder">
<Setter Property="BorderBrush" Value="{DynamicResource RadioButtonCheckIconDisabledBackground}" /> <Setter Property="BorderBrush" Value="{DynamicResource RadioButtonCheckIconDisabledBackground}" />
<Setter Property="Background" Value="{DynamicResource RadioButtonCardCheckedBackground}" /> <Setter Property="Background" Value="{DynamicResource RadioButtonCardCheckedBackground}" />
@@ -361,22 +399,21 @@
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="PureCardRadioButton" TargetType="RadioButton"> <ControlTheme x:Key="PureCardRadioButton" TargetType="RadioButton">
<Setter Property="HorizontalContentAlignment" Value="Left" /> <Setter Property="RadioButton.CornerRadius" Value="{DynamicResource RadioButtonCardCornerRadius}" />
<Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="RadioButton.Cursor" Value="Hand" />
<Setter Property="Padding" Value="{DynamicResource RadioButtonCardPadding}" /> <Setter Property="RadioButton.VerticalContentAlignment" Value="Center" />
<Setter Property="FontSize" Value="{DynamicResource RadioButtonFontSize}" /> <Setter Property="RadioButton.BorderThickness" Value="1" />
<Setter Property="CornerRadius" Value="{DynamicResource RadioButtonCardCornerRadius}" /> <Setter Property="RadioButton.FontSize" Value="{DynamicResource RadioButtonFontSize}" />
<Setter Property="Background" Value="{DynamicResource RadioButtonCardDefaultBackground}" /> <Setter Property="RadioButton.Padding" Value="{DynamicResource RadioButtonCardPadding}" />
<Setter Property="BorderThickness" Value="{DynamicResource RadioButtonBorderThickness}" /> <Setter Property="RadioButton.Background" Value="{DynamicResource RadioButtonCardDefaultBackground}" />
<Setter Property="Cursor" Value="Hand" /> <Setter Property="RadioButton.Template">
<Setter Property="Template">
<ControlTemplate TargetType="RadioButton"> <ControlTemplate TargetType="RadioButton">
<ContentPresenter <ContentPresenter
x:Name="PART_ContentPresenter" x:Name="PART_ContentPresenter"
Margin="{TemplateBinding Margin}"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
Foreground="{TemplateBinding Foreground}"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
@@ -384,8 +421,7 @@
ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplate="{TemplateBinding ContentTemplate}"
CornerRadius="{TemplateBinding CornerRadius}" CornerRadius="{TemplateBinding CornerRadius}"
RecognizesAccessKey="True" RecognizesAccessKey="True"
UseLayoutRounding="False" UseLayoutRounding="False" />
TextWrapping="Wrap" />
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
<Style Selector="^:unchecked"> <Style Selector="^:unchecked">

View File

@@ -2,6 +2,7 @@
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">
<!-- Add Resources Here -->
<ControlTheme x:Key="{x:Type RefreshContainer}" TargetType="RefreshContainer"> <ControlTheme x:Key="{x:Type RefreshContainer}" TargetType="RefreshContainer">
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate> <ControlTemplate>

View File

@@ -108,7 +108,6 @@
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPointeroverBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPointeroverBorderBrush}" />
</Style> </Style>
<Style Selector="^:pressed /template/ ContentPresenter#PART_ContentPresenter"> <Style Selector="^:pressed /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidPrimaryPressedForeground}" />
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryPressedBackground}" /> <Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryPressedBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPressedBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPressedBorderBrush}" />
</Style> </Style>
@@ -124,7 +123,6 @@
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPointeroverBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPointeroverBorderBrush}" />
</Style> </Style>
<Style Selector="^:pressed /template/ ContentPresenter#PART_ContentPresenter"> <Style Selector="^:pressed /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidPrimaryPressedForeground}" />
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryPressedBackground}" /> <Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryPressedBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPressedBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPressedBorderBrush}" />
</Style> </Style>
@@ -206,9 +204,9 @@
</Style> </Style>
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter"> <Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidDisabledForeground}" /> <Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultDisabledBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource ButtonSolidDisabledBackground}" /> <Setter Property="Background" Value="{DynamicResource ButtonSolidDisabledBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidDisabledBorderBrush}" /> <Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
</Style> </Style>
</ControlTheme> </ControlTheme>
@@ -249,12 +247,12 @@
BasedOn="{StaticResource {x:Type RepeatButton}}" BasedOn="{StaticResource {x:Type RepeatButton}}"
TargetType="RepeatButton"> TargetType="RepeatButton">
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter"> <Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderlessBorderBrush}" /> <Setter Property="Background" Value="Transparent" />
<Setter Property="Background" Value="{DynamicResource ButtonBorderlessBackground}" /> <Setter Property="BorderBrush" Value="Transparent" />
</Style> </Style>
<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter"> <Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderlessBorderBrush}" /> <Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="Background" Value="{DynamicResource ButtonBorderlessBackground}" /> <Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" /> <Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
</Style> </Style>

View File

@@ -5,6 +5,7 @@
<MenuFlyout x:Key="SelectableTextBlockContextFlyout" Placement="Bottom"> <MenuFlyout x:Key="SelectableTextBlockContextFlyout" Placement="Bottom">
<MenuItem <MenuItem
x:Name="SelectableTextBlockContextFlyoutCopyItem"
Command="{Binding $parent[SelectableTextBlock].Copy}" Command="{Binding $parent[SelectableTextBlock].Copy}"
Header="{DynamicResource STRING_MENU_COPY}" Header="{DynamicResource STRING_MENU_COPY}"
InputGesture="{x:Static TextBox.CopyGesture}" InputGesture="{x:Static TextBox.CopyGesture}"

View File

@@ -2,6 +2,7 @@
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">
<!-- Add Resources Here -->
<ControlTheme x:Key="SliderHorizontalRepeatButton" TargetType="RepeatButton"> <ControlTheme x:Key="SliderHorizontalRepeatButton" TargetType="RepeatButton">
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="RepeatButton"> <ControlTemplate TargetType="RepeatButton">

View File

@@ -224,7 +224,6 @@
<!-- only for ToggleSplitButton --> <!-- only for ToggleSplitButton -->
<Style Selector="^:checked:disabled /template/ Button"> <Style Selector="^:checked:disabled /template/ Button">
<Setter Property="Background" Value="{DynamicResource ButtonSolidDisabledBackground}" /> <Setter Property="Background" Value="{DynamicResource ButtonSolidDisabledBackground}" />
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidDisabledForeground}" />
</Style> </Style>
</ControlTheme> </ControlTheme>
@@ -307,7 +306,7 @@
<Style Selector="^:disabled /template/ Button"> <Style Selector="^:disabled /template/ Button">
<Setter Property="Background" Value="{DynamicResource ButtonSolidDisabledBackground}" /> <Setter Property="Background" Value="{DynamicResource ButtonSolidDisabledBackground}" />
<Setter Property="Foreground" Value="{DynamicResource ButtonSolidDisabledForeground}" /> <Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
</Style> </Style>
</ControlTheme> </ControlTheme>

View File

@@ -1,4 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- Add Resources Here -->
<ControlTheme x:Key="{x:Type SplitView}" TargetType="SplitView"> <ControlTheme x:Key="{x:Type SplitView}" TargetType="SplitView">
<Setter Property="OpenPaneLength" Value="{DynamicResource SplitViewOpenPaneThemeLength}" /> <Setter Property="OpenPaneLength" Value="{DynamicResource SplitViewOpenPaneThemeLength}" />
<Setter Property="CompactPaneLength" Value="{DynamicResource SplitViewCompactPaneThemeLength}" /> <Setter Property="CompactPaneLength" Value="{DynamicResource SplitViewCompactPaneThemeLength}" />

View File

@@ -2,6 +2,7 @@
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">
<!-- Add Resources Here -->
<ControlTheme x:Key="{x:Type TabControl}" TargetType="TabControl"> <ControlTheme x:Key="{x:Type TabControl}" TargetType="TabControl">
<Setter Property="Margin" Value="0" /> <Setter Property="Margin" Value="0" />
<Setter Property="Padding" Value="0" /> <Setter Property="Padding" Value="0" />

View File

@@ -2,6 +2,7 @@
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">
<!-- Add Resources Here -->
<ControlTheme x:Key="{x:Type TabStrip}" TargetType="TabStrip"> <ControlTheme x:Key="{x:Type TabStrip}" TargetType="TabStrip">
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate> <ControlTemplate>

View File

@@ -4,16 +4,19 @@
x:CompileBindings="True"> x:CompileBindings="True">
<MenuFlyout x:Key="DefaultTextBoxContextFlyout" Placement="Bottom"> <MenuFlyout x:Key="DefaultTextBoxContextFlyout" Placement="Bottom">
<MenuItem <MenuItem
x:Name="TextBoxContextFlyoutCutItem"
Command="{Binding $parent[TextBox].Cut}" Command="{Binding $parent[TextBox].Cut}"
Header="{DynamicResource STRING_MENU_CUT}" Header="{DynamicResource STRING_MENU_CUT}"
InputGesture="{x:Static TextBox.CutGesture}" InputGesture="{x:Static TextBox.CutGesture}"
IsEnabled="{Binding $parent[TextBox].CanCut}" /> IsEnabled="{Binding $parent[TextBox].CanCut}" />
<MenuItem <MenuItem
x:Name="TextBoxContextFlyoutCopyItem"
Command="{Binding $parent[TextBox].Copy}" Command="{Binding $parent[TextBox].Copy}"
Header="{DynamicResource STRING_MENU_COPY}" Header="{DynamicResource STRING_MENU_COPY}"
InputGesture="{x:Static TextBox.CopyGesture}" InputGesture="{x:Static TextBox.CopyGesture}"
IsEnabled="{Binding $parent[TextBox].CanCopy}" /> IsEnabled="{Binding $parent[TextBox].CanCopy}" />
<MenuItem <MenuItem
x:Name="TextBoxContextFlyoutPasteItem"
Command="{Binding $parent[TextBox].Paste}" Command="{Binding $parent[TextBox].Paste}"
Header="{DynamicResource STRING_MENU_PASTE}" Header="{DynamicResource STRING_MENU_PASTE}"
InputGesture="{x:Static TextBox.PasteGesture}" InputGesture="{x:Static TextBox.PasteGesture}"
@@ -21,25 +24,25 @@
</MenuFlyout> </MenuFlyout>
<ControlTheme x:Key="{x:Type TextBox}" TargetType="TextBox"> <ControlTheme x:Key="{x:Type TextBox}" TargetType="TextBox">
<Setter Property="Foreground" Value="{DynamicResource TextBoxForeground}" /> <Setter Property="TextBox.Foreground" Value="{DynamicResource TextBoxForeground}" />
<Setter Property="Background" Value="{DynamicResource TextBoxDefaultBackground}" /> <Setter Property="TextBox.Background" Value="{DynamicResource TextBoxDefaultBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxDefaultBorderBrush}" /> <Setter Property="TextBox.BorderBrush" Value="{DynamicResource TextBoxDefaultBorderBrush}" />
<Setter Property="SelectionBrush" Value="{DynamicResource TextBoxSelectionBackground}" /> <Setter Property="TextBox.SelectionBrush" Value="{DynamicResource TextBoxSelectionBackground}" />
<Setter Property="SelectionForegroundBrush" Value="{DynamicResource TextBoxSelectionForeground}" /> <Setter Property="TextBox.SelectionForegroundBrush" Value="{DynamicResource TextBoxSelectionForeground}" />
<Setter Property="BorderThickness" Value="{DynamicResource TextBoxBorderThickness}" /> <Setter Property="TextBox.BorderThickness" Value="{DynamicResource TextBoxBorderThickness}" />
<Setter Property="BackgroundSizing" Value="OuterBorderEdge" /> <Setter Property="TextBox.BackgroundSizing" Value="OuterBorderEdge" />
<Setter Property="CornerRadius" Value="{DynamicResource TextBoxDefaultCornerRadius}" /> <Setter Property="TextBox.CornerRadius" Value="{DynamicResource TextBoxDefaultCornerRadius}" />
<Setter Property="FontSize" Value="14" /> <Setter Property="TextBox.FontSize" Value="14" />
<Setter Property="Cursor" Value="Ibeam" /> <Setter Property="TextBox.Cursor" Value="Ibeam" />
<Setter Property="CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" /> <Setter Property="TextBox.CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" />
<Setter Property="Padding" Value="{DynamicResource TextBoxContentPadding}" /> <Setter Property="TextBox.Padding" Value="{DynamicResource TextBoxContentPadding}" />
<Setter Property="MinHeight" Value="{DynamicResource TextBoxDefaultHeight}" /> <Setter Property="TextBox.MinHeight" Value="{DynamicResource TextBoxDefaultHeight}" />
<Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="TextBox.VerticalAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="TextBox.VerticalContentAlignment" Value="Center" />
<Setter Property="FocusAdorner" Value="{x:Null}" /> <Setter Property="TextBox.FocusAdorner" Value="{x:Null}" />
<Setter Property="ScrollViewer.IsScrollChainingEnabled" Value="True" /> <Setter Property="ScrollViewer.IsScrollChainingEnabled" Value="True" />
<Setter Property="ContextFlyout" Value="{StaticResource DefaultTextBoxContextFlyout}" /> <Setter Property="TextBox.ContextFlyout" Value="{StaticResource DefaultTextBoxContextFlyout}" />
<Setter Property="Template"> <Setter Property="TextBox.Template">
<ControlTemplate TargetType="TextBox"> <ControlTemplate TargetType="TextBox">
<DataValidationErrors> <DataValidationErrors>
<Border <Border
@@ -128,7 +131,6 @@
<Style Selector="^:pointerover /template/ Border#PART_ContentPresenterBorder"> <Style Selector="^:pointerover /template/ Border#PART_ContentPresenterBorder">
<Setter Property="Background" Value="{DynamicResource TextBoxPointeroverBackground}" /> <Setter Property="Background" Value="{DynamicResource TextBoxPointeroverBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxPointeroverBorderBrush}" />
</Style> </Style>
<Style Selector="^:pressed /template/ Border#PART_ContentPresenterBorder"> <Style Selector="^:pressed /template/ Border#PART_ContentPresenterBorder">
<Setter Property="Background" Value="{DynamicResource TextBoxPressedBackground}" /> <Setter Property="Background" Value="{DynamicResource TextBoxPressedBackground}" />
@@ -195,8 +197,8 @@
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxBorderedPointeroverBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource TextBoxBorderedPointeroverBorderBrush}" />
</Style> </Style>
<Style Selector="^:disabled /template/ Border#PART_ContentPresenterBorder"> <Style Selector="^:disabled /template/ Border#PART_ContentPresenterBorder">
<Setter Property="Background" Value="{DynamicResource TextBoxDisabledBackground}" /> <Setter Property="TextBox.Background" Value="{DynamicResource TextBoxDisabledBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxDisabledBorderBrush}" /> <Setter Property="TextBox.BorderBrush" Value="{DynamicResource TextBoxDisabledBorderBrush}" />
</Style> </Style>
<Style Selector="^:error"> <Style Selector="^:error">
@@ -228,25 +230,25 @@
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="NonErrorTextBox" TargetType="TextBox"> <ControlTheme x:Key="NonErrorTextBox" TargetType="TextBox">
<Setter Property="Foreground" Value="{DynamicResource TextBoxForeground}" /> <Setter Property="TextBox.Foreground" Value="{DynamicResource TextBoxForeground}" />
<Setter Property="Background" Value="{DynamicResource TextBoxDefaultBackground}" /> <Setter Property="TextBox.Background" Value="{DynamicResource TextBoxDefaultBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxDefaultBorderBrush}" /> <Setter Property="TextBox.BorderBrush" Value="{DynamicResource TextBoxDefaultBorderBrush}" />
<Setter Property="SelectionBrush" Value="{DynamicResource TextBoxSelectionBackground}" /> <Setter Property="TextBox.SelectionBrush" Value="{DynamicResource TextBoxSelectionBackground}" />
<Setter Property="SelectionForegroundBrush" Value="{DynamicResource TextBoxSelectionForeground}" /> <Setter Property="TextBox.SelectionForegroundBrush" Value="{DynamicResource TextBoxSelectionForeground}" />
<Setter Property="BorderThickness" Value="{DynamicResource TextBoxBorderThickness}" /> <Setter Property="TextBox.BorderThickness" Value="{DynamicResource TextBoxBorderThickness}" />
<Setter Property="BackgroundSizing" Value="OuterBorderEdge" /> <Setter Property="TextBox.BackgroundSizing" Value="OuterBorderEdge" />
<Setter Property="CornerRadius" Value="{DynamicResource TextBoxDefaultCornerRadius}" /> <Setter Property="TextBox.CornerRadius" Value="{DynamicResource TextBoxDefaultCornerRadius}" />
<Setter Property="FontSize" Value="14" /> <Setter Property="TextBox.FontSize" Value="14" />
<Setter Property="Cursor" Value="Ibeam" /> <Setter Property="TextBox.Cursor" Value="Ibeam" />
<Setter Property="CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" /> <Setter Property="TextBox.CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" />
<Setter Property="Padding" Value="{DynamicResource TextBoxContentPadding}" /> <Setter Property="TextBox.Padding" Value="{DynamicResource TextBoxContentPadding}" />
<Setter Property="MinHeight" Value="{DynamicResource TextBoxDefaultHeight}" /> <Setter Property="TextBox.MinHeight" Value="{DynamicResource TextBoxDefaultHeight}" />
<Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="TextBox.VerticalAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="TextBox.VerticalContentAlignment" Value="Center" />
<Setter Property="FocusAdorner" Value="{x:Null}" /> <Setter Property="TextBox.FocusAdorner" Value="{x:Null}" />
<Setter Property="ScrollViewer.IsScrollChainingEnabled" Value="True" /> <Setter Property="ScrollViewer.IsScrollChainingEnabled" Value="True" />
<Setter Property="ContextFlyout" Value="{StaticResource DefaultTextBoxContextFlyout}" /> <Setter Property="TextBox.ContextFlyout" Value="{StaticResource DefaultTextBoxContextFlyout}" />
<Setter Property="Template"> <Setter Property="TextBox.Template">
<ControlTemplate TargetType="TextBox"> <ControlTemplate TargetType="TextBox">
<DataValidationErrors Theme="{DynamicResource SilentDataValidationErrors}"> <DataValidationErrors Theme="{DynamicResource SilentDataValidationErrors}">
<Border <Border
@@ -335,7 +337,6 @@
<Style Selector="^:pointerover /template/ Border#PART_ContentPresenterBorder"> <Style Selector="^:pointerover /template/ Border#PART_ContentPresenterBorder">
<Setter Property="Background" Value="{DynamicResource TextBoxPointeroverBackground}" /> <Setter Property="Background" Value="{DynamicResource TextBoxPointeroverBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxPointeroverBorderBrush}" />
</Style> </Style>
<Style Selector="^:pressed /template/ Border#PART_ContentPresenterBorder"> <Style Selector="^:pressed /template/ Border#PART_ContentPresenterBorder">
<Setter Property="Background" Value="{DynamicResource TextBoxPressedBackground}" /> <Setter Property="Background" Value="{DynamicResource TextBoxPressedBackground}" />
@@ -402,8 +403,8 @@
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxBorderedPointeroverBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource TextBoxBorderedPointeroverBorderBrush}" />
</Style> </Style>
<Style Selector="^:disabled /template/ Border#PART_ContentPresenterBorder"> <Style Selector="^:disabled /template/ Border#PART_ContentPresenterBorder">
<Setter Property="Background" Value="{DynamicResource TextBoxDisabledBackground}" /> <Setter Property="TextBox.Background" Value="{DynamicResource TextBoxDisabledBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxDisabledBorderBrush}" /> <Setter Property="TextBox.BorderBrush" Value="{DynamicResource TextBoxDisabledBorderBrush}" />
</Style> </Style>
<Style Selector="^:error"> <Style Selector="^:error">
@@ -435,19 +436,19 @@
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="LooklessTextBox" TargetType="TextBox"> <ControlTheme x:Key="LooklessTextBox" TargetType="TextBox">
<Setter Property="Foreground" Value="{DynamicResource TextBoxForeground}" /> <Setter Property="TextBox.Foreground" Value="{DynamicResource TextBoxForeground}" />
<Setter Property="SelectionBrush" Value="{DynamicResource TextBoxSelectionBackground}" /> <Setter Property="TextBox.SelectionBrush" Value="{DynamicResource TextBoxSelectionBackground}" />
<Setter Property="SelectionForegroundBrush" Value="{DynamicResource TextBoxSelectionForeground}" /> <Setter Property="TextBox.SelectionForegroundBrush" Value="{DynamicResource TextBoxSelectionForeground}" />
<Setter Property="FontSize" Value="14" /> <Setter Property="TextBox.FontSize" Value="14" />
<Setter Property="Cursor" Value="Ibeam" /> <Setter Property="TextBox.Cursor" Value="Ibeam" />
<Setter Property="CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" /> <Setter Property="TextBox.CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" />
<Setter Property="Padding" Value="{DynamicResource TextBoxContentPadding}" /> <Setter Property="TextBox.Padding" Value="{DynamicResource TextBoxContentPadding}" />
<Setter Property="MinHeight" Value="{DynamicResource TextBoxDefaultHeight}" /> <Setter Property="TextBox.MinHeight" Value="{DynamicResource TextBoxDefaultHeight}" />
<Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="TextBox.VerticalAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="TextBox.VerticalContentAlignment" Value="Center" />
<Setter Property="FocusAdorner" Value="{x:Null}" /> <Setter Property="TextBox.FocusAdorner" Value="{x:Null}" />
<Setter Property="ScrollViewer.IsScrollChainingEnabled" Value="True" /> <Setter Property="ScrollViewer.IsScrollChainingEnabled" Value="True" />
<Setter Property="Template"> <Setter Property="TextBox.Template">
<ControlTemplate TargetType="TextBox"> <ControlTemplate TargetType="TextBox">
<Border Name="PART_ContentPresenterBorder" MinHeight="{TemplateBinding MinHeight}"> <Border Name="PART_ContentPresenterBorder" MinHeight="{TemplateBinding MinHeight}">
<Grid Margin="{TemplateBinding Padding}" ColumnDefinitions="Auto, *, Auto"> <Grid Margin="{TemplateBinding Padding}" ColumnDefinitions="Auto, *, Auto">

View File

@@ -2,7 +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">
<!-- Add Resources Here -->
<ControlTheme x:Key="{x:Type ThemeVariantScope}" TargetType="ThemeVariantScope"> <ControlTheme x:Key="{x:Type ThemeVariantScope}" TargetType="ThemeVariantScope">
<!-- Add Resources Here -->
<Setter Property="TextElement.Foreground" Value="{DynamicResource DefaultForeground}" /> <Setter Property="TextElement.Foreground" Value="{DynamicResource DefaultForeground}" />
<Setter Property="TextElement.FontSize" Value="{DynamicResource DefaultFontSize}" /> <Setter Property="TextElement.FontSize" Value="{DynamicResource DefaultFontSize}" />
<Setter Property="TextElement.FontFamily" Value="{DynamicResource DefaultFontFamily}" /> <Setter Property="TextElement.FontFamily" Value="{DynamicResource DefaultFontFamily}" />

View File

@@ -2,14 +2,14 @@
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">
<!-- Add Resources Here -->
<ControlTheme x:Key="{x:Type TimePickerPresenter}" TargetType="TimePickerPresenter"> <ControlTheme x:Key="{x:Type TimePickerPresenter}" TargetType="TimePickerPresenter">
<Setter Property="Width" Value="242" /> <Setter Property="Width" Value="242" />
<Setter Property="MinWidth" Value="242" /> <Setter Property="MinWidth" Value="242" />
<Setter Property="MaxHeight" Value="300" /> <Setter Property="MaxHeight" Value="300" />
<Setter Property="FontWeight" Value="Normal" /> <Setter Property="FontWeight" Value="Normal" />
<Setter Property="Background" Value="{DynamicResource DateTimePickerPopupBackground}" /> <Setter Property="Background" Value="{DynamicResource DateTimePickerPopupBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource DateTimePickerPopupBorderBrush}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="CornerRadius" Value="6" /> <Setter Property="CornerRadius" Value="6" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="TimePickerPresenter"> <ControlTemplate TargetType="TimePickerPresenter">
@@ -54,20 +54,8 @@
<RepeatButton Name="PART_MinuteUpButton" Theme="{StaticResource DateTimePickerUpButton}" /> <RepeatButton Name="PART_MinuteUpButton" Theme="{StaticResource DateTimePickerUpButton}" />
<RepeatButton Name="PART_MinuteDownButton" Theme="{StaticResource DateTimePickerDownButton}" /> <RepeatButton Name="PART_MinuteDownButton" Theme="{StaticResource DateTimePickerDownButton}" />
</Panel> </Panel>
<Panel Name="PART_SecondHost" Grid.Column="4">
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden">
<DateTimePickerPanel
Name="PART_SecondSelector"
ItemHeight="{DynamicResource DateTimePickerListBoxItemHeight}"
PanelType="Second"
ShouldLoop="True" />
</ScrollViewer>
<RepeatButton Name="PART_SecondUpButton" Theme="{StaticResource DateTimePickerUpButton}" />
<RepeatButton Name="PART_SecondDownButton" Theme="{StaticResource DateTimePickerDownButton}" />
</Panel>
<Panel Name="PART_PeriodHost" Grid.Column="6"> <Panel Name="PART_PeriodHost" Grid.Column="4">
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden"> <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden">
<DateTimePickerPanel <DateTimePickerPanel
Name="PART_PeriodSelector" Name="PART_PeriodSelector"
@@ -93,13 +81,6 @@
Margin="0,4" Margin="0,4"
HorizontalAlignment="Center" HorizontalAlignment="Center"
Fill="{DynamicResource DateTimePickerSeparatorBackground}" /> Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
<Rectangle
Name="PART_ThirdSpacer"
Grid.Column="5"
Width="1"
Margin="0,4"
HorizontalAlignment="Center"
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
</Grid> </Grid>
<Grid <Grid
@@ -235,29 +216,6 @@
Grid.Column="4" Grid.Column="4"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"> VerticalAlignment="Stretch">
<TextBlock
x:Name="PART_SecondTextBlock"
Padding="12,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontFamily="{TemplateBinding FontFamily}"
FontSize="{TemplateBinding FontSize}"
FontWeight="{TemplateBinding FontWeight}"
Text="{DynamicResource STRING_TIMEPICKER_SECOND_TEXT}"/>
</Border>
<Rectangle
Name="PART_ThirdColumnDivider"
Grid.Column="5"
Width="1"
HorizontalAlignment="Center"
Fill="{DynamicResource DateTimePickerSeparatorBackground}" />
<Border
x:Name="PART_FourthPickerHost"
Grid.Column="6"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch">
<TextBlock <TextBlock
x:Name="PART_PeriodTextBlock" x:Name="PART_PeriodTextBlock"
Padding="12,0" Padding="12,0"

View File

@@ -2,6 +2,7 @@
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">
<!-- Add Resources Here -->
<ControlTheme x:Key="{x:Type TitleBar}" TargetType="TitleBar"> <ControlTheme x:Key="{x:Type TitleBar}" TargetType="TitleBar">
<Setter Property="VerticalAlignment" Value="Top" /> <Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="HorizontalAlignment" Value="Stretch" /> <Setter Property="HorizontalAlignment" Value="Stretch" />

View File

@@ -98,7 +98,6 @@
<Style Selector="^:checked"> <Style Selector="^:checked">
<Setter Property="Foreground" Value="{DynamicResource ToggleButtonCheckedForeground}" /> <Setter Property="Foreground" Value="{DynamicResource ToggleButtonCheckedForeground}" />
<Setter Property="Background" Value="{DynamicResource ToggleButtonPrimaryCheckedBackground}" /> <Setter Property="Background" Value="{DynamicResource ToggleButtonPrimaryCheckedBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource ToggleButtonPrimaryCheckedBorderBrush}" />
<Style Selector="^.Primary"> <Style Selector="^.Primary">
<Setter Property="Background" Value="{DynamicResource ToggleButtonPrimaryCheckedBackground}" /> <Setter Property="Background" Value="{DynamicResource ToggleButtonPrimaryCheckedBackground}" />
</Style> </Style>
@@ -139,12 +138,9 @@
</Style> </Style>
</Style> </Style>
<Style Selector="^:pressed"> <Style Selector="^:pressed">
<Setter Property="Foreground" Value="{DynamicResource ToggleButtonPrimaryCheckedPressedForeground}" />
<Setter Property="Background" Value="{DynamicResource ToggleButtonPrimaryCheckedPressedBackground}" /> <Setter Property="Background" Value="{DynamicResource ToggleButtonPrimaryCheckedPressedBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource ToggleButtonPrimaryCheckedPressedBorderBrush}" />
<Style Selector="^.Primary"> <Style Selector="^.Primary">
<Setter Property="Background" Value="{DynamicResource ToggleButtonPrimaryCheckedPressedBackground}" /> <Setter Property="Background" Value="{DynamicResource ToggleButtonPrimaryCheckedPressedBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource ToggleButtonPrimaryCheckedPressedBorderBrush}" />
</Style> </Style>
<Style Selector="^.Secondary"> <Style Selector="^.Secondary">
<Setter Property="Background" Value="{DynamicResource ToggleButtonSecondaryCheckedPressedBackground}" /> <Setter Property="Background" Value="{DynamicResource ToggleButtonSecondaryCheckedPressedBackground}" />
@@ -260,9 +256,6 @@
<Style Selector="^:disabled"> <Style Selector="^:disabled">
<Setter Property="Foreground" Value="{DynamicResource ToggleButtonDefaultDisabledForeground}" /> <Setter Property="Foreground" Value="{DynamicResource ToggleButtonDefaultDisabledForeground}" />
<Style Selector="^:checked">
<Setter Property="Foreground" Value="{DynamicResource ToggleButtonCheckedDisabledForeground}" />
</Style>
</Style> </Style>
<Style Selector="^.Large"> <Style Selector="^.Large">

View File

@@ -54,8 +54,6 @@
TemplatedControl.IsTemplateFocusTarget="True" TemplatedControl.IsTemplateFocusTarget="True"
Width="{DynamicResource ToggleSwitchDefaultWidth}" Width="{DynamicResource ToggleSwitchDefaultWidth}"
Height="{DynamicResource ToggleSwitchDefaultHeight}" Height="{DynamicResource ToggleSwitchDefaultHeight}"
BorderBrush="{DynamicResource ToggleSwitchDefaultBorderBrush}"
BorderThickness="1"
CornerRadius="100"> CornerRadius="100">
<Border.Transitions> <Border.Transitions>
<Transitions> <Transitions>
@@ -296,8 +294,6 @@
Cursor="Hand" Cursor="Hand"
Width="{DynamicResource ToggleSwitchDefaultWidth}" Width="{DynamicResource ToggleSwitchDefaultWidth}"
Height="{DynamicResource ToggleSwitchDefaultHeight}" Height="{DynamicResource ToggleSwitchDefaultHeight}"
BorderBrush="{DynamicResource ToggleSwitchDefaultBorderBrush}"
BorderThickness="1"
CornerRadius="100"> CornerRadius="100">
<Border.Transitions> <Border.Transitions>
<Transitions> <Transitions>

View File

@@ -2,6 +2,7 @@
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">
<!-- Add Resources Here -->
<ControlTheme x:Key="{x:Type ToolTip}" TargetType="ToolTip"> <ControlTheme x:Key="{x:Type ToolTip}" TargetType="ToolTip">
<Setter Property="Foreground" Value="{DynamicResource ToolTipForeground}" /> <Setter Property="Foreground" Value="{DynamicResource ToolTipForeground}" />
<Setter Property="Background" Value="{DynamicResource ToolTipBackground}" /> <Setter Property="Background" Value="{DynamicResource ToolTipBackground}" />

View File

@@ -23,10 +23,10 @@
</Design.PreviewWith> </Design.PreviewWith>
<ControlTheme x:Key="{x:Type TreeView}" TargetType="TreeView"> <ControlTheme x:Key="{x:Type TreeView}" TargetType="TreeView">
<Setter Property="Background" Value="Transparent" /> <Setter Property="TreeView.Background" Value="Transparent" />
<Setter Property="BorderBrush" Value="Transparent" /> <Setter Property="TreeView.BorderBrush" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" /> <Setter Property="TreeView.BorderThickness" Value="0" />
<Setter Property="Padding" Value="8 0" /> <Setter Property="TreeView.Padding" Value="8 0" />
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" /> <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" /> <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
<Setter Property="ScrollViewer.IsScrollChainingEnabled" Value="True" /> <Setter Property="ScrollViewer.IsScrollChainingEnabled" Value="True" />
@@ -94,11 +94,11 @@
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="{x:Type TreeViewItem}" TargetType="TreeViewItem"> <ControlTheme x:Key="{x:Type TreeViewItem}" TargetType="TreeViewItem">
<Setter Property="Background" Value="{DynamicResource TreeViewItemDefaultBackground}" /> <Setter Property="TreeViewItem.Background" Value="{DynamicResource TreeViewItemDefaultBackground}" />
<Setter Property="Foreground" Value="{DynamicResource TreeViewItemDefaultForeground}" /> <Setter Property="TreeViewItem.Foreground" Value="{DynamicResource TreeViewItemDefaultForeground}" />
<Setter Property="CornerRadius" Value="3" /> <Setter Property="TreeViewItem.CornerRadius" Value="3" />
<Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="TreeViewItem.VerticalAlignment" Value="Center" />
<Setter Property="Template"> <Setter Property="TreeViewItem.Template">
<ControlTemplate TargetType="TreeViewItem"> <ControlTemplate TargetType="TreeViewItem">
<StackPanel> <StackPanel>
<Border <Border
@@ -112,14 +112,17 @@
TemplatedControl.IsTemplateFocusTarget="True"> TemplatedControl.IsTemplateFocusTarget="True">
<Grid <Grid
Name="PART_Header" Name="PART_Header"
Margin="{TemplateBinding Level, Mode=OneWay, Converter={StaticResource TreeViewItemLeftMarginConverter}}" Margin="{TemplateBinding Level,
Mode=OneWay,
Converter={StaticResource TreeViewItemLeftMarginConverter}}"
ColumnDefinitions="Auto, *"> ColumnDefinitions="Auto, *">
<ToggleButton <ToggleButton
Name="PART_ExpandCollapseChevron" Name="PART_ExpandCollapseChevron"
Grid.Column="0" Grid.Column="0"
Padding="{DynamicResource TreeViewItemIconMargin}" Padding="{DynamicResource TreeViewItemIconMargin}"
Focusable="False" Focusable="False"
IsChecked="{TemplateBinding IsExpanded, Mode=TwoWay}" IsChecked="{TemplateBinding IsExpanded,
Mode=TwoWay}"
Theme="{StaticResource ToggleButtonTreeViewItemIconButton}" /> Theme="{StaticResource ToggleButtonTreeViewItemIconButton}" />
<ContentPresenter <ContentPresenter
Name="PART_HeaderPresenter" Name="PART_HeaderPresenter"
@@ -164,9 +167,6 @@
<Style Selector="^:selected /template/ Border#PART_LayoutRoot"> <Style Selector="^:selected /template/ Border#PART_LayoutRoot">
<Setter Property="Background" Value="{DynamicResource TreeViewItemSelectedBackground}" /> <Setter Property="Background" Value="{DynamicResource TreeViewItemSelectedBackground}" />
</Style> </Style>
<Style Selector="^:selected /template/ ContentPresenter#PART_HeaderPresenter">
<Setter Property="Foreground" Value="{DynamicResource TreeViewItemSelectedForeground}" />
</Style>
<!-- Disabled Selected state --> <!-- Disabled Selected state -->
<Style Selector="^:disabled:selected /template/ Border#PART_LayoutRoot"> <Style Selector="^:disabled:selected /template/ Border#PART_LayoutRoot">

View File

@@ -1,20 +1,18 @@
<ResourceDictionary <ResourceDictionary xmlns="https://github.com/avaloniaui"
x:Class="Semi.Avalonia.Locale.en_us" x:Class="Semi.Avalonia.Locale.en_us"
xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <!-- DatePicker -->
<!-- DatePicker -->
<x:String x:Key="STRING_DATEPICKER_DAY_TEXT">day</x:String> <x:String x:Key="STRING_DATEPICKER_DAY_TEXT">day</x:String>
<x:String x:Key="STRING_DATEPICKER_MONTH_TEXT">month</x:String> <x:String x:Key="STRING_DATEPICKER_MONTH_TEXT">month</x:String>
<x:String x:Key="STRING_DATEPICKER_YEAR_TEXT">year</x:String> <x:String x:Key="STRING_DATEPICKER_YEAR_TEXT">year</x:String>
<!-- TimePicker --> <!-- TimePicker -->
<x:String x:Key="STRING_TIMEPICKER_HOUR_TEXT">hour</x:String> <x:String x:Key="STRING_TIMEPICKER_HOUR_TEXT">hour</x:String>
<x:String x:Key="STRING_TIMEPICKER_MINUTE_TEXT">minute</x:String> <x:String x:Key="STRING_TIMEPICKER_MINUTE_TEXT">minute</x:String>
<x:String x:Key="STRING_TIMEPICKER_SECOND_TEXT">second</x:String>
<!-- TextBox/SelectableTextBox flyout --> <!-- TextBox/SelectableTextBox flyout -->
<x:String x:Key="STRING_MENU_CUT">Cut</x:String> <x:String x:Key="STRING_MENU_CUT">Cut</x:String>
<x:String x:Key="STRING_MENU_COPY">Copy</x:String> <x:String x:Key="STRING_MENU_COPY">Copy</x:String>
<x:String x:Key="STRING_MENU_PASTE">Paste</x:String> <x:String x:Key="STRING_MENU_PASTE">Paste</x:String>
<!-- ManagedFileChooser --> <!-- ManagedFileChooser -->
<x:String x:Key="STRING_CHOOSER_FILE_NAME">File name</x:String> <x:String x:Key="STRING_CHOOSER_FILE_NAME">File name</x:String>
<x:String x:Key="STRING_CHOOSER_SHOW_HIDDEN_FILES">Show hidden flies</x:String> <x:String x:Key="STRING_CHOOSER_SHOW_HIDDEN_FILES">Show hidden flies</x:String>
<x:String x:Key="STRING_CHOOSER_DIALOG_OK">OK</x:String> <x:String x:Key="STRING_CHOOSER_DIALOG_OK">OK</x:String>

View File

@@ -1,20 +1,18 @@
<ResourceDictionary <ResourceDictionary xmlns="https://github.com/avaloniaui"
x:Class="Semi.Avalonia.Locale.ja_jp" x:Class="Semi.Avalonia.Locale.ja_jp"
xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <!-- DatePicker -->
<!-- DatePicker -->
<x:String x:Key="STRING_DATEPICKER_DAY_TEXT">日</x:String> <x:String x:Key="STRING_DATEPICKER_DAY_TEXT">日</x:String>
<x:String x:Key="STRING_DATEPICKER_MONTH_TEXT">月</x:String> <x:String x:Key="STRING_DATEPICKER_MONTH_TEXT">月</x:String>
<x:String x:Key="STRING_DATEPICKER_YEAR_TEXT">年</x:String> <x:String x:Key="STRING_DATEPICKER_YEAR_TEXT">年</x:String>
<!-- TimePicker --> <!-- TimePicker -->
<x:String x:Key="STRING_TIMEPICKER_HOUR_TEXT">時</x:String> <x:String x:Key="STRING_TIMEPICKER_HOUR_TEXT">時</x:String>
<x:String x:Key="STRING_TIMEPICKER_MINUTE_TEXT">分</x:String> <x:String x:Key="STRING_TIMEPICKER_MINUTE_TEXT">分</x:String>
<x:String x:Key="STRING_TIMEPICKER_SECOND_TEXT">秒</x:String> <!-- TextBox/SelectableTextBox flyout -->
<!-- TextBox/SelectableTextBox flyout -->
<x:String x:Key="STRING_MENU_CUT">切り取り</x:String> <x:String x:Key="STRING_MENU_CUT">切り取り</x:String>
<x:String x:Key="STRING_MENU_COPY">コピー</x:String> <x:String x:Key="STRING_MENU_COPY">コピー</x:String>
<x:String x:Key="STRING_MENU_PASTE">貼り付け</x:String> <x:String x:Key="STRING_MENU_PASTE">貼り付け</x:String>
<!-- ManagedFileChooser --> <!-- ManagedFileChooser -->
<x:String x:Key="STRING_CHOOSER_FILE_NAME">ファイル名</x:String> <x:String x:Key="STRING_CHOOSER_FILE_NAME">ファイル名</x:String>
<x:String x:Key="STRING_CHOOSER_SHOW_HIDDEN_FILES">隠しファイルを表示</x:String> <x:String x:Key="STRING_CHOOSER_SHOW_HIDDEN_FILES">隠しファイルを表示</x:String>
<x:String x:Key="STRING_CHOOSER_DIALOG_OK">確認</x:String> <x:String x:Key="STRING_CHOOSER_DIALOG_OK">確認</x:String>

View File

@@ -1,20 +1,19 @@
<ResourceDictionary <ResourceDictionary xmlns="https://github.com/avaloniaui"
x:Class="Semi.Avalonia.Locale.ru_ru" x:Class="Semi.Avalonia.Locale.ru_ru"
xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <!-- DatePicker -->
<!-- DatePicker -->
<x:String x:Key="STRING_DATEPICKER_DAY_TEXT">день</x:String> <x:String x:Key="STRING_DATEPICKER_DAY_TEXT">день</x:String>
<x:String x:Key="STRING_DATEPICKER_MONTH_TEXT">месяц</x:String> <x:String x:Key="STRING_DATEPICKER_MONTH_TEXT">месяц</x:String>
<x:String x:Key="STRING_DATEPICKER_YEAR_TEXT">год</x:String> <x:String x:Key="STRING_DATEPICKER_YEAR_TEXT">год</x:String>
<!-- TimePicker --> <!-- TimePicker -->
<x:String x:Key="STRING_TIMEPICKER_HOUR_TEXT">часы</x:String> <x:String x:Key="STRING_TIMEPICKER_HOUR_TEXT">часы</x:String>
<x:String x:Key="STRING_TIMEPICKER_MINUTE_TEXT">минуты</x:String> <x:String x:Key="STRING_TIMEPICKER_MINUTE_TEXT">минуты</x:String>
<x:String x:Key="STRING_TIMEPICKER_SECOND_TEXT">секунды</x:String> <x:String x:Key="STRING_TIMEPICKER_SECOND_TEXT">секунды</x:String>
<!-- TextBox/SelectableTextBox flyout --> <!-- TextBox/SelectableTextBox flyout -->
<x:String x:Key="STRING_MENU_CUT">Вырезать</x:String> <x:String x:Key="STRING_MENU_CUT">Вырезать</x:String>
<x:String x:Key="STRING_MENU_COPY">Копировать</x:String> <x:String x:Key="STRING_MENU_COPY">Копировать</x:String>
<x:String x:Key="STRING_MENU_PASTE">Вставить</x:String> <x:String x:Key="STRING_MENU_PASTE">Вставить</x:String>
<!-- ManagedFileChooser --> <!-- ManagedFileChooser -->
<x:String x:Key="STRING_CHOOSER_FILE_NAME">Имя файла</x:String> <x:String x:Key="STRING_CHOOSER_FILE_NAME">Имя файла</x:String>
<x:String x:Key="STRING_CHOOSER_SHOW_HIDDEN_FILES">Показать скрытые файлы</x:String> <x:String x:Key="STRING_CHOOSER_SHOW_HIDDEN_FILES">Показать скрытые файлы</x:String>
<x:String x:Key="STRING_CHOOSER_DIALOG_OK">OK</x:String> <x:String x:Key="STRING_CHOOSER_DIALOG_OK">OK</x:String>

View File

@@ -1,27 +0,0 @@
<ResourceDictionary
x:Class="Semi.Avalonia.Locale.uk_uk"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- DatePicker -->
<x:String x:Key="STRING_DATEPICKER_DAY_TEXT">день</x:String>
<x:String x:Key="STRING_DATEPICKER_MONTH_TEXT">місяць</x:String>
<x:String x:Key="STRING_DATEPICKER_YEAR_TEXT">рік</x:String>
<!-- TimePicker -->
<x:String x:Key="STRING_TIMEPICKER_HOUR_TEXT">години</x:String>
<x:String x:Key="STRING_TIMEPICKER_MINUTE_TEXT">хвилини</x:String>
<x:String x:Key="STRING_TIMEPICKER_SECOND_TEXT">секунди</x:String>
<!-- TextBox/SelectableTextBox flyout -->
<x:String x:Key="STRING_MENU_CUT">Вирізати</x:String>
<x:String x:Key="STRING_MENU_COPY">Копіювати</x:String>
<x:String x:Key="STRING_MENU_PASTE">Вставити</x:String>
<!-- ManagedFileChooser -->
<x:String x:Key="STRING_CHOOSER_FILE_NAME">Ім'я файлу</x:String>
<x:String x:Key="STRING_CHOOSER_SHOW_HIDDEN_FILES">Показати приховані папки</x:String>
<x:String x:Key="STRING_CHOOSER_DIALOG_OK">ОК</x:String>
<x:String x:Key="STRING_CHOOSER_DIALOG_CANCEL">Відмінити</x:String>
<x:String x:Key="STRING_CHOOSER_NAME_COLUMN">Ім'я</x:String>
<x:String x:Key="STRING_CHOOSER_DATEMODIFIED_COLUMN">Дата редагування</x:String>
<x:String x:Key="STRING_CHOOSER_TYPE_COLUMN">Тип</x:String>
<x:String x:Key="STRING_CHOOSER_SIZE_COLUMN">Розмір</x:String>
<x:String x:Key="STRING_CHOOSER_PROMPT_FILE_ALREADY_EXISTS">{0} уже існує. Ви бажаєте замінити його?</x:String>
</ResourceDictionary>

View File

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

View File

@@ -1,20 +1,18 @@
<ResourceDictionary <ResourceDictionary xmlns="https://github.com/avaloniaui"
x:Class="Semi.Avalonia.Locale.zh_cn" x:Class="Semi.Avalonia.Locale.zh_cn"
xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <!-- DatePicker -->
<!-- DatePicker -->
<x:String x:Key="STRING_DATEPICKER_DAY_TEXT">日</x:String> <x:String x:Key="STRING_DATEPICKER_DAY_TEXT">日</x:String>
<x:String x:Key="STRING_DATEPICKER_MONTH_TEXT">月</x:String> <x:String x:Key="STRING_DATEPICKER_MONTH_TEXT">月</x:String>
<x:String x:Key="STRING_DATEPICKER_YEAR_TEXT">年</x:String> <x:String x:Key="STRING_DATEPICKER_YEAR_TEXT">年</x:String>
<!-- TimePicker --> <!-- TimePicker -->
<x:String x:Key="STRING_TIMEPICKER_HOUR_TEXT">时</x:String> <x:String x:Key="STRING_TIMEPICKER_HOUR_TEXT">时</x:String>
<x:String x:Key="STRING_TIMEPICKER_MINUTE_TEXT">分</x:String> <x:String x:Key="STRING_TIMEPICKER_MINUTE_TEXT">分</x:String>
<x:String x:Key="STRING_TIMEPICKER_SECOND_TEXT">秒</x:String>
<!-- TextBox/SelectableTextBox flyout --> <!-- TextBox/SelectableTextBox flyout -->
<x:String x:Key="STRING_MENU_CUT">剪切</x:String> <x:String x:Key="STRING_MENU_CUT">剪切</x:String>
<x:String x:Key="STRING_MENU_COPY">复制</x:String> <x:String x:Key="STRING_MENU_COPY">复制</x:String>
<x:String x:Key="STRING_MENU_PASTE">粘贴</x:String> <x:String x:Key="STRING_MENU_PASTE">粘贴</x:String>
<!-- ManagedFileChooser --> <!-- ManagedFileChooser -->
<x:String x:Key="STRING_CHOOSER_FILE_NAME">文件名</x:String> <x:String x:Key="STRING_CHOOSER_FILE_NAME">文件名</x:String>
<x:String x:Key="STRING_CHOOSER_SHOW_HIDDEN_FILES">显示隐藏文件</x:String> <x:String x:Key="STRING_CHOOSER_SHOW_HIDDEN_FILES">显示隐藏文件</x:String>
<x:String x:Key="STRING_CHOOSER_DIALOG_OK">确认</x:String> <x:String x:Key="STRING_CHOOSER_DIALOG_OK">确认</x:String>

View File

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

View File

@@ -23,7 +23,6 @@
<SolidColorBrush x:Key="ButtonSolidPrimaryBackground" Color="#54A9FF" /> <SolidColorBrush x:Key="ButtonSolidPrimaryBackground" Color="#54A9FF" />
<SolidColorBrush x:Key="ButtonSolidPrimaryPointeroverBackground" Color="#7FC1FF" /> <SolidColorBrush x:Key="ButtonSolidPrimaryPointeroverBackground" Color="#7FC1FF" />
<SolidColorBrush x:Key="ButtonSolidPrimaryPressedForeground" Color="White" />
<SolidColorBrush x:Key="ButtonSolidPrimaryPressedBackground" Color="#A9D7FF" /> <SolidColorBrush x:Key="ButtonSolidPrimaryPressedBackground" Color="#A9D7FF" />
<SolidColorBrush x:Key="ButtonSolidSecondaryBackground" Color="#40B4F3" /> <SolidColorBrush x:Key="ButtonSolidSecondaryBackground" Color="#40B4F3" />
@@ -70,9 +69,7 @@
<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="ButtonSolidDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
<SolidColorBrush x:Key="ButtonSolidDisabledBackground" Color="#2E3238" /> <SolidColorBrush x:Key="ButtonSolidDisabledBackground" Color="#2E3238" />
<SolidColorBrush x:Key="ButtonSolidDisabledBorderBrush" Color="Transparent" />
<!-- end Solid --> <!-- end Solid -->
<!-- Outline --> <!-- Outline -->
@@ -85,11 +82,6 @@
<SolidColorBrush x:Key="ButtonOutlineDangerBorderBrush" Color="#FC725A" /> <SolidColorBrush x:Key="ButtonOutlineDangerBorderBrush" Color="#FC725A" />
<!-- end Outline --> <!-- end Outline -->
<!-- Borderless -->
<SolidColorBrush x:Key="ButtonBorderlessBackground" Color="Transparent" />
<SolidColorBrush x:Key="ButtonBorderlessBorderBrush" Color="Transparent" />
<!-- end Borderless -->
<SolidColorBrush x:Key="ButtonInputInnerForeground" Opacity="0.6" Color="#F9F9F9" /> <SolidColorBrush x:Key="ButtonInputInnerForeground" Opacity="0.6" Color="#F9F9F9" />
<SolidColorBrush x:Key="ButtonInputInnerPointeroverForeground" Color="#7FC1FF" /> <SolidColorBrush x:Key="ButtonInputInnerPointeroverForeground" Color="#7FC1FF" />
<SolidColorBrush x:Key="ButtonInputInnerPressedForeground" Color="#A9D7FF" /> <SolidColorBrush x:Key="ButtonInputInnerPressedForeground" Color="#A9D7FF" />

View File

@@ -1,7 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SolidColorBrush x:Key="ButtonSpinnerRepeatButtonBackground" Color="#35363C" /> <SolidColorBrush x:Key="ButtonSpinnerRepeatButtonBackground" Color="#35363C" />
<SolidColorBrush x:Key="ButtonSpinnerRepeatButtonPointeroverBackground" Opacity="0.12" Color="White" /> <SolidColorBrush x:Key="ButtonSpinnerRepeatButtonPointeroverBackground" Opacity="0.12" Color="White" />
<SolidColorBrush x:Key="ButtonSpinnerRepeatButtonPointeroverBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="ButtonSpinnerRepeatButtonPressedBackground" Opacity="0.16" Color="White" /> <SolidColorBrush x:Key="ButtonSpinnerRepeatButtonPressedBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="ButtonSpinnerRepeatButtonDisabledBackground" Opacity="0.04" Color="#2E3238" /> <SolidColorBrush x:Key="ButtonSpinnerRepeatButtonDisabledBackground" Opacity="0.04" Color="#2E3238" />
<SolidColorBrush x:Key="ButtonSpinnerRepeatButtonForeground" Opacity="0.6" Color="#F9F9F9" /> <SolidColorBrush x:Key="ButtonSpinnerRepeatButtonForeground" Opacity="0.6" Color="#F9F9F9" />

View File

@@ -3,9 +3,7 @@
<SolidColorBrush x:Key="CalendarDatePickerForeground" Color="#F9F9F9" /> <SolidColorBrush x:Key="CalendarDatePickerForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="CalendarDatePickerIconPointeroverForeground" Color="#F9F9F9" /> <SolidColorBrush x:Key="CalendarDatePickerIconPointeroverForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="CalendarDatePickerBackground" Opacity="0.12" Color="White" /> <SolidColorBrush x:Key="CalendarDatePickerBackground" Opacity="0.12" Color="White" />
<SolidColorBrush x:Key="CalendarDatePickerBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="CalendarDatePickerPointeroverBackground" Opacity="0.16" Color="White" /> <SolidColorBrush x:Key="CalendarDatePickerPointeroverBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="CalendarDatePickerPointeroverBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="CalendarDatePickerFocusBorderBrush" Color="#54A9FF" /> <SolidColorBrush x:Key="CalendarDatePickerFocusBorderBrush" Color="#54A9FF" />
<SolidColorBrush x:Key="CalendarDatePickerDisabledBackground" Opacity="0.04" Color="#E6E8EA" /> <SolidColorBrush x:Key="CalendarDatePickerDisabledBackground" Opacity="0.04" Color="#E6E8EA" />
<SolidColorBrush x:Key="CalendarDatePickerDisabledIconForeground" Opacity="0.4" Color="#E6E8EA" /> <SolidColorBrush x:Key="CalendarDatePickerDisabledIconForeground" Opacity="0.4" Color="#E6E8EA" />

View File

@@ -4,7 +4,6 @@
<SolidColorBrush x:Key="ComboBoxSelectorFocusBackground" Opacity="0.16" Color="White" /> <SolidColorBrush x:Key="ComboBoxSelectorFocusBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="ComboBoxSelectorPressedBackground" Opacity="0.20" Color="White" /> <SolidColorBrush x:Key="ComboBoxSelectorPressedBackground" Opacity="0.20" Color="White" />
<SolidColorBrush x:Key="ComboBoxSelectorDisabledBackground" Opacity="0.04" Color="#E6E8EA" /> <SolidColorBrush x:Key="ComboBoxSelectorDisabledBackground" Opacity="0.04" Color="#E6E8EA" />
<SolidColorBrush x:Key="ComboBoxSelectorDisabledBorderBrush" Opacity="0.04" Color="#E6E8EA" />
<SolidColorBrush x:Key="ComboBoxSelectorBorderBrush" Color="Transparent" /> <SolidColorBrush x:Key="ComboBoxSelectorBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="ComboBoxSelectorPointeroverBorderBrush" Color="Transparent" /> <SolidColorBrush x:Key="ComboBoxSelectorPointeroverBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="ComboBoxSelectorFocusBorderBrush" Color="#54A9FF" /> <SolidColorBrush x:Key="ComboBoxSelectorFocusBorderBrush" Color="#54A9FF" />
@@ -25,13 +24,9 @@
<SolidColorBrush x:Key="ComboBoxItemForeground" Color="#F9F9F9" /> <SolidColorBrush x:Key="ComboBoxItemForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="ComboBoxItemBackground" Color="Transparent" /> <SolidColorBrush x:Key="ComboBoxItemBackground" Color="Transparent" />
<SolidColorBrush x:Key="ComboBoxItemPointeroverForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="ComboBoxItemPointeroverBackground" Opacity="0.12" Color="White" /> <SolidColorBrush x:Key="ComboBoxItemPointeroverBackground" Opacity="0.12" Color="White" />
<SolidColorBrush x:Key="ComboBoxItemFocusForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="ComboBoxItemFocusBackground" Opacity="0.12" Color="White" /> <SolidColorBrush x:Key="ComboBoxItemFocusBackground" Opacity="0.12" Color="White" />
<SolidColorBrush x:Key="ComboBoxItemPressedForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="ComboBoxItemPressedBackground" Opacity="0.16" Color="White" /> <SolidColorBrush x:Key="ComboBoxItemPressedBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="ComboBoxItemSelectedForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="ComboBoxItemSelectedBackground" Opacity="0.2" Color="#54A9FF" /> <SolidColorBrush x:Key="ComboBoxItemSelectedBackground" Opacity="0.2" Color="#54A9FF" />
<SolidColorBrush x:Key="ComboBoxItemSelectedPointeroverBackground" Opacity="0.3" Color="#54A9FF" /> <SolidColorBrush x:Key="ComboBoxItemSelectedPointeroverBackground" Opacity="0.3" Color="#54A9FF" />

View File

@@ -1,7 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SolidColorBrush x:Key="DateTimePickerListItemBackground" Color="Transparent" /> <SolidColorBrush x:Key="DateTimePickerListItemBackground" Color="Transparent" />
<SolidColorBrush x:Key="DateTimePickerPopupBackground" Color="#43444A" /> <SolidColorBrush x:Key="DateTimePickerPopupBackground" Color="#43444A" />
<SolidColorBrush x:Key="DateTimePickerPopupBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="DateTimePickerFlyoutButtonForeground" Opacity="0.6" Color="#F9F9F9" /> <SolidColorBrush x:Key="DateTimePickerFlyoutButtonForeground" Opacity="0.6" Color="#F9F9F9" />
<SolidColorBrush x:Key="DateTimePickerFlyoutButtonPointeroverForeground" Color="#F9F9F9" /> <SolidColorBrush x:Key="DateTimePickerFlyoutButtonPointeroverForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="DateTimePickerFlyoutButtonPressedForeground" Color="#F9F9F9" /> <SolidColorBrush x:Key="DateTimePickerFlyoutButtonPressedForeground" Color="#F9F9F9" />
@@ -21,7 +20,6 @@
<SolidColorBrush x:Key="DateTimePickerEmptyForeground" Opacity="0.5" Color="#F9F9F9" /> <SolidColorBrush x:Key="DateTimePickerEmptyForeground" Opacity="0.5" Color="#F9F9F9" />
<SolidColorBrush x:Key="DateTimePickerButtonPointeroverBackground" Opacity="0.16" Color="White" /> <SolidColorBrush x:Key="DateTimePickerButtonPointeroverBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="DateTimePickerButtonPointeroverBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="DateTimePickerButtonDisabledBorderBrush" Color="Transparent" /> <SolidColorBrush x:Key="DateTimePickerButtonDisabledBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="DateTimePickerButtonDisabledBackground" Opacity="0.04" Color="#E6E8EA" /> <SolidColorBrush x:Key="DateTimePickerButtonDisabledBackground" Opacity="0.04" Color="#E6E8EA" />
<SolidColorBrush x:Key="DateTimePickerButtonDisabledIconForeground" Opacity="0.4" Color="#E6E8EA" /> <SolidColorBrush x:Key="DateTimePickerButtonDisabledIconForeground" Opacity="0.4" Color="#E6E8EA" />

View File

@@ -3,11 +3,8 @@
<SolidColorBrush x:Key="ListBoxItemDisabledForeground" Opacity="0.35" Color="#F9F9F9" /> <SolidColorBrush x:Key="ListBoxItemDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
<SolidColorBrush x:Key="ListBoxItemDefaultBackground" Color="Transparent" /> <SolidColorBrush x:Key="ListBoxItemDefaultBackground" Color="Transparent" />
<SolidColorBrush x:Key="ListBoxItemPointeroverForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="ListBoxItemPointeroverBackground" Opacity="0.12" Color="White" /> <SolidColorBrush x:Key="ListBoxItemPointeroverBackground" Opacity="0.12" Color="White" />
<SolidColorBrush x:Key="ListBoxItemPressedForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="ListBoxItemPressedBackground" Opacity="0.16" Color="White" /> <SolidColorBrush x:Key="ListBoxItemPressedBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="ListBoxItemSelectedForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="ListBoxItemSelectedBackground" Opacity="0.2" Color="#54A9FF" /> <SolidColorBrush x:Key="ListBoxItemSelectedBackground" Opacity="0.2" Color="#54A9FF" />
<SolidColorBrush x:Key="ListBoxItemSelectedPointeroverBackground" Opacity="0.3" Color="#54A9FF" /> <SolidColorBrush x:Key="ListBoxItemSelectedPointeroverBackground" Opacity="0.3" Color="#54A9FF" />
<SolidColorBrush x:Key="ListBoxItemDisabledBackground" Color="Transparent" /> <SolidColorBrush x:Key="ListBoxItemDisabledBackground" Color="Transparent" />

View File

@@ -1,6 +1,5 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SolidColorBrush x:Key="MenuFlyoutScrollViewerIconForeground" Opacity="0.6" Color="#F9F9F9" /> <SolidColorBrush x:Key="MenuFlyoutScrollViewerIconForeground" Opacity="0.6" Color="#F9F9F9" />
<SolidColorBrush x:Key="MenuBackground" Color="Transparent"/>
<!-- MenuFlyout --> <!-- MenuFlyout -->
<SolidColorBrush x:Key="MenuFlyoutBackground" Color="#43444A" /> <SolidColorBrush x:Key="MenuFlyoutBackground" Color="#43444A" />
@@ -8,11 +7,10 @@
<BoxShadows x:Key="MenuFlyoutBorderBoxShadow">0 0 8 0 #1AFFFFFF</BoxShadows> <BoxShadows x:Key="MenuFlyoutBorderBoxShadow">0 0 8 0 #1AFFFFFF</BoxShadows>
<!-- MenuItem --> <!-- MenuItem -->
<SolidColorBrush x:Key="MenuItemBackground" Color="Transparent" /> <SolidColorBrush x:Key="MenuItemBackground" Color="#43444A" />
<SolidColorBrush x:Key="MenuItemForeground" Color="#F9F9F9" /> <SolidColorBrush x:Key="MenuItemForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="MenuItemSeparatorBackground" Opacity="0.08" Color="White" /> <SolidColorBrush x:Key="MenuItemSeparatorBackground" Opacity="0.08" Color="White" />
<SolidColorBrush x:Key="MenuItemPointeroverForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="MenuItemPointeroverBackground" Opacity="0.12" Color="White" /> <SolidColorBrush x:Key="MenuItemPointeroverBackground" Opacity="0.12" Color="White" />
<SolidColorBrush x:Key="MenuItemPressedBackground" Opacity="0.16" Color="White" /> <SolidColorBrush x:Key="MenuItemPressedBackground" Opacity="0.16" Color="White" />

View File

@@ -5,17 +5,7 @@
<SolidColorBrush x:Key="NotificationCardSuccessIconForeground" Color="#5DC264" /> <SolidColorBrush x:Key="NotificationCardSuccessIconForeground" Color="#5DC264" />
<SolidColorBrush x:Key="NotificationCardWarningIconForeground" Color="#FFAE43" /> <SolidColorBrush x:Key="NotificationCardWarningIconForeground" Color="#FFAE43" />
<SolidColorBrush x:Key="NotificationCardErrorIconForeground" Color="#FC725A" /> <SolidColorBrush x:Key="NotificationCardErrorIconForeground" Color="#FC725A" />
<BoxShadows x:Key="NotificationCardBoxShadows">inset 0 0 0 1 #1AFFFFFF, 0 4 14 0 #40000000</BoxShadows> <BoxShadows x:Key="NotificationCardBoxShadows">0 0 8 0 #1AFFFFFF</BoxShadows>
<SolidColorBrush x:Key="NotificationCardTitleForeground" Color="#F9F9F9" /> <SolidColorBrush x:Key="NotificationCardTitleForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="NotificationCardMessageForeground" Opacity="0.8" Color="#F9F9F9" /> <SolidColorBrush x:Key="NotificationCardMessageForeground" Opacity="0.8" Color="#F9F9F9" />
<SolidColorBrush x:Key="NotificationCardLightBackground" Color="#16161A" />
<SolidColorBrush x:Key="NotificationCardLightInformationBorderBrush" Color="#54A9FF" />
<SolidColorBrush x:Key="NotificationCardLightInformationBackground" Opacity="0.2" Color="#54A9FF" />
<SolidColorBrush x:Key="NotificationCardLightSuccessBorderBrush" Color="#5DC264" />
<SolidColorBrush x:Key="NotificationCardLightSuccessBackground" Opacity="0.2" Color="#5DC264" />
<SolidColorBrush x:Key="NotificationCardLightWarningBorderBrush" Color="#FFAE43" />
<SolidColorBrush x:Key="NotificationCardLightWarningBackground" Opacity="0.2" Color="#FFAE43" />
<SolidColorBrush x:Key="NotificationCardLightErrorBorderBrush" Color="#FC725A" />
<SolidColorBrush x:Key="NotificationCardLightErrorBackground" Opacity="0.2" Color="#FC725A" />
</ResourceDictionary> </ResourceDictionary>

View File

@@ -4,7 +4,6 @@
<SolidColorBrush x:Key="TextBoxDefaultBorderBrush" Color="Transparent" /> <SolidColorBrush x:Key="TextBoxDefaultBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="TextBoxDefaultBackground" Opacity="0.12" Color="White" /> <SolidColorBrush x:Key="TextBoxDefaultBackground" Opacity="0.12" Color="White" />
<SolidColorBrush x:Key="TextBoxPointeroverBackground" Opacity="0.16" Color="White" /> <SolidColorBrush x:Key="TextBoxPointeroverBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="TextBoxPointeroverBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="TextBoxPressedBackground" Opacity="0.2" Color="White" /> <SolidColorBrush x:Key="TextBoxPressedBackground" Opacity="0.2" Color="White" />
<SolidColorBrush x:Key="TextBoxFocusBorderBrush" Color="#54A9FF" /> <SolidColorBrush x:Key="TextBoxFocusBorderBrush" Color="#54A9FF" />
<SolidColorBrush x:Key="TextBoxForeground" Color="#F9F9F9" /> <SolidColorBrush x:Key="TextBoxForeground" Color="#F9F9F9" />

View File

@@ -4,7 +4,6 @@
<SolidColorBrush x:Key="ToggleButtonDefaultPressedBackground" Opacity="0.20" Color="White" /> <SolidColorBrush x:Key="ToggleButtonDefaultPressedBackground" Opacity="0.20" Color="White" />
<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" />
<SolidColorBrush x:Key="ToggleButtonCheckedDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
<SolidColorBrush x:Key="ToggleButtonDefaultBorderBrush" Color="Transparent" /> <SolidColorBrush x:Key="ToggleButtonDefaultBorderBrush" Color="Transparent" />
@@ -16,7 +15,6 @@
<SolidColorBrush x:Key="ToggleButtonDefaultDangerForeground" Color="#FC725A" /> <SolidColorBrush x:Key="ToggleButtonDefaultDangerForeground" Color="#FC725A" />
<SolidColorBrush x:Key="ToggleButtonPrimaryCheckedBackground" Color="#54A9FF" /> <SolidColorBrush x:Key="ToggleButtonPrimaryCheckedBackground" Color="#54A9FF" />
<SolidColorBrush x:Key="ToggleButtonPrimaryCheckedBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="ToggleButtonSecondaryCheckedBackground" Color="#40B4F3" /> <SolidColorBrush x:Key="ToggleButtonSecondaryCheckedBackground" Color="#40B4F3" />
<SolidColorBrush x:Key="ToggleButtonTertiaryCheckedBackground" Color="#888D92" /> <SolidColorBrush x:Key="ToggleButtonTertiaryCheckedBackground" Color="#888D92" />
<SolidColorBrush x:Key="ToggleButtonSuccessCheckedBackground" Color="#5DC264" /> <SolidColorBrush x:Key="ToggleButtonSuccessCheckedBackground" Color="#5DC264" />
@@ -30,9 +28,7 @@
<SolidColorBrush x:Key="ToggleButtonWarningCheckedPointeroverBackground" Color="#FFC772" /> <SolidColorBrush x:Key="ToggleButtonWarningCheckedPointeroverBackground" Color="#FFC772" />
<SolidColorBrush x:Key="ToggleButtonDangerCheckedPointeroverBackground" Color="#FD9983" /> <SolidColorBrush x:Key="ToggleButtonDangerCheckedPointeroverBackground" Color="#FD9983" />
<SolidColorBrush x:Key="ToggleButtonPrimaryCheckedPressedForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="ToggleButtonPrimaryCheckedPressedBackground" Color="#A9D7FF" /> <SolidColorBrush x:Key="ToggleButtonPrimaryCheckedPressedBackground" Color="#A9D7FF" />
<SolidColorBrush x:Key="ToggleButtonPrimaryCheckedPressedBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="ToggleButtonSecondaryCheckedPressedBackground" Color="#9DDCF9" /> <SolidColorBrush x:Key="ToggleButtonSecondaryCheckedPressedBackground" Color="#9DDCF9" />
<SolidColorBrush x:Key="ToggleButtonTertiaryCheckedPressedBackground" Color="#C6CACD" /> <SolidColorBrush x:Key="ToggleButtonTertiaryCheckedPressedBackground" Color="#C6CACD" />
<SolidColorBrush x:Key="ToggleButtonSuccessCheckedPressedBackground" Color="#A6E1A8" /> <SolidColorBrush x:Key="ToggleButtonSuccessCheckedPressedBackground" Color="#A6E1A8" />

View File

@@ -1,6 +1,4 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SolidColorBrush x:Key="ToggleSwitchDefaultBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="ToggleSwitchContainerUnCheckedDefaultBackground" Opacity="0.12" Color="White" /> <SolidColorBrush x:Key="ToggleSwitchContainerUnCheckedDefaultBackground" Opacity="0.12" Color="White" />
<SolidColorBrush x:Key="ToggleSwitchContainerUnCheckedPointeroverBackground" Opacity="0.16" Color="White" /> <SolidColorBrush x:Key="ToggleSwitchContainerUnCheckedPointeroverBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="ToggleSwitchContainerUnCheckedPressedBackground" Opacity="0.20" Color="White" /> <SolidColorBrush x:Key="ToggleSwitchContainerUnCheckedPressedBackground" Opacity="0.20" Color="White" />

View File

@@ -5,10 +5,8 @@
<SolidColorBrush x:Key="TreeViewItemDisabledForeground" Opacity="0.35" Color="#F9F9F9" /> <SolidColorBrush x:Key="TreeViewItemDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
<SolidColorBrush x:Key="TreeViewItemDefaultBackground" Color="Transparent" /> <SolidColorBrush x:Key="TreeViewItemDefaultBackground" Color="Transparent" />
<SolidColorBrush x:Key="TreeViewItemPointeroverForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="TreeViewItemPointeroverBackground" Opacity="0.12" Color="White" /> <SolidColorBrush x:Key="TreeViewItemPointeroverBackground" Opacity="0.12" Color="White" />
<SolidColorBrush x:Key="TreeViewItemPressedBackground" Opacity="0.16" Color="White" /> <SolidColorBrush x:Key="TreeViewItemPressedBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="TreeViewItemSelectedForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="TreeViewItemSelectedBackground" Opacity="0.2" Color="#54A9FF" /> <SolidColorBrush x:Key="TreeViewItemSelectedBackground" Opacity="0.2" Color="#54A9FF" />
<SolidColorBrush x:Key="TreeViewItemDisabledBackground" Color="Transparent" /> <SolidColorBrush x:Key="TreeViewItemDisabledBackground" Color="Transparent" />
<SolidColorBrush x:Key="TreeViewItemSelectedDisabledBackground" Opacity="0.04" Color="#E6E8EA" /> <SolidColorBrush x:Key="TreeViewItemSelectedDisabledBackground" Opacity="0.04" Color="#E6E8EA" />

View File

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

View File

@@ -1,13 +0,0 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Color x:Key="WindowColor">#202020</Color>
<Color x:Key="WindowTextColor">#FFFFFF</Color>
<Color x:Key="HotlightColor">#75E9FC</Color>
<Color x:Key="GrayTextColor">#A6A6A6</Color>
<Color x:Key="HighlightTextColor">#263B50</Color>
<Color x:Key="HighlightColor">#8EE3F0</Color>
<Color x:Key="ButtonTextColor">#FFFFFF</Color>
<Color x:Key="ButtonFaceColor">#202020</Color>
<ResourceDictionary.MergedDictionaries>
<ResourceInclude Source="avares://Semi.Avalonia/Themes/HighContrast/_index.axaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>

View File

@@ -1,4 +0,0 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SolidColorBrush x:Key="AutoCompleteBoxPopupBackground" Color="{StaticResource WindowColor}" />
<SolidColorBrush x:Key="AutoCompleteBoxPopupBorderBrush" Color="{StaticResource ButtonTextColor}" />
</ResourceDictionary>

View File

@@ -1,4 +0,0 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SolidColorBrush x:Key="BorderCardBackground" Color="{StaticResource WindowColor}" />
<SolidColorBrush x:Key="BorderCardBorderBrush" Color="{StaticResource WindowTextColor}" />
</ResourceDictionary>

View File

@@ -1,48 +0,0 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- Light -->
<SolidColorBrush x:Key="ButtonDefaultPrimaryForeground" Color="{StaticResource ButtonTextColor}" />
<SolidColorBrush x:Key="ButtonDefaultDisabledForeground" Color="{StaticResource GrayTextColor}" />
<SolidColorBrush x:Key="ButtonDefaultBackground" Color="{StaticResource ButtonFaceColor}" />
<SolidColorBrush x:Key="ButtonDefaultPointeroverBackground" Color="{StaticResource HighlightTextColor}" />
<SolidColorBrush x:Key="ButtonDefaultPressedBackground" Color="{StaticResource HighlightTextColor}" />
<SolidColorBrush x:Key="ButtonDefaultBorderBrush" Color="{StaticResource ButtonTextColor}" />
<SolidColorBrush x:Key="ButtonDefaultPointeroverBorderBrush" Color="{StaticResource HighlightColor}" />
<SolidColorBrush x:Key="ButtonDefaultPressedBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="ButtonDefaultDisabledBorderBrush" Color="{StaticResource GrayTextColor}" />
<!-- end Light -->
<!-- Solid -->
<SolidColorBrush x:Key="ButtonSolidForeground" Color="{StaticResource HighlightTextColor}" />
<SolidColorBrush x:Key="ButtonSolidPrimaryBackground" Color="{StaticResource HighlightColor}" />
<SolidColorBrush x:Key="ButtonSolidPrimaryPointeroverBackground" Color="{StaticResource ButtonTextColor}" />
<SolidColorBrush x:Key="ButtonSolidPrimaryPressedForeground" Color="{StaticResource HighlightColor}" />
<SolidColorBrush x:Key="ButtonSolidPrimaryPressedBackground" Color="{StaticResource ButtonFaceColor}" />
<SolidColorBrush x:Key="ButtonSolidPrimaryBorderBrush" Color="{StaticResource HighlightColor}" />
<SolidColorBrush x:Key="ButtonSolidPrimaryPointeroverBorderBrush" Color="{StaticResource ButtonTextColor}" />
<SolidColorBrush x:Key="ButtonSolidPrimaryPressedBorderBrush" Color="{StaticResource HighlightColor}" />
<SolidColorBrush x:Key="ButtonSolidDisabledBackground" Color="{StaticResource GrayTextColor}" />
<SolidColorBrush x:Key="ButtonSolidDisabledForeground" Color="{StaticResource ButtonFaceColor}" />
<SolidColorBrush x:Key="ButtonSolidDisabledBorderBrush" Color="Transparent" />
<!-- end Solid -->
<!-- Borderless -->
<SolidColorBrush x:Key="ButtonBorderlessBackground" Color="Transparent" />
<SolidColorBrush x:Key="ButtonBorderlessBorderBrush" Color="Transparent" />
<!-- end Borderless -->
<!-- Outline -->
<SolidColorBrush x:Key="ButtonOutlineBackground" Color="Transparent" />
<SolidColorBrush x:Key="ButtonOutlineBorderBrush" Color="{StaticResource WindowTextColor}" />
<SolidColorBrush x:Key="ButtonOutlinePointeroverBackground" Color="{StaticResource HighlightTextColor}" />
<SolidColorBrush x:Key="ButtonOutlinePressedBackground" Color="{StaticResource WindowColor}" />
<!-- end Outline -->
<SolidColorBrush x:Key="ButtonInputInnerForeground" Color="{StaticResource ButtonTextColor}" />
<SolidColorBrush x:Key="ButtonInputInnerPointeroverForeground" Color="{StaticResource HighlightColor}" />
<SolidColorBrush x:Key="ButtonInputInnerPressedForeground" Color="{StaticResource HighlightColor}" />
</ResourceDictionary>

View File

@@ -1,9 +0,0 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SolidColorBrush x:Key="ButtonSpinnerRepeatButtonBackground" Color="{StaticResource ButtonFaceColor}" />
<SolidColorBrush x:Key="ButtonSpinnerRepeatButtonPointeroverBackground" Color="{StaticResource HighlightTextColor}" />
<SolidColorBrush x:Key="ButtonSpinnerRepeatButtonPointeroverBorderBrush" Color="{StaticResource HighlightColor}" />
<SolidColorBrush x:Key="ButtonSpinnerRepeatButtonPressedBackground" Color="{StaticResource HighlightTextColor}" />
<SolidColorBrush x:Key="ButtonSpinnerRepeatButtonDisabledBackground" Color="{StaticResource GrayTextColor}" />
<SolidColorBrush x:Key="ButtonSpinnerRepeatButtonForeground" Color="{StaticResource ButtonTextColor}" />
<SolidColorBrush x:Key="ButtonSpinnerRepeatButtonBorderBrush" Color="{StaticResource ButtonTextColor}" />
</ResourceDictionary>

View File

@@ -1,35 +0,0 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SolidColorBrush x:Key="CalendarBackground" Color="{StaticResource WindowColor}" />
<SolidColorBrush x:Key="CalendarForeground" Color="{StaticResource WindowTextColor}" />
<SolidColorBrush x:Key="CalendarBorderBrush" Color="{StaticResource WindowTextColor}" />
<SolidColorBrush x:Key="CalendarItemWeekDayNameForeground" Color="{StaticResource WindowTextColor}" />
<SolidColorBrush x:Key="CalendarItemIconForeground" Color="{StaticResource WindowTextColor}" />
<SolidColorBrush x:Key="CalendarItemCalendarButtonBackground" Color="{StaticResource WindowColor}" />
<SolidColorBrush x:Key="CalendarItemCalendarButtonForeground" Color="{StaticResource WindowTextColor}" />
<SolidColorBrush x:Key="CalendarItemCalendarButtonBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="CalendarItemCalendarButtonPointeroverBackground" Color="{StaticResource HighlightTextColor}" />
<SolidColorBrush x:Key="CalendarItemCalendarButtonPressedBackground" Color="{StaticResource HighlightTextColor}" />
<SolidColorBrush x:Key="CalendarItemCalendarButtonSelectedBackground" Color="{StaticResource HighlightColor}" />
<SolidColorBrush x:Key="CalendarItemCalendarButtonSelectedForeground" Color="{StaticResource HighlightTextColor}" />
<SolidColorBrush x:Key="CalendarItemCalendarButtonDisabledForeground" Color="{StaticResource GrayTextColor}" />
<SolidColorBrush x:Key="CalendarItemCalendarButtonBlackoutForeground" Color="{StaticResource GrayTextColor}" />
<SolidColorBrush x:Key="CalendarItemCalendarButtonInactiveForeground" Color="{StaticResource GrayTextColor}" />
<SolidColorBrush x:Key="CalendarItemCalendarDayButtonForeground" Color="{StaticResource WindowTextColor}" />
<SolidColorBrush x:Key="CalendarItemCalendarDayButtonBackground" Color="{StaticResource WindowColor}" />
<SolidColorBrush x:Key="CalendarItemCalendarDayButtonBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="CalendarItemCalendarDayButtonPointeroverBackground" Color="{StaticResource HighlightTextColor}" />
<SolidColorBrush x:Key="CalendarItemCalendarDayButtonPressedBackground" Color="{StaticResource HighlightTextColor}" />
<SolidColorBrush x:Key="CalendarItemCalendarDayButtonSelectedBackground" Color="{StaticResource HighlightColor}" />
<SolidColorBrush x:Key="CalendarItemCalendarDayButtonSelectedForeground" Color="{StaticResource HighlightTextColor}" />
<SolidColorBrush x:Key="CalendarItemCalendarDayButtonTodayForeground" Color="{StaticResource HighlightColor}" />
<SolidColorBrush x:Key="CalendarItemCalendarDayButtonTodayBackground" Color="{StaticResource HighlightTextColor}" />
<SolidColorBrush x:Key="CalendarItemCalendarDayButtonDisabledForeground" Color="{StaticResource GrayTextColor}" />
<SolidColorBrush x:Key="CalendarItemCalendarDayButtonBlackoutForeground" Color="{StaticResource GrayTextColor}" />
<SolidColorBrush x:Key="CalendarItemCalendarDayButtonInactiveForeground" Color="{StaticResource GrayTextColor}" />
</ResourceDictionary>

View File

@@ -1,12 +0,0 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SolidColorBrush x:Key="CalendarDatePickerIconForeground" Color="{StaticResource ButtonTextColor}" />
<SolidColorBrush x:Key="CalendarDatePickerForeground" Color="{StaticResource WindowTextColor}" />
<SolidColorBrush x:Key="CalendarDatePickerIconPointeroverForeground" Color="{StaticResource HighlightColor}" />
<SolidColorBrush x:Key="CalendarDatePickerBackground" Color="{StaticResource WindowColor}" />
<SolidColorBrush x:Key="CalendarDatePickerPointeroverBackground" Color="{StaticResource HighlightTextColor}" />
<SolidColorBrush x:Key="CalendarDatePickerPointeroverBorderBrush" Color="{StaticResource HighlightColor}" />
<SolidColorBrush x:Key="CalendarDatePickerFocusBorderBrush" Color="{StaticResource HighlightColor}" />
<SolidColorBrush x:Key="CalendarDatePickerDisabledBackground" Color="{StaticResource WindowColor}" />
<SolidColorBrush x:Key="CalendarDatePickerDisabledIconForeground" Color="{StaticResource GrayTextColor}" />
<SolidColorBrush x:Key="CalendarDatePickerBorderBrush" Color="{StaticResource ButtonTextColor}" />
</ResourceDictionary>

View File

@@ -1,7 +0,0 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SolidColorBrush x:Key="CaptionButtonPointeroverBackground" Color="{StaticResource HotlightColor}" />
<SolidColorBrush x:Key="CaptionButtonPressedBackground" Color="{StaticResource HotlightColor}" />
<SolidColorBrush x:Key="CaptionButtonClosePointeroverBackground" Color="{StaticResource HotlightColor}" />
<SolidColorBrush x:Key="CaptionButtonClosePressedBackground" Color="{StaticResource HotlightColor}" />
<SolidColorBrush x:Key="CaptionButtonForeground" Color="{StaticResource ButtonTextColor}" />
</ResourceDictionary>

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