Compare commits

..

46 Commits

Author SHA1 Message Date
Zhang Dian
dd042fd810 Merge pull request #418 from irihitech/version
Upgrade to 11.1.0.2
2024-08-16 15:41:02 +08:00
Zhang Dian
ea79b0812e misc: bump version. 2024-08-16 14:30:03 +08:00
Zhang Dian
421e8ec53f Merge pull request #417 from irihitech/grid
feat: respect AllowAutoHide in DataGrid.
2024-08-15 18:54:06 +08:00
Zhang Dian
b80deac692 feat:add AutoHide ToggleSwitch to DataGrid demo. 2024-08-15 18:53:06 +08:00
rabbitism
a3ed11fa10 feat: respect AllowAutoHide in DataGrid. 2024-08-15 17:41:31 +08:00
Dong Bin
b13547ae23 Merge pull request #416 from irihitech/notification
Enhance Notification
2024-08-14 22:22:43 +08:00
Zhang Dian
1b26941ec9 fix: revert commit. 2024-08-14 20:52:40 +08:00
Zhang Dian
6630d04565 feat: enhance NotificationDemo. 2024-08-14 20:50:54 +08:00
Zhang Dian
a328e2bb99 feat: add Light class to NotificationCard. 2024-08-14 20:00:43 +08:00
Zhang Dian
38b9494aaf feat: enhance NotificationCard. 2024-08-14 19:22:17 +08:00
Dong Bin
ecde71c999 Merge pull request #411 from irihitech/colorPicker
Enhance ColorPicker
2024-08-13 23:34:42 +08:00
Zhang Dian
f9ce88fbc3 Merge pull request #408 from Darth-Lexx/main
RU locale
2024-08-13 17:09:10 +08:00
Zhang Dian
9b9c05773b fix: fix issues. 2024-08-13 14:45:10 +08:00
Zhang Dian
4d3c9630c3 fix: fix Flyout Placement. 2024-08-12 16:35:51 +08:00
Zhang Dian
73687eb72f fix: fix the shake of ColorSpectrum's thumb. 2024-08-12 16:00:14 +08:00
Zhang Dian
e8d28c0233 feat: add SimpleColorPicker & HexSimpleColorPicker. 2024-08-12 14:42:47 +08:00
Zhang Dian
1cedc77ce1 feat: complete SimpleColorView. 2024-08-12 14:40:57 +08:00
Dong Bin
18fa51a572 Merge branch 'main' into main 2024-08-10 16:45:01 +08:00
Dong Bin
d3a933804b Merge pull request #409 from gehongyan/jp-localization
Add ja_jp Localization
2024-08-10 16:43:55 +08:00
Zhang Dian
d2a1f1e277 feat: basic SimpleColorView. 2024-08-10 14:54:32 +08:00
Zhang Dian
3c0497c07a fix: set ComboBox icon Width Auto, remove a column of CalendarDatePicker 2024-08-10 14:23:11 +08:00
Zhang Dian
4d89b82e16 fix: fix the issue of RGB & HSV NumericUpDown Tag disappearing. 2024-08-10 13:20:13 +08:00
Gehongyan
f564c98afd feat: ja-jp localization 2024-08-10 00:25:02 +08:00
Dong Bin
472f91fab2 Merge pull request #407 from irihitech/popup
Fix Popup related control Background color in Dark Mode
2024-08-08 16:54:49 +08:00
Dong Bin
f55faad641 Merge pull request #406 from irihitech/innerbutton
Fix TextBox Inner Button issues
2024-08-08 16:45:07 +08:00
Dong Bin
1b5a5d5ea1 Merge pull request #405 from irihitech/adorner
Update AdornerLayer
2024-08-08 16:17:14 +08:00
Dong Bin
a81dcb20c5 Merge pull request #400 from MakesYT/expander
修改Expander默认内容为占满宽度
2024-08-08 16:03:42 +08:00
Zhang Dian
95744b7a64 fix: fix Popup related control Background color. 2024-08-07 17:17:54 +08:00
Zhang Dian
7a6c42e106 fix: ClearButton will take the icon place when TextBox has value. 2024-08-07 16:17:22 +08:00
Zhang Dian
4b71b18e72 fix: TextBox inner button colors. 2024-08-07 16:14:32 +08:00
Zhang Dian
3849d7efeb feat: update ToggleSwitch AdornerLayer. 2024-08-07 12:07:56 +08:00
Zhang Dian
5644cf59dc feat: update Default AdornerLayer style. 2024-08-07 12:06:13 +08:00
Dong Bin
372e5d3410 Merge pull request #404 from irihitech/switch
Enchance ToggleSwitch
2024-08-06 19:35:34 +08:00
Zhang Dian
3af7e2f29a feat: add OnContent & OffContent to SimpleToggleSwitch. 2024-08-06 16:42:55 +08:00
Zhang Dian
d355410ff2 feat: add Loading Classes. 2024-08-06 15:22:49 +08:00
Алексей Родионов
a28cbf5ac2 RU locale 2024-08-05 22:13:50 +03:00
rabbitism
fae4a32507 misc: bump version. 2024-08-04 01:15:13 +08:00
Dong Bin
7698f92320 Merge pull request #402 from irihitech/locale
Make sure locale dictionary is linked to class
2024-08-03 00:09:01 +08:00
rabbitism
8ad89d094e feat: make sure locale dictionary is linked to class. 2024-08-02 23:13:36 +08:00
MakesYT
259f8cb5bd Merge branch 'irihitech:main' into expander 2024-08-02 15:41:19 +08:00
Dong Bin
e336800bd5 Merge pull request #398 from irihitech/issue/394-spinner
Remove NumericUpDown ContextFlyout redundant arrow buttons
2024-08-01 18:27:19 +08:00
Zhang Dian
fdd4c99210 Merge pull request #396 from MakesYT/main
独立背景颜色为资源
2024-08-01 17:45:02 +08:00
Zhang Dian
2957521ef8 fix: remove NumericUpDown ContextFlyout redundant arrow buttons. 2024-08-01 17:06:35 +08:00
MakesYT
7c63d45d5e 修改 expander默认HorizontalContentAlignment为Stretch 2024-07-28 17:46:36 +08:00
MakesYT
e1bef9fd04 同步Light 颜色 2024-07-28 15:36:42 +08:00
MakesYT
d90d7b9fe1 独立背景颜色为资源 2024-07-28 14:17:50 +08:00
59 changed files with 1031 additions and 243 deletions

View File

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

View File

@@ -6,35 +6,56 @@
xmlns:controls="using:Avalonia.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DesignHeight="450"
d:DesignHeight="1450"
d:DesignWidth="800"
mc:Ignorable="d">
<StackPanel Spacing="20">
<StackPanel
VerticalAlignment="Top"
Orientation="Horizontal"
Spacing="20">
<ColorView ColorSpectrumShape="Ring" />
<ColorView ColorSpectrumShape="Box" />
<ColorView Palette="{DynamicResource SemiColorPalette}" />
<ScrollViewer>
<StackPanel Spacing="20">
<StackPanel
VerticalAlignment="Top"
Orientation="Horizontal"
Spacing="20">
<ColorView Name="Test" ColorSpectrumShape="Ring" />
<ColorView ColorSpectrumShape="Box" />
<ColorView Palette="{DynamicResource SemiColorPalette}" />
</StackPanel>
<StackPanel
VerticalAlignment="Top"
Orientation="Horizontal">
<ColorView
Name="SimpleColorViewTest"
Theme="{StaticResource SimpleColorView}"
IsAlphaVisible="True"
HsvColor="hsv(120,11%,10%)" />
<StackPanel>
<TextBlock Text="{Binding #SimpleColorViewTest.HsvColor}" />
<TextBlock Text="{Binding #SimpleColorViewTest.Color}" />
</StackPanel>
</StackPanel>
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
<ColorPicker ColorSpectrumShape="Ring">
<ColorPicker.Palette>
<controls:FlatHalfColorPalette />
</ColorPicker.Palette>
</ColorPicker>
<ColorPicker ColorSpectrumShape="Box">
<ColorPicker.Palette>
<colorPicker:SemiColorLightPalette />
</ColorPicker.Palette>
</ColorPicker>
<ColorPicker ColorSpectrumShape="Box" Theme="{DynamicResource HexColorPicker}">
<ColorPicker.Palette>
<colorPicker:SemiColorLightPalette />
</ColorPicker.Palette>
</ColorPicker>
</StackPanel>
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
<ColorPicker Theme="{StaticResource SimpleColorPicker}"
HsvColor="hsv(120,11%,10%)" />
<ColorPicker Theme="{StaticResource HexSimpleColorPicker}"
HsvColor="hsv(120,11%,10%)" />
</StackPanel>
</StackPanel>
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
<ColorPicker ColorSpectrumShape="Ring">
<ColorPicker.Palette>
<controls:FlatHalfColorPalette />
</ColorPicker.Palette>
</ColorPicker>
<ColorPicker ColorSpectrumShape="Box">
<ColorPicker.Palette>
<colorPicker:SemiColorLightPalette />
</ColorPicker.Palette>
</ColorPicker>
<ColorPicker ColorSpectrumShape="Box" Theme="{DynamicResource HexColorPicker}">
<ColorPicker.Palette>
<colorPicker:SemiColorLightPalette />
</ColorPicker.Palette>
</ColorPicker>
</StackPanel>
</StackPanel>
</UserControl>
</ScrollViewer>
</UserControl>

View File

@@ -14,7 +14,10 @@
<TabControl>
<TabItem Header="DataGrid">
<Grid RowDefinitions="Auto, *">
<ToggleSwitch Grid.Row="0" Content="Disable" Name="DisableToggle"></ToggleSwitch>
<StackPanel Grid.Row="0" Orientation="Horizontal">
<ToggleSwitch Content="Disable" Name="DisableToggle" />
<ToggleSwitch Content="ScrollViewerHide" Name="ScrollViewerHide" />
</StackPanel>
<DataGrid Grid.Row="1"
Margin="8"
CanUserReorderColumns="True"
@@ -22,6 +25,7 @@
CanUserSortColumns="True"
HeadersVisibility="All"
IsReadOnly="True"
ScrollViewer.AllowAutoHide="{Binding #ScrollViewerHide.IsChecked}"
IsEnabled="{Binding #DisableToggle.IsChecked}"
ItemsSource="{Binding GridData1}">
<DataGrid.Columns>

View File

@@ -36,4 +36,4 @@
</Expander>
</Grid>
</StackPanel>
</UserControl>
</UserControl>

View File

@@ -7,18 +7,36 @@
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
<StackPanel HorizontalAlignment="Left" Spacing="20">
<StackPanel.Styles>
<Style Selector="Button">
<Setter Property="Theme" Value="{DynamicResource SolidButton}" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
</Style>
</StackPanel.Styles>
<Button Click="InfoButton_OnClick" Content="Default" />
<Button Click="InfoButton_OnClick" Content="Information" />
<Button Click="InfoButton_OnClick" Content="Success" Classes="Success" />
<Button Click="InfoButton_OnClick" Content="Warning" Classes="Warning" />
<Button Click="InfoButton_OnClick" Content="Error" Classes="Danger" />
<StackPanel Spacing="20">
<UniformGrid Rows="3" Columns="3" Width="500" HorizontalAlignment="Left">
<UniformGrid.Styles>
<Style Selector="RadioButton">
<Setter Property="Theme" Value="{DynamicResource PureCardRadioButton}" />
</Style>
</UniformGrid.Styles>
<RadioButton Click="PositionButton_OnClick" Content="TopLeft" />
<RadioButton Click="PositionButton_OnClick" Content="TopCenter" />
<RadioButton Click="PositionButton_OnClick" Content="TopRight" IsChecked="True" />
<RadioButton Click="PositionButton_OnClick" Content="BottomLeft" />
<RadioButton Click="PositionButton_OnClick" Content="BottomCenter" />
<RadioButton Click="PositionButton_OnClick" Content="BottomRight" />
</UniformGrid>
<StackPanel Orientation="Horizontal" Spacing="20">
<Button Click="NormalButton_OnClick" Content="Information" />
<Button Click="NormalButton_OnClick" Content="Success" Classes="Success" />
<Button Click="NormalButton_OnClick" Content="Warning" Classes="Warning" />
<Button Click="NormalButton_OnClick" Content="Error" Classes="Danger" />
</StackPanel>
<StackPanel Orientation="Horizontal" Spacing="20">
<StackPanel.Styles>
<Style Selector="Button">
<Setter Property="Theme" Value="{DynamicResource SolidButton}" />
</Style>
</StackPanel.Styles>
<Button Click="LightButton_OnClick" Content="Information" />
<Button Click="LightButton_OnClick" Content="Success" Classes="Success" />
<Button Click="LightButton_OnClick" Content="Warning" Classes="Warning" />
<Button Click="LightButton_OnClick" Content="Error" Classes="Danger" />
</StackPanel>
</StackPanel>
</UserControl>

