RevealBrush Class

Definition

Important

RevealBrush is available for use in the operating systems specified in the Requirements section. However, we do not recommend its use as it may be altered or unavailable in subsequent versions.

Base class for brushes that use composition effects and lighting to implement the reveal visual design treatment.

[WebHostHidden]
public ref class RevealBrush : XamlCompositionBrushBase
public ref class RevealBrush : XamlCompositionBrushBase
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 327680)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[WebHostHidden]
class RevealBrush : XamlCompositionBrushBase
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 327680)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class RevealBrush : XamlCompositionBrushBase
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 327680)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public class RevealBrush : XamlCompositionBrushBase
Public Class RevealBrush
Inherits XamlCompositionBrushBase
Inheritance
Derived
Attributes

Windows requirements

Device family
Windows 10 Fall Creators Update (introduced in 10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v5.0)

Examples

See the XAML Controls Gallery sample app for examples of WinUI features and controls.

If you have the XAML Controls Gallery app installed, open the app to see the controls in action.

If you don't have the XAML Controls Gallery app installed, get the WinUI 2.x version from the Microsoft Store.

You can also view, clone, and build the XAML Controls Gallery source code from GitHub (switch to the WinUI 3 Preview branch for WinUI 3 Preview controls and features).

Remarks

XAML attached properties

RevealBrush is the host service class for a XAML attached property.

In order to support XAML processor access to the attached properties, and also to expose equivalent get and set operations to code, each XAML attached property has a pair of Get and Set accessor methods. Another way to get or set the value in code is to use the dependency property system, calling either GetValue or SetValue and passing the identifier field as the dependency property identifier.

Attached property Description
State Gets or sets a value that indicates the pointer state of the element that this brush is used on.

Constructors

RevealBrush()

Important

RevealBrush is available for use in the operating systems specified in the Requirements section. However, we do not recommend its use as it may be altered or unavailable in subsequent versions.

Provides base class initialization behavior for RevealBrush-derived classes.

Properties

AlwaysUseFallback

Important

RevealBrush is available for use in the operating systems specified in the Requirements section. However, we do not recommend its use as it may be altered or unavailable in subsequent versions.

Gets or sets a value that specifies whether the brush is forced to the solid fallback color.

AlwaysUseFallbackProperty

Important

RevealBrush is available for use in the operating systems specified in the Requirements section. However, we do not recommend its use as it may be altered or unavailable in subsequent versions.

Identifies the AlwaysUseFallback dependency property.

Color

Important

RevealBrush is available for use in the operating systems specified in the Requirements section. However, we do not recommend its use as it may be altered or unavailable in subsequent versions. Gets or sets a value that specifies the base background color for the brush.

ColorProperty

Important

RevealBrush is available for use in the operating systems specified in the Requirements section. However, we do not recommend its use as it may be altered or unavailable in subsequent versions.

Identifies the Color dependency property.

CompositionBrush

Gets or sets the CompositionBrush used by this XAML brush.

Equivalent WinUI property: Microsoft.UI.Xaml.Media.XamlCompositionBrushBase.CompositionBrush.

(Inherited from XamlCompositionBrushBase)
Dispatcher

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

Equivalent WinUI property: Microsoft.UI.Xaml.DependencyObject.Dispatcher.

(Inherited from DependencyObject)
FallbackColor

The color to use for rendering in case the CompositionBrush can't be rendered.

Equivalent WinUI property: Microsoft.UI.Xaml.Media.XamlCompositionBrushBase.FallbackColor.

(Inherited from XamlCompositionBrushBase)
Opacity

Gets or sets the degree of opacity of a Brush.

Equivalent WinUI property: Microsoft.UI.Xaml.Media.Brush.Opacity.

(Inherited from Brush)
RelativeTransform

Gets or sets the transformation that is applied to the brush using relative coordinates.

Equivalent WinUI property: Microsoft.UI.Xaml.Media.Brush.RelativeTransform.

(Inherited from Brush)
StateProperty

Important

RevealBrush is available for use in the operating systems specified in the Requirements section. However, we do not recommend its use as it may be altered or unavailable in subsequent versions.

