From 011cb37712f897f11113383eb85681e879d92ba4 Mon Sep 17 00:00:00 2001 From: robloo Date: Sat, 20 Aug 2022 22:05:40 -0400 Subject: [PATCH 01/17] Update DatePicker template part names --- .../DateTimePickers/DatePicker.cs | 18 +++++++++--------- .../Controls/DatePicker.xaml | 18 +++++++++--------- .../Controls/DatePicker.xaml | 18 +++++++++--------- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/Avalonia.Controls/DateTimePickers/DatePicker.cs b/src/Avalonia.Controls/DateTimePickers/DatePicker.cs index f2b808fe0d..4b8fbaec14 100644 --- a/src/Avalonia.Controls/DateTimePickers/DatePicker.cs +++ b/src/Avalonia.Controls/DateTimePickers/DatePicker.cs @@ -14,15 +14,15 @@ namespace Avalonia.Controls /// /// A control to allow the user to select a date /// - [TemplatePart("ButtonContentGrid", typeof(Grid))] - [TemplatePart("DayText", typeof(TextBlock))] - [TemplatePart("FirstSpacer", typeof(Rectangle))] - [TemplatePart("FlyoutButton", typeof(Button))] - [TemplatePart("MonthText", typeof(TextBlock))] - [TemplatePart("PickerPresenter", typeof(DatePickerPresenter))] - [TemplatePart("Popup", typeof(Popup))] - [TemplatePart("SecondSpacer", typeof(Rectangle))] - [TemplatePart("YearText", typeof(TextBlock))] + [TemplatePart("PART_ButtonContentGrid", typeof(Grid))] + [TemplatePart("PART_DayText", typeof(TextBlock))] + [TemplatePart("PART_FirstSpacer", typeof(Rectangle))] + [TemplatePart("PART_FlyoutButton", typeof(Button))] + [TemplatePart("PART_MonthText", typeof(TextBlock))] + [TemplatePart("PART_PickerPresenter", typeof(DatePickerPresenter))] + [TemplatePart("PART_Popup", typeof(Popup))] + [TemplatePart("PART_SecondSpacer", typeof(Rectangle))] + [TemplatePart("PART_YearText", typeof(TextBlock))] [PseudoClasses(":hasnodate")] public class DatePicker : TemplatedControl { diff --git a/src/Avalonia.Themes.Fluent/Controls/DatePicker.xaml b/src/Avalonia.Themes.Fluent/Controls/DatePicker.xaml index bc47f3892e..c5afa3dfca 100644 --- a/src/Avalonia.Themes.Fluent/Controls/DatePicker.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/DatePicker.xaml @@ -101,7 +101,7 @@ HorizontalAlignment="Stretch" VerticalAlignment="Top"/> - - - + diff --git a/src/Avalonia.Themes.Simple/Controls/DatePicker.xaml b/src/Avalonia.Themes.Simple/Controls/DatePicker.xaml index a6da2ad9f8..f7310eba64 100644 --- a/src/Avalonia.Themes.Simple/Controls/DatePicker.xaml +++ b/src/Avalonia.Themes.Simple/Controls/DatePicker.xaml @@ -102,7 +102,7 @@ Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" /> - - - + From 66baf9c03835617f0e10dc8581bf870dfc872303 Mon Sep 17 00:00:00 2001 From: robloo Date: Sat, 20 Aug 2022 22:47:54 -0400 Subject: [PATCH 02/17] Update Date/TimePicker template part names --- .../DateTimePickers/DatePicker.cs | 18 ++--- .../DateTimePickers/DatePickerPresenter.cs | 68 +++++++++---------- .../DateTimePickers/TimePicker.cs | 48 ++++++------- .../DateTimePickers/TimePickerPresenter.cs | 56 +++++++-------- .../Controls/DatePicker.xaml | 38 +++++------ .../Controls/TimePicker.xaml | 60 ++++++++-------- .../Controls/DatePicker.xaml | 34 +++++----- .../Controls/TimePicker.xaml | 58 ++++++++-------- 8 files changed, 190 insertions(+), 190 deletions(-) diff --git a/src/Avalonia.Controls/DateTimePickers/DatePicker.cs b/src/Avalonia.Controls/DateTimePickers/DatePicker.cs index 4b8fbaec14..db59dbdb4a 100644 --- a/src/Avalonia.Controls/DateTimePickers/DatePicker.cs +++ b/src/Avalonia.Controls/DateTimePickers/DatePicker.cs @@ -280,15 +280,15 @@ namespace Avalonia.Controls } base.OnApplyTemplate(e); - _flyoutButton = e.NameScope.Find - - - + @@ -216,42 +216,42 @@ Padding="{DynamicResource DateTimeFlyoutBorderPadding}" MaxHeight="398"> - + - + - - - + + - + - - - + + - + - - - + + - - - - - - - + @@ -214,50 +214,50 @@ CornerRadius="{TemplateBinding CornerRadius}"> - + - - - - - - - - - - - - @@ -272,12 +272,12 @@ Color="{DynamicResource ThemeAccentColor}" /> - - - - - -