SkewTransform class
Represents a two-dimensional skew.
Inheritance
- Object
- DependencyObject
- GeneralTransform
- Transform
- SkewTransform
Syntax
<SkewTransform .../>
Attributes
- ActivatableAttribute(NTDDI_WIN8)
- MarshalingBehaviorAttribute(Agile)
- StaticAttribute(Windows.UI.Xaml.Media.ISkewTransformStatics, NTDDI_WIN8)
- ThreadingAttribute(Both)
- VersionAttribute(NTDDI_WIN8)
- WebHostHiddenAttribute()
Members
The SkewTransform class has these types of members:
Constructors
The SkewTransform class has these constructors.
| Constructor | Description |
|---|---|
| SkewTransform | Initializes a new instance of the SkewTransform class. |
Methods
The SkewTransform class has these methods. It also inherits methods from the Object class.
| Method | Description |
|---|---|
| ClearValue | Clears the local value of a dependency property. (Inherited from DependencyObject) |
| GetAnimationBaseValue | Returns any base value established for a dependency property, which would apply in cases where an animation is not active. (Inherited from DependencyObject) |
| GetValue | Returns the current effective value of a dependency property from a DependencyObject. (Inherited from DependencyObject) |
| ReadLocalValue | Returns the local value of a dependency property, if a local value is set. (Inherited from DependencyObject) |
| SetValue | Sets the local value of a dependency property on a DependencyObject. (Inherited from DependencyObject) |
| TransformBounds | Transforms the specified bounding box and returns an axis-aligned bounding box that is exactly large enough to contain it. (Inherited from GeneralTransform) |
| TransformBoundsCore | Provides the means to override the TransformBounds behavior in a derived transform class. (Inherited from GeneralTransform) |
| TransformPoint | Transforms the specified point and returns the result. (Inherited from GeneralTransform) |
| TryTransform | Attempts to transform the specified point and returns a value that indicates whether the transformation was successful. (Inherited from GeneralTransform) |
| TryTransformCore | Provides the means to override the TryTransform behavior in a derived transform class. (Inherited from GeneralTransform) |
Properties
The SkewTransform class has these properties.
| Property | Access type | Description |
|---|---|---|
| Read/write | Gets or sets the x-axis skew angle, which is measured in degrees counterclockwise from the y-axis. | |
| Read-only | Identifies the AngleX dependency property. | |
| Read/write | Gets or sets the y-axis skew angle, which is measured in degrees counterclockwise from the x-axis. | |
| Read-only | Identifies the AngleY dependency property. | |
| Read/write | Gets or sets the x-coordinate of the transform center. | |
| Read-only | Identifies the CenterX dependency property. | |
| Read/write | Gets or sets the y-coordinate of the transform center. | |
| Read-only | Identifies the CenterY dependency property. | |
| Read-only | Gets the CoreDispatcher that this object is associated with. (Inherited from DependencyObject) | |
| Read-only | Gets the inverse transformation of this GeneralTransform, if possible. (Inherited from GeneralTransform) | |
| Read-only | Implements the behavior for return value of Inverse in a derived or custom GeneralTransform. (Inherited from GeneralTransform) |
Examples
This example uses a SkewTransform to skew text. A skew, also known as a shear, is a transformation that stretches the coordinate space in a non-uniform manner. In this example, the two text strings are skewed -30 degrees and 30 degrees along the x-coordinate.
<Canvas Margin="30"> <!-- Skew the text using a SkewTransform. --> <TextBlock FontSize="32" FontWeight="Bold" Foreground="Maroon" Text="Skewed Text"> <TextBlock.RenderTransform> <SkewTransform AngleX="-30" AngleY="0" /> </TextBlock.RenderTransform> </TextBlock> <TextBlock Canvas.Top="60" FontSize="32" FontWeight="Bold" Foreground="Maroon" Text="Skewed Text"> <TextBlock.RenderTransform> <SkewTransform AngleX="30" AngleY="0" /> </TextBlock.RenderTransform> </TextBlock> </Canvas>
This next example shows how to increase the AngleX property value of a SkewTransform applied to a Rectangle every time the Rectangle is clicked.
<Rectangle PointerPressed="IncreaseSkew" Width="50" Height="50" Fill="RoyalBlue"> <Rectangle.RenderTransform> <!-- If you give the transform a name you can access it easily from code. --> <SkewTransform x:Name="mySkewTransform" /> </Rectangle.RenderTransform> </Rectangle>
public void IncreaseSkew(object sender, RoutedEventArgs e) { mySkewTransform.AngleX = mySkewTransform.AngleX + 5; }
Requirements
|
Minimum supported client | Windows 8 [Windows Store apps only] |
|---|---|
|
Minimum supported server | Windows Server 2012 [Windows Store apps only] |
|
Namespace |
|
|
Metadata |
|
See also
Build date: 12/4/2012
