From a25667f69ae93814e8f21dc327cd96c385ac10b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Su=C3=A1rez?= Date: Wed, 30 Apr 2025 16:39:06 +0200 Subject: [PATCH 01/72] Initial changes --- .../src/Core/DatePicker/DatePicker.cs | 24 +++++++++++++ src/Controls/src/Core/Picker/Picker.cs | 24 +++++++++++++ .../src/Core/PickerClosedEventArgs.cs | 8 +++++ src/Controls/src/Core/PickerElement.cs | 32 +++++++++++++++++ .../src/Core/PickerOpenedEventArgs.cs | 8 +++++ .../net-android/PublicAPI.Unshipped.txt | 19 +++++++++- .../PublicAPI/net-ios/PublicAPI.Unshipped.txt | 17 +++++++++ .../net-maccatalyst/PublicAPI.Unshipped.txt | 17 +++++++++ .../net-windows/PublicAPI.Unshipped.txt | 17 ++++++++- .../PublicAPI/net/PublicAPI.Unshipped.txt | 17 ++++++++- .../netstandard/PublicAPI.Unshipped.txt | 17 ++++++++- .../src/Core/TimePicker/TimePicker.cs | 24 +++++++++++++ src/Core/src/Core/IDatePicker.cs | 2 +- src/Core/src/Core/IPicker.cs | 2 +- src/Core/src/Core/IPickerElement.cs | 36 +++++++++++++++++++ src/Core/src/Core/ITimePicker.cs | 2 +- .../DatePickerHandler.MacCatalyst.cs | 5 +++ .../DatePicker/DatePickerHandler.Standard.cs | 1 + .../DatePicker/DatePickerHandler.Tizen.cs | 3 ++ .../DatePicker/DatePickerHandler.Windows.cs | 5 +++ .../Handlers/DatePicker/DatePickerHandler.cs | 1 + .../DatePicker/DatePickerHandler.iOS.cs | 5 +++ .../Handlers/Picker/PickerHandler.Android.cs | 5 +++ .../Handlers/Picker/PickerHandler.Standard.cs | 1 + .../Handlers/Picker/PickerHandler.Tizen.cs | 4 +++ .../Handlers/Picker/PickerHandler.Windows.cs | 5 +++ src/Core/src/Handlers/Picker/PickerHandler.cs | 1 + .../src/Handlers/Picker/PickerHandler.iOS.cs | 5 +++ .../TimePicker/TimePickerHandler.Android.cs | 5 +++ .../TimePickerHandler.MacCatalyst.cs | 5 +++ .../TimePicker/TimePickerHandler.Standard.cs | 1 + .../TimePicker/TimePickerHandler.Tizen.cs | 3 ++ .../TimePicker/TimePickerHandler.Windows.cs | 5 +++ .../Handlers/TimePicker/TimePickerHandler.cs | 1 + .../TimePicker/TimePickerHandler.iOS.cs | 5 +++ .../Platform/Android/DatePickerExtensions.cs | 5 +++ .../src/Platform/Android/PickerExtensions.cs | 5 +++ .../Platform/Android/TimePickerExtensions.cs | 5 +++ .../Platform/Windows/DatePickerExtensions.cs | 5 +++ .../src/Platform/Windows/PickerExtensions.cs | 5 +++ .../Platform/Windows/TimePickerExtensions.cs | 5 +++ .../src/Platform/iOS/DatePickerExtensions.cs | 5 +++ src/Core/src/Platform/iOS/PickerExtensions.cs | 5 +++ .../src/Platform/iOS/TimePickerExtensions.cs | 6 ++++ .../net-android/PublicAPI.Unshipped.txt | 9 +++++ .../PublicAPI/net-ios/PublicAPI.Unshipped.txt | 10 ++++++ .../net-maccatalyst/PublicAPI.Unshipped.txt | 9 +++++ .../net-windows/PublicAPI.Unshipped.txt | 10 ++++++ .../src/PublicAPI/net/PublicAPI.Unshipped.txt | 6 ++++ .../netstandard/PublicAPI.Unshipped.txt | 5 +++ .../netstandard2.0/PublicAPI.Unshipped.txt | 1 + 51 files changed, 421 insertions(+), 7 deletions(-) create mode 100644 src/Controls/src/Core/PickerClosedEventArgs.cs create mode 100644 src/Controls/src/Core/PickerElement.cs create mode 100644 src/Controls/src/Core/PickerOpenedEventArgs.cs create mode 100644 src/Core/src/Core/IPickerElement.cs diff --git a/src/Controls/src/Core/DatePicker/DatePicker.cs b/src/Controls/src/Core/DatePicker/DatePicker.cs index ad05ae0d139d..9f19bc072484 100644 --- a/src/Controls/src/Core/DatePicker/DatePicker.cs +++ b/src/Controls/src/Core/DatePicker/DatePicker.cs @@ -45,6 +45,8 @@ public partial class DatePicker : View, IFontElement, ITextElement, IElementConf /// Bindable property for . public static readonly BindableProperty FontAutoScalingEnabledProperty = FontElement.FontAutoScalingEnabledProperty; + public static readonly BindableProperty IsOpenProperty = PickerElement.IsOpenProperty; + readonly Lazy> _platformConfigurationRegistry; /// @@ -132,6 +134,12 @@ public bool FontAutoScalingEnabled get => (bool)GetValue(FontAutoScalingEnabledProperty); set => SetValue(FontAutoScalingEnabledProperty, value); } + + public bool IsOpen + { + get => (bool)GetValue(IsOpenProperty); + set => SetValue(IsOpenProperty, value); + } void IFontElement.OnFontFamilyChanged(string oldValue, string newValue) => HandleFontChanged(); @@ -158,11 +166,27 @@ void ITextElement.OnTextTransformChanged(TextTransform oldValue, TextTransform n { } + void IPickerElement.OnIsOpenPropertyChanged(bool oldValue, bool newValue) => + HandleIsOpenChanged(); + + void HandleIsOpenChanged() + { + if (Handler.VirtualView is not DatePicker datePicker) + return; + + if (datePicker.IsOpen) + datePicker.Opened?.Invoke(datePicker, new PickerOpenedEventArgs()); + else + datePicker.Closed?.Invoke(datePicker, new PickerClosedEventArgs()); + } + /// public virtual string UpdateFormsText(string source, TextTransform textTransform) => TextTransformUtilities.GetTransformedText(source, textTransform); public event EventHandler DateSelected; + public event EventHandler Opened; + public event EventHandler Closed; static object CoerceDate(BindableObject bindable, object value) { diff --git a/src/Controls/src/Core/Picker/Picker.cs b/src/Controls/src/Core/Picker/Picker.cs index a6f9911fc6b2..5b01def51dbf 100644 --- a/src/Controls/src/Core/Picker/Picker.cs +++ b/src/Controls/src/Core/Picker/Picker.cs @@ -65,6 +65,8 @@ public partial class Picker : View, IFontElement, ITextElement, ITextAlignmentEl /// Bindable property for . public static readonly BindableProperty VerticalTextAlignmentProperty = TextAlignmentElement.VerticalTextAlignmentProperty; + public static readonly BindableProperty IsOpenProperty = PickerElement.IsOpenProperty; + readonly Lazy> _platformConfigurationRegistry; /// @@ -220,7 +222,15 @@ public BindingBase ItemDisplayBinding } } + public bool IsOpen + { + get => (bool)GetValue(IsOpenProperty); + set => SetValue(IsOpenProperty, value); + } + public event EventHandler SelectedIndexChanged; + public event EventHandler Opened; + public event EventHandler Closed; static readonly BindableProperty s_displayProperty = BindableProperty.Create("Display", typeof(string), typeof(Picker), default(string)); @@ -287,6 +297,20 @@ void OnItemsSourceChanged(IList oldValue, IList newValue) } } + void IPickerElement.OnIsOpenPropertyChanged(bool oldValue, bool newValue) => + HandleIsOpenChanged(); + + void HandleIsOpenChanged() + { + if (Handler.VirtualView is not Picker picker) + return; + + if (picker.IsOpen) + picker.Opened?.Invoke(picker, new PickerOpenedEventArgs()); + else + picker.Closed?.Invoke(picker, new PickerClosedEventArgs()); + } + void CollectionChanged(object sender, NotifyCollectionChangedEventArgs e) { switch (e.Action) diff --git a/src/Controls/src/Core/PickerClosedEventArgs.cs b/src/Controls/src/Core/PickerClosedEventArgs.cs new file mode 100644 index 000000000000..4eb42a42a517 --- /dev/null +++ b/src/Controls/src/Core/PickerClosedEventArgs.cs @@ -0,0 +1,8 @@ +using System; + +namespace Microsoft.Maui.Controls; + +public class PickerClosedEventArgs : EventArgs +{ + +} \ No newline at end of file diff --git a/src/Controls/src/Core/PickerElement.cs b/src/Controls/src/Core/PickerElement.cs new file mode 100644 index 000000000000..a780b9c25ad9 --- /dev/null +++ b/src/Controls/src/Core/PickerElement.cs @@ -0,0 +1,32 @@ +#nullable disable + +namespace Microsoft.Maui.Controls +{ + static class PickerElement + { + public static readonly BindableProperty IsOpenProperty = + BindableProperty.Create(nameof(IPickerElement.IsOpen), typeof(bool), typeof(PickerElement), default, BindingMode.TwoWay, + propertyChanged: OnIsOpenPropertyChanged); + + static void OnIsOpenPropertyChanged(BindableObject bindable, object oldValue, object newValue) + { + ((IPickerElement)bindable).OnIsOpenPropertyChanged((bool)oldValue, (bool)newValue); + } + + static void IsOpenPropertyChanged(BindableObject bindable, object oldValue, object newValue) + { + var datePicker = (DatePicker)bindable; + + bool isOpen = (bool)newValue; + + // Only process if there's an actual change + if ((bool)oldValue == isOpen) + return; + + if (isOpen) + datePicker.Opened?.Invoke(datePicker, new PickerOpenedEventArgs()); + else + datePicker.Closed?.Invoke(datePicker, new PickerClosedEventArgs()); + } + } +} diff --git a/src/Controls/src/Core/PickerOpenedEventArgs.cs b/src/Controls/src/Core/PickerOpenedEventArgs.cs new file mode 100644 index 000000000000..258d92786b48 --- /dev/null +++ b/src/Controls/src/Core/PickerOpenedEventArgs.cs @@ -0,0 +1,8 @@ +using System; + +namespace Microsoft.Maui.Controls; + +public class PickerOpenedEventArgs : EventArgs +{ + +} \ No newline at end of file diff --git a/src/Controls/src/Core/PublicAPI/net-android/PublicAPI.Unshipped.txt b/src/Controls/src/Core/PublicAPI/net-android/PublicAPI.Unshipped.txt index 600a21d19a0e..81322083e789 100644 --- a/src/Controls/src/Core/PublicAPI/net-android/PublicAPI.Unshipped.txt +++ b/src/Controls/src/Core/PublicAPI/net-android/PublicAPI.Unshipped.txt @@ -16,11 +16,15 @@ Microsoft.Maui.Controls.DateChangedEventArgs.DateChangedEventArgs(System.DateTim Microsoft.Maui.Controls.DateChangedEventArgs.NewDate.get -> System.DateTime? *REMOVED*Microsoft.Maui.Controls.DateChangedEventArgs.OldDate.get -> System.DateTime Microsoft.Maui.Controls.DateChangedEventArgs.OldDate.get -> System.DateTime? +Microsoft.Maui.Controls.DatePicker.Closed -> System.EventHandler Microsoft.Maui.Controls.DatePicker.Date.get -> System.DateTime? *REMOVED*Microsoft.Maui.Controls.DatePicker.MaximumDate.get -> System.DateTime *REMOVED*Microsoft.Maui.Controls.DatePicker.MinimumDate.get -> System.DateTime +Microsoft.Maui.Controls.DatePicker.IsOpen.get -> bool +Microsoft.Maui.Controls.DatePicker.IsOpen.set -> void Microsoft.Maui.Controls.DatePicker.MaximumDate.get -> System.DateTime? Microsoft.Maui.Controls.DatePicker.MinimumDate.get -> System.DateTime? +Microsoft.Maui.Controls.DatePicker.Opened -> System.EventHandler Microsoft.Maui.Controls.HybridWebView.InvokeJavaScriptAsync(string! methodName, object?[]? paramValues = null, System.Text.Json.Serialization.Metadata.JsonTypeInfo?[]? paramJsonTypeInfos = null) -> System.Threading.Tasks.Task! Microsoft.Maui.Controls.HybridWebView.SetInvokeJavaScriptTarget(T! target) -> void Microsoft.Maui.Controls.ICornerElement @@ -39,6 +43,16 @@ Microsoft.Maui.Controls.ITextElement.OnCharacterSpacingPropertyChanged(double ol Microsoft.Maui.Controls.ITextElement.OnTextTransformChanged(Microsoft.Maui.TextTransform oldValue, Microsoft.Maui.TextTransform newValue) -> void Microsoft.Maui.Controls.ITextElement.TextTransform.get -> Microsoft.Maui.TextTransform Microsoft.Maui.Controls.ITextElement.TextTransform.set -> void +Microsoft.Maui.Controls.Picker.Closed -> System.EventHandler +Microsoft.Maui.Controls.Picker.IsOpen.get -> bool +Microsoft.Maui.Controls.Picker.IsOpen.set -> void +Microsoft.Maui.Controls.Picker.Opened -> System.EventHandler +Microsoft.Maui.Controls.PickerClosedEventArgs +Microsoft.Maui.Controls.PickerOpenedEventArgs +Microsoft.Maui.Controls.TimePicker.Closed -> System.EventHandler +Microsoft.Maui.Controls.TimePicker.IsOpen.get -> bool +Microsoft.Maui.Controls.TimePicker.IsOpen.set -> void +Microsoft.Maui.Controls.TimePicker.Opened -> System.EventHandler ~Microsoft.Maui.Controls.ITextElement.OnTextColorPropertyChanged(Microsoft.Maui.Graphics.Color oldValue, Microsoft.Maui.Graphics.Color newValue) -> void ~Microsoft.Maui.Controls.ITextElement.TextColor.get -> Microsoft.Maui.Graphics.Color ~Microsoft.Maui.Controls.ITextElement.UpdateFormsText(string original, Microsoft.Maui.TextTransform transform) -> string @@ -210,6 +224,8 @@ static readonly Microsoft.Maui.Controls.TitleBar.TitleProperty -> Microsoft.Maui static readonly Microsoft.Maui.Controls.TitleBar.TrailingContentProperty -> Microsoft.Maui.Controls.BindableProperty! static readonly Microsoft.Maui.Controls.Window.TitleBarProperty -> Microsoft.Maui.Controls.BindableProperty! virtual Microsoft.Maui.Controls.Application.ActivateWindow(Microsoft.Maui.Controls.Window! window) -> void +~static readonly Microsoft.Maui.Controls.DatePicker.IsOpenProperty -> Microsoft.Maui.Controls.BindableProperty +~static readonly Microsoft.Maui.Controls.Picker.IsOpenProperty -> Microsoft.Maui.Controls.BindableProperty ~static readonly Microsoft.Maui.Controls.Switch.OffColorProperty -> Microsoft.Maui.Controls.BindableProperty ~Microsoft.Maui.Controls.Switch.OffColor.get -> Microsoft.Maui.Graphics.Color ~Microsoft.Maui.Controls.Switch.OffColor.set -> void @@ -265,4 +281,5 @@ override Microsoft.Maui.Controls.ListStringTypeConverter.ConvertTo(System.Compon ~static Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific.Button.SetRippleColor(Microsoft.Maui.Controls.BindableObject element, Microsoft.Maui.Graphics.Color value) -> void ~static Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific.ImageButton.SetRippleColor(this Microsoft.Maui.Controls.IPlatformElementConfiguration config, Microsoft.Maui.Graphics.Color value) -> Microsoft.Maui.Controls.IPlatformElementConfiguration *REMOVED*Microsoft.Maui.Controls.TimePicker.Time.get -> System.TimeSpan -Microsoft.Maui.Controls.TimePicker.Time.get -> System.TimeSpan? \ No newline at end of file +Microsoft.Maui.Controls.TimePicker.Time.get -> System.TimeSpan? +~static readonly Microsoft.Maui.Controls.TimePicker.IsOpenProperty -> Microsoft.Maui.Controls.BindableProperty \ No newline at end of file diff --git a/src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt b/src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt index b898752084b3..dd2d3dfb4712 100644 --- a/src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt +++ b/src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt @@ -1,4 +1,14 @@ #nullable enable +Microsoft.Maui.Controls.DatePicker.Closed -> System.EventHandler +Microsoft.Maui.Controls.DatePicker.IsOpen.get -> bool +Microsoft.Maui.Controls.DatePicker.IsOpen.set -> void +Microsoft.Maui.Controls.DatePicker.Opened -> System.EventHandler +Microsoft.Maui.Controls.Picker.Closed -> System.EventHandler +Microsoft.Maui.Controls.Picker.IsOpen.get -> bool +Microsoft.Maui.Controls.Picker.IsOpen.set -> void +Microsoft.Maui.Controls.Picker.Opened -> System.EventHandler +Microsoft.Maui.Controls.PickerClosedEventArgs +Microsoft.Maui.Controls.PickerOpenedEventArgs Microsoft.Maui.Controls.ShadowTypeConverter Microsoft.Maui.Controls.ShadowTypeConverter.ShadowTypeConverter() -> void *REMOVED*Microsoft.Maui.Controls.DatePicker.Date.get -> System.DateTime @@ -15,6 +25,10 @@ Microsoft.Maui.Controls.DateChangedEventArgs.OldDate.get -> System.DateTime? Microsoft.Maui.Controls.DatePicker.Date.get -> System.DateTime? Microsoft.Maui.Controls.StyleableElement.Style.get -> Microsoft.Maui.Controls.Style? Microsoft.Maui.Controls.Internals.TextTransformUtilities +Microsoft.Maui.Controls.TimePicker.Closed -> System.EventHandler +Microsoft.Maui.Controls.TimePicker.IsOpen.get -> bool +Microsoft.Maui.Controls.TimePicker.IsOpen.set -> void +Microsoft.Maui.Controls.TimePicker.Opened -> System.EventHandler override Microsoft.Maui.Controls.ShadowTypeConverter.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Type? sourceType) -> bool override Microsoft.Maui.Controls.ShadowTypeConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Type? destinationType) -> bool override Microsoft.Maui.Controls.ShadowTypeConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object! value) -> object! @@ -231,6 +245,9 @@ Microsoft.Maui.Controls.ITextElement.TextTransform.set -> void *REMOVED*~static Microsoft.Maui.Controls.WebView.ControlsWebViewMapper -> Microsoft.Maui.IPropertyMapper *REMOVED*~static Microsoft.Maui.Controls.Window.ControlsWindowMapper -> Microsoft.Maui.IPropertyMapper ~static readonly Microsoft.Maui.Controls.BaseShellItem.FlyoutItemIsVisibleProperty -> Microsoft.Maui.Controls.BindableProperty +~static readonly Microsoft.Maui.Controls.DatePicker.IsOpenProperty -> Microsoft.Maui.Controls.BindableProperty +~static readonly Microsoft.Maui.Controls.Picker.IsOpenProperty -> Microsoft.Maui.Controls.BindableProperty +~static readonly Microsoft.Maui.Controls.TimePicker.IsOpenProperty -> Microsoft.Maui.Controls.BindableProperty ~virtual Microsoft.Maui.Controls.Handlers.Items2.ItemsViewController2.CreateDelegator() -> UIKit.UICollectionViewDelegateFlowLayout ~virtual Microsoft.Maui.Controls.Handlers.Items2.ItemsViewController2.CreateItemsViewSource() -> Microsoft.Maui.Controls.Handlers.Items.IItemsViewSource ~virtual Microsoft.Maui.Controls.Handlers.Items2.ItemsViewController2.DetermineCellReuseId(Foundation.NSIndexPath indexPath) -> string diff --git a/src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt b/src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt index 5d0850bbe260..6c946264ebbb 100644 --- a/src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt +++ b/src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt @@ -1,4 +1,14 @@ #nullable enable +Microsoft.Maui.Controls.DatePicker.Closed -> System.EventHandler +Microsoft.Maui.Controls.DatePicker.IsOpen.get -> bool +Microsoft.Maui.Controls.DatePicker.IsOpen.set -> void +Microsoft.Maui.Controls.DatePicker.Opened -> System.EventHandler +Microsoft.Maui.Controls.Picker.Closed -> System.EventHandler +Microsoft.Maui.Controls.Picker.IsOpen.get -> bool +Microsoft.Maui.Controls.Picker.IsOpen.set -> void +Microsoft.Maui.Controls.Picker.Opened -> System.EventHandler +Microsoft.Maui.Controls.PickerClosedEventArgs +Microsoft.Maui.Controls.PickerOpenedEventArgs Microsoft.Maui.Controls.ShadowTypeConverter Microsoft.Maui.Controls.ShadowTypeConverter.ShadowTypeConverter() -> void *REMOVED*Microsoft.Maui.Controls.DatePicker.Date.get -> System.DateTime @@ -15,6 +25,10 @@ Microsoft.Maui.Controls.DateChangedEventArgs.OldDate.get -> System.DateTime? Microsoft.Maui.Controls.DatePicker.Date.get -> System.DateTime? Microsoft.Maui.Controls.StyleableElement.Style.get -> Microsoft.Maui.Controls.Style? Microsoft.Maui.Controls.Internals.TextTransformUtilities +Microsoft.Maui.Controls.TimePicker.Closed -> System.EventHandler +Microsoft.Maui.Controls.TimePicker.IsOpen.get -> bool +Microsoft.Maui.Controls.TimePicker.IsOpen.set -> void +Microsoft.Maui.Controls.TimePicker.Opened -> System.EventHandler override Microsoft.Maui.Controls.ShadowTypeConverter.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Type? sourceType) -> bool override Microsoft.Maui.Controls.ShadowTypeConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Type? destinationType) -> bool override Microsoft.Maui.Controls.ShadowTypeConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object! value) -> object! @@ -232,6 +246,9 @@ Microsoft.Maui.Controls.ITextElement.TextTransform.set -> void *REMOVED*~static Microsoft.Maui.Controls.WebView.ControlsWebViewMapper -> Microsoft.Maui.IPropertyMapper *REMOVED*~static Microsoft.Maui.Controls.Window.ControlsWindowMapper -> Microsoft.Maui.IPropertyMapper ~static readonly Microsoft.Maui.Controls.BaseShellItem.FlyoutItemIsVisibleProperty -> Microsoft.Maui.Controls.BindableProperty +~static readonly Microsoft.Maui.Controls.DatePicker.IsOpenProperty -> Microsoft.Maui.Controls.BindableProperty +~static readonly Microsoft.Maui.Controls.Picker.IsOpenProperty -> Microsoft.Maui.Controls.BindableProperty +~static readonly Microsoft.Maui.Controls.TimePicker.IsOpenProperty -> Microsoft.Maui.Controls.BindableProperty ~virtual Microsoft.Maui.Controls.Handlers.Items2.ItemsViewController2.CreateDelegator() -> UIKit.UICollectionViewDelegateFlowLayout ~virtual Microsoft.Maui.Controls.Handlers.Items2.ItemsViewController2.CreateItemsViewSource() -> Microsoft.Maui.Controls.Handlers.Items.IItemsViewSource ~virtual Microsoft.Maui.Controls.Handlers.Items2.ItemsViewController2.DetermineCellReuseId(Foundation.NSIndexPath indexPath) -> string diff --git a/src/Controls/src/Core/PublicAPI/net-windows/PublicAPI.Unshipped.txt b/src/Controls/src/Core/PublicAPI/net-windows/PublicAPI.Unshipped.txt index 213837164f92..75021da868ec 100644 --- a/src/Controls/src/Core/PublicAPI/net-windows/PublicAPI.Unshipped.txt +++ b/src/Controls/src/Core/PublicAPI/net-windows/PublicAPI.Unshipped.txt @@ -16,11 +16,15 @@ Microsoft.Maui.Controls.DateChangedEventArgs.DateChangedEventArgs(System.DateTim Microsoft.Maui.Controls.DateChangedEventArgs.NewDate.get -> System.DateTime? *REMOVED*Microsoft.Maui.Controls.DateChangedEventArgs.OldDate.get -> System.DateTime Microsoft.Maui.Controls.DateChangedEventArgs.OldDate.get -> System.DateTime? +Microsoft.Maui.Controls.DatePicker.Closed -> System.EventHandler Microsoft.Maui.Controls.DatePicker.Date.get -> System.DateTime? *REMOVED*Microsoft.Maui.Controls.DatePicker.MaximumDate.get -> System.DateTime *REMOVED*Microsoft.Maui.Controls.DatePicker.MinimumDate.get -> System.DateTime +Microsoft.Maui.Controls.DatePicker.IsOpen.get -> bool +Microsoft.Maui.Controls.DatePicker.IsOpen.set -> void Microsoft.Maui.Controls.DatePicker.MaximumDate.get -> System.DateTime? Microsoft.Maui.Controls.DatePicker.MinimumDate.get -> System.DateTime? +Microsoft.Maui.Controls.DatePicker.Opened -> System.EventHandler Microsoft.Maui.Controls.HybridWebView.InvokeJavaScriptAsync(string! methodName, object?[]? paramValues = null, System.Text.Json.Serialization.Metadata.JsonTypeInfo?[]? paramJsonTypeInfos = null) -> System.Threading.Tasks.Task! Microsoft.Maui.Controls.HybridWebView.SetInvokeJavaScriptTarget(T! target) -> void Microsoft.Maui.Controls.ICornerElement @@ -39,6 +43,14 @@ Microsoft.Maui.Controls.ITextElement.OnCharacterSpacingPropertyChanged(double ol Microsoft.Maui.Controls.ITextElement.OnTextTransformChanged(Microsoft.Maui.TextTransform oldValue, Microsoft.Maui.TextTransform newValue) -> void Microsoft.Maui.Controls.ITextElement.TextTransform.get -> Microsoft.Maui.TextTransform Microsoft.Maui.Controls.ITextElement.TextTransform.set -> void +Microsoft.Maui.Controls.Picker.Closed -> System.EventHandler +Microsoft.Maui.Controls.Picker.IsOpen.get -> bool +Microsoft.Maui.Controls.Picker.IsOpen.set -> void +Microsoft.Maui.Controls.Picker.Opened -> System.EventHandler +Microsoft.Maui.Controls.TimePicker.Closed -> System.EventHandler +Microsoft.Maui.Controls.TimePicker.IsOpen.get -> bool +Microsoft.Maui.Controls.TimePicker.IsOpen.set -> void +Microsoft.Maui.Controls.TimePicker.Opened -> System.EventHandler ~Microsoft.Maui.Controls.ITextElement.OnTextColorPropertyChanged(Microsoft.Maui.Graphics.Color oldValue, Microsoft.Maui.Graphics.Color newValue) -> void ~Microsoft.Maui.Controls.ITextElement.TextColor.get -> Microsoft.Maui.Graphics.Color ~Microsoft.Maui.Controls.ITextElement.UpdateFormsText(string original, Microsoft.Maui.TextTransform transform) -> string @@ -209,6 +221,8 @@ static readonly Microsoft.Maui.Controls.TitleBar.TitleProperty -> Microsoft.Maui static readonly Microsoft.Maui.Controls.TitleBar.TrailingContentProperty -> Microsoft.Maui.Controls.BindableProperty! static readonly Microsoft.Maui.Controls.Window.TitleBarProperty -> Microsoft.Maui.Controls.BindableProperty! virtual Microsoft.Maui.Controls.Application.ActivateWindow(Microsoft.Maui.Controls.Window! window) -> void +~static readonly Microsoft.Maui.Controls.DatePicker.IsOpenProperty -> Microsoft.Maui.Controls.BindableProperty +~static readonly Microsoft.Maui.Controls.Picker.IsOpenProperty -> Microsoft.Maui.Controls.BindableProperty ~static readonly Microsoft.Maui.Controls.Switch.OffColorProperty -> Microsoft.Maui.Controls.BindableProperty ~Microsoft.Maui.Controls.Switch.OffColor.get -> Microsoft.Maui.Graphics.Color ~Microsoft.Maui.Controls.Switch.OffColor.set -> void @@ -266,4 +280,5 @@ override Microsoft.Maui.Controls.ListStringTypeConverter.ConvertTo(System.Compon ~static Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific.Button.SetRippleColor(Microsoft.Maui.Controls.BindableObject element, Microsoft.Maui.Graphics.Color value) -> void ~static Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific.ImageButton.SetRippleColor(this Microsoft.Maui.Controls.IPlatformElementConfiguration config, Microsoft.Maui.Graphics.Color value) -> Microsoft.Maui.Controls.IPlatformElementConfiguration *REMOVED*Microsoft.Maui.Controls.TimePicker.Time.get -> System.TimeSpan -Microsoft.Maui.Controls.TimePicker.Time.get -> System.TimeSpan? \ No newline at end of file +Microsoft.Maui.Controls.TimePicker.Time.get -> System.TimeSpan? +~static readonly Microsoft.Maui.Controls.TimePicker.IsOpenProperty -> Microsoft.Maui.Controls.BindableProperty \ No newline at end of file diff --git a/src/Controls/src/Core/PublicAPI/net/PublicAPI.Unshipped.txt b/src/Controls/src/Core/PublicAPI/net/PublicAPI.Unshipped.txt index 3387b9a0ee64..661a67a1afcc 100644 --- a/src/Controls/src/Core/PublicAPI/net/PublicAPI.Unshipped.txt +++ b/src/Controls/src/Core/PublicAPI/net/PublicAPI.Unshipped.txt @@ -16,11 +16,15 @@ Microsoft.Maui.Controls.DateChangedEventArgs.DateChangedEventArgs(System.DateTim Microsoft.Maui.Controls.DateChangedEventArgs.NewDate.get -> System.DateTime? *REMOVED*Microsoft.Maui.Controls.DateChangedEventArgs.OldDate.get -> System.DateTime Microsoft.Maui.Controls.DateChangedEventArgs.OldDate.get -> System.DateTime? +Microsoft.Maui.Controls.DatePicker.Closed -> System.EventHandler Microsoft.Maui.Controls.DatePicker.Date.get -> System.DateTime? *REMOVED*Microsoft.Maui.Controls.DatePicker.MaximumDate.get -> System.DateTime *REMOVED*Microsoft.Maui.Controls.DatePicker.MinimumDate.get -> System.DateTime +Microsoft.Maui.Controls.DatePicker.IsOpen.get -> bool +Microsoft.Maui.Controls.DatePicker.IsOpen.set -> void Microsoft.Maui.Controls.DatePicker.MaximumDate.get -> System.DateTime? Microsoft.Maui.Controls.DatePicker.MinimumDate.get -> System.DateTime? +Microsoft.Maui.Controls.DatePicker.Opened -> System.EventHandler Microsoft.Maui.Controls.HybridWebView.InvokeJavaScriptAsync(string! methodName, object?[]? paramValues = null, System.Text.Json.Serialization.Metadata.JsonTypeInfo?[]? paramJsonTypeInfos = null) -> System.Threading.Tasks.Task! Microsoft.Maui.Controls.HybridWebView.SetInvokeJavaScriptTarget(T! target) -> void Microsoft.Maui.Controls.ICornerElement @@ -34,6 +38,14 @@ Microsoft.Maui.Controls.ITextAlignmentElement.HorizontalTextAlignment.get -> Mic Microsoft.Maui.Controls.ITextAlignmentElement.OnHorizontalTextAlignmentPropertyChanged(Microsoft.Maui.TextAlignment oldValue, Microsoft.Maui.TextAlignment newValue) -> void Microsoft.Maui.Controls.ITextAlignmentElement.VerticalTextAlignment.get -> Microsoft.Maui.TextAlignment Microsoft.Maui.Controls.ITextElement +Microsoft.Maui.Controls.Picker.Closed -> System.EventHandler +Microsoft.Maui.Controls.Picker.IsOpen.get -> bool +Microsoft.Maui.Controls.Picker.IsOpen.set -> void +Microsoft.Maui.Controls.Picker.Opened -> System.EventHandler +Microsoft.Maui.Controls.TimePicker.Closed -> System.EventHandler +Microsoft.Maui.Controls.TimePicker.IsOpen.get -> bool +Microsoft.Maui.Controls.TimePicker.IsOpen.set -> void +Microsoft.Maui.Controls.TimePicker.Opened -> System.EventHandler ~Microsoft.Maui.Controls.ITextElement.OnTextColorPropertyChanged(Microsoft.Maui.Graphics.Color oldValue, Microsoft.Maui.Graphics.Color newValue) -> void ~Microsoft.Maui.Controls.ITextElement.TextColor.get -> Microsoft.Maui.Graphics.Color ~Microsoft.Maui.Controls.ITextElement.UpdateFormsText(string original, Microsoft.Maui.TextTransform transform) -> string @@ -201,6 +213,8 @@ static readonly Microsoft.Maui.Controls.TitleBar.TitleProperty -> Microsoft.Maui static readonly Microsoft.Maui.Controls.TitleBar.TrailingContentProperty -> Microsoft.Maui.Controls.BindableProperty! static readonly Microsoft.Maui.Controls.Window.TitleBarProperty -> Microsoft.Maui.Controls.BindableProperty! virtual Microsoft.Maui.Controls.Application.ActivateWindow(Microsoft.Maui.Controls.Window! window) -> void +~static readonly Microsoft.Maui.Controls.DatePicker.IsOpenProperty -> Microsoft.Maui.Controls.BindableProperty +~static readonly Microsoft.Maui.Controls.Picker.IsOpenProperty -> Microsoft.Maui.Controls.BindableProperty ~static readonly Microsoft.Maui.Controls.Switch.OffColorProperty -> Microsoft.Maui.Controls.BindableProperty ~Microsoft.Maui.Controls.Switch.OffColor.get -> Microsoft.Maui.Graphics.Color ~Microsoft.Maui.Controls.Switch.OffColor.set -> void @@ -257,4 +271,5 @@ override Microsoft.Maui.Controls.ListStringTypeConverter.ConvertTo(System.Compon ~static Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific.Button.SetRippleColor(Microsoft.Maui.Controls.BindableObject element, Microsoft.Maui.Graphics.Color value) -> void ~static Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific.ImageButton.SetRippleColor(this Microsoft.Maui.Controls.IPlatformElementConfiguration config, Microsoft.Maui.Graphics.Color value) -> Microsoft.Maui.Controls.IPlatformElementConfiguration *REMOVED*Microsoft.Maui.Controls.TimePicker.Time.get -> System.TimeSpan -Microsoft.Maui.Controls.TimePicker.Time.get -> System.TimeSpan? \ No newline at end of file +Microsoft.Maui.Controls.TimePicker.Time.get -> System.TimeSpan? +~static readonly Microsoft.Maui.Controls.TimePicker.IsOpenProperty -> Microsoft.Maui.Controls.BindableProperty \ No newline at end of file diff --git a/src/Controls/src/Core/PublicAPI/netstandard/PublicAPI.Unshipped.txt b/src/Controls/src/Core/PublicAPI/netstandard/PublicAPI.Unshipped.txt index 647648206b9d..21d19366c869 100644 --- a/src/Controls/src/Core/PublicAPI/netstandard/PublicAPI.Unshipped.txt +++ b/src/Controls/src/Core/PublicAPI/netstandard/PublicAPI.Unshipped.txt @@ -16,11 +16,15 @@ Microsoft.Maui.Controls.DateChangedEventArgs.DateChangedEventArgs(System.DateTim Microsoft.Maui.Controls.DateChangedEventArgs.NewDate.get -> System.DateTime? *REMOVED*Microsoft.Maui.Controls.DateChangedEventArgs.OldDate.get -> System.DateTime Microsoft.Maui.Controls.DateChangedEventArgs.OldDate.get -> System.DateTime? +Microsoft.Maui.Controls.DatePicker.Closed -> System.EventHandler Microsoft.Maui.Controls.DatePicker.Date.get -> System.DateTime? *REMOVED*Microsoft.Maui.Controls.DatePicker.MaximumDate.get -> System.DateTime *REMOVED*Microsoft.Maui.Controls.DatePicker.MinimumDate.get -> System.DateTime +Microsoft.Maui.Controls.DatePicker.IsOpen.get -> bool +Microsoft.Maui.Controls.DatePicker.IsOpen.set -> void Microsoft.Maui.Controls.DatePicker.MaximumDate.get -> System.DateTime? Microsoft.Maui.Controls.DatePicker.MinimumDate.get -> System.DateTime? +Microsoft.Maui.Controls.DatePicker.Opened -> System.EventHandler Microsoft.Maui.Controls.HybridWebView.InvokeJavaScriptAsync(string! methodName, object?[]? paramValues = null, System.Text.Json.Serialization.Metadata.JsonTypeInfo?[]? paramJsonTypeInfos = null) -> System.Threading.Tasks.Task! Microsoft.Maui.Controls.HybridWebView.SetInvokeJavaScriptTarget(T! target) -> void Microsoft.Maui.Controls.ICornerElement @@ -39,9 +43,17 @@ Microsoft.Maui.Controls.ITextElement.OnCharacterSpacingPropertyChanged(double ol Microsoft.Maui.Controls.ITextElement.OnTextTransformChanged(Microsoft.Maui.TextTransform oldValue, Microsoft.Maui.TextTransform newValue) -> void Microsoft.Maui.Controls.ITextElement.TextTransform.get -> Microsoft.Maui.TextTransform Microsoft.Maui.Controls.ITextElement.TextTransform.set -> void +Microsoft.Maui.Controls.Picker.Closed -> System.EventHandler +Microsoft.Maui.Controls.Picker.IsOpen.get -> bool +Microsoft.Maui.Controls.Picker.IsOpen.set -> void +Microsoft.Maui.Controls.Picker.Opened -> System.EventHandler Microsoft.Maui.Controls.ShadowTypeConverter Microsoft.Maui.Controls.ShadowTypeConverter.ShadowTypeConverter() -> void Microsoft.Maui.Controls.StyleableElement.Style.get -> Microsoft.Maui.Controls.Style? +Microsoft.Maui.Controls.TimePicker.Closed -> System.EventHandler +Microsoft.Maui.Controls.TimePicker.IsOpen.get -> bool +Microsoft.Maui.Controls.TimePicker.IsOpen.set -> void +Microsoft.Maui.Controls.TimePicker.Opened -> System.EventHandler override Microsoft.Maui.Controls.ShadowTypeConverter.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Type? sourceType) -> bool override Microsoft.Maui.Controls.ShadowTypeConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Type? destinationType) -> bool override Microsoft.Maui.Controls.ShadowTypeConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object! value) -> object! @@ -201,6 +213,8 @@ static readonly Microsoft.Maui.Controls.TitleBar.TitleProperty -> Microsoft.Maui static readonly Microsoft.Maui.Controls.TitleBar.TrailingContentProperty -> Microsoft.Maui.Controls.BindableProperty! static readonly Microsoft.Maui.Controls.Window.TitleBarProperty -> Microsoft.Maui.Controls.BindableProperty! virtual Microsoft.Maui.Controls.Application.ActivateWindow(Microsoft.Maui.Controls.Window! window) -> void +~static readonly Microsoft.Maui.Controls.DatePicker.IsOpenProperty -> Microsoft.Maui.Controls.BindableProperty +~static readonly Microsoft.Maui.Controls.Picker.IsOpenProperty -> Microsoft.Maui.Controls.BindableProperty ~static readonly Microsoft.Maui.Controls.Switch.OffColorProperty -> Microsoft.Maui.Controls.BindableProperty ~Microsoft.Maui.Controls.Switch.OffColor.get -> Microsoft.Maui.Graphics.Color ~Microsoft.Maui.Controls.Switch.OffColor.set -> void @@ -256,4 +270,5 @@ override Microsoft.Maui.Controls.ListStringTypeConverter.ConvertTo(System.Compon ~static Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific.Button.SetRippleColor(Microsoft.Maui.Controls.BindableObject element, Microsoft.Maui.Graphics.Color value) -> void ~static Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific.ImageButton.SetRippleColor(this Microsoft.Maui.Controls.IPlatformElementConfiguration config, Microsoft.Maui.Graphics.Color value) -> Microsoft.Maui.Controls.IPlatformElementConfiguration *REMOVED*Microsoft.Maui.Controls.TimePicker.Time.get -> System.TimeSpan -Microsoft.Maui.Controls.TimePicker.Time.get -> System.TimeSpan? \ No newline at end of file +Microsoft.Maui.Controls.TimePicker.Time.get -> System.TimeSpan? +~static readonly Microsoft.Maui.Controls.TimePicker.IsOpenProperty -> Microsoft.Maui.Controls.BindableProperty \ No newline at end of file diff --git a/src/Controls/src/Core/TimePicker/TimePicker.cs b/src/Controls/src/Core/TimePicker/TimePicker.cs index 7e50dcef69c1..66a309579b2a 100644 --- a/src/Controls/src/Core/TimePicker/TimePicker.cs +++ b/src/Controls/src/Core/TimePicker/TimePicker.cs @@ -40,6 +40,8 @@ public partial class TimePicker : View, IFontElement, ITextElement, IElementConf /// Bindable property for . public static readonly BindableProperty FontAutoScalingEnabledProperty = FontElement.FontAutoScalingEnabledProperty; + public static readonly BindableProperty IsOpenProperty = PickerElement.IsOpenProperty; + readonly Lazy> _platformConfigurationRegistry; /// @@ -104,6 +106,12 @@ public bool FontAutoScalingEnabled set => SetValue(FontAutoScalingEnabledProperty, value); } + public bool IsOpen + { + get => (bool)GetValue(IsOpenProperty); + set => SetValue(IsOpenProperty, value); + } + TextTransform ITextElement.TextTransform { get => TextTransform.Default; @@ -111,6 +119,8 @@ TextTransform ITextElement.TextTransform } public event EventHandler TimeSelected; + public event EventHandler Opened; + public event EventHandler Closed; /// public virtual string UpdateFormsText(string source, TextTransform textTransform) @@ -137,6 +147,20 @@ void HandleFontChanged() InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged); } + void IPickerElement.OnIsOpenPropertyChanged(bool oldValue, bool newValue) => + HandleIsOpenChanged(); + + void HandleIsOpenChanged() + { + if (Handler.VirtualView is not TimePicker timePicker) + return; + + if (timePicker.IsOpen) + timePicker.Opened?.Invoke(timePicker, new PickerOpenedEventArgs()); + else + timePicker.Closed?.Invoke(timePicker, new PickerClosedEventArgs()); + } + /// public IPlatformElementConfiguration On() where T : IConfigPlatform { diff --git a/src/Core/src/Core/IDatePicker.cs b/src/Core/src/Core/IDatePicker.cs index 9174dd8ad960..3348314ff40c 100644 --- a/src/Core/src/Core/IDatePicker.cs +++ b/src/Core/src/Core/IDatePicker.cs @@ -5,7 +5,7 @@ namespace Microsoft.Maui; /// /// Represents a that allows the user to select a date. /// -public interface IDatePicker : IView, ITextStyle +public interface IDatePicker : IView, IPickerElement, ITextStyle { /// /// Gets the format of the date to display to the user. diff --git a/src/Core/src/Core/IPicker.cs b/src/Core/src/Core/IPicker.cs index 0e013bebd64d..a0911c90720c 100644 --- a/src/Core/src/Core/IPicker.cs +++ b/src/Core/src/Core/IPicker.cs @@ -7,7 +7,7 @@ namespace Microsoft.Maui /// /// Represents a View for selecting a text item from a list of data. /// - public interface IPicker : IView, ITextStyle, ITextAlignment, IItemDelegate + public interface IPicker : IView, IPickerElement, ITextStyle, ITextAlignment, IItemDelegate { /// /// Gets the list of choices. diff --git a/src/Core/src/Core/IPickerElement.cs b/src/Core/src/Core/IPickerElement.cs new file mode 100644 index 000000000000..e1f7d5ffaf2c --- /dev/null +++ b/src/Core/src/Core/IPickerElement.cs @@ -0,0 +1,36 @@ +namespace Microsoft.Maui; + +/// +/// Defines a UI element that can display content in a dropdown or popup that can be opened and closed. +/// +/// +/// The interface is implemented by controls that have an expandable region +/// which can be shown or hidden, such as Picker, DatePicker, or TimePicker. +/// This interface allows for programmatic control of the dropdown state. +/// +public interface IPickerElement +{ + /// + /// Gets or sets a value indicating whether the dropdown is currently open. + /// + /// + /// true if the dropdown is currently open and visible; otherwise, false. + /// + /// + /// Setting this property programmatically will open or close the dropdown. + /// Controls may also update this property when the dropdown is opened or closed through user interaction. + /// + bool IsOpen { get; set; } + + /// + /// Called when the property changes. + /// + /// The previous value of . + /// The new value of . + /// + /// This method is intended for handling UI updates or additional logic + /// when the dropdown's visibility state changes. + /// Implementers may trigger animations, adjust layout, or notify other components. + /// + void OnIsOpenPropertyChanged(bool oldValue, bool newValue); +} \ No newline at end of file diff --git a/src/Core/src/Core/ITimePicker.cs b/src/Core/src/Core/ITimePicker.cs index c283151f0ff7..4a6868656bbc 100644 --- a/src/Core/src/Core/ITimePicker.cs +++ b/src/Core/src/Core/ITimePicker.cs @@ -5,7 +5,7 @@ namespace Microsoft.Maui; /// /// Represents a that allows the user to select a time. /// -public interface ITimePicker : IView, ITextStyle +public interface ITimePicker : IView, IPickerElement, ITextStyle { /// /// The format of the time to display to the user. diff --git a/src/Core/src/Handlers/DatePicker/DatePickerHandler.MacCatalyst.cs b/src/Core/src/Handlers/DatePicker/DatePickerHandler.MacCatalyst.cs index 8b57893e68ab..58a0af2994b6 100644 --- a/src/Core/src/Handlers/DatePicker/DatePickerHandler.MacCatalyst.cs +++ b/src/Core/src/Handlers/DatePicker/DatePickerHandler.MacCatalyst.cs @@ -75,6 +75,11 @@ public static partial void MapFlowDirection(DatePickerHandler handler, IDatePick } + public static partial void MapIsOpen(IDatePickerHandler handler, IDatePicker datePicker) + { + + } + void SetVirtualViewDate() { if (VirtualView is null) diff --git a/src/Core/src/Handlers/DatePicker/DatePickerHandler.Standard.cs b/src/Core/src/Handlers/DatePicker/DatePickerHandler.Standard.cs index 52635d6682ab..bc5d1e0e0ee0 100644 --- a/src/Core/src/Handlers/DatePicker/DatePickerHandler.Standard.cs +++ b/src/Core/src/Handlers/DatePicker/DatePickerHandler.Standard.cs @@ -13,5 +13,6 @@ public static partial void MapMaximumDate(IDatePickerHandler handler, IDatePicke public static partial void MapCharacterSpacing(IDatePickerHandler handler, IDatePicker datePicker) { } public static partial void MapFont(IDatePickerHandler handler, IDatePicker datePicker) { } public static partial void MapTextColor(IDatePickerHandler handler, IDatePicker datePicker) { } + public static partial void MapIsOpen(IDatePickerHandler handler, IDatePicker datePicker) { } } } \ No newline at end of file diff --git a/src/Core/src/Handlers/DatePicker/DatePickerHandler.Tizen.cs b/src/Core/src/Handlers/DatePicker/DatePickerHandler.Tizen.cs index 4d08aab1e3d6..52828b56eb7f 100644 --- a/src/Core/src/Handlers/DatePicker/DatePickerHandler.Tizen.cs +++ b/src/Core/src/Handlers/DatePicker/DatePickerHandler.Tizen.cs @@ -57,6 +57,9 @@ public static partial void MapCharacterSpacing(IDatePickerHandler handler, IDate handler.PlatformView.UpdateCharacterSpacing(datePicker); } + [MissingMapper] + public static partial void MapIsOpen(IDatePickerHandler handler, IDatePicker datePicker) { } + bool OnTouch(object source, Tizen.NUI.BaseComponents.View.TouchEventArgs e) { if (e.Touch.GetState(0) != PointStateType.Up) diff --git a/src/Core/src/Handlers/DatePicker/DatePickerHandler.Windows.cs b/src/Core/src/Handlers/DatePicker/DatePickerHandler.Windows.cs index faf2097fcfb0..4ab43b998474 100644 --- a/src/Core/src/Handlers/DatePicker/DatePickerHandler.Windows.cs +++ b/src/Core/src/Handlers/DatePicker/DatePickerHandler.Windows.cs @@ -53,6 +53,11 @@ public static partial void MapTextColor(IDatePickerHandler handler, IDatePicker handler.PlatformView.UpdateTextColor(datePicker); } + public static partial void MapIsOpen(IDatePickerHandler handler, IDatePicker datePicker) + { + handler.PlatformView?.UpdateIsOpen(datePicker); + } + private void DateChanged(CalendarDatePicker sender, CalendarDatePickerDateChangedEventArgs args) { if (VirtualView is null) diff --git a/src/Core/src/Handlers/DatePicker/DatePickerHandler.cs b/src/Core/src/Handlers/DatePicker/DatePickerHandler.cs index ba750f45223d..bb42cf6997f0 100644 --- a/src/Core/src/Handlers/DatePicker/DatePickerHandler.cs +++ b/src/Core/src/Handlers/DatePicker/DatePickerHandler.cs @@ -34,6 +34,7 @@ public partial class DatePickerHandler : IDatePickerHandler [nameof(IDatePicker.MaximumDate)] = MapMaximumDate, [nameof(IDatePicker.MinimumDate)] = MapMinimumDate, [nameof(IDatePicker.TextColor)] = MapTextColor, + [nameof(IDatePicker.IsOpen)] = MapIsOpen, }; public static CommandMapper CommandMapper = new(ViewCommandMapper) diff --git a/src/Core/src/Handlers/DatePicker/DatePickerHandler.iOS.cs b/src/Core/src/Handlers/DatePicker/DatePickerHandler.iOS.cs index 1e5b38d9598b..ca84676721cb 100644 --- a/src/Core/src/Handlers/DatePicker/DatePickerHandler.iOS.cs +++ b/src/Core/src/Handlers/DatePicker/DatePickerHandler.iOS.cs @@ -86,6 +86,11 @@ public static partial void MapFlowDirection(DatePickerHandler handler, IDatePick handler.PlatformView?.UpdateTextAlignment(datePicker); } + public static partial void MapIsOpen(IDatePickerHandler handler, IDatePicker datePicker) + { + handler.PlatformView?.UpdateIsOpen(datePicker); + } + static void OnValueChanged(object? sender) { if (sender is DatePickerHandler datePickerHandler) diff --git a/src/Core/src/Handlers/Picker/PickerHandler.Android.cs b/src/Core/src/Handlers/Picker/PickerHandler.Android.cs index 76325f274690..7a489328ffde 100644 --- a/src/Core/src/Handlers/Picker/PickerHandler.Android.cs +++ b/src/Core/src/Handlers/Picker/PickerHandler.Android.cs @@ -86,6 +86,11 @@ public static void MapVerticalTextAlignment(IPickerHandler handler, IPicker pick handler.PlatformView?.UpdateVerticalAlignment(picker.VerticalTextAlignment); } + public static void MapIsOpen(IPickerHandler handler, IPicker picker) + { + handler.PlatformView?.UpdateIsOpen(picker); + } + void OnFocusChange(object? sender, global::Android.Views.View.FocusChangeEventArgs e) { if (PlatformView == null) diff --git a/src/Core/src/Handlers/Picker/PickerHandler.Standard.cs b/src/Core/src/Handlers/Picker/PickerHandler.Standard.cs index 9ff08772b963..c8150454fcb2 100644 --- a/src/Core/src/Handlers/Picker/PickerHandler.Standard.cs +++ b/src/Core/src/Handlers/Picker/PickerHandler.Standard.cs @@ -18,5 +18,6 @@ public static void MapFont(IPickerHandler handler, IPicker view) { } public static void MapTextColor(IPickerHandler handler, IPicker view) { } public static void MapHorizontalTextAlignment(IPickerHandler handler, IPicker view) { } public static void MapVerticalTextAlignment(IPickerHandler handler, IPicker view) { } + public static void MapIsOpen(IPickerHandler handler, IPicker picker) { } } } \ No newline at end of file diff --git a/src/Core/src/Handlers/Picker/PickerHandler.Tizen.cs b/src/Core/src/Handlers/Picker/PickerHandler.Tizen.cs index 80bb2681121d..daceb062a72c 100644 --- a/src/Core/src/Handlers/Picker/PickerHandler.Tizen.cs +++ b/src/Core/src/Handlers/Picker/PickerHandler.Tizen.cs @@ -74,6 +74,10 @@ public static void MapCharacterSpacing(IPickerHandler handler, IPicker picker) handler.PlatformView.UpdateCharacterSpacing(picker); } + [MissingMapper] + public static void MapIsOpen(IPickerHandler handler, IPicker picker) { } + + static void Reload(IPickerHandler handler) { if (handler.VirtualView == null || handler.PlatformView == null) diff --git a/src/Core/src/Handlers/Picker/PickerHandler.Windows.cs b/src/Core/src/Handlers/Picker/PickerHandler.Windows.cs index 9ea5b7c13bbe..d88c3837b734 100644 --- a/src/Core/src/Handlers/Picker/PickerHandler.Windows.cs +++ b/src/Core/src/Handlers/Picker/PickerHandler.Windows.cs @@ -107,6 +107,11 @@ public static void MapVerticalTextAlignment(IPickerHandler handler, IPicker pick handler.PlatformView?.UpdateVerticalTextAlignment(picker); } + public static void MapIsOpen(IPickerHandler handler, IPicker picker) + { + handler.PlatformView?.UpdateIsOpen(picker); + } + void OnControlSelectionChanged(object? sender, WSelectionChangedEventArgs e) { if (PlatformView == null) diff --git a/src/Core/src/Handlers/Picker/PickerHandler.cs b/src/Core/src/Handlers/Picker/PickerHandler.cs index d2640d33f420..7cc4a8ac9f12 100644 --- a/src/Core/src/Handlers/Picker/PickerHandler.cs +++ b/src/Core/src/Handlers/Picker/PickerHandler.cs @@ -28,6 +28,7 @@ public partial class PickerHandler : IPickerHandler [nameof(ITextAlignment.HorizontalTextAlignment)] = MapHorizontalTextAlignment, [nameof(ITextAlignment.VerticalTextAlignment)] = MapVerticalTextAlignment, [nameof(IPicker.Items)] = MapItems, + [nameof(IPicker.IsOpen)] = MapIsOpen, }; public static CommandMapper CommandMapper = new(ViewCommandMapper) diff --git a/src/Core/src/Handlers/Picker/PickerHandler.iOS.cs b/src/Core/src/Handlers/Picker/PickerHandler.iOS.cs index f8b0db75c471..1ad1cd8d7a68 100644 --- a/src/Core/src/Handlers/Picker/PickerHandler.iOS.cs +++ b/src/Core/src/Handlers/Picker/PickerHandler.iOS.cs @@ -172,6 +172,11 @@ public static void MapVerticalTextAlignment(IPickerHandler handler, IPicker pick handler.PlatformView?.UpdateVerticalTextAlignment(picker); } + public static void MapIsOpen(IPickerHandler handler, IPicker picker) + { + handler.PlatformView?.UpdateIsOpen(picker); + } + void UpdatePickerFromPickerSource(PickerSource? pickerSource) { if (VirtualView == null || PlatformView == null || pickerSource == null) diff --git a/src/Core/src/Handlers/TimePicker/TimePickerHandler.Android.cs b/src/Core/src/Handlers/TimePicker/TimePickerHandler.Android.cs index 2a2048bf28b8..aa7a882f65fa 100644 --- a/src/Core/src/Handlers/TimePicker/TimePickerHandler.Android.cs +++ b/src/Core/src/Handlers/TimePicker/TimePickerHandler.Android.cs @@ -85,6 +85,11 @@ public static void MapTextColor(ITimePickerHandler handler, ITimePicker timePick handler.PlatformView?.UpdateTextColor(timePicker); } + public static void MapIsOpen(ITimePickerHandler handler, ITimePicker timePicker) + { + handler.PlatformView?.UpdateIsOpen(timePicker); + } + void ShowPickerDialog() { if (VirtualView is null) diff --git a/src/Core/src/Handlers/TimePicker/TimePickerHandler.MacCatalyst.cs b/src/Core/src/Handlers/TimePicker/TimePickerHandler.MacCatalyst.cs index 1a9489a39558..99d527d399ee 100644 --- a/src/Core/src/Handlers/TimePicker/TimePickerHandler.MacCatalyst.cs +++ b/src/Core/src/Handlers/TimePicker/TimePickerHandler.MacCatalyst.cs @@ -62,6 +62,11 @@ public static void MapFlowDirection(TimePickerHandler handler, ITimePicker timeP // handler.PlatformView?.UpdateTextAlignment(timePicker); } + public static void MapIsOpen(ITimePickerHandler handler, ITimePicker timePicker) + { + + } + void SetVirtualViewTime() { if (VirtualView == null || PlatformView == null) diff --git a/src/Core/src/Handlers/TimePicker/TimePickerHandler.Standard.cs b/src/Core/src/Handlers/TimePicker/TimePickerHandler.Standard.cs index cd029f28c010..f6ed7cfeb17d 100644 --- a/src/Core/src/Handlers/TimePicker/TimePickerHandler.Standard.cs +++ b/src/Core/src/Handlers/TimePicker/TimePickerHandler.Standard.cs @@ -11,5 +11,6 @@ public static void MapTime(ITimePickerHandler handler, ITimePicker view) { } public static void MapCharacterSpacing(ITimePickerHandler handler, ITimePicker view) { } public static void MapFont(ITimePickerHandler handler, ITimePicker view) { } public static void MapTextColor(ITimePickerHandler handler, ITimePicker timePicker) { } + public static void MapIsOpen(ITimePickerHandler handler, ITimePicker timePicker) { } } } \ No newline at end of file diff --git a/src/Core/src/Handlers/TimePicker/TimePickerHandler.Tizen.cs b/src/Core/src/Handlers/TimePicker/TimePickerHandler.Tizen.cs index 97559b38d3cc..8c0f98fe8325 100644 --- a/src/Core/src/Handlers/TimePicker/TimePickerHandler.Tizen.cs +++ b/src/Core/src/Handlers/TimePicker/TimePickerHandler.Tizen.cs @@ -52,6 +52,9 @@ public static void MapCharacterSpacing(ITimePickerHandler handler, ITimePicker t handler.PlatformView.UpdateCharacterSpacing(timePicker); } + [MissingMapper] + public static void MapIsOpen(ITimePickerHandler handler, ITimePicker timePicker) { } + bool OnTouch(object source, Tizen.NUI.BaseComponents.View.TouchEventArgs e) { if (e.Touch.GetState(0) != Tizen.NUI.PointStateType.Up) diff --git a/src/Core/src/Handlers/TimePicker/TimePickerHandler.Windows.cs b/src/Core/src/Handlers/TimePicker/TimePickerHandler.Windows.cs index 6fd1084bc6e3..f08a95d3c101 100644 --- a/src/Core/src/Handlers/TimePicker/TimePickerHandler.Windows.cs +++ b/src/Core/src/Handlers/TimePicker/TimePickerHandler.Windows.cs @@ -49,6 +49,11 @@ public static void MapBackground(ITimePickerHandler handler, ITimePicker timePic handler.PlatformView?.UpdateBackground(timePicker); } + public static void MapIsOpen(ITimePickerHandler handler, ITimePicker timePicker) + { + handler.PlatformView?.UpdateIsOpen(timePicker); + } + void OnControlTimeChanged(object? sender, TimePickerValueChangedEventArgs e) { if (VirtualView is not null) diff --git a/src/Core/src/Handlers/TimePicker/TimePickerHandler.cs b/src/Core/src/Handlers/TimePicker/TimePickerHandler.cs index f71793788f44..6ba3d841a365 100644 --- a/src/Core/src/Handlers/TimePicker/TimePickerHandler.cs +++ b/src/Core/src/Handlers/TimePicker/TimePickerHandler.cs @@ -28,6 +28,7 @@ public partial class TimePickerHandler : ITimePickerHandler [nameof(ITimePicker.Format)] = MapFormat, [nameof(ITimePicker.TextColor)] = MapTextColor, [nameof(ITimePicker.Time)] = MapTime, + [nameof(ITimePicker.IsOpen)] = MapIsOpen, }; public static CommandMapper CommandMapper = new(ViewCommandMapper) diff --git a/src/Core/src/Handlers/TimePicker/TimePickerHandler.iOS.cs b/src/Core/src/Handlers/TimePicker/TimePickerHandler.iOS.cs index 89f673607b65..2b5fd3aa7b4d 100644 --- a/src/Core/src/Handlers/TimePicker/TimePickerHandler.iOS.cs +++ b/src/Core/src/Handlers/TimePicker/TimePickerHandler.iOS.cs @@ -61,6 +61,11 @@ public static void MapFlowDirection(TimePickerHandler handler, ITimePicker timeP handler.PlatformView?.UpdateFlowDirection(timePicker); handler.PlatformView?.UpdateTextAlignment(timePicker); } + + public static void MapIsOpen(ITimePickerHandler handler, ITimePicker timePicker) + { + handler.PlatformView?.UpdateIsOpen(timePicker); + } void SetVirtualViewTime() { diff --git a/src/Core/src/Platform/Android/DatePickerExtensions.cs b/src/Core/src/Platform/Android/DatePickerExtensions.cs index 478167df7576..b9bd19e475d6 100644 --- a/src/Core/src/Platform/Android/DatePickerExtensions.cs +++ b/src/Core/src/Platform/Android/DatePickerExtensions.cs @@ -73,6 +73,11 @@ public static void UpdateMaximumDate(this MauiDatePicker platformDatePicker, IDa } } + public static void UpdateIsOpen(this MauiDatePicker platformDatePicker, IDatePicker datePicker) + { + + } + internal static void SetText(this MauiDatePicker platformDatePicker, IDatePicker datePicker) { platformDatePicker.Text = datePicker.Date?.ToString(datePicker.Format) ?? string.Empty; diff --git a/src/Core/src/Platform/Android/PickerExtensions.cs b/src/Core/src/Platform/Android/PickerExtensions.cs index a33ba47fd8d4..7bd6af847cd6 100644 --- a/src/Core/src/Platform/Android/PickerExtensions.cs +++ b/src/Core/src/Platform/Android/PickerExtensions.cs @@ -37,6 +37,11 @@ public static void UpdateTextColor(this MauiPicker platformPicker, IPicker picke public static void UpdateSelectedIndex(this MauiPicker platformPicker, IPicker picker) => UpdatePicker(platformPicker, picker); + public static void UpdateIsOpen(this MauiPicker platformPicker, IPicker picker) + { + + } + internal static void UpdatePicker(this MauiPicker platformPicker, IPicker picker) { platformPicker.Hint = picker.Title; diff --git a/src/Core/src/Platform/Android/TimePickerExtensions.cs b/src/Core/src/Platform/Android/TimePickerExtensions.cs index 333c98845b5f..de7028efb6f7 100644 --- a/src/Core/src/Platform/Android/TimePickerExtensions.cs +++ b/src/Core/src/Platform/Android/TimePickerExtensions.cs @@ -12,6 +12,11 @@ public static void UpdateTime(this MauiTimePicker mauiTimePicker, ITimePicker ti mauiTimePicker.SetTime(timePicker); } + public static void UpdateIsOpen(this MauiTimePicker mauiTimePicker, ITimePicker timePicker) + { + + } + internal static void SetTime(this MauiTimePicker mauiTimePicker, ITimePicker timePicker) { var time = timePicker.Time; diff --git a/src/Core/src/Platform/Windows/DatePickerExtensions.cs b/src/Core/src/Platform/Windows/DatePickerExtensions.cs index fc049a7465f7..81a7f70c4d34 100644 --- a/src/Core/src/Platform/Windows/DatePickerExtensions.cs +++ b/src/Core/src/Platform/Windows/DatePickerExtensions.cs @@ -109,5 +109,10 @@ public static void UpdateBackground(this CalendarDatePicker platformDatePicker, "CalendarDatePickerBackgroundDisabled", "CalendarDatePickerBackgroundFocused", }; + + public static void UpdateIsOpen(this CalendarDatePicker platformDatePicker, IDatePicker datePicker) + { + + } } } diff --git a/src/Core/src/Platform/Windows/PickerExtensions.cs b/src/Core/src/Platform/Windows/PickerExtensions.cs index d501768fc693..302cb1ecdc69 100644 --- a/src/Core/src/Platform/Windows/PickerExtensions.cs +++ b/src/Core/src/Platform/Windows/PickerExtensions.cs @@ -88,5 +88,10 @@ public static void UpdateVerticalTextAlignment(this ComboBox nativeComboBox, IPi { nativeComboBox.VerticalContentAlignment = picker.VerticalTextAlignment.ToPlatformVerticalAlignment(); } + + public static void UpdateIsOpen(this ComboBox nativeComboBox, IPicker picker) + { + + } } } \ No newline at end of file diff --git a/src/Core/src/Platform/Windows/TimePickerExtensions.cs b/src/Core/src/Platform/Windows/TimePickerExtensions.cs index 0ef54a98b518..15dc3f9f1edc 100644 --- a/src/Core/src/Platform/Windows/TimePickerExtensions.cs +++ b/src/Core/src/Platform/Windows/TimePickerExtensions.cs @@ -84,4 +84,9 @@ public static void UpdateBackground(this TimePicker platformTimePicker, ITimePic "TimePickerButtonBackgroundDisabled", "TimePickerButtonBackgroundFocused", }; + + public static void UpdateIsOpen(this TimePicker platformTimePicker, ITimePicker timePicker) + { + + } } diff --git a/src/Core/src/Platform/iOS/DatePickerExtensions.cs b/src/Core/src/Platform/iOS/DatePickerExtensions.cs index 8caee7721d99..ac1b89df0568 100644 --- a/src/Core/src/Platform/iOS/DatePickerExtensions.cs +++ b/src/Core/src/Platform/iOS/DatePickerExtensions.cs @@ -140,4 +140,9 @@ public static void UpdateTextAlignment(this MauiDatePicker nativeDatePicker, IDa { // TODO: Update TextAlignment based on the EffectiveFlowDirection property. } + + public static void UpdateIsOpen(this UIDatePicker picker, IDatePicker datePicker) + { + + } } \ No newline at end of file diff --git a/src/Core/src/Platform/iOS/PickerExtensions.cs b/src/Core/src/Platform/iOS/PickerExtensions.cs index 2e8215099c4e..bcb76eaad697 100644 --- a/src/Core/src/Platform/iOS/PickerExtensions.cs +++ b/src/Core/src/Platform/iOS/PickerExtensions.cs @@ -18,6 +18,11 @@ public static void UpdateTextColor(this MauiPicker platformPicker, IPicker picke public static void UpdateSelectedIndex(this MauiPicker platformPicker, IPicker picker) => platformPicker.UpdatePicker(picker, picker.SelectedIndex); + public static void UpdateIsOpen(this MauiPicker platformPicker, IPicker picker) + { + + } + internal static void SetTitleColor(this MauiPicker platformPicker, IPicker picker) { var title = picker.Title; diff --git a/src/Core/src/Platform/iOS/TimePickerExtensions.cs b/src/Core/src/Platform/iOS/TimePickerExtensions.cs index 276f601126ef..294b1ed56c08 100644 --- a/src/Core/src/Platform/iOS/TimePickerExtensions.cs +++ b/src/Core/src/Platform/iOS/TimePickerExtensions.cs @@ -1,6 +1,7 @@ using System; using System.Globalization; using Foundation; +using Microsoft.Maui.Storage; using UIKit; namespace Microsoft.Maui.Platform; @@ -87,4 +88,9 @@ public static void UpdateTextAlignment(this MauiTimePicker textField, ITimePicke { // TODO: Update TextAlignment based on the EffectiveFlowDirection property. } + + public static void UpdateIsOpen(this MauiTimePicker mauiTimePicker, ITimePicker timePicker) + { + + } } \ No newline at end of file diff --git a/src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt b/src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt index 36b286bf60e0..7eb70eb75c2f 100644 --- a/src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt +++ b/src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt @@ -57,6 +57,10 @@ Microsoft.Maui.IHybridWebView.InvokeJavaScriptType.set -> void Microsoft.Maui.IHybridWebView.RawMessageReceived(string! rawMessage) -> void Microsoft.Maui.IHybridWebView.SendRawMessage(string! rawMessage) -> void Microsoft.Maui.IHybridWebView.SetInvokeJavaScriptTarget(T! target) -> void +Microsoft.Maui.IPickerElement +Microsoft.Maui.IPickerElement.IsOpen.get -> bool +Microsoft.Maui.IPickerElement.IsOpen.set -> void +Microsoft.Maui.IPickerElement.OnIsOpenPropertyChanged(bool oldValue, bool newValue) -> void Microsoft.Maui.ITitleBar Microsoft.Maui.ITitleBar.PassthroughElements.get -> System.Collections.Generic.IList! Microsoft.Maui.ITitleBar.Subtitle.get -> string? @@ -108,6 +112,8 @@ static Microsoft.Maui.Handlers.HybridWebViewHandler.MapInvokeJavaScriptAsync(Mic static Microsoft.Maui.Handlers.HybridWebViewHandler.Mapper -> Microsoft.Maui.IPropertyMapper! static Microsoft.Maui.Handlers.HybridWebViewHandler.MapSendRawMessage(Microsoft.Maui.Handlers.IHybridWebViewHandler! handler, Microsoft.Maui.IHybridWebView! hybridWebView, object? arg) -> void static Microsoft.Maui.Handlers.ImageHandler.MapInputTransparent(Microsoft.Maui.Handlers.IImageHandler! handler, Microsoft.Maui.IImage! image) -> void +static Microsoft.Maui.Handlers.PickerHandler.MapIsOpen(Microsoft.Maui.Handlers.IPickerHandler! handler, Microsoft.Maui.IPicker! picker) -> void +static Microsoft.Maui.Handlers.TimePickerHandler.MapIsOpen(Microsoft.Maui.Handlers.ITimePickerHandler! handler, Microsoft.Maui.ITimePicker! timePicker) -> void static Microsoft.Maui.Hosting.AppHostBuilderExtensions.ConfigureEnvironmentVariables(this Microsoft.Maui.Hosting.MauiAppBuilder! builder) -> Microsoft.Maui.Hosting.MauiAppBuilder! static Microsoft.Maui.Hosting.HybridWebViewServiceCollectionExtensions.AddHybridWebViewDeveloperTools(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! static Microsoft.Maui.Keyboard.Date.get -> Microsoft.Maui.Keyboard! @@ -117,11 +123,14 @@ static Microsoft.Maui.Keyboard.Time.get -> Microsoft.Maui.Keyboard! *REMOVED*virtual Microsoft.Maui.PropertyMapper.ClearKeyCache() -> void *REMOVED*virtual Microsoft.Maui.PropertyMapper.UpdateKeys.get -> System.Collections.Generic.IReadOnlyCollection! static Microsoft.Maui.Platform.ButtonExtensions.UpdateRippleColor(this Google.Android.Material.Button.MaterialButton! platformView, Microsoft.Maui.Graphics.Color? rippleColor) -> void +static Microsoft.Maui.Platform.DatePickerExtensions.UpdateIsOpen(this Microsoft.Maui.Platform.MauiDatePicker! platformDatePicker, Microsoft.Maui.IDatePicker! datePicker) -> void static Microsoft.Maui.Platform.EditTextExtensions.GetCursorPosition(this Android.Widget.EditText! editText, int cursorOffset = 0) -> int static Microsoft.Maui.Platform.EditTextExtensions.GetSelectedTextLength(this Android.Widget.EditText! editText) -> int static Microsoft.Maui.Platform.EditTextExtensions.UpdateClearButtonVisibility(this Android.Widget.EditText! editText, Microsoft.Maui.IEntry! entry) -> void static Microsoft.Maui.Platform.ImageButtonExtensions.UpdateBackground(this Google.Android.Material.ImageView.ShapeableImageView! platformButton, Microsoft.Maui.IImageButton! imageButton) -> void static Microsoft.Maui.Platform.ImageButtonExtensions.UpdateRippleColor(this Google.Android.Material.ImageView.ShapeableImageView! platformView, Microsoft.Maui.Graphics.Color! rippleColor) -> void +static Microsoft.Maui.Platform.PickerExtensions.UpdateIsOpen(this Microsoft.Maui.Platform.MauiPicker! platformPicker, Microsoft.Maui.IPicker! picker) -> void +static Microsoft.Maui.Platform.TimePickerExtensions.UpdateIsOpen(this Microsoft.Maui.Platform.MauiTimePicker! mauiTimePicker, Microsoft.Maui.ITimePicker! timePicker) -> void static Microsoft.Maui.ViewExtensions.DisconnectHandlers(this Microsoft.Maui.IView! view) -> void override Microsoft.Maui.Handlers.BorderHandler.PlatformArrange(Microsoft.Maui.Graphics.Rect rect) -> void override Microsoft.Maui.Platform.MauiWebChromeClient.OnHideCustomView() -> void diff --git a/src/Core/src/PublicAPI/net-ios/PublicAPI.Unshipped.txt b/src/Core/src/PublicAPI/net-ios/PublicAPI.Unshipped.txt index 3e411bcc0303..3b50405c0417 100644 --- a/src/Core/src/PublicAPI/net-ios/PublicAPI.Unshipped.txt +++ b/src/Core/src/PublicAPI/net-ios/PublicAPI.Unshipped.txt @@ -56,6 +56,10 @@ Microsoft.Maui.IHybridWebView.InvokeJavaScriptType.set -> void Microsoft.Maui.IHybridWebView.RawMessageReceived(string! rawMessage) -> void Microsoft.Maui.IHybridWebView.SendRawMessage(string! rawMessage) -> void Microsoft.Maui.IHybridWebView.SetInvokeJavaScriptTarget(T! target) -> void +Microsoft.Maui.IPickerElement +Microsoft.Maui.IPickerElement.IsOpen.get -> bool +Microsoft.Maui.IPickerElement.IsOpen.set -> void +Microsoft.Maui.IPickerElement.OnIsOpenPropertyChanged(bool oldValue, bool newValue) -> void Microsoft.Maui.ITitleBar Microsoft.Maui.ITitleBar.PassthroughElements.get -> System.Collections.Generic.IList! Microsoft.Maui.ITitleBar.Subtitle.get -> string? @@ -89,12 +93,15 @@ static Microsoft.Maui.ElementHandlerExtensions.GetService(this Microsoft.Maui static Microsoft.Maui.ElementHandlerExtensions.GetServiceProvider(this Microsoft.Maui.IElementHandler! handler) -> System.IServiceProvider! static Microsoft.Maui.ElementHandlerExtensions.IsConnected(this Microsoft.Maui.IElementHandler! handler) -> bool static Microsoft.Maui.Handlers.ApplicationHandler.MapActivateWindow(Microsoft.Maui.Handlers.ApplicationHandler! handler, Microsoft.Maui.IApplication! application, object? args) -> void +static Microsoft.Maui.Handlers.DatePickerHandler.MapIsOpen(Microsoft.Maui.Handlers.IDatePickerHandler! handler, Microsoft.Maui.IDatePicker! datePicker) -> void static Microsoft.Maui.Handlers.GraphicsViewHandler.MapBackground(Microsoft.Maui.Handlers.IGraphicsViewHandler! handler, Microsoft.Maui.IGraphicsView! graphicsView) -> void static Microsoft.Maui.Handlers.HybridWebViewHandler.CommandMapper -> Microsoft.Maui.CommandMapper! static Microsoft.Maui.Handlers.HybridWebViewHandler.MapEvaluateJavaScriptAsync(Microsoft.Maui.Handlers.IHybridWebViewHandler! handler, Microsoft.Maui.IHybridWebView! hybridWebView, object? arg) -> void static Microsoft.Maui.Handlers.HybridWebViewHandler.MapInvokeJavaScriptAsync(Microsoft.Maui.Handlers.IHybridWebViewHandler! handler, Microsoft.Maui.IHybridWebView! hybridWebView, object? arg) -> void static Microsoft.Maui.Handlers.HybridWebViewHandler.Mapper -> Microsoft.Maui.IPropertyMapper! static Microsoft.Maui.Handlers.HybridWebViewHandler.MapSendRawMessage(Microsoft.Maui.Handlers.IHybridWebViewHandler! handler, Microsoft.Maui.IHybridWebView! hybridWebView, object? arg) -> void +static Microsoft.Maui.Handlers.PickerHandler.MapIsOpen(Microsoft.Maui.Handlers.IPickerHandler! handler, Microsoft.Maui.IPicker! picker) -> void +static Microsoft.Maui.Handlers.TimePickerHandler.MapIsOpen(Microsoft.Maui.Handlers.ITimePickerHandler! handler, Microsoft.Maui.ITimePicker! timePicker) -> void static Microsoft.Maui.Hosting.AppHostBuilderExtensions.ConfigureEnvironmentVariables(this Microsoft.Maui.Hosting.MauiAppBuilder! builder) -> Microsoft.Maui.Hosting.MauiAppBuilder! static Microsoft.Maui.Hosting.HybridWebViewServiceCollectionExtensions.AddHybridWebViewDeveloperTools(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! static Microsoft.Maui.Keyboard.Date.get -> Microsoft.Maui.Keyboard! @@ -105,10 +112,13 @@ static Microsoft.Maui.Keyboard.Time.get -> Microsoft.Maui.Keyboard! *REMOVED*virtual Microsoft.Maui.PropertyMapper.UpdateKeys.get -> System.Collections.Generic.IReadOnlyCollection! *REMOVED*static Microsoft.Maui.Platform.ElementExtensions.ToUIViewController(this Microsoft.Maui.IElement! view, Microsoft.Maui.IMauiContext! context) -> UIKit.UIViewController! static Microsoft.Maui.Platform.ApplicationExtensions.CreatePlatformWindow(this UIKit.IUIApplicationDelegate! platformApplication, Microsoft.Maui.IApplication! application, UIKit.UIApplication! uiApplication, Foundation.NSDictionary? launchOptions) -> void +static Microsoft.Maui.Platform.DatePickerExtensions.UpdateIsOpen(this UIKit.UIDatePicker! picker, Microsoft.Maui.IDatePicker! datePicker) -> void static Microsoft.Maui.Platform.ElementExtensions.ToUIViewController(this Microsoft.Maui.IElement? view, Microsoft.Maui.IMauiContext! context) -> UIKit.UIViewController! +static Microsoft.Maui.Platform.PickerExtensions.UpdateIsOpen(this Microsoft.Maui.Platform.MauiPicker! platformPicker, Microsoft.Maui.IPicker! picker) -> void static Microsoft.Maui.Platform.TextInputExtensions.GetCursorPosition(this UIKit.IUITextInput! platformView, int cursorOffset = 0) -> int static Microsoft.Maui.Platform.TextInputExtensions.GetSelectedTextLength(this UIKit.IUITextInput! platformView) -> int static Microsoft.Maui.Platform.TextInputExtensions.SetTextRange(this UIKit.IUITextInput! platformView, int start, int selectedTextLength) -> void +static Microsoft.Maui.Platform.TimePickerExtensions.UpdateIsOpen(this Microsoft.Maui.Platform.MauiTimePicker! mauiTimePicker, Microsoft.Maui.ITimePicker! timePicker) -> void static Microsoft.Maui.Platform.UIWindowExtensions.GetWindow(this UIKit.UIWindow? platformWindow) -> Microsoft.Maui.IWindow? static Microsoft.Maui.Platform.UIWindowExtensions.GetWindow(this UIKit.UIWindowScene? windowScene) -> Microsoft.Maui.IWindow? static Microsoft.Maui.ViewExtensions.DisconnectHandlers(this Microsoft.Maui.IView! view) -> void diff --git a/src/Core/src/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt b/src/Core/src/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt index 486d4b279528..92a5ea69fce6 100644 --- a/src/Core/src/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt +++ b/src/Core/src/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt @@ -56,6 +56,10 @@ Microsoft.Maui.IHybridWebView.InvokeJavaScriptType.set -> void Microsoft.Maui.IHybridWebView.RawMessageReceived(string! rawMessage) -> void Microsoft.Maui.IHybridWebView.SendRawMessage(string! rawMessage) -> void Microsoft.Maui.IHybridWebView.SetInvokeJavaScriptTarget(T! target) -> void +Microsoft.Maui.IPickerElement +Microsoft.Maui.IPickerElement.IsOpen.get -> bool +Microsoft.Maui.IPickerElement.IsOpen.set -> void +Microsoft.Maui.IPickerElement.OnIsOpenPropertyChanged(bool oldValue, bool newValue) -> void Microsoft.Maui.ITitleBar Microsoft.Maui.ITitleBar.PassthroughElements.get -> System.Collections.Generic.IList! Microsoft.Maui.ITitleBar.Subtitle.get -> string? @@ -91,12 +95,15 @@ static Microsoft.Maui.ElementHandlerExtensions.GetServiceProvider(this Microsoft static Microsoft.Maui.ElementHandlerExtensions.IsConnected(this Microsoft.Maui.IElementHandler! handler) -> bool static Microsoft.Maui.Handlers.ApplicationHandler.MapActivateWindow(Microsoft.Maui.Handlers.ApplicationHandler! handler, Microsoft.Maui.IApplication! application, object? args) -> void static Microsoft.Maui.Handlers.ButtonHandler.MapBackground(Microsoft.Maui.Handlers.IButtonHandler! handler, Microsoft.Maui.IButton! button) -> void +static Microsoft.Maui.Handlers.DatePickerHandler.MapIsOpen(Microsoft.Maui.Handlers.IDatePickerHandler! handler, Microsoft.Maui.IDatePicker! datePicker) -> void static Microsoft.Maui.Handlers.GraphicsViewHandler.MapBackground(Microsoft.Maui.Handlers.IGraphicsViewHandler! handler, Microsoft.Maui.IGraphicsView! graphicsView) -> void static Microsoft.Maui.Handlers.HybridWebViewHandler.CommandMapper -> Microsoft.Maui.CommandMapper! static Microsoft.Maui.Handlers.HybridWebViewHandler.MapEvaluateJavaScriptAsync(Microsoft.Maui.Handlers.IHybridWebViewHandler! handler, Microsoft.Maui.IHybridWebView! hybridWebView, object? arg) -> void static Microsoft.Maui.Handlers.HybridWebViewHandler.MapInvokeJavaScriptAsync(Microsoft.Maui.Handlers.IHybridWebViewHandler! handler, Microsoft.Maui.IHybridWebView! hybridWebView, object? arg) -> void static Microsoft.Maui.Handlers.HybridWebViewHandler.Mapper -> Microsoft.Maui.IPropertyMapper! static Microsoft.Maui.Handlers.HybridWebViewHandler.MapSendRawMessage(Microsoft.Maui.Handlers.IHybridWebViewHandler! handler, Microsoft.Maui.IHybridWebView! hybridWebView, object? arg) -> void +static Microsoft.Maui.Handlers.PickerHandler.MapIsOpen(Microsoft.Maui.Handlers.IPickerHandler! handler, Microsoft.Maui.IPicker! picker) -> void +static Microsoft.Maui.Handlers.TimePickerHandler.MapIsOpen(Microsoft.Maui.Handlers.ITimePickerHandler! handler, Microsoft.Maui.ITimePicker! timePicker) -> void static Microsoft.Maui.Hosting.AppHostBuilderExtensions.ConfigureEnvironmentVariables(this Microsoft.Maui.Hosting.MauiAppBuilder! builder) -> Microsoft.Maui.Hosting.MauiAppBuilder! static Microsoft.Maui.Hosting.HybridWebViewServiceCollectionExtensions.AddHybridWebViewDeveloperTools(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! static Microsoft.Maui.Keyboard.Date.get -> Microsoft.Maui.Keyboard! @@ -107,7 +114,9 @@ static Microsoft.Maui.Keyboard.Time.get -> Microsoft.Maui.Keyboard! *REMOVED*virtual Microsoft.Maui.PropertyMapper.UpdateKeys.get -> System.Collections.Generic.IReadOnlyCollection! *REMOVED*static Microsoft.Maui.Platform.ElementExtensions.ToUIViewController(this Microsoft.Maui.IElement! view, Microsoft.Maui.IMauiContext! context) -> UIKit.UIViewController! static Microsoft.Maui.Platform.ApplicationExtensions.CreatePlatformWindow(this UIKit.IUIApplicationDelegate! platformApplication, Microsoft.Maui.IApplication! application, UIKit.UIApplication! uiApplication, Foundation.NSDictionary? launchOptions) -> void +static Microsoft.Maui.Platform.DatePickerExtensions.UpdateIsOpen(this UIKit.UIDatePicker! picker, Microsoft.Maui.IDatePicker! datePicker) -> void static Microsoft.Maui.Platform.ElementExtensions.ToUIViewController(this Microsoft.Maui.IElement? view, Microsoft.Maui.IMauiContext! context) -> UIKit.UIViewController! +static Microsoft.Maui.Platform.PickerExtensions.UpdateIsOpen(this Microsoft.Maui.Platform.MauiPicker! platformPicker, Microsoft.Maui.IPicker! picker) -> void static Microsoft.Maui.Platform.TextInputExtensions.GetCursorPosition(this UIKit.IUITextInput! platformView, int cursorOffset = 0) -> int static Microsoft.Maui.Platform.TextInputExtensions.GetSelectedTextLength(this UIKit.IUITextInput! platformView) -> int static Microsoft.Maui.Platform.TextInputExtensions.SetTextRange(this UIKit.IUITextInput! platformView, int start, int selectedTextLength) -> void diff --git a/src/Core/src/PublicAPI/net-windows/PublicAPI.Unshipped.txt b/src/Core/src/PublicAPI/net-windows/PublicAPI.Unshipped.txt index 82f603bb4b91..bfbfb5bc84b0 100644 --- a/src/Core/src/PublicAPI/net-windows/PublicAPI.Unshipped.txt +++ b/src/Core/src/PublicAPI/net-windows/PublicAPI.Unshipped.txt @@ -56,6 +56,10 @@ Microsoft.Maui.IHybridWebView.InvokeJavaScriptType.set -> void Microsoft.Maui.IHybridWebView.RawMessageReceived(string! rawMessage) -> void Microsoft.Maui.IHybridWebView.SendRawMessage(string! rawMessage) -> void Microsoft.Maui.IHybridWebView.SetInvokeJavaScriptTarget(T! target) -> void +Microsoft.Maui.IPickerElement +Microsoft.Maui.IPickerElement.IsOpen.get -> bool +Microsoft.Maui.IPickerElement.IsOpen.set -> void +Microsoft.Maui.IPickerElement.OnIsOpenPropertyChanged(bool oldValue, bool newValue) -> void Microsoft.Maui.ITitleBar Microsoft.Maui.ITitleBar.PassthroughElements.get -> System.Collections.Generic.IList! Microsoft.Maui.ITitleBar.Subtitle.get -> string? @@ -83,12 +87,15 @@ static Microsoft.Maui.ElementHandlerExtensions.GetService(this Microsoft.Maui static Microsoft.Maui.ElementHandlerExtensions.GetServiceProvider(this Microsoft.Maui.IElementHandler! handler) -> System.IServiceProvider! static Microsoft.Maui.ElementHandlerExtensions.IsConnected(this Microsoft.Maui.IElementHandler! handler) -> bool static Microsoft.Maui.Handlers.ApplicationHandler.MapActivateWindow(Microsoft.Maui.Handlers.ApplicationHandler! handler, Microsoft.Maui.IApplication! application, object? args) -> void +static Microsoft.Maui.Handlers.DatePickerHandler.MapIsOpen(Microsoft.Maui.Handlers.IDatePickerHandler! handler, Microsoft.Maui.IDatePicker! datePicker) -> void static Microsoft.Maui.Handlers.GraphicsViewHandler.MapBackground(Microsoft.Maui.Handlers.IGraphicsViewHandler! handler, Microsoft.Maui.IGraphicsView! graphicsView) -> void static Microsoft.Maui.Handlers.HybridWebViewHandler.CommandMapper -> Microsoft.Maui.CommandMapper! static Microsoft.Maui.Handlers.HybridWebViewHandler.MapEvaluateJavaScriptAsync(Microsoft.Maui.Handlers.IHybridWebViewHandler! handler, Microsoft.Maui.IHybridWebView! hybridWebView, object? arg) -> void static Microsoft.Maui.Handlers.HybridWebViewHandler.MapInvokeJavaScriptAsync(Microsoft.Maui.Handlers.IHybridWebViewHandler! handler, Microsoft.Maui.IHybridWebView! hybridWebView, object? arg) -> void static Microsoft.Maui.Handlers.HybridWebViewHandler.Mapper -> Microsoft.Maui.IPropertyMapper! static Microsoft.Maui.Handlers.HybridWebViewHandler.MapSendRawMessage(Microsoft.Maui.Handlers.IHybridWebViewHandler! handler, Microsoft.Maui.IHybridWebView! hybridWebView, object? arg) -> void +static Microsoft.Maui.Handlers.PickerHandler.MapIsOpen(Microsoft.Maui.Handlers.IPickerHandler! handler, Microsoft.Maui.IPicker! picker) -> void +static Microsoft.Maui.Handlers.TimePickerHandler.MapIsOpen(Microsoft.Maui.Handlers.ITimePickerHandler! handler, Microsoft.Maui.ITimePicker! timePicker) -> void static Microsoft.Maui.Hosting.AppHostBuilderExtensions.ConfigureEnvironmentVariables(this Microsoft.Maui.Hosting.MauiAppBuilder! builder) -> Microsoft.Maui.Hosting.MauiAppBuilder! static Microsoft.Maui.Hosting.HybridWebViewServiceCollectionExtensions.AddHybridWebViewDeveloperTools(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! static Microsoft.Maui.Keyboard.Date.get -> Microsoft.Maui.Keyboard! @@ -98,6 +105,9 @@ static Microsoft.Maui.Platform.CalendarDatePickerExtensions.ToDateFormat(this st *REMOVED*readonly Microsoft.Maui.PropertyMapper._mapper -> System.Collections.Generic.Dictionary!>! *REMOVED*virtual Microsoft.Maui.PropertyMapper.ClearKeyCache() -> void *REMOVED*virtual Microsoft.Maui.PropertyMapper.UpdateKeys.get -> System.Collections.Generic.IReadOnlyCollection! +static Microsoft.Maui.Platform.DatePickerExtensions.UpdateIsOpen(this Microsoft.UI.Xaml.Controls.CalendarDatePicker! platformDatePicker, Microsoft.Maui.IDatePicker! datePicker) -> void +static Microsoft.Maui.Platform.PickerExtensions.UpdateIsOpen(this Microsoft.UI.Xaml.Controls.ComboBox! nativeComboBox, Microsoft.Maui.IPicker! picker) -> void +static Microsoft.Maui.Platform.TimePickerExtensions.UpdateIsOpen(this Microsoft.UI.Xaml.Controls.TimePicker! platformTimePicker, Microsoft.Maui.ITimePicker! timePicker) -> void static Microsoft.Maui.ViewExtensions.DisconnectHandlers(this Microsoft.Maui.IView! view) -> void *REMOVED*virtual Microsoft.Maui.Platform.NavigationRootManager.Connect(Microsoft.UI.Xaml.UIElement! platformView) -> void virtual Microsoft.Maui.Platform.NavigationRootManager.Connect(Microsoft.UI.Xaml.UIElement? platformView) -> void diff --git a/src/Core/src/PublicAPI/net/PublicAPI.Unshipped.txt b/src/Core/src/PublicAPI/net/PublicAPI.Unshipped.txt index fbe7261a4a33..cf4b6abed613 100644 --- a/src/Core/src/PublicAPI/net/PublicAPI.Unshipped.txt +++ b/src/Core/src/PublicAPI/net/PublicAPI.Unshipped.txt @@ -56,6 +56,10 @@ Microsoft.Maui.IHybridWebView.InvokeJavaScriptType.set -> void Microsoft.Maui.IHybridWebView.RawMessageReceived(string! rawMessage) -> void Microsoft.Maui.IHybridWebView.SendRawMessage(string! rawMessage) -> void Microsoft.Maui.IHybridWebView.SetInvokeJavaScriptTarget(T! target) -> void +Microsoft.Maui.IPickerElement +Microsoft.Maui.IPickerElement.IsOpen.get -> bool +Microsoft.Maui.IPickerElement.IsOpen.set -> void +Microsoft.Maui.IPickerElement.OnIsOpenPropertyChanged(bool oldValue, bool newValue) -> void Microsoft.Maui.ITitleBar Microsoft.Maui.ITitleBar.PassthroughElements.get -> System.Collections.Generic.IList! Microsoft.Maui.ITitleBar.Subtitle.get -> string? @@ -79,6 +83,8 @@ static Microsoft.Maui.Handlers.HybridWebViewHandler.MapEvaluateJavaScriptAsync(M static Microsoft.Maui.Handlers.HybridWebViewHandler.MapInvokeJavaScriptAsync(Microsoft.Maui.Handlers.IHybridWebViewHandler! handler, Microsoft.Maui.IHybridWebView! hybridWebView, object? arg) -> void static Microsoft.Maui.Handlers.HybridWebViewHandler.Mapper -> Microsoft.Maui.IPropertyMapper! static Microsoft.Maui.Handlers.HybridWebViewHandler.MapSendRawMessage(Microsoft.Maui.Handlers.IHybridWebViewHandler! handler, Microsoft.Maui.IHybridWebView! hybridWebView, object? arg) -> void +static Microsoft.Maui.Handlers.PickerHandler.MapIsOpen(Microsoft.Maui.Handlers.IPickerHandler! handler, Microsoft.Maui.IPicker! picker) -> void +static Microsoft.Maui.Handlers.TimePickerHandler.MapIsOpen(Microsoft.Maui.Handlers.ITimePickerHandler! handler, Microsoft.Maui.ITimePicker! timePicker) -> void static Microsoft.Maui.Hosting.AppHostBuilderExtensions.ConfigureEnvironmentVariables(this Microsoft.Maui.Hosting.MauiAppBuilder! builder) -> Microsoft.Maui.Hosting.MauiAppBuilder! static Microsoft.Maui.Hosting.HybridWebViewServiceCollectionExtensions.AddHybridWebViewDeveloperTools(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! static Microsoft.Maui.Keyboard.Date.get -> Microsoft.Maui.Keyboard! diff --git a/src/Core/src/PublicAPI/netstandard/PublicAPI.Unshipped.txt b/src/Core/src/PublicAPI/netstandard/PublicAPI.Unshipped.txt index fbe7261a4a33..a546b7db935f 100644 --- a/src/Core/src/PublicAPI/netstandard/PublicAPI.Unshipped.txt +++ b/src/Core/src/PublicAPI/netstandard/PublicAPI.Unshipped.txt @@ -56,6 +56,10 @@ Microsoft.Maui.IHybridWebView.InvokeJavaScriptType.set -> void Microsoft.Maui.IHybridWebView.RawMessageReceived(string! rawMessage) -> void Microsoft.Maui.IHybridWebView.SendRawMessage(string! rawMessage) -> void Microsoft.Maui.IHybridWebView.SetInvokeJavaScriptTarget(T! target) -> void +Microsoft.Maui.IPickerElement +Microsoft.Maui.IPickerElement.IsOpen.get -> bool +Microsoft.Maui.IPickerElement.IsOpen.set -> void +Microsoft.Maui.IPickerElement.OnIsOpenPropertyChanged(bool oldValue, bool newValue) -> void Microsoft.Maui.ITitleBar Microsoft.Maui.ITitleBar.PassthroughElements.get -> System.Collections.Generic.IList! Microsoft.Maui.ITitleBar.Subtitle.get -> string? @@ -79,6 +83,7 @@ static Microsoft.Maui.Handlers.HybridWebViewHandler.MapEvaluateJavaScriptAsync(M static Microsoft.Maui.Handlers.HybridWebViewHandler.MapInvokeJavaScriptAsync(Microsoft.Maui.Handlers.IHybridWebViewHandler! handler, Microsoft.Maui.IHybridWebView! hybridWebView, object? arg) -> void static Microsoft.Maui.Handlers.HybridWebViewHandler.Mapper -> Microsoft.Maui.IPropertyMapper! static Microsoft.Maui.Handlers.HybridWebViewHandler.MapSendRawMessage(Microsoft.Maui.Handlers.IHybridWebViewHandler! handler, Microsoft.Maui.IHybridWebView! hybridWebView, object? arg) -> void +static Microsoft.Maui.Handlers.PickerHandler.MapIsOpen(Microsoft.Maui.Handlers.IPickerHandler! handler, Microsoft.Maui.IPicker! picker) -> void static Microsoft.Maui.Hosting.AppHostBuilderExtensions.ConfigureEnvironmentVariables(this Microsoft.Maui.Hosting.MauiAppBuilder! builder) -> Microsoft.Maui.Hosting.MauiAppBuilder! static Microsoft.Maui.Hosting.HybridWebViewServiceCollectionExtensions.AddHybridWebViewDeveloperTools(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! static Microsoft.Maui.Keyboard.Date.get -> Microsoft.Maui.Keyboard! diff --git a/src/Core/src/PublicAPI/netstandard2.0/PublicAPI.Unshipped.txt b/src/Core/src/PublicAPI/netstandard2.0/PublicAPI.Unshipped.txt index fbe7261a4a33..86e35529f8e1 100644 --- a/src/Core/src/PublicAPI/netstandard2.0/PublicAPI.Unshipped.txt +++ b/src/Core/src/PublicAPI/netstandard2.0/PublicAPI.Unshipped.txt @@ -56,6 +56,7 @@ Microsoft.Maui.IHybridWebView.InvokeJavaScriptType.set -> void Microsoft.Maui.IHybridWebView.RawMessageReceived(string! rawMessage) -> void Microsoft.Maui.IHybridWebView.SendRawMessage(string! rawMessage) -> void Microsoft.Maui.IHybridWebView.SetInvokeJavaScriptTarget(T! target) -> void +Microsoft.Maui.IPickerElement.OnIsOpenPropertyChanged(bool oldValue, bool newValue) -> void Microsoft.Maui.ITitleBar Microsoft.Maui.ITitleBar.PassthroughElements.get -> System.Collections.Generic.IList! Microsoft.Maui.ITitleBar.Subtitle.get -> string? From ec1c2d780e31adead789bb0f2fe235a9667206c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Su=C3=A1rez?= Date: Wed, 30 Apr 2025 17:07:30 +0200 Subject: [PATCH 02/72] More changes --- src/Core/src/Handlers/DatePicker/DatePickerHandler.cs | 2 ++ src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt | 1 + .../src/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt | 1 + src/Core/src/PublicAPI/net/PublicAPI.Unshipped.txt | 1 + src/Core/src/PublicAPI/netstandard/PublicAPI.Unshipped.txt | 2 ++ .../src/PublicAPI/netstandard2.0/PublicAPI.Unshipped.txt | 6 ++++++ 6 files changed, 13 insertions(+) diff --git a/src/Core/src/Handlers/DatePicker/DatePickerHandler.cs b/src/Core/src/Handlers/DatePicker/DatePickerHandler.cs index bb42cf6997f0..84e280fa0d55 100644 --- a/src/Core/src/Handlers/DatePicker/DatePickerHandler.cs +++ b/src/Core/src/Handlers/DatePicker/DatePickerHandler.cs @@ -125,5 +125,7 @@ public DatePickerHandler(IPropertyMapper? mapper, CommandMapper? commandMapper) /// The associated handler. /// The associated instance. public static partial void MapTextColor(IDatePickerHandler handler, IDatePicker datePicker); + + public static partial void MapIsOpen(IDatePickerHandler handler, IDatePicker datePicker); } } \ No newline at end of file diff --git a/src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt b/src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt index 7eb70eb75c2f..46016bb677a5 100644 --- a/src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt +++ b/src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt @@ -105,6 +105,7 @@ static Microsoft.Maui.ElementHandlerExtensions.GetService(this Microsoft.Maui static Microsoft.Maui.ElementHandlerExtensions.GetServiceProvider(this Microsoft.Maui.IElementHandler! handler) -> System.IServiceProvider! static Microsoft.Maui.ElementHandlerExtensions.IsConnected(this Microsoft.Maui.IElementHandler! handler) -> bool static Microsoft.Maui.Handlers.ApplicationHandler.MapActivateWindow(Microsoft.Maui.Handlers.ApplicationHandler! handler, Microsoft.Maui.IApplication! application, object? args) -> void +static Microsoft.Maui.Handlers.DatePickerHandler.MapIsOpen(Microsoft.Maui.Handlers.IDatePickerHandler! handler, Microsoft.Maui.IDatePicker! datePicker) -> void static Microsoft.Maui.Handlers.GraphicsViewHandler.MapBackground(Microsoft.Maui.Handlers.IGraphicsViewHandler! handler, Microsoft.Maui.IGraphicsView! graphicsView) -> void static Microsoft.Maui.Handlers.HybridWebViewHandler.CommandMapper -> Microsoft.Maui.CommandMapper! static Microsoft.Maui.Handlers.HybridWebViewHandler.MapEvaluateJavaScriptAsync(Microsoft.Maui.Handlers.IHybridWebViewHandler! handler, Microsoft.Maui.IHybridWebView! hybridWebView, object? arg) -> void diff --git a/src/Core/src/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt b/src/Core/src/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt index 92a5ea69fce6..348736e0097e 100644 --- a/src/Core/src/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt +++ b/src/Core/src/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt @@ -120,6 +120,7 @@ static Microsoft.Maui.Platform.PickerExtensions.UpdateIsOpen(this Microsoft.Maui static Microsoft.Maui.Platform.TextInputExtensions.GetCursorPosition(this UIKit.IUITextInput! platformView, int cursorOffset = 0) -> int static Microsoft.Maui.Platform.TextInputExtensions.GetSelectedTextLength(this UIKit.IUITextInput! platformView) -> int static Microsoft.Maui.Platform.TextInputExtensions.SetTextRange(this UIKit.IUITextInput! platformView, int start, int selectedTextLength) -> void +static Microsoft.Maui.Platform.TimePickerExtensions.UpdateIsOpen(this Microsoft.Maui.Platform.MauiTimePicker! mauiTimePicker, Microsoft.Maui.ITimePicker! timePicker) -> void static Microsoft.Maui.Platform.UIWindowExtensions.GetWindow(this UIKit.UIWindow? platformWindow) -> Microsoft.Maui.IWindow? static Microsoft.Maui.Platform.UIWindowExtensions.GetWindow(this UIKit.UIWindowScene? windowScene) -> Microsoft.Maui.IWindow? static Microsoft.Maui.ViewExtensions.DisconnectHandlers(this Microsoft.Maui.IView! view) -> void diff --git a/src/Core/src/PublicAPI/net/PublicAPI.Unshipped.txt b/src/Core/src/PublicAPI/net/PublicAPI.Unshipped.txt index cf4b6abed613..d2cc2f9a2f95 100644 --- a/src/Core/src/PublicAPI/net/PublicAPI.Unshipped.txt +++ b/src/Core/src/PublicAPI/net/PublicAPI.Unshipped.txt @@ -78,6 +78,7 @@ static Microsoft.Maui.ElementHandlerExtensions.GetService(this Microsoft.Maui static Microsoft.Maui.ElementHandlerExtensions.GetServiceProvider(this Microsoft.Maui.IElementHandler! handler) -> System.IServiceProvider! static Microsoft.Maui.ElementHandlerExtensions.IsConnected(this Microsoft.Maui.IElementHandler! handler) -> bool static Microsoft.Maui.Handlers.ApplicationHandler.MapActivateWindow(Microsoft.Maui.Handlers.ApplicationHandler! handler, Microsoft.Maui.IApplication! application, object? args) -> void +static Microsoft.Maui.Handlers.DatePickerHandler.MapIsOpen(Microsoft.Maui.Handlers.IDatePickerHandler! handler, Microsoft.Maui.IDatePicker! datePicker) -> void static Microsoft.Maui.Handlers.HybridWebViewHandler.CommandMapper -> Microsoft.Maui.CommandMapper! static Microsoft.Maui.Handlers.HybridWebViewHandler.MapEvaluateJavaScriptAsync(Microsoft.Maui.Handlers.IHybridWebViewHandler! handler, Microsoft.Maui.IHybridWebView! hybridWebView, object? arg) -> void static Microsoft.Maui.Handlers.HybridWebViewHandler.MapInvokeJavaScriptAsync(Microsoft.Maui.Handlers.IHybridWebViewHandler! handler, Microsoft.Maui.IHybridWebView! hybridWebView, object? arg) -> void diff --git a/src/Core/src/PublicAPI/netstandard/PublicAPI.Unshipped.txt b/src/Core/src/PublicAPI/netstandard/PublicAPI.Unshipped.txt index a546b7db935f..d2cc2f9a2f95 100644 --- a/src/Core/src/PublicAPI/netstandard/PublicAPI.Unshipped.txt +++ b/src/Core/src/PublicAPI/netstandard/PublicAPI.Unshipped.txt @@ -78,12 +78,14 @@ static Microsoft.Maui.ElementHandlerExtensions.GetService(this Microsoft.Maui static Microsoft.Maui.ElementHandlerExtensions.GetServiceProvider(this Microsoft.Maui.IElementHandler! handler) -> System.IServiceProvider! static Microsoft.Maui.ElementHandlerExtensions.IsConnected(this Microsoft.Maui.IElementHandler! handler) -> bool static Microsoft.Maui.Handlers.ApplicationHandler.MapActivateWindow(Microsoft.Maui.Handlers.ApplicationHandler! handler, Microsoft.Maui.IApplication! application, object? args) -> void +static Microsoft.Maui.Handlers.DatePickerHandler.MapIsOpen(Microsoft.Maui.Handlers.IDatePickerHandler! handler, Microsoft.Maui.IDatePicker! datePicker) -> void static Microsoft.Maui.Handlers.HybridWebViewHandler.CommandMapper -> Microsoft.Maui.CommandMapper! static Microsoft.Maui.Handlers.HybridWebViewHandler.MapEvaluateJavaScriptAsync(Microsoft.Maui.Handlers.IHybridWebViewHandler! handler, Microsoft.Maui.IHybridWebView! hybridWebView, object? arg) -> void static Microsoft.Maui.Handlers.HybridWebViewHandler.MapInvokeJavaScriptAsync(Microsoft.Maui.Handlers.IHybridWebViewHandler! handler, Microsoft.Maui.IHybridWebView! hybridWebView, object? arg) -> void static Microsoft.Maui.Handlers.HybridWebViewHandler.Mapper -> Microsoft.Maui.IPropertyMapper! static Microsoft.Maui.Handlers.HybridWebViewHandler.MapSendRawMessage(Microsoft.Maui.Handlers.IHybridWebViewHandler! handler, Microsoft.Maui.IHybridWebView! hybridWebView, object? arg) -> void static Microsoft.Maui.Handlers.PickerHandler.MapIsOpen(Microsoft.Maui.Handlers.IPickerHandler! handler, Microsoft.Maui.IPicker! picker) -> void +static Microsoft.Maui.Handlers.TimePickerHandler.MapIsOpen(Microsoft.Maui.Handlers.ITimePickerHandler! handler, Microsoft.Maui.ITimePicker! timePicker) -> void static Microsoft.Maui.Hosting.AppHostBuilderExtensions.ConfigureEnvironmentVariables(this Microsoft.Maui.Hosting.MauiAppBuilder! builder) -> Microsoft.Maui.Hosting.MauiAppBuilder! static Microsoft.Maui.Hosting.HybridWebViewServiceCollectionExtensions.AddHybridWebViewDeveloperTools(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! static Microsoft.Maui.Keyboard.Date.get -> Microsoft.Maui.Keyboard! diff --git a/src/Core/src/PublicAPI/netstandard2.0/PublicAPI.Unshipped.txt b/src/Core/src/PublicAPI/netstandard2.0/PublicAPI.Unshipped.txt index 86e35529f8e1..d2cc2f9a2f95 100644 --- a/src/Core/src/PublicAPI/netstandard2.0/PublicAPI.Unshipped.txt +++ b/src/Core/src/PublicAPI/netstandard2.0/PublicAPI.Unshipped.txt @@ -56,6 +56,9 @@ Microsoft.Maui.IHybridWebView.InvokeJavaScriptType.set -> void Microsoft.Maui.IHybridWebView.RawMessageReceived(string! rawMessage) -> void Microsoft.Maui.IHybridWebView.SendRawMessage(string! rawMessage) -> void Microsoft.Maui.IHybridWebView.SetInvokeJavaScriptTarget(T! target) -> void +Microsoft.Maui.IPickerElement +Microsoft.Maui.IPickerElement.IsOpen.get -> bool +Microsoft.Maui.IPickerElement.IsOpen.set -> void Microsoft.Maui.IPickerElement.OnIsOpenPropertyChanged(bool oldValue, bool newValue) -> void Microsoft.Maui.ITitleBar Microsoft.Maui.ITitleBar.PassthroughElements.get -> System.Collections.Generic.IList! @@ -75,11 +78,14 @@ static Microsoft.Maui.ElementHandlerExtensions.GetService(this Microsoft.Maui static Microsoft.Maui.ElementHandlerExtensions.GetServiceProvider(this Microsoft.Maui.IElementHandler! handler) -> System.IServiceProvider! static Microsoft.Maui.ElementHandlerExtensions.IsConnected(this Microsoft.Maui.IElementHandler! handler) -> bool static Microsoft.Maui.Handlers.ApplicationHandler.MapActivateWindow(Microsoft.Maui.Handlers.ApplicationHandler! handler, Microsoft.Maui.IApplication! application, object? args) -> void +static Microsoft.Maui.Handlers.DatePickerHandler.MapIsOpen(Microsoft.Maui.Handlers.IDatePickerHandler! handler, Microsoft.Maui.IDatePicker! datePicker) -> void static Microsoft.Maui.Handlers.HybridWebViewHandler.CommandMapper -> Microsoft.Maui.CommandMapper! static Microsoft.Maui.Handlers.HybridWebViewHandler.MapEvaluateJavaScriptAsync(Microsoft.Maui.Handlers.IHybridWebViewHandler! handler, Microsoft.Maui.IHybridWebView! hybridWebView, object? arg) -> void static Microsoft.Maui.Handlers.HybridWebViewHandler.MapInvokeJavaScriptAsync(Microsoft.Maui.Handlers.IHybridWebViewHandler! handler, Microsoft.Maui.IHybridWebView! hybridWebView, object? arg) -> void static Microsoft.Maui.Handlers.HybridWebViewHandler.Mapper -> Microsoft.Maui.IPropertyMapper! static Microsoft.Maui.Handlers.HybridWebViewHandler.MapSendRawMessage(Microsoft.Maui.Handlers.IHybridWebViewHandler! handler, Microsoft.Maui.IHybridWebView! hybridWebView, object? arg) -> void +static Microsoft.Maui.Handlers.PickerHandler.MapIsOpen(Microsoft.Maui.Handlers.IPickerHandler! handler, Microsoft.Maui.IPicker! picker) -> void +static Microsoft.Maui.Handlers.TimePickerHandler.MapIsOpen(Microsoft.Maui.Handlers.ITimePickerHandler! handler, Microsoft.Maui.ITimePicker! timePicker) -> void static Microsoft.Maui.Hosting.AppHostBuilderExtensions.ConfigureEnvironmentVariables(this Microsoft.Maui.Hosting.MauiAppBuilder! builder) -> Microsoft.Maui.Hosting.MauiAppBuilder! static Microsoft.Maui.Hosting.HybridWebViewServiceCollectionExtensions.AddHybridWebViewDeveloperTools(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! static Microsoft.Maui.Keyboard.Date.get -> Microsoft.Maui.Keyboard! From 9108547c2e1bed831da911527eee11a64a8587a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Su=C3=A1rez?= Date: Wed, 30 Apr 2025 17:14:24 +0200 Subject: [PATCH 03/72] More changes --- src/Core/src/Platform/iOS/DatePickerExtensions.cs | 2 +- src/Core/src/PublicAPI/net-ios/PublicAPI.Unshipped.txt | 2 +- src/Core/src/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Core/src/Platform/iOS/DatePickerExtensions.cs b/src/Core/src/Platform/iOS/DatePickerExtensions.cs index ac1b89df0568..efcf31d847d9 100644 --- a/src/Core/src/Platform/iOS/DatePickerExtensions.cs +++ b/src/Core/src/Platform/iOS/DatePickerExtensions.cs @@ -141,7 +141,7 @@ public static void UpdateTextAlignment(this MauiDatePicker nativeDatePicker, IDa // TODO: Update TextAlignment based on the EffectiveFlowDirection property. } - public static void UpdateIsOpen(this UIDatePicker picker, IDatePicker datePicker) + public static void UpdateIsOpen(this MauiDatePicker nativeDatePicker, IDatePicker datePicker) { } diff --git a/src/Core/src/PublicAPI/net-ios/PublicAPI.Unshipped.txt b/src/Core/src/PublicAPI/net-ios/PublicAPI.Unshipped.txt index 3b50405c0417..2d761605e9a0 100644 --- a/src/Core/src/PublicAPI/net-ios/PublicAPI.Unshipped.txt +++ b/src/Core/src/PublicAPI/net-ios/PublicAPI.Unshipped.txt @@ -112,7 +112,7 @@ static Microsoft.Maui.Keyboard.Time.get -> Microsoft.Maui.Keyboard! *REMOVED*virtual Microsoft.Maui.PropertyMapper.UpdateKeys.get -> System.Collections.Generic.IReadOnlyCollection! *REMOVED*static Microsoft.Maui.Platform.ElementExtensions.ToUIViewController(this Microsoft.Maui.IElement! view, Microsoft.Maui.IMauiContext! context) -> UIKit.UIViewController! static Microsoft.Maui.Platform.ApplicationExtensions.CreatePlatformWindow(this UIKit.IUIApplicationDelegate! platformApplication, Microsoft.Maui.IApplication! application, UIKit.UIApplication! uiApplication, Foundation.NSDictionary? launchOptions) -> void -static Microsoft.Maui.Platform.DatePickerExtensions.UpdateIsOpen(this UIKit.UIDatePicker! picker, Microsoft.Maui.IDatePicker! datePicker) -> void +static Microsoft.Maui.Platform.DatePickerExtensions.UpdateIsOpen(this Microsoft.Maui.Platform.MauiDatePicker! nativeDatePicker, Microsoft.Maui.IDatePicker! datePicker) -> void static Microsoft.Maui.Platform.ElementExtensions.ToUIViewController(this Microsoft.Maui.IElement? view, Microsoft.Maui.IMauiContext! context) -> UIKit.UIViewController! static Microsoft.Maui.Platform.PickerExtensions.UpdateIsOpen(this Microsoft.Maui.Platform.MauiPicker! platformPicker, Microsoft.Maui.IPicker! picker) -> void static Microsoft.Maui.Platform.TextInputExtensions.GetCursorPosition(this UIKit.IUITextInput! platformView, int cursorOffset = 0) -> int diff --git a/src/Core/src/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt b/src/Core/src/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt index 348736e0097e..1e64f88f4cc2 100644 --- a/src/Core/src/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt +++ b/src/Core/src/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt @@ -114,7 +114,7 @@ static Microsoft.Maui.Keyboard.Time.get -> Microsoft.Maui.Keyboard! *REMOVED*virtual Microsoft.Maui.PropertyMapper.UpdateKeys.get -> System.Collections.Generic.IReadOnlyCollection! *REMOVED*static Microsoft.Maui.Platform.ElementExtensions.ToUIViewController(this Microsoft.Maui.IElement! view, Microsoft.Maui.IMauiContext! context) -> UIKit.UIViewController! static Microsoft.Maui.Platform.ApplicationExtensions.CreatePlatformWindow(this UIKit.IUIApplicationDelegate! platformApplication, Microsoft.Maui.IApplication! application, UIKit.UIApplication! uiApplication, Foundation.NSDictionary? launchOptions) -> void -static Microsoft.Maui.Platform.DatePickerExtensions.UpdateIsOpen(this UIKit.UIDatePicker! picker, Microsoft.Maui.IDatePicker! datePicker) -> void +static Microsoft.Maui.Platform.DatePickerExtensions.UpdateIsOpen(this Microsoft.Maui.Platform.MauiDatePicker! nativeDatePicker, Microsoft.Maui.IDatePicker! datePicker) -> void static Microsoft.Maui.Platform.ElementExtensions.ToUIViewController(this Microsoft.Maui.IElement? view, Microsoft.Maui.IMauiContext! context) -> UIKit.UIViewController! static Microsoft.Maui.Platform.PickerExtensions.UpdateIsOpen(this Microsoft.Maui.Platform.MauiPicker! platformPicker, Microsoft.Maui.IPicker! picker) -> void static Microsoft.Maui.Platform.TextInputExtensions.GetCursorPosition(this UIKit.IUITextInput! platformView, int cursorOffset = 0) -> int From 2ba2fa9c7db3024e886ef49e1ad6e4fe948b9a81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Su=C3=A1rez?= Date: Thu, 1 May 2025 19:29:29 +0200 Subject: [PATCH 04/72] More changes --- .../src/Handlers/DatePicker/DatePickerHandler.Android.cs | 5 +++++ src/Core/src/Handlers/DatePicker/DatePickerHandler.cs | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/src/Core/src/Handlers/DatePicker/DatePickerHandler.Android.cs b/src/Core/src/Handlers/DatePicker/DatePickerHandler.Android.cs index fdd7013af8f4..cddf29976f66 100644 --- a/src/Core/src/Handlers/DatePicker/DatePickerHandler.Android.cs +++ b/src/Core/src/Handlers/DatePicker/DatePickerHandler.Android.cs @@ -126,6 +126,11 @@ public static partial void MapTextColor(IDatePickerHandler handler, IDatePicker handler.PlatformView?.UpdateTextColor(datePicker); } + public static partial void MapIsOpen(IDatePickerHandler handler, IDatePicker datePicker) + { + handler.PlatformView?.UpdateIsOpen(datePicker); + } + void ShowPickerDialog() { if (VirtualView is null) diff --git a/src/Core/src/Handlers/DatePicker/DatePickerHandler.cs b/src/Core/src/Handlers/DatePicker/DatePickerHandler.cs index 84e280fa0d55..897e3221a76a 100644 --- a/src/Core/src/Handlers/DatePicker/DatePickerHandler.cs +++ b/src/Core/src/Handlers/DatePicker/DatePickerHandler.cs @@ -126,6 +126,14 @@ public DatePickerHandler(IPropertyMapper? mapper, CommandMapper? commandMapper) /// The associated instance. public static partial void MapTextColor(IDatePickerHandler handler, IDatePicker datePicker); + /// + /// Maps the abstract property to the platform-specific implementations. + /// + /// The associated handler that controls platform behavior. + /// The instance that determines whether the date picker dropdown is open. + /// + /// This method is responsible for ensuring that opening and closing the date picker is correctly handled across different platforms. + /// public static partial void MapIsOpen(IDatePickerHandler handler, IDatePicker datePicker); } } \ No newline at end of file From dfe0b80ed9c7f262b12e9727f320b7ca4635da1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Su=C3=A1rez?= Date: Thu, 1 May 2025 19:45:38 +0200 Subject: [PATCH 05/72] =?UTF-8?q?Implement=20DateP=C3=ACcker=20IsOpen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Handlers/DatePicker/DatePickerHandler.Android.cs | 5 +++-- src/Core/src/Platform/Android/DatePickerExtensions.cs | 10 ++++++++-- src/Core/src/Platform/Windows/DatePickerExtensions.cs | 2 +- src/Core/src/Platform/iOS/DatePickerExtensions.cs | 7 +++++-- .../src/PublicAPI/net-android/PublicAPI.Unshipped.txt | 2 +- src/Core/src/PublicAPI/net-ios/PublicAPI.Unshipped.txt | 2 +- .../PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt | 2 +- 7 files changed, 20 insertions(+), 10 deletions(-) diff --git a/src/Core/src/Handlers/DatePicker/DatePickerHandler.Android.cs b/src/Core/src/Handlers/DatePicker/DatePickerHandler.Android.cs index cddf29976f66..0fe4090335a8 100644 --- a/src/Core/src/Handlers/DatePicker/DatePickerHandler.Android.cs +++ b/src/Core/src/Handlers/DatePicker/DatePickerHandler.Android.cs @@ -128,7 +128,8 @@ public static partial void MapTextColor(IDatePickerHandler handler, IDatePicker public static partial void MapIsOpen(IDatePickerHandler handler, IDatePicker datePicker) { - handler.PlatformView?.UpdateIsOpen(datePicker); + if (handler is DatePickerHandler platformHandler) + handler.PlatformView?.UpdateIsOpen(datePicker, platformHandler._dialog); } void ShowPickerDialog() @@ -136,7 +137,7 @@ void ShowPickerDialog() if (VirtualView is null) { return; - } + } if (_dialog is not null && _dialog.IsShowing) { diff --git a/src/Core/src/Platform/Android/DatePickerExtensions.cs b/src/Core/src/Platform/Android/DatePickerExtensions.cs index b9bd19e475d6..62e649cfefc8 100644 --- a/src/Core/src/Platform/Android/DatePickerExtensions.cs +++ b/src/Core/src/Platform/Android/DatePickerExtensions.cs @@ -73,9 +73,15 @@ public static void UpdateMaximumDate(this MauiDatePicker platformDatePicker, IDa } } - public static void UpdateIsOpen(this MauiDatePicker platformDatePicker, IDatePicker datePicker) + public static void UpdateIsOpen(this MauiDatePicker platformDatePicker, IDatePicker datePicker, DatePickerDialog? datePickerDialog) { - + if (datePickerDialog is null) + return; + + if (datePicker.IsOpen) + datePickerDialog.Show(); + else + datePickerDialog.Hide(); } internal static void SetText(this MauiDatePicker platformDatePicker, IDatePicker datePicker) diff --git a/src/Core/src/Platform/Windows/DatePickerExtensions.cs b/src/Core/src/Platform/Windows/DatePickerExtensions.cs index 81a7f70c4d34..c2df78abcb13 100644 --- a/src/Core/src/Platform/Windows/DatePickerExtensions.cs +++ b/src/Core/src/Platform/Windows/DatePickerExtensions.cs @@ -112,7 +112,7 @@ public static void UpdateBackground(this CalendarDatePicker platformDatePicker, public static void UpdateIsOpen(this CalendarDatePicker platformDatePicker, IDatePicker datePicker) { - + platformDatePicker.IsCalendarOpen = datePicker.IsOpen; } } } diff --git a/src/Core/src/Platform/iOS/DatePickerExtensions.cs b/src/Core/src/Platform/iOS/DatePickerExtensions.cs index efcf31d847d9..83704e421326 100644 --- a/src/Core/src/Platform/iOS/DatePickerExtensions.cs +++ b/src/Core/src/Platform/iOS/DatePickerExtensions.cs @@ -141,8 +141,11 @@ public static void UpdateTextAlignment(this MauiDatePicker nativeDatePicker, IDa // TODO: Update TextAlignment based on the EffectiveFlowDirection property. } - public static void UpdateIsOpen(this MauiDatePicker nativeDatePicker, IDatePicker datePicker) + public static void UpdateIsOpen(this MauiDatePicker platformDatePicker, IDatePicker datePicker) { - + if (datePicker.IsOpen) + platformDatePicker.BecomeFirstResponder(); + else + platformDatePicker.ResignFirstResponder(); } } \ No newline at end of file diff --git a/src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt b/src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt index 46016bb677a5..578ee15217ce 100644 --- a/src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt +++ b/src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt @@ -124,7 +124,7 @@ static Microsoft.Maui.Keyboard.Time.get -> Microsoft.Maui.Keyboard! *REMOVED*virtual Microsoft.Maui.PropertyMapper.ClearKeyCache() -> void *REMOVED*virtual Microsoft.Maui.PropertyMapper.UpdateKeys.get -> System.Collections.Generic.IReadOnlyCollection! static Microsoft.Maui.Platform.ButtonExtensions.UpdateRippleColor(this Google.Android.Material.Button.MaterialButton! platformView, Microsoft.Maui.Graphics.Color? rippleColor) -> void -static Microsoft.Maui.Platform.DatePickerExtensions.UpdateIsOpen(this Microsoft.Maui.Platform.MauiDatePicker! platformDatePicker, Microsoft.Maui.IDatePicker! datePicker) -> void +static Microsoft.Maui.Platform.DatePickerExtensions.UpdateIsOpen(this Microsoft.Maui.Platform.MauiDatePicker! platformDatePicker, Microsoft.Maui.IDatePicker! datePicker, Android.App.DatePickerDialog? datePickerDialog) -> void static Microsoft.Maui.Platform.EditTextExtensions.GetCursorPosition(this Android.Widget.EditText! editText, int cursorOffset = 0) -> int static Microsoft.Maui.Platform.EditTextExtensions.GetSelectedTextLength(this Android.Widget.EditText! editText) -> int static Microsoft.Maui.Platform.EditTextExtensions.UpdateClearButtonVisibility(this Android.Widget.EditText! editText, Microsoft.Maui.IEntry! entry) -> void diff --git a/src/Core/src/PublicAPI/net-ios/PublicAPI.Unshipped.txt b/src/Core/src/PublicAPI/net-ios/PublicAPI.Unshipped.txt index 2d761605e9a0..8c73fdfcc502 100644 --- a/src/Core/src/PublicAPI/net-ios/PublicAPI.Unshipped.txt +++ b/src/Core/src/PublicAPI/net-ios/PublicAPI.Unshipped.txt @@ -112,7 +112,7 @@ static Microsoft.Maui.Keyboard.Time.get -> Microsoft.Maui.Keyboard! *REMOVED*virtual Microsoft.Maui.PropertyMapper.UpdateKeys.get -> System.Collections.Generic.IReadOnlyCollection! *REMOVED*static Microsoft.Maui.Platform.ElementExtensions.ToUIViewController(this Microsoft.Maui.IElement! view, Microsoft.Maui.IMauiContext! context) -> UIKit.UIViewController! static Microsoft.Maui.Platform.ApplicationExtensions.CreatePlatformWindow(this UIKit.IUIApplicationDelegate! platformApplication, Microsoft.Maui.IApplication! application, UIKit.UIApplication! uiApplication, Foundation.NSDictionary? launchOptions) -> void -static Microsoft.Maui.Platform.DatePickerExtensions.UpdateIsOpen(this Microsoft.Maui.Platform.MauiDatePicker! nativeDatePicker, Microsoft.Maui.IDatePicker! datePicker) -> void +static Microsoft.Maui.Platform.DatePickerExtensions.UpdateIsOpen(this Microsoft.Maui.Platform.MauiDatePicker! platformDatePicker, Microsoft.Maui.IDatePicker! datePicker) -> void static Microsoft.Maui.Platform.ElementExtensions.ToUIViewController(this Microsoft.Maui.IElement? view, Microsoft.Maui.IMauiContext! context) -> UIKit.UIViewController! static Microsoft.Maui.Platform.PickerExtensions.UpdateIsOpen(this Microsoft.Maui.Platform.MauiPicker! platformPicker, Microsoft.Maui.IPicker! picker) -> void static Microsoft.Maui.Platform.TextInputExtensions.GetCursorPosition(this UIKit.IUITextInput! platformView, int cursorOffset = 0) -> int diff --git a/src/Core/src/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt b/src/Core/src/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt index 1e64f88f4cc2..bb12acaf2ead 100644 --- a/src/Core/src/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt +++ b/src/Core/src/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt @@ -114,7 +114,7 @@ static Microsoft.Maui.Keyboard.Time.get -> Microsoft.Maui.Keyboard! *REMOVED*virtual Microsoft.Maui.PropertyMapper.UpdateKeys.get -> System.Collections.Generic.IReadOnlyCollection! *REMOVED*static Microsoft.Maui.Platform.ElementExtensions.ToUIViewController(this Microsoft.Maui.IElement! view, Microsoft.Maui.IMauiContext! context) -> UIKit.UIViewController! static Microsoft.Maui.Platform.ApplicationExtensions.CreatePlatformWindow(this UIKit.IUIApplicationDelegate! platformApplication, Microsoft.Maui.IApplication! application, UIKit.UIApplication! uiApplication, Foundation.NSDictionary? launchOptions) -> void -static Microsoft.Maui.Platform.DatePickerExtensions.UpdateIsOpen(this Microsoft.Maui.Platform.MauiDatePicker! nativeDatePicker, Microsoft.Maui.IDatePicker! datePicker) -> void +static Microsoft.Maui.Platform.DatePickerExtensions.UpdateIsOpen(this Microsoft.Maui.Platform.MauiDatePicker! platformDatePicker, Microsoft.Maui.IDatePicker! datePicker) -> void static Microsoft.Maui.Platform.ElementExtensions.ToUIViewController(this Microsoft.Maui.IElement? view, Microsoft.Maui.IMauiContext! context) -> UIKit.UIViewController! static Microsoft.Maui.Platform.PickerExtensions.UpdateIsOpen(this Microsoft.Maui.Platform.MauiPicker! platformPicker, Microsoft.Maui.IPicker! picker) -> void static Microsoft.Maui.Platform.TextInputExtensions.GetCursorPosition(this UIKit.IUITextInput! platformView, int cursorOffset = 0) -> int From 4e419f833a96d495661e48311a07bc1e1c027a60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Su=C3=A1rez?= Date: Thu, 1 May 2025 20:26:29 +0200 Subject: [PATCH 06/72] More changes --- .../DatePicker/DatePickerHandler.Android.cs | 7 ++++++- .../TimePicker/TimePickerHandler.Android.cs | 8 +++++++- .../TimePicker/TimePickerHandler.MacCatalyst.cs | 2 +- .../src/Platform/Android/DatePickerExtensions.cs | 11 ----------- .../src/Platform/Android/TimePickerExtensions.cs | 5 ----- .../src/Platform/Windows/TimePickerExtensions.cs | 7 +++++++ src/Core/src/Platform/iOS/TimePickerExtensions.cs | 13 ++++++++++++- .../PublicAPI/net-android/PublicAPI.Unshipped.txt | 2 -- .../src/PublicAPI/net-ios/PublicAPI.Unshipped.txt | 1 + .../net-maccatalyst/PublicAPI.Unshipped.txt | 1 + 10 files changed, 35 insertions(+), 22 deletions(-) diff --git a/src/Core/src/Handlers/DatePicker/DatePickerHandler.Android.cs b/src/Core/src/Handlers/DatePicker/DatePickerHandler.Android.cs index 0fe4090335a8..e0543cc75d06 100644 --- a/src/Core/src/Handlers/DatePicker/DatePickerHandler.Android.cs +++ b/src/Core/src/Handlers/DatePicker/DatePickerHandler.Android.cs @@ -129,7 +129,12 @@ public static partial void MapTextColor(IDatePickerHandler handler, IDatePicker public static partial void MapIsOpen(IDatePickerHandler handler, IDatePicker datePicker) { if (handler is DatePickerHandler platformHandler) - handler.PlatformView?.UpdateIsOpen(datePicker, platformHandler._dialog); + { + if (datePicker.IsOpen) + platformHandler.ShowPickerDialog(datePicker.Date); + else + platformHandler.HidePickerDialog(); + } } void ShowPickerDialog() diff --git a/src/Core/src/Handlers/TimePicker/TimePickerHandler.Android.cs b/src/Core/src/Handlers/TimePicker/TimePickerHandler.Android.cs index aa7a882f65fa..1e4e79582790 100644 --- a/src/Core/src/Handlers/TimePicker/TimePickerHandler.Android.cs +++ b/src/Core/src/Handlers/TimePicker/TimePickerHandler.Android.cs @@ -87,7 +87,13 @@ public static void MapTextColor(ITimePickerHandler handler, ITimePicker timePick public static void MapIsOpen(ITimePickerHandler handler, ITimePicker timePicker) { - handler.PlatformView?.UpdateIsOpen(timePicker); + if (handler is TimePickerHandler timePickerHandler) + { + if (timePicker.IsOpen) + timePickerHandler.ShowPickerDialog(); + else + timePickerHandler.HidePickerDialog(); + } } void ShowPickerDialog() diff --git a/src/Core/src/Handlers/TimePicker/TimePickerHandler.MacCatalyst.cs b/src/Core/src/Handlers/TimePicker/TimePickerHandler.MacCatalyst.cs index 99d527d399ee..d8f93e78bcac 100644 --- a/src/Core/src/Handlers/TimePicker/TimePickerHandler.MacCatalyst.cs +++ b/src/Core/src/Handlers/TimePicker/TimePickerHandler.MacCatalyst.cs @@ -64,7 +64,7 @@ public static void MapFlowDirection(TimePickerHandler handler, ITimePicker timeP public static void MapIsOpen(ITimePickerHandler handler, ITimePicker timePicker) { - + handler.PlatformView?.UpdateIsOpen(timePicker); } void SetVirtualViewTime() diff --git a/src/Core/src/Platform/Android/DatePickerExtensions.cs b/src/Core/src/Platform/Android/DatePickerExtensions.cs index 62e649cfefc8..478167df7576 100644 --- a/src/Core/src/Platform/Android/DatePickerExtensions.cs +++ b/src/Core/src/Platform/Android/DatePickerExtensions.cs @@ -73,17 +73,6 @@ public static void UpdateMaximumDate(this MauiDatePicker platformDatePicker, IDa } } - public static void UpdateIsOpen(this MauiDatePicker platformDatePicker, IDatePicker datePicker, DatePickerDialog? datePickerDialog) - { - if (datePickerDialog is null) - return; - - if (datePicker.IsOpen) - datePickerDialog.Show(); - else - datePickerDialog.Hide(); - } - internal static void SetText(this MauiDatePicker platformDatePicker, IDatePicker datePicker) { platformDatePicker.Text = datePicker.Date?.ToString(datePicker.Format) ?? string.Empty; diff --git a/src/Core/src/Platform/Android/TimePickerExtensions.cs b/src/Core/src/Platform/Android/TimePickerExtensions.cs index de7028efb6f7..333c98845b5f 100644 --- a/src/Core/src/Platform/Android/TimePickerExtensions.cs +++ b/src/Core/src/Platform/Android/TimePickerExtensions.cs @@ -12,11 +12,6 @@ public static void UpdateTime(this MauiTimePicker mauiTimePicker, ITimePicker ti mauiTimePicker.SetTime(timePicker); } - public static void UpdateIsOpen(this MauiTimePicker mauiTimePicker, ITimePicker timePicker) - { - - } - internal static void SetTime(this MauiTimePicker mauiTimePicker, ITimePicker timePicker) { var time = timePicker.Time; diff --git a/src/Core/src/Platform/Windows/TimePickerExtensions.cs b/src/Core/src/Platform/Windows/TimePickerExtensions.cs index 15dc3f9f1edc..586fa8b863bd 100644 --- a/src/Core/src/Platform/Windows/TimePickerExtensions.cs +++ b/src/Core/src/Platform/Windows/TimePickerExtensions.cs @@ -1,5 +1,6 @@ using System; using Microsoft.Maui.Graphics; +using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; namespace Microsoft.Maui.Platform; @@ -87,6 +88,12 @@ public static void UpdateBackground(this TimePicker platformTimePicker, ITimePic public static void UpdateIsOpen(this TimePicker platformTimePicker, ITimePicker timePicker) { + if (platformTimePicker.Resources["TimePickerFlyoutPresenter"] is not Flyout flyout) + return; + if (timePicker.IsOpen) + flyout.ShowAt(platformTimePicker); + else + flyout.Hide(); } } diff --git a/src/Core/src/Platform/iOS/TimePickerExtensions.cs b/src/Core/src/Platform/iOS/TimePickerExtensions.cs index 294b1ed56c08..5a961f846de7 100644 --- a/src/Core/src/Platform/iOS/TimePickerExtensions.cs +++ b/src/Core/src/Platform/iOS/TimePickerExtensions.cs @@ -89,8 +89,19 @@ public static void UpdateTextAlignment(this MauiTimePicker textField, ITimePicke // TODO: Update TextAlignment based on the EffectiveFlowDirection property. } - public static void UpdateIsOpen(this MauiTimePicker mauiTimePicker, ITimePicker timePicker) + public static void UpdateIsOpen(this UIDatePicker picker, ITimePicker timePicker) { + if (timePicker.IsOpen) + picker.BecomeFirstResponder(); + else + picker.ResignFirstResponder(); + } + public static void UpdateIsOpen(this MauiTimePicker mauiTimePicker, ITimePicker timePicker) + { + if (timePicker.IsOpen) + mauiTimePicker.BecomeFirstResponder(); + else + mauiTimePicker.ResignFirstResponder(); } } \ No newline at end of file diff --git a/src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt b/src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt index 578ee15217ce..93d1da8df261 100644 --- a/src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt +++ b/src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt @@ -124,14 +124,12 @@ static Microsoft.Maui.Keyboard.Time.get -> Microsoft.Maui.Keyboard! *REMOVED*virtual Microsoft.Maui.PropertyMapper.ClearKeyCache() -> void *REMOVED*virtual Microsoft.Maui.PropertyMapper.UpdateKeys.get -> System.Collections.Generic.IReadOnlyCollection! static Microsoft.Maui.Platform.ButtonExtensions.UpdateRippleColor(this Google.Android.Material.Button.MaterialButton! platformView, Microsoft.Maui.Graphics.Color? rippleColor) -> void -static Microsoft.Maui.Platform.DatePickerExtensions.UpdateIsOpen(this Microsoft.Maui.Platform.MauiDatePicker! platformDatePicker, Microsoft.Maui.IDatePicker! datePicker, Android.App.DatePickerDialog? datePickerDialog) -> void static Microsoft.Maui.Platform.EditTextExtensions.GetCursorPosition(this Android.Widget.EditText! editText, int cursorOffset = 0) -> int static Microsoft.Maui.Platform.EditTextExtensions.GetSelectedTextLength(this Android.Widget.EditText! editText) -> int static Microsoft.Maui.Platform.EditTextExtensions.UpdateClearButtonVisibility(this Android.Widget.EditText! editText, Microsoft.Maui.IEntry! entry) -> void static Microsoft.Maui.Platform.ImageButtonExtensions.UpdateBackground(this Google.Android.Material.ImageView.ShapeableImageView! platformButton, Microsoft.Maui.IImageButton! imageButton) -> void static Microsoft.Maui.Platform.ImageButtonExtensions.UpdateRippleColor(this Google.Android.Material.ImageView.ShapeableImageView! platformView, Microsoft.Maui.Graphics.Color! rippleColor) -> void static Microsoft.Maui.Platform.PickerExtensions.UpdateIsOpen(this Microsoft.Maui.Platform.MauiPicker! platformPicker, Microsoft.Maui.IPicker! picker) -> void -static Microsoft.Maui.Platform.TimePickerExtensions.UpdateIsOpen(this Microsoft.Maui.Platform.MauiTimePicker! mauiTimePicker, Microsoft.Maui.ITimePicker! timePicker) -> void static Microsoft.Maui.ViewExtensions.DisconnectHandlers(this Microsoft.Maui.IView! view) -> void override Microsoft.Maui.Handlers.BorderHandler.PlatformArrange(Microsoft.Maui.Graphics.Rect rect) -> void override Microsoft.Maui.Platform.MauiWebChromeClient.OnHideCustomView() -> void diff --git a/src/Core/src/PublicAPI/net-ios/PublicAPI.Unshipped.txt b/src/Core/src/PublicAPI/net-ios/PublicAPI.Unshipped.txt index 8c73fdfcc502..518d382a0ecf 100644 --- a/src/Core/src/PublicAPI/net-ios/PublicAPI.Unshipped.txt +++ b/src/Core/src/PublicAPI/net-ios/PublicAPI.Unshipped.txt @@ -119,6 +119,7 @@ static Microsoft.Maui.Platform.TextInputExtensions.GetCursorPosition(this UIKit. static Microsoft.Maui.Platform.TextInputExtensions.GetSelectedTextLength(this UIKit.IUITextInput! platformView) -> int static Microsoft.Maui.Platform.TextInputExtensions.SetTextRange(this UIKit.IUITextInput! platformView, int start, int selectedTextLength) -> void static Microsoft.Maui.Platform.TimePickerExtensions.UpdateIsOpen(this Microsoft.Maui.Platform.MauiTimePicker! mauiTimePicker, Microsoft.Maui.ITimePicker! timePicker) -> void +static Microsoft.Maui.Platform.TimePickerExtensions.UpdateIsOpen(this UIKit.UIDatePicker! picker, Microsoft.Maui.ITimePicker! timePicker) -> void static Microsoft.Maui.Platform.UIWindowExtensions.GetWindow(this UIKit.UIWindow? platformWindow) -> Microsoft.Maui.IWindow? static Microsoft.Maui.Platform.UIWindowExtensions.GetWindow(this UIKit.UIWindowScene? windowScene) -> Microsoft.Maui.IWindow? static Microsoft.Maui.ViewExtensions.DisconnectHandlers(this Microsoft.Maui.IView! view) -> void diff --git a/src/Core/src/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt b/src/Core/src/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt index bb12acaf2ead..952f87600263 100644 --- a/src/Core/src/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt +++ b/src/Core/src/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt @@ -121,6 +121,7 @@ static Microsoft.Maui.Platform.TextInputExtensions.GetCursorPosition(this UIKit. static Microsoft.Maui.Platform.TextInputExtensions.GetSelectedTextLength(this UIKit.IUITextInput! platformView) -> int static Microsoft.Maui.Platform.TextInputExtensions.SetTextRange(this UIKit.IUITextInput! platformView, int start, int selectedTextLength) -> void static Microsoft.Maui.Platform.TimePickerExtensions.UpdateIsOpen(this Microsoft.Maui.Platform.MauiTimePicker! mauiTimePicker, Microsoft.Maui.ITimePicker! timePicker) -> void +static Microsoft.Maui.Platform.TimePickerExtensions.UpdateIsOpen(this UIKit.UIDatePicker! picker, Microsoft.Maui.ITimePicker! timePicker) -> void static Microsoft.Maui.Platform.UIWindowExtensions.GetWindow(this UIKit.UIWindow? platformWindow) -> Microsoft.Maui.IWindow? static Microsoft.Maui.Platform.UIWindowExtensions.GetWindow(this UIKit.UIWindowScene? windowScene) -> Microsoft.Maui.IWindow? static Microsoft.Maui.ViewExtensions.DisconnectHandlers(this Microsoft.Maui.IView! view) -> void From 374db13ad099fe56e5a34aa430c18496d570f531 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Su=C3=A1rez?= Date: Thu, 1 May 2025 20:39:37 +0200 Subject: [PATCH 07/72] Implemented on Picker --- src/Core/src/Handlers/Picker/PickerHandler.Android.cs | 3 ++- src/Core/src/Platform/Android/PickerExtensions.cs | 11 +++++++++-- src/Core/src/Platform/Windows/PickerExtensions.cs | 2 +- src/Core/src/Platform/iOS/PickerExtensions.cs | 5 ++++- .../src/PublicAPI/net-android/PublicAPI.Unshipped.txt | 2 +- 5 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/Core/src/Handlers/Picker/PickerHandler.Android.cs b/src/Core/src/Handlers/Picker/PickerHandler.Android.cs index 7a489328ffde..f823acfba71f 100644 --- a/src/Core/src/Handlers/Picker/PickerHandler.Android.cs +++ b/src/Core/src/Handlers/Picker/PickerHandler.Android.cs @@ -88,7 +88,8 @@ public static void MapVerticalTextAlignment(IPickerHandler handler, IPicker pick public static void MapIsOpen(IPickerHandler handler, IPicker picker) { - handler.PlatformView?.UpdateIsOpen(picker); + if (handler is PickerHandler pickerHandler) + handler.PlatformView?.UpdateIsOpen(picker, pickerHandler._dialog); } void OnFocusChange(object? sender, global::Android.Views.View.FocusChangeEventArgs e) diff --git a/src/Core/src/Platform/Android/PickerExtensions.cs b/src/Core/src/Platform/Android/PickerExtensions.cs index 7bd6af847cd6..55046f703b03 100644 --- a/src/Core/src/Platform/Android/PickerExtensions.cs +++ b/src/Core/src/Platform/Android/PickerExtensions.cs @@ -1,5 +1,6 @@ using Android.App; using Android.Content.Res; +using AppCompatAlertDialog = AndroidX.AppCompat.App.AlertDialog; namespace Microsoft.Maui.Platform { @@ -37,9 +38,15 @@ public static void UpdateTextColor(this MauiPicker platformPicker, IPicker picke public static void UpdateSelectedIndex(this MauiPicker platformPicker, IPicker picker) => UpdatePicker(platformPicker, picker); - public static void UpdateIsOpen(this MauiPicker platformPicker, IPicker picker) + public static void UpdateIsOpen(this MauiPicker platformPicker, IPicker picker, AppCompatAlertDialog? dialog) { + if (dialog is null) + return; + if (picker.IsOpen) + dialog.Show(); + else + dialog.Dismiss(); } internal static void UpdatePicker(this MauiPicker platformPicker, IPicker picker) @@ -52,7 +59,7 @@ internal static void UpdatePicker(this MauiPicker platformPicker, IPicker picker platformPicker.Text = picker.GetItem(picker.SelectedIndex); } - internal static void UpdateFlowDirection(this AndroidX.AppCompat.App.AlertDialog alertDialog, MauiPicker platformPicker) + internal static void UpdateFlowDirection(this AppCompatAlertDialog alertDialog, MauiPicker platformPicker) { var platformLayoutDirection = platformPicker.LayoutDirection; diff --git a/src/Core/src/Platform/Windows/PickerExtensions.cs b/src/Core/src/Platform/Windows/PickerExtensions.cs index 302cb1ecdc69..f00d72605dee 100644 --- a/src/Core/src/Platform/Windows/PickerExtensions.cs +++ b/src/Core/src/Platform/Windows/PickerExtensions.cs @@ -91,7 +91,7 @@ public static void UpdateVerticalTextAlignment(this ComboBox nativeComboBox, IPi public static void UpdateIsOpen(this ComboBox nativeComboBox, IPicker picker) { - + nativeComboBox.IsDropDownOpen = picker.IsOpen; } } } \ No newline at end of file diff --git a/src/Core/src/Platform/iOS/PickerExtensions.cs b/src/Core/src/Platform/iOS/PickerExtensions.cs index bcb76eaad697..13fae59062ea 100644 --- a/src/Core/src/Platform/iOS/PickerExtensions.cs +++ b/src/Core/src/Platform/iOS/PickerExtensions.cs @@ -20,7 +20,10 @@ public static void UpdateSelectedIndex(this MauiPicker platformPicker, IPicker p public static void UpdateIsOpen(this MauiPicker platformPicker, IPicker picker) { - + if (picker.IsOpen) + platformPicker.BecomeFirstResponder(); + else + platformPicker.ResignFirstResponder(); } internal static void SetTitleColor(this MauiPicker platformPicker, IPicker picker) diff --git a/src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt b/src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt index 93d1da8df261..b1503a0e38ec 100644 --- a/src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt +++ b/src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt @@ -129,7 +129,7 @@ static Microsoft.Maui.Platform.EditTextExtensions.GetSelectedTextLength(this And static Microsoft.Maui.Platform.EditTextExtensions.UpdateClearButtonVisibility(this Android.Widget.EditText! editText, Microsoft.Maui.IEntry! entry) -> void static Microsoft.Maui.Platform.ImageButtonExtensions.UpdateBackground(this Google.Android.Material.ImageView.ShapeableImageView! platformButton, Microsoft.Maui.IImageButton! imageButton) -> void static Microsoft.Maui.Platform.ImageButtonExtensions.UpdateRippleColor(this Google.Android.Material.ImageView.ShapeableImageView! platformView, Microsoft.Maui.Graphics.Color! rippleColor) -> void -static Microsoft.Maui.Platform.PickerExtensions.UpdateIsOpen(this Microsoft.Maui.Platform.MauiPicker! platformPicker, Microsoft.Maui.IPicker! picker) -> void +static Microsoft.Maui.Platform.PickerExtensions.UpdateIsOpen(this Microsoft.Maui.Platform.MauiPicker! platformPicker, Microsoft.Maui.IPicker! picker, AndroidX.AppCompat.App.AlertDialog? dialog) -> void static Microsoft.Maui.ViewExtensions.DisconnectHandlers(this Microsoft.Maui.IView! view) -> void override Microsoft.Maui.Handlers.BorderHandler.PlatformArrange(Microsoft.Maui.Graphics.Rect rect) -> void override Microsoft.Maui.Platform.MauiWebChromeClient.OnHideCustomView() -> void From cac13c939cbb446a807fdddf5c8ace2bfe85b5da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Su=C3=A1rez?= Date: Thu, 1 May 2025 22:56:30 +0200 Subject: [PATCH 08/72] Added DatePicker sample --- .../Pages/Controls/DatePickerPage.xaml | 7 ++++ .../Pages/Controls/DatePickerPage.xaml.cs | 38 ++++++++++++++++++- 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/src/Controls/samples/Controls.Sample/Pages/Controls/DatePickerPage.xaml b/src/Controls/samples/Controls.Sample/Pages/Controls/DatePickerPage.xaml index cc78cae0c9af..a16c75926936 100644 --- a/src/Controls/samples/Controls.Sample/Pages/Controls/DatePickerPage.xaml +++ b/src/Controls/samples/Controls.Sample/Pages/Controls/DatePickerPage.xaml @@ -97,6 +97,13 @@ Date="{x:Null}"/>