AppThemeBindingExtension 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 creates a binding with different values for light and dark themes.
public ref class AppThemeBindingExtension : Microsoft::Maui::Controls::Xaml::IMarkupExtension<Microsoft::Maui::Controls::BindingBase ^>
[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 AppThemeBindingExtension : Microsoft.Maui.Controls.Xaml.IMarkupExtension<Microsoft.Maui.Controls.BindingBase>
[Microsoft.Maui.Controls.ContentProperty("Default")]
public class AppThemeBindingExtension : Microsoft.Maui.Controls.Xaml.IMarkupExtension<Microsoft.Maui.Controls.BindingBase>
[<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 AppThemeBindingExtension = class
interface IMarkupExtension<BindingBase>
interface IMarkupExtension
[<Microsoft.Maui.Controls.ContentProperty("Default")>]
type AppThemeBindingExtension = class
interface IMarkupExtension<BindingBase>
interface IMarkupExtension
Public Class AppThemeBindingExtension
Implements IMarkupExtension(Of BindingBase)
- Inheritance
-
AppThemeBindingExtension
- Attributes
- Implements
Constructors
| Name | Description |
|---|---|
| AppThemeBindingExtension() | |
Properties
| Name | Description |
|---|---|
| Dark |
Gets or sets the value to use when the dark theme is active. |
| Default |
Gets or sets the default value to use when no theme-specific value is set. |
| Light |
Gets or sets the value to use when the light theme is active. |
| Value |
Gets the current value based on the active theme. |
Methods
| Name | Description |
|---|---|
| ProvideValue(IServiceProvider) | |
Explicit Interface Implementations
| Name | Description |
|---|---|
| IMarkupExtension<BindingBase>.ProvideValue(IServiceProvider) | |