Docs / UI

Glossary: Stencil Style

The properties, methods and events of Stencil, in alphabetical order.

Color legend plain property dependency property method

Shows a picture through a mask texture: where the mask has the key color, the picture shows, and the rest of the mask stays. A portrait in a frame is the usual case.

Stencil derives from BaseElement and has its members too. The images page shows it in context, with code and screenshots.

Names are colored by what they are: a plain property, a method, an event or a dependency property, which a style, a binding or an animation can set.

Properties

GeneralMouseCursorsSet 🠆

MouseCursorsSet · Static. The cursors of every element of this style type; null (the default) falls back to DefaultMouseCursorsSet.

GeneralStyle 🠆

StencilStyle · Static. The style of every element of this style type. It starts as a copy of the framework defaults; changing one of its properties updates every such element, a property it leaves unset takes its default.

KeyColor 🠆

Color · The stencil color, alpha included, where the source shows through. Defaults to transparent black (0, 0, 0, 0).

MouseCursorsSet 🠆

MouseCursorsSet · Read-only. The cursors the element shows: its override, else the set given to the control it is a part of, else its type’s general set, else DefaultMouseCursorsSet.

MouseCursorsSetOverride 🠆

MouseCursorsSet · The cursors of this element only, passed on to its parts that have none of their own.

SourceTexture 🠆

Texture2D · The picture that shows where the stencil has the key color. Not part of StencilStyle.

StencilTexture 🠆

Texture2D · The mask drawn over the picture. A stencil that fits its content takes its size. Not part of StencilStyle.

StyleOverride 🠆

StencilStyle · A style for this element only, applied over the general style. Setting it to null takes its values back out.

Tolerance 🠆

float · How far a stencil pixel may be from KeyColor and still be keyed, on a 0 to 1 scale per channel. Defaults to 0 (an exact match).

Methods

Stencil() 🠆

Stencil(string name = null) · Creates a stencil. The name is used by GetElementByName.

Parameter Type Description
name string The element’s Name, which GetElementByName finds it by. Default: null.