View File

@@ -22,13 +22,34 @@ public partial class NotificationDemo : UserControl
_manager = new WindowNotificationManager(topLevel) { MaxItems = 3 };
}
private void InfoButton_OnClick(object? sender, RoutedEventArgs e)
private void PositionButton_OnClick(object? sender, RoutedEventArgs e)
{
if (sender is RadioButton b && b.Content is string s)
{
Enum.TryParse<NotificationPosition>(s, out var t);
_manager.Position = t;
}
}
private void NormalButton_OnClick(object? sender, RoutedEventArgs e)
{
if (sender is Button b && b.Content is string s)
{
_manager?.Show(Enum.TryParse<NotificationType>(s, out NotificationType t)
_manager?.Show(Enum.TryParse<NotificationType>(s, out var t)
? new Notification(t.ToString(), "This is message", t)
: new Notification(s, "This is message"));
}
}
private void LightButton_OnClick(object? sender, RoutedEventArgs e)
{
if (sender is Button b && b.Content is string s)
{
Enum.TryParse<NotificationType>(s, out var notificationType);
_manager?.Show(
new Notification(notificationType.ToString(), "This is message"),
type: notificationType,
classes: ["Light"]);
}
}
}

View File

@@ -24,8 +24,9 @@
<TextBox Width="300" PasswordChar="*" />
<TextBox
Width="300"
Classes="revealPasswordButton"
PasswordChar="*" />
Classes="ClearButton RevealPasswordButton"
PasswordChar="*"
Text="123456" />
<TextBox
Width="500"
InnerLeftContent="http://"

View File

@@ -26,15 +26,38 @@
OnContent="OnContent" />
<StackPanel Orientation="Horizontal">
<ToggleSwitch Theme="{StaticResource SimpleToggleSwitch}" Classes="Small" />
<ToggleSwitch Theme="{StaticResource SimpleToggleSwitch}" Classes="Small" IsChecked="True"/>
<ToggleSwitch Theme="{StaticResource SimpleToggleSwitch}" Classes="Small" IsChecked="True" />
<ToggleSwitch Theme="{StaticResource SimpleToggleSwitch}" Classes="Small Loading" />
<ToggleSwitch Theme="{StaticResource SimpleToggleSwitch}" Classes="Small Loading" IsChecked="True" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<ToggleSwitch Theme="{StaticResource SimpleToggleSwitch}" />
<ToggleSwitch Theme="{StaticResource SimpleToggleSwitch}" IsChecked="True" />
<ToggleSwitch Theme="{StaticResource SimpleToggleSwitch}" Classes="Loading" />
<ToggleSwitch Theme="{StaticResource SimpleToggleSwitch}" Classes="Loading" IsChecked="True" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<ToggleSwitch Theme="{StaticResource SimpleToggleSwitch}" Classes="Large" />
<ToggleSwitch Theme="{StaticResource SimpleToggleSwitch}" Classes="Large" IsChecked="True"/>
<ToggleSwitch Theme="{StaticResource SimpleToggleSwitch}" Classes="Large" IsChecked="True" />
<ToggleSwitch Theme="{StaticResource SimpleToggleSwitch}" Classes="Large Loading" />
<ToggleSwitch Theme="{StaticResource SimpleToggleSwitch}" Classes="Large Loading" IsChecked="True" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<ToggleSwitch Theme="{StaticResource SimpleToggleSwitch}" OffContent="关" OnContent="开"/>
<ToggleSwitch Theme="{StaticResource SimpleToggleSwitch}" OffContent="" OnContent=""/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<ToggleSwitch Theme="{StaticResource SimpleToggleSwitch}" OffContent="关" OnContent="开" IsChecked="True" />
<ToggleSwitch Theme="{StaticResource SimpleToggleSwitch}" OffContent="" OnContent="" IsChecked="True" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<ToggleSwitch Theme="{StaticResource SimpleToggleSwitch}" OffContent="关" OnContent="开" Classes="Large" />
<ToggleSwitch Theme="{StaticResource SimpleToggleSwitch}" OffContent="" OnContent="" Classes="Large" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<ToggleSwitch Theme="{StaticResource SimpleToggleSwitch}" OffContent="关" OnContent="开" Classes="Large" IsChecked="True" />
<ToggleSwitch Theme="{StaticResource SimpleToggleSwitch}" OffContent="" OnContent="" Classes="Large" IsChecked="True" />
</StackPanel>
<ToggleSwitch Theme="{DynamicResource ButtonToggleSwitch}">

View File

@@ -3,7 +3,7 @@
<TargetFrameworks>net6.0;net8.0;netstandard2.0</TargetFrameworks>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<Version>11.1.0</Version>
<Version>11.1.0.2</Version>
<Authors>IRIHI Technology Co., Ltd.</Authors>
<Description>Avalonia Theme inspired by Semi Design.</Description>
<RepositoryUrl>https://github.com/irihitech/Semi.Avalonia</RepositoryUrl>

View File

@@ -234,7 +234,7 @@
RowDefinitions="Auto,24,1*,1*,1*,1*,12"
Tag="{TemplateBinding ColorModel}">
<Grid.Styles>
<Style Selector="NumericUpDown /template/ TextBox">
<Style Selector="NumericUpDown">
<Setter Property="InnerLeftContent">
<Template>
<TextBlock Width="12" Text="{Binding $parent[NumericUpDown].Tag}" />
@@ -514,4 +514,199 @@
</Setter>
</ControlTheme>
<ControlTheme
x:Key="SimpleColorPicker"
BasedOn="{StaticResource {x:Type ColorPicker}}"
TargetType="ColorPicker">
<Setter Property="ColorSpectrumComponents" Value="SaturationValue" />
<Setter Property="Template">
<ControlTemplate TargetType="{x:Type ColorPicker}">
<DropDownButton
Width="{TemplateBinding Width}"
Height="{TemplateBinding Height}"
Padding="0,0,10,0"
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch"
ClipToBounds="True"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
CornerRadius="{TemplateBinding CornerRadius}"
UseLayoutRounding="False">
<DropDownButton.Styles>
<Style Selector="FlyoutPresenter.nopadding">
<Setter Property="Padding" Value="0" />
</Style>
</DropDownButton.Styles>
<DropDownButton.Flyout>
<Flyout FlyoutPresenterClasses="nopadding" Placement="{DynamicResource SimpleColorPickerFlyoutPlacement}">
<!--
The following is copy-pasted from the ColorView's control template.
It MUST always be kept in sync with the ColorView (which is master).
Note the only changes are resources specific to the ColorPicker.
-->
<Grid Width="280">
<Grid.RowDefinitions>
<RowDefinition Height="*" MinHeight="280" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<!-- Spectrum Tab -->
<Border
Grid.Row="0"
CornerRadius="8 8 0 0"
ClipToBounds="True">
<primitives:ColorSpectrum
x:Name="ColorSpectrum"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Components="{TemplateBinding ColorSpectrumComponents}"
HsvColor="{TemplateBinding HsvColor, Mode=TwoWay}"
MaxHue="{TemplateBinding MaxHue}"
MaxSaturation="{TemplateBinding MaxSaturation}"
MaxValue="{TemplateBinding MaxValue}"
MinHue="{TemplateBinding MinHue}"
MinSaturation="{TemplateBinding MinSaturation}"
MinValue="{TemplateBinding MinValue}"
Shape="{TemplateBinding ColorSpectrumShape}" />
</Border>
<primitives:ColorSlider
x:Name="ColorSpectrumThirdComponentSlider"
Grid.Row="1"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
AutomationProperties.Name="Third Component"
ColorComponent="{Binding #ColorSpectrum.ThirdComponent}"
ColorModel="Hsva"
HsvColor="{TemplateBinding HsvColor, Mode=TwoWay}"
IsVisible="{TemplateBinding IsColorSpectrumSliderVisible}"
Orientation="Horizontal" />
<primitives:ColorSlider
x:Name="ColorSpectrumAlphaSlider"
Grid.Row="2"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
AutomationProperties.Name="Alpha Component"
ColorComponent="Alpha"
ColorModel="Hsva"
HsvColor="{TemplateBinding HsvColor, Mode=TwoWay}"
IsEnabled="{TemplateBinding IsAlphaEnabled}"
IsVisible="{TemplateBinding IsAlphaVisible}"
IsRoundingEnabled="True"
IsSnapToTickEnabled="True"
TickFrequency="1"
Orientation="Horizontal">
</primitives:ColorSlider>
<StackPanel
Grid.Row="3"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
Orientation="Horizontal"
Margin="0 8 0 0">
<Border
Background="{TemplateBinding Color, Converter={StaticResource ToBrushConverter}}"
Width="20"
Height="20"
CornerRadius="4" />
<Panel
x:Name="PART_TextBoxPanel"
Width="106"
Margin="4 0 0 0"
HorizontalAlignment="Stretch"
VerticalAlignment="Center">
<TextBox
x:Name="PART_HexTextBox"
Classes="Small"
InnerLeftContent="#"
IsVisible="{Binding #ColorModelComboBox.SelectedValue, Converter={StaticResource ToColorModel}, ConverterParameter=Hex}"
Text="{TemplateBinding Color, Converter={StaticResource ColorToHexConverter}, Mode=TwoWay}"
MaxLength="8" />
<TextBox
x:Name="PART_RgbaTextBox"
Classes="Small"
IsVisible="{Binding #ColorModelComboBox.SelectedValue, Converter={StaticResource ToColorModel}, ConverterParameter=Rgba}"
Text="{TemplateBinding Color, Converter={StaticResource ColorToTextConverter}, Mode=TwoWay}" />
<TextBox
x:Name="PART_HsvaTextBox"
Classes="Small"
IsVisible="{Binding #ColorModelComboBox.SelectedValue, Converter={StaticResource ToColorModel}, ConverterParameter=Hsva}"
Text="{TemplateBinding HsvColor, Converter={StaticResource HsvColorToTextConverter}, Mode=TwoWay}" />
</Panel>
<NumericUpDown
x:Name="AlphaComponentNumericUpDown"
Width="70"
HorizontalAlignment="Right"
VerticalAlignment="Center"
AllowSpin="True"
Classes="Small"
IsEnabled="{TemplateBinding IsAlphaEnabled}"
Maximum="{Binding #ColorSpectrumAlphaSlider.Maximum}"
Minimum="{Binding #ColorSpectrumAlphaSlider.Minimum}"
NumberFormat="{StaticResource ColorViewComponentNumberFormat}"
ShowButtonSpinner="False"
InnerRightContent="%"
IsVisible="{TemplateBinding IsAlphaVisible}"
Value="{Binding #ColorSpectrumAlphaSlider.Value}" />
<ComboBox
x:Name="ColorModelComboBox"
Width="80"
VerticalAlignment="Center"
Classes="Small"
SelectedValue="Hex">
Hex<ColorModel>Rgba</ColorModel>
<ColorModel>Hsva</ColorModel>
</ComboBox>
</StackPanel>
</Grid>
</Flyout>
</DropDownButton.Flyout>
</DropDownButton>
</ControlTemplate>
</Setter>
<Style Selector="^[IsAlphaVisible=False] /template/ Panel#PART_TextBoxPanel">
<Setter Property="Width" Value="176" />
</Style>
</ControlTheme>
<ControlTheme
x:Key="HexSimpleColorPicker"
BasedOn="{StaticResource SimpleColorPicker}"
TargetType="ColorPicker">
<Setter Property="Width" Value="200" />
<Setter Property="Content">
<Template>
<Grid ColumnDefinitions="Auto, *">
<Border
Grid.Column="0"
Width="{Binding $self.Bounds.Height}"
Margin="1,1,0,1"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="{DynamicResource ColorControlCheckeredBackgroundBrush}"
CornerRadius="{TemplateBinding CornerRadius}" />
<Border
Grid.Column="0"
Width="{Binding $self.Bounds.Height}"
Margin="1,1,0,1"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="{TemplateBinding HsvColor,
Converter={StaticResource ToBrushConverter}}"
CornerRadius="{TemplateBinding CornerRadius}" />
<TextBlock
Grid.Column="1"
Margin="8,0,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontWeight="Regular"
Foreground="{DynamicResource TextBlockDefaultForeground}"
Text="{Binding $parent[ColorPicker].Color}" />
</Grid>
</Template>
</Setter>
</ControlTheme>
</ResourceDictionary>

