Merge branch 'main' into 11.2-test
This commit is contained in:
commit
0d81c7d1bf
@ -19,42 +19,74 @@
|
||||
<ColorView ColorSpectrumShape="Box" />
|
||||
<ColorView Palette="{DynamicResource SemiColorPalette}" />
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
VerticalAlignment="Top"
|
||||
Orientation="Horizontal">
|
||||
<StackPanel VerticalAlignment="Top" Orientation="Horizontal">
|
||||
<ColorView
|
||||
Name="SimpleColorViewTest"
|
||||
Theme="{StaticResource SimpleColorView}"
|
||||
HsvColor="hsv(120,11%,10%)"
|
||||
IsAlphaVisible="True"
|
||||
HsvColor="hsv(120,11%,10%)" />
|
||||
Theme="{StaticResource SimpleColorView}" />
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding #SimpleColorViewTest.HsvColor}" />
|
||||
<TextBlock Text="{Binding #SimpleColorViewTest.Color}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
|
||||
<ColorPicker ColorSpectrumShape="Ring">
|
||||
<ColorPicker Margin="8" ColorSpectrumShape="Ring">
|
||||
<ColorPicker.Palette>
|
||||
<controls:FlatHalfColorPalette />
|
||||
</ColorPicker.Palette>
|
||||
</ColorPicker>
|
||||
<ColorPicker ColorSpectrumShape="Box">
|
||||
<ColorPicker Margin="8" ColorSpectrumShape="Box">
|
||||
<ColorPicker.Palette>
|
||||
<colorPicker:SemiColorLightPalette />
|
||||
</ColorPicker.Palette>
|
||||
</ColorPicker>
|
||||
|
||||
<ColorPicker ColorSpectrumShape="Box" Theme="{DynamicResource HexColorPicker}">
|
||||
<ColorPicker
|
||||
Margin="8"
|
||||
ColorSpectrumShape="Box"
|
||||
Theme="{DynamicResource HexColorPicker}">
|
||||
<ColorPicker.Palette>
|
||||
<colorPicker:SemiColorLightPalette />
|
||||
</ColorPicker.Palette>
|
||||
</ColorPicker>
|
||||
</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">
|
||||
<ColorPicker Theme="{StaticResource SimpleColorPicker}"
|
||||
HsvColor="hsv(120,11%,10%)" />
|
||||
<ColorPicker Theme="{StaticResource HexSimpleColorPicker}"
|
||||
HsvColor="hsv(120,11%,10%)" />
|
||||
<ColorPicker
|
||||
Margin="8"
|
||||
HsvColor="hsv(120,11%,10%)"
|
||||
Theme="{StaticResource SimpleColorPicker}" />
|
||||
<ColorPicker
|
||||
Margin="8"
|
||||
HsvColor="hsv(120,11%,10%)"
|
||||
Theme="{StaticResource HexSimpleColorPicker}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
|
@ -13,17 +13,16 @@ public partial class PaletteDemo : UserControl
|
||||
public PaletteDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.DataContext = new PaletteDemoViewModel();
|
||||
}
|
||||
|
||||
protected override async void OnApplyTemplate(TemplateAppliedEventArgs e)
|
||||
{
|
||||
base.OnApplyTemplate(e);
|
||||
PaletteDemoViewModel? vm = new PaletteDemoViewModel();
|
||||
PaletteDemoViewModel? vm = this.DataContext as PaletteDemoViewModel;
|
||||
await Dispatcher.UIThread.InvokeAsync(() =>
|
||||
{
|
||||
vm.InitializeResources();
|
||||
vm?.InitializeResources();
|
||||
});
|
||||
DataContext = vm;
|
||||
}
|
||||
}
|
@ -51,7 +51,6 @@
|
||||
<DropDownButton
|
||||
Width="{TemplateBinding Width}"
|
||||
Height="{TemplateBinding Height}"
|
||||
Padding="0,0,10,0"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
VerticalContentAlignment="Stretch"
|
||||
ClipToBounds="True"
|
||||
@ -473,6 +472,10 @@
|
||||
</DropDownButton>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^ /template/ DropDownButton">
|
||||
<Setter Property="Padding" Value="0 0 10 0"></Setter>
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme
|
||||
@ -523,7 +526,6 @@
|
||||
<DropDownButton
|
||||
Width="{TemplateBinding Width}"
|
||||
Height="{TemplateBinding Height}"
|
||||
Padding="0,0,10,0"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
VerticalContentAlignment="Stretch"
|
||||
ClipToBounds="True"
|
||||
|
@ -406,10 +406,11 @@
|
||||
Margin="4,0,0,0"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
IsVisible="{TemplateBinding IsPropertyNameVisible}" />
|
||||
<TextBlock
|
||||
<ContentControl
|
||||
Name="PART_GroupKeyContentControl"
|
||||
Margin="4,0,0,0"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
Text="{Binding Key}" />
|
||||
Content="{Binding Key}" />
|
||||
<TextBlock
|
||||
Name="PART_ItemCountElement"
|
||||
Margin="4,0,0,0"
|
||||
|
@ -1,11 +1,12 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
||||
x:Class="Semi.Avalonia.Locale.en_us"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- DatePicker -->
|
||||
<ResourceDictionary
|
||||
x:Class="Semi.Avalonia.Locale.en_us"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- DatePicker -->
|
||||
<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_YEAR_TEXT">year</x:String>
|
||||
<!-- TimePicker -->
|
||||
<!-- TimePicker -->
|
||||
<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_SECOND_TEXT">second</x:String>
|
||||
@ -13,7 +14,7 @@
|
||||
<x:String x:Key="STRING_MENU_CUT">Cut</x:String>
|
||||
<x:String x:Key="STRING_MENU_COPY">Copy</x:String>
|
||||
<x:String x:Key="STRING_MENU_PASTE">Paste</x:String>
|
||||
<!-- ManagedFileChooser -->
|
||||
<!-- ManagedFileChooser -->
|
||||
<x:String x:Key="STRING_CHOOSER_FILE_NAME">File name</x:String>
|
||||
<x:String x:Key="STRING_CHOOSER_SHOW_HIDDEN_FILES">Show hidden flies</x:String>
|
||||
<x:String x:Key="STRING_CHOOSER_DIALOG_OK">OK</x:String>
|
||||
|
@ -1,18 +1,19 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
||||
x:Class="Semi.Avalonia.Locale.ja_jp"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- DatePicker -->
|
||||
<ResourceDictionary
|
||||
x:Class="Semi.Avalonia.Locale.ja_jp"
|
||||
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 -->
|
||||
<!-- TimePicker -->
|
||||
<x:String x:Key="STRING_TIMEPICKER_HOUR_TEXT">時</x:String>
|
||||
<x:String x:Key="STRING_TIMEPICKER_MINUTE_TEXT">分</x:String>
|
||||
<!-- TextBox/SelectableTextBox flyout -->
|
||||
<!-- 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 -->
|
||||
<!-- 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>
|
||||
|
@ -1,19 +1,20 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
||||
x:Class="Semi.Avalonia.Locale.ru_ru"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- DatePicker -->
|
||||
<ResourceDictionary
|
||||
x:Class="Semi.Avalonia.Locale.ru_ru"
|
||||
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 -->
|
||||
<!-- 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 -->
|
||||
<!-- 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 -->
|
||||
<!-- 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>
|
||||
|
27
src/Semi.Avalonia/Locale/uk-uk.axaml
Normal file
27
src/Semi.Avalonia/Locale/uk-uk.axaml
Normal file
@ -0,0 +1,27 @@
|
||||
<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>
|
8
src/Semi.Avalonia/Locale/uk-uk.axaml.cs
Normal file
8
src/Semi.Avalonia/Locale/uk-uk.axaml.cs
Normal file
@ -0,0 +1,8 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Semi.Avalonia.Locale;
|
||||
|
||||
public class uk_uk : ResourceDictionary
|
||||
{
|
||||
|
||||
}
|
@ -1,11 +1,12 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
||||
x:Class="Semi.Avalonia.Locale.zh_cn"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- DatePicker -->
|
||||
<ResourceDictionary
|
||||
x:Class="Semi.Avalonia.Locale.zh_cn"
|
||||
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 -->
|
||||
<!-- 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>
|
||||
@ -13,7 +14,7 @@
|
||||
<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 -->
|
||||
<!-- 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>
|
||||
|
@ -20,6 +20,7 @@ public class SemiTheme : Styles
|
||||
{ new CultureInfo("zh-cn"), new zh_cn() },
|
||||
{ new CultureInfo("en-us"), new en_us() },
|
||||
{ new CultureInfo("ja-jp"), new ja_jp() },
|
||||
{ new CultureInfo("uk-uk"), new uk_uk() },
|
||||
{ new CultureInfo("ru-ru"), new ru_ru() },
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user