mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-03-03 00:00:55 +08:00
feat: enhance Previous & Next Button in Calendar.
This commit is contained in:
@@ -2,6 +2,11 @@
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
x:CompileBindings="True">
|
||||
<Design.PreviewWith>
|
||||
<Border Padding="20">
|
||||
<Calendar />
|
||||
</Border>
|
||||
</Design.PreviewWith>
|
||||
<ControlTheme x:Key="{x:Type Calendar}" TargetType="Calendar">
|
||||
<Setter Property="Foreground" Value="{DynamicResource CalendarForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource CalendarBackground}" />
|
||||
@@ -59,18 +64,19 @@
|
||||
VerticalAlignment="Stretch"
|
||||
RowDefinitions="Auto,*">
|
||||
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto">
|
||||
<Button
|
||||
<RepeatButton
|
||||
Name="PART_PreviousButton"
|
||||
Grid.Column="0"
|
||||
HorizontalContentAlignment="Left"
|
||||
Padding="0"
|
||||
MinWidth="{Binding $self.MinHeight}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
Theme="{DynamicResource BorderlessButton}">
|
||||
Theme="{DynamicResource BorderlessRepeatButton}">
|
||||
<PathIcon
|
||||
Theme="{DynamicResource InnerPathIcon}"
|
||||
Classes="Large"
|
||||
Data="{DynamicResource CalendarItemPreviousIconGlyph}"
|
||||
Foreground="{DynamicResource CalendarItemIconForeground}" />
|
||||
</Button>
|
||||
</RepeatButton>
|
||||
|
||||
<Button
|
||||
Name="PART_HeaderButton"
|
||||
@@ -79,18 +85,19 @@
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
Theme="{DynamicResource BorderlessButton}" />
|
||||
|
||||
<Button
|
||||
<RepeatButton
|
||||
Name="PART_NextButton"
|
||||
Grid.Column="2"
|
||||
HorizontalContentAlignment="Left"
|
||||
Padding="0"
|
||||
MinWidth="{Binding $self.MinHeight}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
Theme="{DynamicResource BorderlessButton}">
|
||||
Theme="{DynamicResource BorderlessRepeatButton}">
|
||||
<PathIcon
|
||||
Theme="{DynamicResource InnerPathIcon}"
|
||||
Classes="Large"
|
||||
Data="{DynamicResource CalendarItemNextIconGlyph}"
|
||||
Foreground="{DynamicResource CalendarItemIconForeground}" />
|
||||
</Button>
|
||||
</RepeatButton>
|
||||
</Grid>
|
||||
<Grid
|
||||
Name="PART_MonthView"
|
||||
|
||||
Reference in New Issue
Block a user