View File

@@ -6,13 +6,17 @@
xmlns:globalization="using:System.Globalization"
xmlns:pc="using:Avalonia.Controls.Primitives.Converters"
xmlns:primitives="using:Avalonia.Controls.Primitives"
xmlns:cvts="clr-namespace:Semi.Avalonia.ColorPicker.Converters"
x:CompileBindings="True">
<!-- Add Resources Here -->
<pc:ContrastBrushConverter x:Key="ContrastBrushConverter" />
<converters:ColorToDisplayNameConverter x:Key="ColorToDisplayNameConverter" />
<converters:ColorToHexConverter x:Key="ColorToHexConverter" />
<converters:DoNothingForNullConverter x:Key="DoNothingForNullConverter" />
<converters:EnumToBoolConverter x:Key="EnumToBoolConverter" />
<converters:ToBrushConverter x:Key="ToBrushConverter" />
<cvts:HsvColorToTextConverter x:Key="HsvColorToTextConverter" />
<cvts:ColorToTextConverter x:Key="ColorToTextConverter" />
<cvts:ToColorModel x:Key="ToColorModel" />
<globalization:NumberFormatInfo x:Key="ColorViewComponentNumberFormat" NumberDecimalDigits="0" />
<VisualBrush
@@ -322,7 +326,7 @@
RowDefinitions="Auto,24,1*,1*,1*,1*,12"
UseLayoutRounding="False">
<Grid.Styles>
<Style Selector="NumericUpDown /template/ TextBox">
<Style Selector="NumericUpDown">
<Setter Property="InnerLeftContent">
<Template>
<TextBlock Width="12" Text="{Binding $parent[NumericUpDown].Tag}" />
@@ -376,7 +380,7 @@
AutomationProperties.Name="Hexadecimal Color"
InnerLeftContent="#"
IsVisible="{TemplateBinding IsHexInputVisible}"
MaxLength="9" />
MaxLength="8" />
</Grid>
<!-- Color component editing controls -->
<!-- Component 1 RGB:Red HSV:Hue -->
@@ -560,4 +564,142 @@
</Style>
</Style>
</ControlTheme>
<ControlTheme x:Key="SimpleColorView" TargetType="ColorView">
<Setter Property="Width" Value="280" />
<Setter Property="CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
<Setter Property="ColorSpectrumComponents" Value="SaturationValue" />
<Setter Property="Template">
<ControlTemplate TargetType="{x:Type ColorView}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" MinHeight="280" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<!-- Spectrum Tab -->
<Border
Grid.Row="0"
CornerRadius="8 8 0 0"
ClipToBounds="True">
<primitives:ColorSpectrum
x:Name="ColorSpectrum"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Components="{TemplateBinding ColorSpectrumComponents}"
HsvColor="{TemplateBinding HsvColor, Mode=TwoWay}"
MaxHue="{TemplateBinding MaxHue}"
MaxSaturation="{TemplateBinding MaxSaturation}"
MaxValue="{TemplateBinding MaxValue}"
MinHue="{TemplateBinding MinHue}"
MinSaturation="{TemplateBinding MinSaturation}"
MinValue="{TemplateBinding MinValue}"
Shape="{TemplateBinding ColorSpectrumShape}" />
</Border>
<primitives:ColorSlider
x:Name="ColorSpectrumThirdComponentSlider"
Grid.Row="1"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
AutomationProperties.Name="Third Component"
ColorComponent="{Binding #ColorSpectrum.ThirdComponent}"
ColorModel="Hsva"
HsvColor="{TemplateBinding HsvColor, Mode=TwoWay}"
IsVisible="{TemplateBinding IsColorSpectrumSliderVisible}"
Orientation="Horizontal" />
<primitives:ColorSlider
x:Name="ColorSpectrumAlphaSlider"
Grid.Row="2"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
AutomationProperties.Name="Alpha Component"
ColorComponent="Alpha"
ColorModel="Hsva"
HsvColor="{TemplateBinding HsvColor, Mode=TwoWay}"
IsEnabled="{TemplateBinding IsAlphaEnabled}"
IsVisible="{TemplateBinding IsAlphaVisible}"
IsRoundingEnabled="True"
IsSnapToTickEnabled="True"
TickFrequency="1"
Orientation="Horizontal">
</primitives:ColorSlider>
<StackPanel
Grid.Row="3"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
Orientation="Horizontal"
Margin="0 8 0 0">
<Border
Background="{TemplateBinding Color, Converter={StaticResource ToBrushConverter}}"
Width="20"
Height="20"
CornerRadius="4" />
<Panel
x:Name="PART_TextBoxPanel"
Width="106"
Margin="4 0 0 0"
HorizontalAlignment="Stretch"
VerticalAlignment="Center">
<TextBox
x:Name="PART_HexTextBox"
Classes="Small"
InnerLeftContent="#"
IsVisible="{Binding #ColorModelComboBox.SelectedValue, Converter={StaticResource ToColorModel}, ConverterParameter=Hex}"
Text="{TemplateBinding Color, Converter={StaticResource ColorToHexConverter}, Mode=TwoWay}"
MaxLength="8" />
<TextBox
x:Name="PART_RgbaTextBox"
Classes="Small"
IsVisible="{Binding #ColorModelComboBox.SelectedValue, Converter={StaticResource ToColorModel}, ConverterParameter=Rgba}"
Text="{TemplateBinding Color, Converter={StaticResource ColorToTextConverter}, Mode=TwoWay}" />
<TextBox
x:Name="PART_HsvaTextBox"
Classes="Small"
IsVisible="{Binding #ColorModelComboBox.SelectedValue, Converter={StaticResource ToColorModel}, ConverterParameter=Hsva}"
Text="{TemplateBinding HsvColor, Converter={StaticResource HsvColorToTextConverter}, Mode=TwoWay}" />
</Panel>
<NumericUpDown
x:Name="AlphaComponentNumericUpDown"
Width="70"
HorizontalAlignment="Right"
VerticalAlignment="Center"
AllowSpin="True"
Classes="Small"
IsEnabled="{TemplateBinding IsAlphaEnabled}"
Maximum="{Binding #ColorSpectrumAlphaSlider.Maximum}"
Minimum="{Binding #ColorSpectrumAlphaSlider.Minimum}"
NumberFormat="{StaticResource ColorViewComponentNumberFormat}"
ShowButtonSpinner="False"
InnerRightContent="%"
IsVisible="{TemplateBinding IsAlphaVisible}"
Value="{Binding #ColorSpectrumAlphaSlider.Value}" />
<ComboBox
x:Name="ColorModelComboBox"
Width="80"
VerticalAlignment="Center"
Classes="Small"
SelectedValue="Hex">
Hex<ColorModel>Rgba</ColorModel>
<ColorModel>Hsva</ColorModel>
</ComboBox>
</StackPanel>
</Grid>
</ControlTemplate>
</Setter>
<Style Selector="^[IsAlphaVisible=False] /template/ Panel#PART_TextBoxPanel">
<Setter Property="Width" Value="176" />
</Style>
</ControlTheme>
<Design.PreviewWith>
<ColorView
Theme="{StaticResource SimpleColorView}"
IsAlphaVisible="True"
IsAlphaEnabled="True"
ColorModel="Hsva"
HsvColor="hsv(120,7%,90%)" />
</Design.PreviewWith>
</ResourceDictionary>

View File

@@ -0,0 +1,34 @@
using System;
using System.Globalization;
using System.Linq;
using Avalonia;
using Avalonia.Data;
using Avalonia.Data.Converters;
using Avalonia.Media;
namespace Semi.Avalonia.ColorPicker.Converters;
public class ColorToTextConverter : IValueConverter
{
public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
return value is Color color ? $"{color.R},{color.G},{color.B},{color.A}" : AvaloniaProperty.UnsetValue;
}
public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if (value is not string str) return BindingOperations.DoNothing;
var parts = str.Split(',');
if (parts.Length != 4 || parts.Any(string.IsNullOrWhiteSpace)) return BindingOperations.DoNothing;
if (byte.TryParse(parts[0], NumberStyles.Integer, CultureInfo.InvariantCulture, out var r) &&
byte.TryParse(parts[1], NumberStyles.Integer, CultureInfo.InvariantCulture, out var g) &&
byte.TryParse(parts[2], NumberStyles.Integer, CultureInfo.InvariantCulture, out var b) &&
byte.TryParse(parts[3], NumberStyles.Integer, CultureInfo.InvariantCulture, out var a))
{
return new Color(a, r, g, b);
}
return BindingOperations.DoNothing;
}
}

View File

@@ -0,0 +1,36 @@
using System;
using System.Globalization;
using System.Linq;
using Avalonia;
using Avalonia.Data;
using Avalonia.Data.Converters;
using Avalonia.Media;
namespace Semi.Avalonia.ColorPicker.Converters;
public class HsvColorToTextConverter : IValueConverter
{
public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
return value is HsvColor hsvColor
? $"{Math.Round(hsvColor.H)},{Math.Round(hsvColor.S * 100)},{Math.Round(hsvColor.V * 100)},{Math.Round(hsvColor.A * 100)}"
: AvaloniaProperty.UnsetValue;
}
public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if (value is not string str) return BindingOperations.DoNothing;
var parts = str.Split(',');
if (parts.Length != 4 || parts.Any(string.IsNullOrWhiteSpace)) return BindingOperations.DoNothing;
if (double.TryParse(parts[0], NumberStyles.Float, CultureInfo.InvariantCulture, out var h) &&
double.TryParse(parts[1], NumberStyles.Float, CultureInfo.InvariantCulture, out var s) &&
double.TryParse(parts[2], NumberStyles.Float, CultureInfo.InvariantCulture, out var v) &&
double.TryParse(parts[3], NumberStyles.Float, CultureInfo.InvariantCulture, out var a))
{
return new HsvColor(a / 100, h, s / 100, v / 100);
}
return BindingOperations.DoNothing;
}
}

View File

@@ -0,0 +1,21 @@
using System;
using System.Globalization;
using Avalonia.Controls;
using Avalonia.Data.Converters;
namespace Semi.Avalonia.ColorPicker.Converters;
public class ToColorModel : IValueConverter
{
public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
return parameter is "Hex" && value is "Hex" ||
parameter is "Rgba" && value is ColorModel.Rgba ||
parameter is "Hsva" && value is ColorModel.Hsva;
}
public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}