Identifies the RevealBrush.State attached property.

TargetTheme

Important

RevealBrush is available for use in the operating systems specified in the Requirements section. However, we do not recommend its use as it may be altered or unavailable in subsequent versions.

Gets or sets a value that specifies the theme used to draw the brush and light, to ensure that the correct composition effect recipe is used for the desired theme.

TargetThemeProperty

Important

RevealBrush is available for use in the operating systems specified in the Requirements section. However, we do not recommend its use as it may be altered or unavailable in subsequent versions.

Identifies the TargetTheme dependency property.

Transform

Gets or sets the transformation that is applied to the brush.

Equivalent WinUI property: Microsoft.UI.Xaml.Media.Brush.Transform.

(Inherited from Brush)

Attached Properties

State

Gets or sets a value that indicates the pointer state of the element that this brush is used on.

Methods

ClearValue(DependencyProperty)

Clears the local value of a dependency property.

Equivalent WinUI method: Microsoft.UI.Xaml.DependencyObject.ClearValue.

(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.

Equivalent WinUI method: Microsoft.UI.Xaml.DependencyObject.GetAnimationBaseValue.

(Inherited from DependencyObject)
GetState(UIElement)

Important

RevealBrush is available for use in the operating systems specified in the Requirements section. However, we do not recommend its use as it may be altered or unavailable in subsequent versions.

Gets the value of the RevealBrush.State XAML attached property for the target element.

GetValue(DependencyProperty)

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

Equivalent WinUI method: Microsoft.UI.Xaml.DependencyObject.GetValue.

(Inherited from DependencyObject)
OnConnected()

Invoked when a brush is first used on screen to paint an element.

When implemented in a derived class, you can create a CompositionBrush instance and provide it to the framework by setting the CompositionBrush property.

OnDisconnected will be called when the brush is no longer being used to paint any elements.

Equivalent WinUI method: Microsoft.UI.Xaml.Media.XamlCompositionBrushBase.OnConnected.

(Inherited from XamlCompositionBrushBase)
OnDisconnected()

Invoked when the brush is no longer being used to paint any elements.

When implemented in a derived class, you can safely dispose of the compostion brush and other composition resources.

OnConnected will be called again if the brush is later used to paint any elements after being disconnected.

Equivalent WinUI method: Microsoft.UI.Xaml.Media.XamlCompositionBrushBase.OnDisconnected.

(Inherited from XamlCompositionBrushBase)
PopulatePropertyInfo(String, AnimationPropertyInfo)

Defines a property that can be animated.

Equivalent WinUI method: Microsoft.UI.Xaml.Media.Brush.PopulatePropertyInfo.

(Inherited from Brush)
PopulatePropertyInfoOverride(String, AnimationPropertyInfo)

When overridden in a derived class, defines a property that can be animated.

Equivalent WinUI method: Microsoft.UI.Xaml.Media.Brush.PopulatePropertyInfoOverride.

(Inherited from Brush)
ReadLocalValue(DependencyProperty)

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

Equivalent WinUI method: Microsoft.UI.Xaml.DependencyObject.ReadLocalValue.

(Inherited from DependencyObject)
RegisterPropertyChangedCallback(DependencyProperty, DependencyPropertyChangedCallback)

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

Equivalent WinUI method: Microsoft.UI.Xaml.DependencyObject.RegisterPropertyChangedCallback.

(Inherited from DependencyObject)
SetState(UIElement, RevealBrushState)

Important

RevealBrush is available for use in the operating systems specified in the Requirements section. However, we do not recommend its use as it may be altered or unavailable in subsequent versions.

Sets the value of the RevealBrush.State XAML attached property for a target element.

SetValue(DependencyProperty, Object)

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

Equivalent WinUI method: Microsoft.UI.Xaml.DependencyObject.SetValue.

(Inherited from DependencyObject)
UnregisterPropertyChangedCallback(DependencyProperty, Int64)

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

Equivalent WinUI method: Microsoft.UI.Xaml.DependencyObject.UnregisterPropertyChangedCallback.

(Inherited from DependencyObject)

Applies to