Edit

Share via


XamlCompositionBrush.Clone Method

Definition

Clones the current instance by rebuilding the source Windows.UI.Xaml.Media.Brush. Use this method to reuse the same effects pipeline on a different Windows.System.DispatcherQueue

public Microsoft.Toolkit.Uwp.UI.Media.XamlCompositionBrush Clone ();
member this.Clone : unit -> Microsoft.Toolkit.Uwp.UI.Media.XamlCompositionBrush
Public Function Clone () As XamlCompositionBrush

Returns

A XamlCompositionBrush instance using the current effects pipeline

Remarks

If your code is already on the same thread, you can just assign this brush to an arbitrary number of controls and it will still work correctly. This method is only meant to be used to create a new instance of this brush using the same pipeline, on threads that can't access the current instance, for example in secondary app windows.

Applies to