View File

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

View File

@@ -29,4 +29,5 @@
<colorPicker:SemiColorDarkPalette x:Key="SemiColorPalette" />
<PlacementMode x:Key="ColorPickerFlyoutPlacement">AnchorAndGravity</PlacementMode>
<PlacementMode x:Key="SimpleColorPickerFlyoutPlacement">BottomEdgeAlignedLeft</PlacementMode>
</ResourceDictionary>

View File

@@ -471,6 +471,7 @@
<Setter Property="VerticalScrollBarVisibility" Value="Auto" />
<Setter Property="SelectionMode" Value="Extended" />
<Setter Property="GridLinesVisibility" Value="None" />
<Setter Property="ScrollViewer.AllowAutoHide" Value="True" />
<Setter Property="HorizontalGridLinesBrush" Value="{DynamicResource DataGridLineBrush}" />
<Setter Property="VerticalGridLinesBrush" Value="{DynamicResource DataGridLineBrush}" />
<Setter Property="DropLocationIndicatorTemplate">
@@ -570,5 +571,15 @@
<Setter Property="IsVisible" Value="False" />
</Style>
</Style>
<Style Selector="^[(ScrollViewer.AllowAutoHide)=False]">
<Style Selector="^ /template/ DataGridRowsPresenter#PART_RowsPresenter">
<Setter Property="Grid.RowSpan" Value="1" />
<Setter Property="Grid.ColumnSpan" Value="2" />
</Style>
<Style Selector="^ /template/ DataGridColumnHeadersPresenter#PART_ColumnHeadersPresenter">
<Setter Property="Grid.ColumnSpan" Value="1" />
</Style>
</Style>
</ControlTheme>
</ResourceDictionary>

View File

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

View File

@@ -5,11 +5,8 @@
<ControlTheme x:Key="{x:Type AdornerLayer}" TargetType="AdornerLayer">
<Setter Property="DefaultFocusAdorner">
<FocusAdornerTemplate>
<Rectangle
Margin="{DynamicResource AdornerLayerMargin}"
Stroke="{DynamicResource AdornerLayerBackground}"
StrokeDashArray="1,2"
StrokeThickness="{DynamicResource AdornerLayerThickness}" />
<Border BorderThickness="{DynamicResource AdornerLayerBorderThickness}"
BorderBrush="{DynamicResource AdornerLayerStroke}" />
</FocusAdornerTemplate>
</Setter>
</ControlTheme>

View File

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

View File

@@ -34,11 +34,10 @@
<Grid
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
ColumnDefinitions="*, Auto, Auto">
ColumnDefinitions="*, Auto">
<TextBox
Name="PART_TextBox"
Grid.Column="0"
Grid.ColumnSpan="2"
MinHeight="{TemplateBinding MinHeight}"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
@@ -85,7 +84,7 @@
Theme="{DynamicResource InnerIconButton}" />
<Button
Name="PART_Button"
Grid.Column="2"
Grid.Column="1"
Padding="0,0,8,0"
Content="{DynamicResource CalendarDatePickerIconGlyph}"
Focusable="False"
@@ -122,10 +121,13 @@
</ControlTemplate>
</Setter>
<Style Selector="^.clearButton, ^.ClearButton">
<Style Selector="^:pointerover /template/ Button#ClearButton">
<Setter Property="IsVisible" Value="{Binding $parent[CalendarDatePicker].SelectedDate, Converter={x:Static ObjectConverters.IsNotNull}}"></Setter>
<Setter Property="IsVisible" Value="{Binding $parent[CalendarDatePicker].SelectedDate, Converter={x:Static ObjectConverters.IsNotNull}}" />
</Style>
<Style Selector="^:pointerover /template/ Button#PART_Button">
<Setter Property="IsVisible" Value="{Binding $parent[CalendarDatePicker].SelectedDate, Converter={x:Static ObjectConverters.IsNull}}" />
</Style>
</Style>

View File

@@ -26,6 +26,7 @@
<Grid x:Name="RootGrid" ColumnDefinitions="Auto,*">
<Grid
Grid.Column="0"
TemplatedControl.IsTemplateFocusTarget="True"
Margin="0,0,0,0"
VerticalAlignment="Center">
<Border

View File

@@ -46,11 +46,11 @@
<Setter Property="Template">
<ControlTemplate TargetType="ComboBox">
<DataValidationErrors>
<Grid ColumnDefinitions="*, Auto, 32">
<Grid ColumnDefinitions="*, Auto">
<Border
x:Name="Background"
Grid.Column="0"
Grid.ColumnSpan="3"
Grid.ColumnSpan="2"
Background="{TemplateBinding Background}"
BackgroundSizing="{TemplateBinding BackgroundSizing}"
BorderBrush="{TemplateBinding BorderBrush}"
@@ -80,13 +80,15 @@
<Button
Name="ClearButton"
Grid.Column="1"
Margin="0,0,8,0"
Command="{Binding $parent[ComboBox].Clear}"
Content="{DynamicResource IconButtonClearData}"
Focusable="False"
IsVisible="False"
Theme="{DynamicResource InnerIconButton}" />
<Border
x:Name="DropDownOverlay"
Grid.Column="2"
Grid.Column="1"
Width="30"
Margin="0,1,1,1"
HorizontalAlignment="Right"
@@ -95,12 +97,10 @@
<PathIcon
x:Name="DropDownGlyph"
Grid.Column="2"
Grid.Column="1"
Width="12"
Height="12"
Margin="0,0,10,0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Margin="0,0,12,0"
Data="{DynamicResource ComboBoxIcon}"
Foreground="{DynamicResource ComboBoxIconDefaultForeground}"
IsHitTestVisible="False"
@@ -148,6 +148,9 @@
<Style Selector="^:pointerover /template/ Button#ClearButton">
<Setter Property="IsVisible" Value="{Binding $parent[ComboBox].SelectionBoxItem, Converter={x:Static ObjectConverters.IsNotNull}}" />
</Style>
<Style Selector="^:pointerover /template/ PathIcon#DropDownGlyph">
<Setter Property="IsVisible" Value="{Binding $parent[ComboBox].SelectionBoxItem, Converter={x:Static ObjectConverters.IsNull}}"/>
</Style>
</Style>
<Style Selector="^.Large">

View File

@@ -23,7 +23,7 @@
<Setter Property="Expander.BorderBrush" Value="{DynamicResource ExpanderSeparatorBorderBrush}" />
<Setter Property="Expander.CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
<Setter Property="Expander.HorizontalAlignment" Value="Stretch" />
<Setter Property="Expander.HorizontalContentAlignment" Value="Left" />
<Setter Property="Expander.HorizontalContentAlignment" Value="Stretch" />
<Setter Property="Expander.VerticalContentAlignment" Value="Stretch" />
<Setter Property="Expander.Template">
<ControlTemplate TargetType="Expander">

View File

@@ -3,15 +3,26 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:CompileBindings="True">
<Design.PreviewWith>
<NotificationCard>
<TextBlock Text="Hello World" />
</NotificationCard>
<ThemeVariantScope RequestedThemeVariant="Dark">
<StackPanel>
<NotificationCard>
Hello, Semi.Avalonia!
</NotificationCard>
<NotificationCard NotificationType="Success">
<Notification Title="Welcome" Message="Hello, Semi.Avalonia!" />
</NotificationCard>
<NotificationCard NotificationType="Warning">
<Notification Title="" Message="Hello, Semi.Avalonia!" />
</NotificationCard>
<NotificationCard NotificationType="Error">
<Notification Message="Hello, Semi.Avalonia!" />
</NotificationCard>
</StackPanel>
</ThemeVariantScope>
</Design.PreviewWith>
<ControlTheme x:Key="{x:Type NotificationCard}" TargetType="NotificationCard">
<Setter Property="UseLayoutRounding" Value="True" />
<Setter Property="MinWidth" Value="{DynamicResource NotificationCardWidth}" />
<Setter Property="FontSize" Value="14" />
<Setter Property="Foreground" Value="{DynamicResource NotificationCardForeground}" />
<Setter Property="MinWidth" Value="{DynamicResource NotificationCardMinWidth}" />
<Setter Property="RenderTransformOrigin" Value="50%,75%" />
<Setter Property="BorderThickness" Value="{DynamicResource NotificationCardBorderThickness}" />
<Setter Property="BorderBrush" Value="{DynamicResource NotificationCardBorderBrush}" />
@@ -21,47 +32,50 @@
<ControlTemplate TargetType="NotificationCard">
<LayoutTransformControl Name="PART_LayoutTransformControl" UseRenderTransform="True">
<Border
Margin="8"
BoxShadow="{DynamicResource NotificationCardBoxShadows}"
Margin="{DynamicResource NotificationCardMargin}"
Background="{TemplateBinding Background}"
CornerRadius="{TemplateBinding CornerRadius}">
<Border
Background="{TemplateBinding Background}"
x:Name="PART_RootBorder"
Padding="{DynamicResource NotificationCardPadding}"
BoxShadow="{DynamicResource NotificationCardBoxShadow}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
ClipToBounds="True"
CornerRadius="{TemplateBinding CornerRadius}">
<DockPanel>
<PathIcon
Name="NotificationIcon"
Width="16"
Height="16"
Margin="16,16,12,0"
Width="{DynamicResource NotificationCardIconWidth}"
Height="{DynamicResource NotificationCardIconHeight}"
Margin="{DynamicResource NotificationCardIconMargin}"
VerticalAlignment="Top"
IsVisible="False"
Data="{DynamicResource NotificationCardInformationIconPathData}"/>
Data="{DynamicResource NotificationCardInformationIconPathData}" />
<ContentControl
Name="PART_Content"
MinHeight="64"
Content="{TemplateBinding Content}">
<ContentControl.DataTemplates>
<DataTemplate DataType="INotification">
<StackPanel Margin="0,8,8,8" Spacing="8">
<TextBlock
FontSize="16"
FontWeight="600"
<StackPanel Spacing="{DynamicResource NotificationCardTitleSpacing}">
<SelectableTextBlock
Foreground="{DynamicResource NotificationCardTitleForeground}"
FontSize="{DynamicResource NotificationCardTitleFontSize}"
FontWeight="{DynamicResource NotificationCardTitleFontWeight}"
IsVisible="{Binding Title, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
Text="{Binding Title}" />
<TextBlock
MaxHeight="80"
Margin="0,0,8,0"
FontSize="14"
FontWeight="400"
<SelectableTextBlock
Foreground="{DynamicResource NotificationCardMessageForeground}"
FontSize="{DynamicResource NotificationCardMessageFontSize}"
FontWeight="{DynamicResource NotificationCardMessageFontWeight}"
Text="{Binding Message}"
TextWrapping="Wrap" />
</StackPanel>
</DataTemplate>
<DataTemplate DataType="x:String">
<TextBlock
Margin="12"
<SelectableTextBlock
Foreground="{DynamicResource NotificationCardMessageForeground}"
FontSize="{DynamicResource NotificationCardMessageFontSize}"
FontWeight="{DynamicResource NotificationCardMessageFontWeight}"
Text="{Binding}"
TextWrapping="Wrap" />
</DataTemplate>
@@ -153,5 +167,25 @@
<Setter Property="Foreground" Value="{DynamicResource NotificationCardErrorIconForeground}" />
<Setter Property="Data" Value="{DynamicResource NotificationCardErrorIconPathData}" />
</Style>
<Style Selector="^.Light">
<Setter Property="Background" Value="{DynamicResource SemiColorBackground0}" />
<Style Selector="^:information /template/ Border#PART_RootBorder">
<Setter Property="BorderBrush" Value="{DynamicResource SemiColorInformation}" />
<Setter Property="Background" Value="{DynamicResource SemiColorInformationLight}" />
</Style>
<Style Selector="^:success /template/ Border#PART_RootBorder">
<Setter Property="BorderBrush" Value="{DynamicResource SemiColorSuccess}" />
<Setter Property="Background" Value="{DynamicResource SemiColorSuccessLight}" />
</Style>
<Style Selector="^:warning /template/ Border#PART_RootBorder">
<Setter Property="BorderBrush" Value="{DynamicResource SemiColorWarning}" />
<Setter Property="Background" Value="{DynamicResource SemiColorWarningLight}" />
</Style>
<Style Selector="^:error /template/ Border#PART_RootBorder">
<Setter Property="BorderBrush" Value="{DynamicResource SemiColorDanger}" />
<Setter Property="Background" Value="{DynamicResource SemiColorDangerLight}" />
</Style>
</Style>
</ControlTheme>
</ResourceDictionary>
</ResourceDictionary>

