feat: add DatePicker & TimePicker support.
(cherry picked from commit 04ffd38e143eadbaa8657a5e241991f4c437c895)
This commit is contained in:
parent
9220c46d43
commit
8f5c496cc5
@ -171,7 +171,7 @@
|
|||||||
FontFamily="{TemplateBinding FontFamily}"
|
FontFamily="{TemplateBinding FontFamily}"
|
||||||
FontSize="{TemplateBinding FontSize}"
|
FontSize="{TemplateBinding FontSize}"
|
||||||
FontWeight="{TemplateBinding FontWeight}"
|
FontWeight="{TemplateBinding FontWeight}"
|
||||||
Text="day" />
|
Text="{DynamicResource STRING_DATEPICKER_DAY_TEXT}" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Name="PART_MonthTextBlock"
|
Name="PART_MonthTextBlock"
|
||||||
Padding="12,4"
|
Padding="12,4"
|
||||||
@ -179,7 +179,7 @@
|
|||||||
FontFamily="{TemplateBinding FontFamily}"
|
FontFamily="{TemplateBinding FontFamily}"
|
||||||
FontSize="{TemplateBinding FontSize}"
|
FontSize="{TemplateBinding FontSize}"
|
||||||
FontWeight="{TemplateBinding FontWeight}"
|
FontWeight="{TemplateBinding FontWeight}"
|
||||||
Text="month"
|
Text="{DynamicResource STRING_DATEPICKER_MONTH_TEXT}"
|
||||||
TextAlignment="Left" />
|
TextAlignment="Left" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Name="PART_YearTextBlock"
|
Name="PART_YearTextBlock"
|
||||||
@ -189,7 +189,7 @@
|
|||||||
FontFamily="{TemplateBinding FontFamily}"
|
FontFamily="{TemplateBinding FontFamily}"
|
||||||
FontSize="{TemplateBinding FontSize}"
|
FontSize="{TemplateBinding FontSize}"
|
||||||
FontWeight="{TemplateBinding FontWeight}"
|
FontWeight="{TemplateBinding FontWeight}"
|
||||||
Text="year" />
|
Text="{DynamicResource STRING_DATEPICKER_YEAR_TEXT}" />
|
||||||
<Rectangle
|
<Rectangle
|
||||||
x:Name="PART_FirstSpacer"
|
x:Name="PART_FirstSpacer"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
|
@ -176,7 +176,8 @@
|
|||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
FontFamily="{TemplateBinding FontFamily}"
|
FontFamily="{TemplateBinding FontFamily}"
|
||||||
FontSize="{TemplateBinding FontSize}"
|
FontSize="{TemplateBinding FontSize}"
|
||||||
FontWeight="{TemplateBinding FontWeight}" />
|
FontWeight="{TemplateBinding FontWeight}"
|
||||||
|
Text="{DynamicResource STRING_TIMEPICKER_HOUR_TEXT}" />
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<Rectangle
|
<Rectangle
|
||||||
@ -199,7 +200,8 @@
|
|||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
FontFamily="{TemplateBinding FontFamily}"
|
FontFamily="{TemplateBinding FontFamily}"
|
||||||
FontSize="{TemplateBinding FontSize}"
|
FontSize="{TemplateBinding FontSize}"
|
||||||
FontWeight="{TemplateBinding FontWeight}" />
|
FontWeight="{TemplateBinding FontWeight}"
|
||||||
|
Text="{DynamicResource STRING_TIMEPICKER_MINUTE_TEXT}" />
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<Rectangle
|
<Rectangle
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
||||||
x:Class="Semi.Avalonia.Locale.en_us"
|
x:Class="Semi.Avalonia.Locale.en_us"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
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 -->
|
||||||
|
<x:String x:Key="STRING_TIMEPICKER_HOUR_TEXT">hour</x:String>
|
||||||
|
<x:String x:Key="STRING_TIMEPICKER_MINUTE_TEXT">minute</x:String>
|
||||||
<!-- TextBox/SelectableTextBox flyout -->
|
<!-- TextBox/SelectableTextBox flyout -->
|
||||||
<x:String x:Key="STRING_MENU_CUT">Cut</x:String>
|
<x:String x:Key="STRING_MENU_CUT">Cut</x:String>
|
||||||
<x:String x:Key="STRING_MENU_COPY">Copy</x:String>
|
<x:String x:Key="STRING_MENU_COPY">Copy</x:String>
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
||||||
x:Class="Semi.Avalonia.Locale.zh_cn"
|
x:Class="Semi.Avalonia.Locale.zh_cn"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
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 -->
|
<!-- TextBox/SelectableTextBox flyout -->
|
||||||
<x:String x:Key="STRING_MENU_CUT">剪切</x:String>
|
<x:String x:Key="STRING_MENU_CUT">剪切</x:String>
|
||||||
<x:String x:Key="STRING_MENU_COPY">复制</x:String>
|
<x:String x:Key="STRING_MENU_COPY">复制</x:String>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user