OnPlatformExtension Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides a XAML markup extension that returns different values depending on the platform the app is running on.
public ref class OnPlatformExtension : Microsoft::Maui::Controls::Xaml::IMarkupExtension
[Microsoft.Maui.Controls.ContentProperty("Default")]
[Microsoft.Maui.Controls.Xaml.RequireService(new System.Type[] { typeof(Microsoft.Maui.Controls.Xaml.IProvideValueTarget), typeof(Microsoft.Maui.Controls.Xaml.IValueConverterProvider), typeof(Microsoft.Maui.Controls.Xaml.IXmlLineInfoProvider), typeof(Microsoft.Maui.Controls.Xaml.IConverterOptions) })]
public class OnPlatformExtension : Microsoft.Maui.Controls.Xaml.IMarkupExtension
[Microsoft.Maui.Controls.ContentProperty("Default")]
public class OnPlatformExtension : Microsoft.Maui.Controls.Xaml.IMarkupExtension
[<Microsoft.Maui.Controls.ContentProperty("Default")>]
[<Microsoft.Maui.Controls.Xaml.RequireService(new System.Type[] { typeof(Microsoft.Maui.Controls.Xaml.IProvideValueTarget), typeof(Microsoft.Maui.Controls.Xaml.IValueConverterProvider), typeof(Microsoft.Maui.Controls.Xaml.IXmlLineInfoProvider), typeof(Microsoft.Maui.Controls.Xaml.IConverterOptions) })>]
type OnPlatformExtension = class
interface IMarkupExtension
[<Microsoft.Maui.Controls.ContentProperty("Default")>]
type OnPlatformExtension = class
interface IMarkupExtension
Public Class OnPlatformExtension
Implements IMarkupExtension
- Inheritance
-
OnPlatformExtension
- Attributes
- Implements
Constructors
| Name | Description |
|---|---|
| OnPlatformExtension() | |
Properties
| Name | Description |
|---|---|
| Android |
Gets or sets the value to use on Android. |
| Converter |
Gets or sets a converter to apply to the platform-specific value. |
| ConverterParameter |
Gets or sets a parameter to pass to the converter. |
| Default |
Gets or sets the default value to use if no platform-specific value is set. |
| iOS |
Gets or sets the value to use on iOS. |
| MacCatalyst |
Gets or sets the value to use on Mac Catalyst. |
| Tizen |
Gets or sets the value to use on Tizen. |
| UWP |
Obsolete.
Gets or sets the value to use on UWP. Use WinUI instead. |
| WinUI |
Gets or sets the value to use on Windows (WinUI). |
Methods
| Name | Description |
|---|---|
| ProvideValue(IServiceProvider) | |