Share via


MicaBackdrop Class

Definition

Represents a system backdrop that applies Mica material to a supported XAML surface, such as a Window.

/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackMethodName(value="OnPropertyChanged")]
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Xaml.XamlContract, 262144)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class MicaBackdrop : SystemBackdrop
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackMethodName(value="OnPropertyChanged")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.XamlContract), 262144)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public class MicaBackdrop : SystemBackdrop
Public Class MicaBackdrop
Inherits SystemBackdrop
Inheritance
Object IInspectable DependencyObject SystemBackdrop MicaBackdrop
Attributes
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackAttribute Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackMethodNameAttribute ContractVersionAttribute MarshalingBehaviorAttribute ThreadingAttribute

Examples

<Window
    ... >

    <Window.SystemBackdrop>
        <MicaBackdrop Kind="BaseAlt"/>
    </Window.SystemBackdrop>

</Window>
public MainWindow()
{
    this.InitializeComponent();

    SystemBackdrop = new MicaBackdrop() 
                        { Kind = MicaKind.BaseAlt };
}

Remarks

You can use MicaBackdrop to apply Mica material to an object that implements the ICompositionSupportsSystemBackdrop interface, typically a XAML Window.

Mica isn't supported on all systems. Where it's not supported, a solid color is used instead of the Mica effect.

Constructors

MicaBackdrop()

Initializes a new instance of the MicaBackdrop class.

Properties

Dispatcher

Always returns null in a Windows App SDK app. Use DispatcherQueue instead.

(Inherited from DependencyObject)
DispatcherQueue

Gets the DispatcherQueue that this object is associated with. The DispatcherQueue represents a facility that can access the DependencyObject on the UI thread even if the code is initiated by a non-UI thread.

(Inherited from DependencyObject)
Kind

Gets or sets the kind of backdrop that the MicaBackdrop displays.

KindProperty

Identifies the Kind dependency property.

Methods

ClearValue(DependencyProperty)

Clears the local value of a dependency property.

(Inherited from DependencyObject)
GetAnimationBaseValue(DependencyProperty)

Returns any base value established for a dependency property, which would apply in cases where an animation is not active.

(Inherited from DependencyObject)
GetDefaultSystemBackdropConfiguration(ICompositionSupportsSystemBackdrop, XamlRoot)

Retrieves a default SystemBackdropConfiguration object that can be passed to ISystemBackdropControllerWithTargets.SetSystemBackdropConfiguration.

(Inherited from SystemBackdrop)
GetValue(DependencyProperty)

Returns the current effective value of a dependency property from a DependencyObject.

(Inherited from DependencyObject)
OnDefaultSystemBackdropConfigurationChanged(ICompositionSupportsSystemBackdrop, XamlRoot)

Override this method to be called when the object returned by GetDefaultSystemBackdropConfiguration changes. This is useful if you're using a custom SystemBackdropConfiguration.

(Inherited from SystemBackdrop)
OnTargetConnected(ICompositionSupportsSystemBackdrop, XamlRoot)

Called when this object is attached to a valid container; for example, when set on Window.SystemBackdrop.

(Inherited from SystemBackdrop)
OnTargetDisconnected(ICompositionSupportsSystemBackdrop)

Called when this object is cleared from its container.

(Inherited from SystemBackdrop)
ReadLocalValue(DependencyProperty)

Returns the local value of a dependency property, if a local value is set.

(Inherited from DependencyObject)
RegisterPropertyChangedCallback(DependencyProperty, DependencyPropertyChangedCallback)

Registers a notification function for listening to changes to a specific DependencyProperty on this DependencyObject instance.

(Inherited from DependencyObject)
SetValue(DependencyProperty, Object)

Sets the local value of a dependency property on a DependencyObject.

(Inherited from DependencyObject)
UnregisterPropertyChangedCallback(DependencyProperty, Int64)

Cancels a change notification that was previously registered by calling RegisterPropertyChangedCallback.

(Inherited from DependencyObject)

Applies to

See also