View File

@@ -39,7 +39,11 @@
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}">
<Grid ColumnDefinitions="Auto,*">
<Grid Margin="{DynamicResource RadioButtonIconMargin}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
<Grid
Grid.Column="0"
TemplatedControl.IsTemplateFocusTarget="True"
Margin="{DynamicResource RadioButtonIconMargin}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
<Ellipse
Name="OuterEllipse"
Width="{DynamicResource RadioButtonIconRadius}"

View File

@@ -26,7 +26,7 @@
<ControlTheme x:Key="{x:Type TextBox}" TargetType="TextBox">
<ControlTheme.Resources>
<ControlTheme x:Key="InputToggleButton" TargetType="ToggleButton">
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource TextBoxButtonDefaultForeground}" />
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource ButtonInputInnerForeground}" />
<Setter Property="ToggleButton.Cursor" Value="Hand" />
<Setter Property="ToggleButton.Template">
<ControlTemplate TargetType="ToggleButton">
@@ -45,6 +45,12 @@
</Panel>
</ControlTemplate>
</Setter>
<Style Selector="^:pointerover">
<Setter Property="Foreground" Value="{DynamicResource ButtonInputInnerPointeroverForeground}" />
</Style>
<Style Selector="^:pressed">
<Setter Property="Foreground" Value="{DynamicResource ButtonInputInnerPressedForeground}" />
</Style>
</ControlTheme>
</ControlTheme.Resources>
<Setter Property="TextBox.Foreground" Value="{DynamicResource TextBoxForeground}" />

View File

@@ -15,6 +15,13 @@
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="FocusAdorner">
<FocusAdornerTemplate>
<Border BorderThickness="{DynamicResource AdornerLayerBorderThickness}"
BorderBrush="{DynamicResource AdornerLayerStroke}"
CornerRadius="100"/>
</FocusAdornerTemplate>
</Setter>
<Setter Property="KnobTransitions">
<Transitions>
<DoubleTransition
@@ -28,76 +35,99 @@
<Grid
Background="{TemplateBinding Background}"
Cursor="Hand"
RowDefinitions="Auto,*">
RowDefinitions="Auto,*"
ColumnDefinitions="Auto, *">
<ContentPresenter
x:Name="PART_ContentPresenter"
Grid.Row="0"
Grid.Row="0" Grid.Column="0"
Grid.ColumnSpan="2"
Margin="{DynamicResource ToggleSwitchHeaderMargin}"
VerticalAlignment="Top"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
IsVisible="{TemplateBinding Content, Converter={x:Static ObjectConverters.IsNotNull}}"
RecognizesAccessKey="True" />
<Grid
Grid.Row="1"
Background="Transparent"
ColumnDefinitions="Auto, *">
<Grid
Grid.Column="0"
Grid.ColumnSpan="2"
TemplatedControl.IsTemplateFocusTarget="True" />
<Border
x:Name="SwitchBackgroundBorder"
Grid.Column="0"
Width="{DynamicResource ToggleSwitchDefaultWidth}"
Height="{DynamicResource ToggleSwitchDefaultHeight}"
CornerRadius="100">
<Border.Transitions>
<Transitions>
<BrushTransition Property="Background" Duration="0:0:0.2" />
</Transitions>
</Border.Transitions>
<Canvas
x:Name="PART_SwitchKnob"
<Border
x:Name="SwitchBackgroundBorder"
Grid.Row="1" Grid.Column="0"
TemplatedControl.IsTemplateFocusTarget="True"
Width="{DynamicResource ToggleSwitchDefaultWidth}"
Height="{DynamicResource ToggleSwitchDefaultHeight}"
CornerRadius="100">
<Border.Transitions>
<Transitions>
<BrushTransition Property="Background" Duration="0:0:0.2" />
</Transitions>
</Border.Transitions>
<Canvas
x:Name="PART_SwitchKnob"
Width="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
Height="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
HorizontalAlignment="Left">
<Grid
x:Name="PART_MovingKnobs"
Width="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
Height="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
HorizontalAlignment="Left">
<Grid
x:Name="PART_MovingKnobs"
Width="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
Height="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
Margin="{DynamicResource ToggleSwitchIndicatorDefaultMargin}">
<Border
x:Name="SwitchKnobIndicator"
Background="White"
BoxShadow="0 0 1 1 #222E3238"
CornerRadius="100" />
</Grid>
</Canvas>
</Border>
Margin="{DynamicResource ToggleSwitchIndicatorDefaultMargin}">
<Border
x:Name="SwitchKnobIndicator"
Background="White"
BoxShadow="0 0 1 1 #222E3238"
CornerRadius="100" />
<Arc
x:Name="SwitchKnobLoadingIndicator"
IsVisible="False"
StrokeThickness="2"
StartAngle="0"
SweepAngle="140"
StrokeJoin="Round"
StrokeLineCap="Round">
<Arc.Stroke>
<ConicGradientBrush>
<GradientStops>
<GradientStop Offset="0.1" Color="Transparent" />
<GradientStop Offset="0.7" Color="White" />
</GradientStops>
</ConicGradientBrush>
</Arc.Stroke>
<Arc.Styles>
<Style Selector="Arc[IsVisible=True]">
<Style.Animations>
<Animation IterationCount="Infinite" Duration="0:0:0.6">
<KeyFrame Cue="0%">
<Setter Property="RotateTransform.Angle" Value="0.0" />
</KeyFrame>
<KeyFrame Cue="100%">
<Setter Property="RotateTransform.Angle" Value="360.0" />
</KeyFrame>
</Animation>
</Style.Animations>
</Style>
</Arc.Styles>
</Arc>
</Grid>
</Canvas>
</Border>
<ContentPresenter
x:Name="PART_OnContentPresenter"
Grid.Column="1"
Margin="{DynamicResource ToggleSwitchOnContentMargin}"
HorizontalAlignment="Left"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
Content="{TemplateBinding OnContent}"
ContentTemplate="{TemplateBinding OnContentTemplate}"
IsVisible="True" />
<ContentPresenter
x:Name="PART_OffContentPresenter"
Grid.Column="1"
Margin="{DynamicResource ToggleSwitchOnContentMargin}"
HorizontalAlignment="Left"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
Content="{TemplateBinding OffContent}"
ContentTemplate="{TemplateBinding OffContentTemplate}"
IsVisible="False" />
</Grid>
<ContentPresenter
x:Name="PART_OnContentPresenter"
Grid.Row="1" Grid.Column="1"
Margin="{DynamicResource ToggleSwitchOnContentMargin}"
HorizontalAlignment="Left"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
Content="{TemplateBinding OnContent}"
ContentTemplate="{TemplateBinding OnContentTemplate}" />
<ContentPresenter
x:Name="PART_OffContentPresenter"
Grid.Row="1" Grid.Column="1"
Margin="{DynamicResource ToggleSwitchOnContentMargin}"
HorizontalAlignment="Left"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
Content="{TemplateBinding OffContent}"
ContentTemplate="{TemplateBinding OffContentTemplate}" />
</Grid>
</ControlTemplate>
</Setter>
@@ -149,6 +179,22 @@
<Setter Property="Background" Value="{DynamicResource ToggleSwitchContainerCheckedDisabledBackground}" />
</Style>
</Style>
<Style Selector="^.Loading">
<Style Selector="^ /template/ Border#SwitchKnobIndicator">
<Setter Property="IsVisible" Value="False" />
</Style>
<Style Selector="^ /template/ Arc#SwitchKnobLoadingIndicator">
<Setter Property="IsVisible" Value="True" />
</Style>
<Style Selector="^:unchecked /template/ Border#SwitchBackgroundBorder">
<Setter Property="Background" Value="{DynamicResource ToggleSwitchContainerUnCheckedPointeroverBackground}" />
</Style>
<Style Selector="^:checked /template/ Border#SwitchBackgroundBorder">
<Setter Property="Background" Value="{DynamicResource ToggleSwitchContainerCheckedPointeroverBackground}" />
</Style>
</Style>
<Style Selector="^.Small">
<Style Selector="^ /template/ Border#SwitchBackgroundBorder">
<Setter Property="Width" Value="{DynamicResource ToggleSwitchSmallWidth}" />
@@ -163,6 +209,9 @@
<Setter Property="Height" Value="{DynamicResource ToggleSwitchIndicatorSmallWidth}" />
<Setter Property="Margin" Value="{DynamicResource ToggleSwitchIndicatorSmallMargin}"/>
</Style>
<Style Selector="^ /template/ Arc#SwitchKnobLoadingIndicator">
<Setter Property="StrokeThickness" Value="{DynamicResource ToggleSwitchLoadingIndicatorSmallStrokeThickness}" />
</Style>
</Style>
<Style Selector="^.Large">
<Style Selector="^ /template/ Border#SwitchBackgroundBorder">
@@ -178,6 +227,9 @@
<Setter Property="Height" Value="{DynamicResource ToggleSwitchIndicatorLargeWidth}" />
<Setter Property="Margin" Value="{DynamicResource ToggleSwitchIndicatorLargeMargin}"/>
</Style>
<Style Selector="^ /template/ Arc#SwitchKnobLoadingIndicator">
<Setter Property="StrokeThickness" Value="{DynamicResource ToggleSwitchLoadingIndicatorLargeStrokeThickness}" />
</Style>
</Style>
</ControlTheme>
@@ -188,6 +240,12 @@
<Setter Property="Padding" Value="8" />
<Setter Property="CornerRadius" Value="3" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="FocusAdorner">
<FocusAdornerTemplate>
<Border BorderThickness="{DynamicResource AdornerLayerBorderThickness}"
BorderBrush="{DynamicResource AdornerLayerStroke}" />
</FocusAdornerTemplate>
</Setter>
<Setter Property="Template">
<ControlTemplate TargetType="ToggleSwitch">
<Border
@@ -196,9 +254,9 @@
Background="{TemplateBinding Background}"
CornerRadius="{TemplateBinding CornerRadius}"
Cursor="Hand">
<Grid ColumnDefinitions="Auto">
<Grid x:Name="PART_SwitchKnob" />
<Grid x:Name="PART_MovingKnobs" />
<Panel>
<Panel x:Name="PART_SwitchKnob" />
<Panel x:Name="PART_MovingKnobs" />
<ContentPresenter
x:Name="PART_OnContentPresenter"
Margin="{DynamicResource ToggleSwitchOnContentMargin}"
@@ -209,7 +267,7 @@
Margin="{DynamicResource ToggleSwitchOnContentMargin}"
Content="{TemplateBinding OffContent}"
ContentTemplate="{TemplateBinding OffContentTemplate}" />
</Grid>
</Panel>
</Border>
</ControlTemplate>
</Setter>
@@ -225,29 +283,29 @@
x:Key="SimpleToggleSwitch"
BasedOn="{StaticResource {x:Type ToggleSwitch}}"
TargetType="ToggleSwitch">
<Setter Property="OnContent" Value="{x:Null}" />
<Setter Property="OffContent" Value="{x:Null}" />
<Setter Property="FontSize" Value="{DynamicResource SimpleToggleSwitchFontSize}" />
<Setter Property="Template">
<ControlTemplate TargetType="ToggleSwitch">
<Grid
<Border
x:Name="SwitchBackgroundBorder"
Background="{TemplateBinding Background}"
Cursor="Hand"
ColumnDefinitions="Auto, *">
Width="{DynamicResource ToggleSwitchDefaultWidth}"
Height="{DynamicResource ToggleSwitchDefaultHeight}"
CornerRadius="100">
<Border.Transitions>
<Transitions>
<BrushTransition Property="Background" Duration="0:0:0.2" />
</Transitions>
</Border.Transitions>
<Grid
Grid.Column="0"
Grid.ColumnSpan="2"
TemplatedControl.IsTemplateFocusTarget="True" />
<Border
x:Name="SwitchBackgroundBorder"
Grid.Column="0"
Width="{DynamicResource ToggleSwitchDefaultWidth}"
Height="{DynamicResource ToggleSwitchDefaultHeight}"
CornerRadius="100">
<Border.Transitions>
<Transitions>
<BrushTransition Property="Background" Duration="0:0:0.2" />
</Transitions>
</Border.Transitions>
ColumnDefinitions="*,*">
<Canvas
x:Name="PART_SwitchKnob"
Grid.Column="0"
Grid.ColumnSpan="2"
Width="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
Height="{DynamicResource ToggleSwitchIndicatorDefaultWidth}"
HorizontalAlignment="Left">
@@ -261,11 +319,74 @@
Background="White"
BoxShadow="0 0 1 1 #222E3238"
CornerRadius="100" />
<Arc
x:Name="SwitchKnobLoadingIndicator"
IsVisible="False"
StrokeThickness="2"
StartAngle="0"
SweepAngle="140"
StrokeJoin="Round"
StrokeLineCap="Round">
<Arc.Stroke>
<ConicGradientBrush>
<GradientStops>
<GradientStop Offset="0.1" Color="Transparent" />
<GradientStop Offset="0.7" Color="White" />
</GradientStops>
</ConicGradientBrush>
</Arc.Stroke>
<Arc.Styles>
<Style Selector="Arc[IsVisible=True]">
<Style.Animations>
<Animation IterationCount="Infinite" Duration="0:0:0.6">
<KeyFrame Cue="0%">
<Setter Property="RotateTransform.Angle" Value="0.0" />
</KeyFrame>
<KeyFrame Cue="100%">
<Setter Property="RotateTransform.Angle" Value="360.0" />
</KeyFrame>
</Animation>
</Style.Animations>
</Style>
</Arc.Styles>
</Arc>
</Grid>
</Canvas>
</Border>
</Grid>
<ContentPresenter
x:Name="PART_OnContentPresenter"
Grid.Column="0"
VerticalAlignment="Center"
HorizontalAlignment="Center"
FontSize="{TemplateBinding FontSize}"
Foreground="{TemplateBinding Foreground}"
Content="{TemplateBinding OnContent}"
ContentTemplate="{TemplateBinding OnContentTemplate}" />
<ContentPresenter
x:Name="PART_OffContentPresenter"
Grid.Column="1"
VerticalAlignment="Center"
HorizontalAlignment="Center"
FontSize="{TemplateBinding FontSize}"
Foreground="{TemplateBinding Foreground}"
Content="{TemplateBinding OffContent}"
ContentTemplate="{TemplateBinding OffContentTemplate}" />
</Grid>
</Border>
</ControlTemplate>
</Setter>
<Style Selector="^:unchecked">
<Setter Property="Foreground" Value="{DynamicResource SimpleToggleSwitchContainerUnCheckedForeground}" />
</Style>
<Style Selector="^:checked">
<Setter Property="Foreground" Value="{DynamicResource SimpleToggleSwitchContainerCheckedForeground}" />
</Style>
<Style Selector="^.Small">
<Style Selector="^ /template/ ContentPresenter#PART_OnContentPresenter">
<Setter Property="IsVisible" Value="False" />
</Style>
<Style Selector="^ /template/ ContentPresenter#PART_OffContentPresenter">
<Setter Property="IsVisible" Value="False" />
</Style>
</Style>
</ControlTheme>
</ResourceDictionary>

