diff --git a/src/Controls/docs/Microsoft.Maui.Controls/AcceleratorTypeConverter.xml b/src/Controls/docs/Microsoft.Maui.Controls/AcceleratorTypeConverter.xml deleted file mode 100644 index 39dc087556e6..000000000000 --- a/src/Controls/docs/Microsoft.Maui.Controls/AcceleratorTypeConverter.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - Microsoft.Maui.Controls.Core - 0.0.0.0 - 2.0.0.0 - - - System.ComponentModel.TypeConverter - - - - Class that the XAML parser uses to convert strings to objects. - To be added. - - - - - - - Constructor - - 0.0.0.0 - 2.0.0.0 - Microsoft.Maui.Controls.Core - - - - Creates a new instance. - To be added. - - - - - - - - Method - - 0.0.0.0 - 2.0.0.0 - Microsoft.Maui.Controls.Core - - - System.Object - - - - - - To be added. - Converts into a . - A new initialized from . - - - may contain a combination of "CTRL", "CMD", "ALT", "SHIFT", "FN", or "WIN", in any combination of upper or lower case letters, as well as any available keys on the platform. The returned has its array filled with the specifed modifiers, and its array filled with the remaining keys. - - - - - diff --git a/src/Controls/src/Core/AcceleratorTypeConverter.cs b/src/Controls/src/Core/AcceleratorTypeConverter.cs index ee245f1923ef..b66d4a7c68f7 100644 --- a/src/Controls/src/Core/AcceleratorTypeConverter.cs +++ b/src/Controls/src/Core/AcceleratorTypeConverter.cs @@ -4,18 +4,22 @@ namespace Microsoft.Maui.Controls { - /// + /// + /// Class that the XAML parser uses to convert strings to objects. + /// + /// + /// The given string value may contain a combination of "CTRL", "CMD", "ALT", "SHIFT", "FN", or "WIN", + /// in any combination of upper or lower case letters, as well as any available keys on the platform. + /// The returned has its array filled with the specified modifiers, + /// and its array filled with the remaining keys. public class AcceleratorTypeConverter : TypeConverter { - /// public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) => sourceType == typeof(string); - /// public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) => destinationType == typeof(string); - - /// + public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { var strValue = value?.ToString(); @@ -26,11 +30,11 @@ public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo c return Accelerator.FromString(strValue); } - /// public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { if (value is not Accelerator acc) throw new NotSupportedException(); + return acc.ToString(); } } diff --git a/src/Controls/src/Core/ActivityIndicator.cs b/src/Controls/src/Core/ActivityIndicator.cs index c80bee968f67..8d9df218a4e7 100644 --- a/src/Controls/src/Core/ActivityIndicator.cs +++ b/src/Controls/src/Core/ActivityIndicator.cs @@ -33,7 +33,8 @@ public bool IsRunning get { return (bool)GetValue(IsRunningProperty); } set { SetValue(IsRunningProperty, value); } } - /// + + /// public IPlatformElementConfiguration On() where T : IConfigPlatform { return _platformConfigurationRegistry.Value.On(); diff --git a/src/Controls/src/Core/Application.cs b/src/Controls/src/Core/Application.cs index d9074d1edaef..47a695f25530 100644 --- a/src/Controls/src/Core/Application.cs +++ b/src/Controls/src/Core/Application.cs @@ -279,7 +279,7 @@ internal void NotifyOfWindowModalEvent(EventArgs eventArgs) [Obsolete("Properties API is obsolete, use Microsoft.Maui.Storage.Preferences instead.", error: true)] public Task SavePropertiesAsync() => throw new NotSupportedException("Properties API is obsolete, use Microsoft.Maui.Storage.Preferences instead."); - /// + /// public IPlatformElementConfiguration On() where T : IConfigPlatform { return _platformConfigurationRegistry.Value.On(); diff --git a/src/Controls/src/Core/BoxView.cs b/src/Controls/src/Core/BoxView.cs index 1b0818dbc3d8..3acc3926bc29 100644 --- a/src/Controls/src/Core/BoxView.cs +++ b/src/Controls/src/Core/BoxView.cs @@ -35,7 +35,7 @@ public CornerRadius CornerRadius set => SetValue(CornerElement.CornerRadiusProperty, value); } - /// + /// public IPlatformElementConfiguration On() where T : IConfigPlatform { return _platformConfigurationRegistry.Value.On(); diff --git a/src/Controls/src/Core/Button.cs b/src/Controls/src/Core/Button.cs index 86d8a13a1087..48d02da0ef3d 100644 --- a/src/Controls/src/Core/Button.cs +++ b/src/Controls/src/Core/Button.cs @@ -248,7 +248,7 @@ public Button() _platformConfigurationRegistry = new Lazy>(() => new PlatformConfigurationRegistry