GradientBrush.MappingMode Property
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets or sets a BrushMappingMode enumeration value that specifies whether the positioning coordinates of the gradient brush are absolute or relative to the output area.
Assembly: System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.
<gradientBrush MappingMode="Absolute"/> -or- <gradientBrush MappingMode="RelativeToBoundingBox"/>
Property Value
Type: System.Windows.Media.BrushMappingModeA BrushMappingMode value that specifies how to interpret the gradient brush's positioning coordinates. The default is BrushMappingMode.RelativeToBoundingBox.
Dependency property identifier field: MappingModeProperty
A value of Absolute indicates the gradient brush's coordinates are expressed in pixels. A value of BrushMappingMode.RelativeToBoundingBox indicates that the gradient brush's coordinates are expressed as a logical factor between 0 and 1.
The MappingMode of a LinearGradientBrush or RadialGradientBrush does not influence how the Offset values are interpreted. Regardless of mapping mode, the offset is always interpreted as a factor between 0 and 1 along the vector that defines the gradient.