View File

@@ -1,4 +1,5 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
x:Class="Semi.Avalonia.Locale.en_us"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- DatePicker -->
<x:String x:Key="STRING_DATEPICKER_DAY_TEXT">day</x:String>

View File

@@ -0,0 +1,24 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
x:Class="Semi.Avalonia.Locale.ja_jp"
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>
<!-- 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>
</ResourceDictionary>

View File

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

View File

@@ -0,0 +1,24 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
x:Class="Semi.Avalonia.Locale.ru_ru"
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>
<!-- 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">OK</x:String>
<x:String x:Key="STRING_CHOOSER_DIALOG_CANCEL">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>
</ResourceDictionary>

View File

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

View File

@@ -1,4 +1,5 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui"
x:Class="Semi.Avalonia.Locale.zh_cn"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- DatePicker -->
<x:String x:Key="STRING_DATEPICKER_DAY_TEXT">日</x:String>

View File

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

View File

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

View File

@@ -1,5 +1,5 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<BoxShadows x:Key="AutoCompleteBoxPopupBoxShadow">0 0 8 0 #1AFFFFFF</BoxShadows>
<SolidColorBrush x:Key="AutoCompleteBoxPopupBackground" Color="#35363C" />
<SolidColorBrush x:Key="AutoCompleteBoxPopupBackground" Color="#43444A" />
<SolidColorBrush x:Key="AutoCompleteBoxPopupBorderBrush" Opacity="0.08" Color="White" />
</ResourceDictionary>

View File

@@ -82,7 +82,7 @@
<SolidColorBrush x:Key="ButtonOutlineDangerBorderBrush" Color="#FC725A" />
<!-- end Outline -->
<SolidColorBrush x:Key="ButtonInputInnerForeground" Color="#888D92" />
<SolidColorBrush x:Key="ButtonInputInnerPointeroverForeground" Color="#A7ABB0" />
<SolidColorBrush x:Key="ButtonInputInnerPressedForeground" Color="#C6CACD" />
<SolidColorBrush x:Key="ButtonInputInnerForeground" Opacity="0.6" Color="#F9F9F9" />
<SolidColorBrush x:Key="ButtonInputInnerPointeroverForeground" Color="#7FC1FF" />
<SolidColorBrush x:Key="ButtonInputInnerPressedForeground" Color="#A9D7FF" />
</ResourceDictionary>

View File

@@ -1,17 +1,17 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SolidColorBrush x:Key="CalendarBackground" Color="#232429" />
<SolidColorBrush x:Key="CalendarBackground" Color="#43444A" />
<SolidColorBrush x:Key="CalendarForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="CalendarBorderBrush" Opacity="0.08" Color="White" />
<SolidColorBrush x:Key="CalendarItemWeekDayNameForeground" Opacity="0.6" Color="#F9F9F9" />
<SolidColorBrush x:Key="CalendarItemIconForeground" Opacity="0.6" Color="#F9F9F9" />
<SolidColorBrush x:Key="CalendarItemCalendarButtonBackground" Color="#232429" />
<SolidColorBrush x:Key="CalendarItemCalendarButtonBackground" Color="#43444A" />
<SolidColorBrush x:Key="CalendarItemCalendarButtonForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="CalendarItemCalendarButtonBorderBrush" Color="Transparent" />
<SolidColorBrush x:Key="CalendarItemCalendarButtonPointeroverBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="CalendarItemCalendarButtonPressedBackground" Opacity="0.20" Color="White" />
<SolidColorBrush x:Key="CalendarItemCalendarButtonSelectedBackground" Color="#54A9FF" />
<SolidColorBrush x:Key="CalendarItemCalendarButtonSelectedForeground" Color="#232429" />
<SolidColorBrush x:Key="CalendarItemCalendarButtonSelectedForeground" Color="#43444A" />
<SolidColorBrush x:Key="CalendarItemCalendarButtonDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
<SolidColorBrush x:Key="CalendarItemCalendarButtonBlackoutForeground" Opacity="0.35" Color="#F9F9F9" />
<SolidColorBrush x:Key="CalendarItemCalendarButtonInactiveForeground" Opacity="0.65" Color="#F9F9F9" />
@@ -24,7 +24,7 @@
<SolidColorBrush x:Key="CalendarItemCalendarDayButtonPressedBackground" Opacity="0.20" Color="White" />
<SolidColorBrush x:Key="CalendarItemCalendarDayButtonSelectedBackground" Color="#54A9FF" />
<SolidColorBrush x:Key="CalendarItemCalendarDayButtonSelectedForeground" Color="#232429" />
<SolidColorBrush x:Key="CalendarItemCalendarDayButtonSelectedForeground" Color="#43444A" />
<SolidColorBrush x:Key="CalendarItemCalendarDayButtonTodayForeground" Color="#54A9FF" />
<SolidColorBrush x:Key="CalendarItemCalendarDayButtonTodayBackground" Opacity="0.12" Color="White" />

View File

@@ -18,7 +18,7 @@
<SolidColorBrush x:Key="ComboBoxDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
<BoxShadows x:Key="ComboBoxPopupBoxShadow">0 0 8 0 #1AFFFFFF</BoxShadows>
<SolidColorBrush x:Key="ComboBoxPopupBackground" Color="#35363C" />
<SolidColorBrush x:Key="ComboBoxPopupBackground" Color="#43444A" />
<SolidColorBrush x:Key="ComboBoxPopupBorderBrush" Opacity="0.08" Color="White" />
<SolidColorBrush x:Key="ComboBoxItemForeground" Color="#F9F9F9" />

View File

@@ -1,6 +1,6 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SolidColorBrush x:Key="DateTimePickerListItemBackground" Color="Transparent" />
<SolidColorBrush x:Key="DateTimePickerPopupBackground" Color="#35363C" />
<SolidColorBrush x:Key="DateTimePickerPopupBackground" Color="#43444A" />
<SolidColorBrush x:Key="DateTimePickerFlyoutButtonForeground" Opacity="0.6" Color="#F9F9F9" />
<SolidColorBrush x:Key="DateTimePickerFlyoutButtonPointeroverForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="DateTimePickerFlyoutButtonPressedForeground" Color="#F9F9F9" />

View File

@@ -1,5 +1,5 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SolidColorBrush x:Key="FlyoutBackground" Color="#35363C" />
<SolidColorBrush x:Key="FlyoutBackground" Color="#43444A" />
<SolidColorBrush x:Key="FlyoutForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="FlyoutBorderBrush" Opacity="0.08" Color="White" />
<BoxShadows x:Key="FlyoutBorderBoxShadow">0 0 8 0 #1AFFFFFF</BoxShadows>

View File

@@ -2,12 +2,12 @@
<SolidColorBrush x:Key="MenuFlyoutScrollViewerIconForeground" Opacity="0.6" Color="#F9F9F9" />
<!-- MenuFlyout -->
<SolidColorBrush x:Key="MenuFlyoutBackground" Color="#35363C" />
<SolidColorBrush x:Key="MenuFlyoutBackground" Color="#43444A" />
<SolidColorBrush x:Key="MenuFlyoutBorderBrush" Opacity="0.08" Color="White" />
<BoxShadows x:Key="MenuFlyoutBorderBoxShadow">0 0 8 0 #1AFFFFFF</BoxShadows>
<!-- MenuItem -->
<SolidColorBrush x:Key="MenuItemBackground" Color="#35363C" />
<SolidColorBrush x:Key="MenuItemBackground" Color="#43444A" />
<SolidColorBrush x:Key="MenuItemForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="MenuItemSeparatorBackground" Opacity="0.08" Color="White" />

View File

