Gets or sets the transformation that is applied to the brush. This transformation is applied after the brush's output has been mapped and positioned.
Assembly: PresentationCore (in PresentationCore.dll)
Use this property to rotate, scale, skew, or translate a brush's content. For detailed information about this property, see the Brush Transformation Overview.
The first example applies a RotateTransform to the RelativeTransform property of an ImageBrush. The CenterX and CenterY properties of a RotateTransform object are both set to 0.5, which is the relative coordinate of the center point of this content. As a result, the ImageBrush content rotates about its center.
<Rectangle Width="175" Height="90" Stroke="Black"> <Rectangle.Fill> <ImageBrush ImageSource="sampleImages\pinkcherries.jpg"> <ImageBrush.RelativeTransform> <RotateTransform CenterX="0.5" CenterY="0.5" Angle="45" /> </ImageBrush.RelativeTransform> </ImageBrush> </Rectangle.Fill> </Rectangle>
To rotate the brush about its center, the example sets the CenterX and CenterY properties of the RotateTransform object to absolute coordinates. Because the brush paints a rectangle that is 175 by 90 pixels, the center point of the rectangle is (87.5, 45).
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.