Used to specify multiple image sources that an Image element can display at different pixel densities.

In order to ensure a given image looks best across multiple screens with different pixel densities, it's often useful to be able to specify different pre-scaled versions of an image, instead of just specifying one and relying on image scaling while rendering. This allows Fuse to pick the one that's best suited for a particular screen.

Example

<Image StretchMode="PointPrefer">
    <MultiDensityImageSource>
        <FileImageSource File="Icon.png" Density="1"/>
        <FileImageSource File="Icon.png@2x.png" Density="2"/>
    </MultiDensityImageSource>
</Image>

Location

Namespace
Fuse.Resources
Package
Fuse.Elements 1.11.2

Interface of MultiDensityImageSource

MatchDensity : float ux

Used to override the current screen's detected density when selecting a source to display.

Inherited from ImageSource

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.