@@ -1,5 +1,4 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SolidColorBrush x:Key="NotificationCardForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="NotificationCardBorderBrush" Opacity="0.08" Color="White" />
<SolidColorBrush x:Key="NotificationCardBackground" Color="#43444A" />
<SolidColorBrush x:Key="NotificationCardInformationIconForeground" Color="#54A9FF" />
@@ -7,4 +6,6 @@
<SolidColorBrush x:Key="NotificationCardWarningIconForeground" Color="#FFAE43" />
<SolidColorBrush x:Key="NotificationCardErrorIconForeground" Color="#FC725A" />
<BoxShadows x:Key="NotificationCardBoxShadows">0 0 8 0 #1AFFFFFF</BoxShadows>
<SolidColorBrush x:Key="NotificationCardTitleForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="NotificationCardMessageForeground" Opacity="0.8" Color="#F9F9F9" />
</ResourceDictionary>

View File

@@ -160,6 +160,11 @@
<Color x:Key="SemiGrey7Color">#C6CACD</Color>
<Color x:Key="SemiGrey8Color">#E6E8EA</Color>
<Color x:Key="SemiGrey9Color">#F9F9F9</Color>
<Color x:Key="SemiBackground0Color">#16161A</Color>
<Color x:Key="SemiBackground1Color">#232429</Color>
<Color x:Key="SemiBackground2Color">#35363C</Color>
<Color x:Key="SemiBackground3Color">#43444A</Color>
<Color x:Key="SemiBackground4Color">#4F5159</Color>
<SolidColorBrush x:Key="SemiRed0" Color="{StaticResource SemiRed0Color}" />
<SolidColorBrush x:Key="SemiRed1" Color="{StaticResource SemiRed1Color}" />
@@ -396,11 +401,11 @@
<SolidColorBrush x:Key="SemiColorLinkVisited" Color="{StaticResource SemiBlue5Color}" />
<!-- Background -->
<SolidColorBrush x:Key="SemiColorBackground0" Color="#16161A" />
<SolidColorBrush x:Key="SemiColorBackground1" Color="#232429" />
<SolidColorBrush x:Key="SemiColorBackground2" Color="#35363C" />
<SolidColorBrush x:Key="SemiColorBackground3" Color="#43444A" />
<SolidColorBrush x:Key="SemiColorBackground4" Color="#4F5159" />
<SolidColorBrush x:Key="SemiColorBackground0" Color="{StaticResource SemiBackground0Color}" />
<SolidColorBrush x:Key="SemiColorBackground1" Color="{StaticResource SemiBackground1Color}" />
<SolidColorBrush x:Key="SemiColorBackground2" Color="{StaticResource SemiBackground2Color}" />
<SolidColorBrush x:Key="SemiColorBackground3" Color="{StaticResource SemiBackground3Color}" />
<SolidColorBrush x:Key="SemiColorBackground4" Color="{StaticResource SemiBackground4Color}" />
<!-- Fill -->
<SolidColorBrush x:Key="SemiColorFill0" Opacity="0.12" Color="White" />

View File

@@ -9,9 +9,6 @@
<SolidColorBrush x:Key="TextBoxForeground" Color="#F9F9F9" />
<SolidColorBrush x:Key="TextBoxInnerForeground" Opacity="0.6" Color="#F9F9F9" />
<SolidColorBrush x:Key="TextBoxButtonDefaultForeground" Opacity="0.2" Color="#E6E8EA" />
<SolidColorBrush x:Key="TextBoxButtonPointeroverForeground" Opacity="0.4" Color="#E6E8EA" />
<SolidColorBrush x:Key="TextBoxDisabledBackground" Opacity="0.04" Color="#E6E8EA" />
<SolidColorBrush x:Key="TextBoxDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
<SolidColorBrush x:Key="TextBoxDisabledBorderBrush" Color="Transparent" />

View File

@@ -10,4 +10,7 @@
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedPointeroverBackground" Color="#7FD184" />
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedPressedBackground" Color="#A6E1A8" />
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedDisabledBackground" Color="#277731" />
<SolidColorBrush x:Key="SimpleToggleSwitchContainerUnCheckedForeground" Opacity="0.6" Color="#F9F9F9" />
<SolidColorBrush x:Key="SimpleToggleSwitchContainerCheckedForeground" Color="White" />
</ResourceDictionary>

View File

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

View File

@@ -82,7 +82,7 @@
<SolidColorBrush x:Key="ButtonOutlineDangerBorderBrush" Color="#F93920" />
<!-- end Outline -->
<SolidColorBrush x:Key="ButtonInputInnerForeground" Color="#6B7075" />
<SolidColorBrush x:Key="ButtonInputInnerPointeroverForeground" Color="#555B61" />
<SolidColorBrush x:Key="ButtonInputInnerPressedForeground" Color="#41464C" />
<SolidColorBrush x:Key="ButtonInputInnerForeground" Opacity="0.62" Color="#1C1F23" />
<SolidColorBrush x:Key="ButtonInputInnerPointeroverForeground" Color="#0062D6" />
<SolidColorBrush x:Key="ButtonInputInnerPressedForeground" Color="#004FB3" />
</ResourceDictionary>

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="CalendarBackground" Color="White" />
<SolidColorBrush x:Key="CalendarForeground" Color="#1C1F23" />
<SolidColorBrush x:Key="CalendarBorderBrush" Opacity="0.08" Color="#1C1F23" />

View File

@@ -1,5 +1,4 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SolidColorBrush x:Key="NotificationCardForeground" Color="#1C1F23" />
<SolidColorBrush x:Key="NotificationCardBorderBrush" Opacity="0.08" Color="#1C1F23" />
<SolidColorBrush x:Key="NotificationCardBackground" Color="White" />
<SolidColorBrush x:Key="NotificationCardInformationIconForeground" Color="#0077FA" />
@@ -7,4 +6,6 @@
<SolidColorBrush x:Key="NotificationCardWarningIconForeground" Color="#FC8800" />
<SolidColorBrush x:Key="NotificationCardErrorIconForeground" Color="#F93920" />
<BoxShadows x:Key="NotificationCardBoxShadows">0 0 8 0 #1A000000</BoxShadows>
<SolidColorBrush x:Key="NotificationCardTitleForeground" Color="#1C1F23" />
<SolidColorBrush x:Key="NotificationCardMessageForeground" Opacity="0.8" Color="#1C1F23" />
</ResourceDictionary>

View File

@@ -160,6 +160,11 @@
<Color x:Key="SemiGrey7Color">#41464C</Color>
<Color x:Key="SemiGrey8Color">#2E3238</Color>
<Color x:Key="SemiGrey9Color">#1C1F23</Color>
<Color x:Key="SemiBackground0Color">White</Color>
<Color x:Key="SemiBackground1Color">White</Color>
<Color x:Key="SemiBackground2Color">White</Color>
<Color x:Key="SemiBackground3Color">White</Color>
<Color x:Key="SemiBackground4Color">White</Color>
<SolidColorBrush x:Key="SemiRed0" Color="{StaticResource SemiRed0Color}" />
<SolidColorBrush x:Key="SemiRed1" Color="{StaticResource SemiRed1Color}" />
@@ -396,11 +401,11 @@
<SolidColorBrush x:Key="SemiColorLinkVisited" Color="{StaticResource SemiBlue5Color}" />
<!-- Background -->
<SolidColorBrush x:Key="SemiColorBackground0" Color="White" />
<SolidColorBrush x:Key="SemiColorBackground1" Color="White" />
<SolidColorBrush x:Key="SemiColorBackground2" Color="White" />
<SolidColorBrush x:Key="SemiColorBackground3" Color="White" />
<SolidColorBrush x:Key="SemiColorBackground4" Color="White" />
<SolidColorBrush x:Key="SemiColorBackground0" Color="{StaticResource SemiBackground0Color}" />
<SolidColorBrush x:Key="SemiColorBackground1" Color="{StaticResource SemiBackground1Color}" />
<SolidColorBrush x:Key="SemiColorBackground2" Color="{StaticResource SemiBackground2Color}" />
<SolidColorBrush x:Key="SemiColorBackground3" Color="{StaticResource SemiBackground3Color}" />
<SolidColorBrush x:Key="SemiColorBackground4" Color="{StaticResource SemiBackground4Color}" />
<!-- Fill -->
<SolidColorBrush x:Key="SemiColorFill0" Opacity="0.05" Color="{StaticResource SemiGrey8Color}" />

View File

@@ -9,9 +9,6 @@
<SolidColorBrush x:Key="TextBoxForeground" Color="#1C1F23" />
<SolidColorBrush x:Key="TextBoxInnerForeground" Opacity="0.62" Color="#1C1F23" />
<SolidColorBrush x:Key="TextBoxButtonDefaultForeground" Opacity="0.08" Color="#1C1F23" />
<SolidColorBrush x:Key="TextBoxButtonPointeroverForeground" Color="#0077FA" />
<SolidColorBrush x:Key="TextBoxDisabledBackground" Opacity="0.02" Color="#2E3238" />
<SolidColorBrush x:Key="TextBoxDisabledForeground" Opacity="0.35" Color="#1C1F23" />
<SolidColorBrush x:Key="TextBoxDisabledBorderBrush" Color="Transparent" />

View File

@@ -10,4 +10,7 @@
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedPointeroverBackground" Color="#30953B" />
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedPressedBackground" Color="#25772F" />
<SolidColorBrush x:Key="ToggleSwitchContainerCheckedDisabledBackground" Color="#A4E0A7" />
<SolidColorBrush x:Key="SimpleToggleSwitchContainerUnCheckedForeground" Opacity="0.62" Color="#1C1F23" />
<SolidColorBrush x:Key="SimpleToggleSwitchContainerCheckedForeground" Color="White" />
</ResourceDictionary>

View File

