Masks an Element to an image.

Location

Namespace
Fuse.Effects
Package
Fuse.Effects 1.11.2

Interface of Mask

Mode : MaskMode ux

Specifies which channels should be used to determine the opacity of each pixel.

Inherited from BasicEffect

Inherited from Effect

Inherited from Node

ContextParent : Node uno

The context parent is the semantic parent of this node. It is where non-UI structure should be resolved, like looking for the DataContext, a Navigation, or other semantic item.

FindNodeByName(Selector, Predicate<Node> (Node)) : Node uno

Finds the first node with a given name that satisfies the given acceptor. The serach algorithm works as follows: Nodes in the subtree are matched first, then it matches the nodes in the subtrees ofthe ancestor nodes by turn all the way to the root. If no matching node is found, the function returns null.

IsRootingStarted : bool uno

Whether rooting of this node has started. Note that even if this property returns true, rooting may not yet be completed for the node. See also IsRootingCompleted.

Name : Selector ux

Run-time name of the node. This property is automatically set using the ux:Name attribute.

Inherited from PropertyObject

Inherited from object

Attached UX Attributes

GlobalKey (attached by Resource) : string ux

The ux:Global attribute creates a global resource that is accessible everywhere in UX markup.

Implemented Interfaces

IScriptObject uno

Interface for objects that can have a script engine representation

Examples

The following example will display a Rectangle masked with an image from a file.

<Rectangle Width="200" Height="88" Color="#EA5455">
    <Mask Mode="Alpha" File="fuse.png" />
</Rectangle>

The following example illustrates how you can supply your own ImageSource.

<Rectangle Width="200" Height="88">
    <Mask Mode="Alpha">
        <MultiDensityImageSource>
            <FileImageSource Density="1" File="fuse@1x.png" />
            <FileImageSource Density="2" File="fuse@2x.png" />
            <FileImageSource Density="3" File="fuse@3x.png" />
        </MultiDensityImageSource>
    </Mask>

    <LinearGradient AngleDegrees="60">
        <GradientStop Color="#900C3F" Offset="0" />
        <GradientStop Color="#2794EB" Offset="1" />
    </LinearGradient>
</Rectangle>