UIElement.RenderTransformOrigin Property
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Gets or sets the origin point of any possible render transform declared by RenderTransform, relative to the bounds of the UIElement.
Namespace: System.Windows
Assembly: System.Windows (in System.Windows.dll)
Syntax
'Declaration
Public Property RenderTransformOrigin As Point
public Point RenderTransformOrigin { get; set; }
<uiElement RenderTransformOrigin="x,y"/>
XAML Values
x
The X value of the Point that specifies the transform origin.y
The Y value of a Point that specifies the transform origin.
The XAML syntax for RenderTransformOrigin specifies a new Point as a string. The delimiter between the x and y values of the point can be either a comma or a space. Note that the comma usage has potential to clash with the usage of comma as the decimal point in some UI cultures. For more information, see the "XAML Attribute Syntax" section of Point.
Property Value
Type: System.Windows.Point
The origin point of the render transform. The default value is a point with value 0,0.
Remarks
Dependency property identifier field: RenderTransformOriginProperty
This property is one of several ways to offset an object in layout. Other options include Canvas.Left / Canvas.Top, or using a TranslateTransform for RenderTransform.
Generally you should align points/coordinates for Silverlight to integer values. See Layout Rounding.
Design surfaces of tools that generate XAML from a UI design metaphor often use transforms to specify positioning. Such transforms also often specify a RenderTransformOrigin in the produced XAML.
Values for RenderTransformOrigin are evaluated against the top left corner of the bounding box for a UIElement.
Version Information
Silverlight
Supported in: 5, 4, 3
Silverlight for Windows Phone
Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0
Platforms
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.