@@ -8,14 +8,16 @@ using Semi.Avalonia.Locale;
namespace Semi.Avalonia;
public class SemiTheme: Styles
public class SemiTheme : Styles
{
private static readonly Dictionary<CultureInfo, ResourceDictionary> _localeToResource = new()
{
{ new CultureInfo("zh-cn"), new zh_cn() },
{ new CultureInfo("en-us"), new en_us() },
{ new CultureInfo("ja-jp"), new ja_jp() },
{ new CultureInfo("ru-ru"), new ru_ru() },
};
private readonly IServiceProvider? sp;
public SemiTheme(IServiceProvider? provider = null)
{
@@ -28,17 +30,17 @@ public class SemiTheme: Styles
{
get => _locale;
set
{
{
_locale = value;
var resource = TryGetLocaleResource(value);
if(resource is null) return;
if (resource is null) return;
foreach (var kv in resource)
{
this.Resources.Add(kv);
}
}
}
private static ResourceDictionary? TryGetLocaleResource(CultureInfo? locale)
{
if (locale is null)

View File

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

View File

@@ -1,9 +1,22 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<x:Double x:Key="NotificationCardWidth">320</x:Double>
<x:Double x:Key="NotificationCardMinWidth">320</x:Double>
<Thickness x:Key="NotificationCardBorderThickness">1</Thickness>
<CornerRadius x:Key="NotificationCardCornerRadius">6</CornerRadius>
<Geometry x:Key="NotificationCardInformationIconPathData">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 23ZM14 7C14 8.10457 13.1046 9 12 9C10.8954 9 10 8.10457 10 7C10 5.89543 10.8954 5 12 5C13.1046 5 14 5.89543 14 7ZM9 10.75C9 10.3358 9.33579 10 9.75 10H12.5C13.0523 10 13.5 10.4477 13.5 11V16.5H14.25C14.6642 16.5 15 16.8358 15 17.25C15 17.6642 14.6642 18 14.25 18H9.75C9.33579 18 9 17.6642 9 17.25C9 16.8358 9.33579 16.5 9.75 16.5H10.5V11.5H9.75C9.33579 11.5 9 11.1642 9 10.75Z</Geometry>
<Geometry x:Key="NotificationCardSuccessIconPathData">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.8831 9.82235L11.6854 17.4112C11.4029 17.7806 10.965 17.9981 10.5 18C10.035 18.0019 9.59533 17.788 9.30982 17.421L5.81604 13.4209C5.30744 12.767 5.42524 11.8246 6.07916 11.316C6.73308 10.8074 7.67549 10.9252 8.1841 11.5791L10.4838 14.0439L15.5 8C16.0032 7.34193 16.9446 7.21641 17.6027 7.71964C18.2608 8.22287 18.3863 9.16428 17.8831 9.82235Z</Geometry>
<Geometry x:Key="NotificationCardWarningIconPathData">M10.2268 2.3986L1.52616 19.0749C0.831449 20.4064 1.79747 22 3.29933 22H20.7007C22.2025 22 23.1686 20.4064 22.4739 19.0749L13.7732 2.3986C13.0254 0.965441 10.9746 0.965442 10.2268 2.3986ZM13.1415 14.0101C13.0603 14.5781 12.5739 15 12.0001 15C11.4263 15 10.9398 14.5781 10.8586 14.0101L10.2829 9.97992C10.1336 8.93495 10.9445 8.00002 12.0001 8.00002C13.0556 8.00002 13.8665 8.93495 13.7172 9.97992L13.1415 14.0101ZM13.5001 18.5C13.5001 19.3284 12.8285 20 12.0001 20C11.1716 20 10.5001 19.3284 10.5001 18.5C10.5001 17.6716 11.1716 17 12.0001 17C12.8285 17 13.5001 17.6716 13.5001 18.5Z</Geometry>
<Geometry x:Key="NotificationCardErrorIconPathData">M23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12C1 5.92487 5.92487 1 12 1C18.0751 1 23 5.92487 23 12ZM13.5 17.5C13.5 16.6716 12.8284 16 12 16C11.1716 16 10.5 16.6716 10.5 17.5C10.5 18.3284 11.1716 19 12 19C12.8284 19 13.5 18.3284 13.5 17.5ZM12 5C10.9138 5 10.0507 5.91244 10.1109 6.99692L10.4168 12.5023C10.4635 13.3426 11.1584 14 12 14C12.8416 14 13.5365 13.3426 13.5832 12.5023L13.8891 6.99692C13.9493 5.91244 13.0862 5 12 5Z</Geometry>
<Thickness x:Key="NotificationCardMargin">8</Thickness>
<Thickness x:Key="NotificationCardPadding">16 12</Thickness>
<x:Double x:Key="NotificationCardIconWidth">18</x:Double>
<x:Double x:Key="NotificationCardIconHeight">18</x:Double>
<Thickness x:Key="NotificationCardIconMargin">0 0 12 0</Thickness>
<StreamGeometry x:Key="NotificationCardInformationIconPathData">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 23ZM14 7C14 8.10457 13.1046 9 12 9C10.8954 9 10 8.10457 10 7C10 5.89543 10.8954 5 12 5C13.1046 5 14 5.89543 14 7ZM9 10.75C9 10.3358 9.33579 10 9.75 10H12.5C13.0523 10 13.5 10.4477 13.5 11V16.5H14.25C14.6642 16.5 15 16.8358 15 17.25C15 17.6642 14.6642 18 14.25 18H9.75C9.33579 18 9 17.6642 9 17.25C9 16.8358 9.33579 16.5 9.75 16.5H10.5V11.5H9.75C9.33579 11.5 9 11.1642 9 10.75Z</StreamGeometry>
<StreamGeometry x:Key="NotificationCardSuccessIconPathData">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.8831 9.82235L11.6854 17.4112C11.4029 17.7806 10.965 17.9981 10.5 18C10.035 18.0019 9.59533 17.788 9.30982 17.421L5.81604 13.4209C5.30744 12.767 5.42524 11.8246 6.07916 11.316C6.73308 10.8074 7.67549 10.9252 8.1841 11.5791L10.4838 14.0439L15.5 8C16.0032 7.34193 16.9446 7.21641 17.6027 7.71964C18.2608 8.22287 18.3863 9.16428 17.8831 9.82235Z</StreamGeometry>
<StreamGeometry x:Key="NotificationCardWarningIconPathData">M10.2268 2.3986L1.52616 19.0749C0.831449 20.4064 1.79747 22 3.29933 22H20.7007C22.2025 22 23.1686 20.4064 22.4739 19.0749L13.7732 2.3986C13.0254 0.965441 10.9746 0.965442 10.2268 2.3986ZM13.1415 14.0101C13.0603 14.5781 12.5739 15 12.0001 15C11.4263 15 10.9398 14.5781 10.8586 14.0101L10.2829 9.97992C10.1336 8.93495 10.9445 8.00002 12.0001 8.00002C13.0556 8.00002 13.8665 8.93495 13.7172 9.97992L13.1415 14.0101ZM13.5001 18.5C13.5001 19.3284 12.8285 20 12.0001 20C11.1716 20 10.5001 19.3284 10.5001 18.5C10.5001 17.6716 11.1716 17 12.0001 17C12.8285 17 13.5001 17.6716 13.5001 18.5Z</StreamGeometry>
<StreamGeometry x:Key="NotificationCardErrorIconPathData">M23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12C1 5.92487 5.92487 1 12 1C18.0751 1 23 5.92487 23 12ZM13.5 17.5C13.5 16.6716 12.8284 16 12 16C11.1716 16 10.5 16.6716 10.5 17.5C10.5 18.3284 11.1716 19 12 19C12.8284 19 13.5 18.3284 13.5 17.5ZM12 5C10.9138 5 10.0507 5.91244 10.1109 6.99692L10.4168 12.5023C10.4635 13.3426 11.1584 14 12 14C12.8416 14 13.5365 13.3426 13.5832 12.5023L13.8891 6.99692C13.9493 5.91244 13.0862 5 12 5Z</StreamGeometry>
<x:Double x:Key="NotificationCardTitleSpacing">4</x:Double>
<x:Double x:Key="NotificationCardTitleFontSize">16</x:Double>
<FontWeight x:Key="NotificationCardTitleFontWeight">600</FontWeight>
<x:Double x:Key="NotificationCardMessageFontSize">14</x:Double>
<FontWeight x:Key="NotificationCardMessageFontWeight">400</FontWeight>
</ResourceDictionary>

View File

@@ -13,6 +13,6 @@
<Thickness x:Key="TextBoxTextAreaContentPadding">12 5</Thickness>
<x:Double x:Key="TextBoxTextAreaHeight">90</x:Double>
<StreamGeometry x:Key="PasswordBoxRevealButtonData">M12 4C5 4 1 10 1 12C1 14 5 20 12 20C19 20 23 14 23 12C23 10 19 4 12 4ZM17 12C17 14.7614 14.7614 17 12 17C9.23858 17 7 14.7614 7 12C7 9.23858 9.23858 7 12 7C14.7614 7 17 9.23858 17 12ZM12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15Z</StreamGeometry>
<StreamGeometry x:Key="PasswordBoxHideButtonData">M2.02949 4.67856C2.7593 4.28654 3.66871 4.56038 4.06073 5.29018C6.21313 9.29726 8.83179 11.5 12.0001 11.5C15.1685 11.5 17.7871 9.29726 19.9395 5.29018C20.3315 4.56038 21.241 4.28655 21.9708 4.67856C22.7006 5.07058 22.9744 5.97999 22.5824 6.7098C21.9049 7.97104 21.1385 9.15419 20.2743 10.199L23.2001 14.1C23.6971 14.7627 23.5628 15.7029 22.9001 16.2C22.2373 16.697 21.2971 16.5627 20.8001 15.9L18.1186 12.3246C17.448 12.8501 16.7322 13.2957 15.9687 13.6441L17.4046 17.4733C17.6955 18.249 17.3025 19.1136 16.5268 19.4045C15.7511 19.6954 14.8865 19.3024 14.5956 18.5267L13.0956 14.5267C13.0852 14.4988 13.0756 14.4709 13.0669 14.4428C12.7193 14.4806 12.3638 14.5 12.0001 14.5C11.6365 14.5 11.281 14.4806 10.9333 14.4428C10.9246 14.4709 10.9151 14.4988 10.9046 14.5267L9.40463 18.5267C9.11375 19.3024 8.24913 19.6954 7.47345 19.4045C6.69777 19.1136 6.30476 18.249 6.59564 17.4733L8.03159 13.6441C7.26806 13.2957 6.55223 12.8501 5.88163 12.3246L3.20009 15.9C2.70303 16.5627 1.76283 16.697 1.10009 16.2C0.437347 15.7029 0.303032 14.7627 0.800088 14.1L3.72589 10.1989C2.86177 9.15415 2.09533 7.97101 1.41787 6.70979C1.02585 5.97999 1.29969 5.07057 2.02949 4.67856Z</StreamGeometry>
<StreamGeometry x:Key="PasswordBoxRevealButtonData">M21.7071 3.70711C22.0976 3.31658 22.0976 2.68342 21.7071 2.29289C21.3166 1.90237 20.6834 1.90237 20.2929 2.29289L17.3135 5.27233C15.8114 4.50566 14.0321 4 12 4C5 4 1 10 1 12C1 13.1757 2.38219 15.7335 4.94345 17.6423L2.29289 20.2929C1.90237 20.6834 1.90237 21.3166 2.29289 21.7071C2.68342 22.0976 3.31658 22.0976 3.70711 21.7071L21.7071 3.70711ZM7.8284 14.7574L9.29237 13.2934C9.10495 12.9018 9 12.4631 9 12C9 10.3431 10.3431 9 12 9C12.4631 9 12.9018 9.10495 13.2934 9.29237L14.7574 7.8284C13.967 7.30488 13.0191 7 12 7C9.23858 7 7 9.23858 7 12C7 13.0191 7.30488 13.967 7.8284 14.7574Z M12 20C10.7789 20 9.64914 19.8174 8.61594 19.5054L11.1871 16.9342C11.4516 16.9775 11.7232 17 12 17C14.7614 17 17 14.7614 17 12C17 11.7232 16.9775 11.4516 16.9342 11.1871L20.5032 7.61808C22.1342 9.27317 23 11.0695 23 12C23 14 19 20 12 20Z</StreamGeometry>
<StreamGeometry x:Key="PasswordBoxHideButtonData">M12 4C5 4 1 10 1 12C1 14 5 20 12 20C19 20 23 14 23 12C23 10 19 4 12 4ZM17 12C17 14.7614 14.7614 17 12 17C9.23858 17 7 14.7614 7 12C7 9.23858 9.23858 7 12 7C14.7614 7 17 9.23858 17 12ZM12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15Z</StreamGeometry>
</ResourceDictionary>

View File

@@ -11,10 +11,14 @@
<Thickness x:Key="ToggleSwitchIndicatorDefaultMargin">2 0 0 0</Thickness>
<Thickness x:Key="ToggleSwitchIndicatorSmallMargin">1 0 0 0</Thickness>
<Thickness x:Key="ToggleSwitchIndicatorLargeMargin">3 0 0 0</Thickness>
<x:Double x:Key="ToggleSwitchLoadingIndicatorSmallStrokeThickness">1</x:Double>
<x:Double x:Key="ToggleSwitchLoadingIndicatorLargeStrokeThickness">3</x:Double>
<x:Double x:Key="ToggleSwitchDefaultFontSize">12</x:Double>
<x:Double x:Key="ToggleSwitchLargeFontSize">14</x:Double>
<Thickness x:Key="ToggleSwitchHeaderMargin">8 4</Thickness>
<Thickness x:Key="ToggleSwitchOnContentMargin">8 4</Thickness>
<x:Double x:Key="SimpleToggleSwitchFontSize">14</x:Double>
</ResourceDictionary>