Object Transforms in WPF : Transform « Windows Presentation Foundation « VB.Net Tutorial






<Window x:Class="WpfApplication1.ObjectMatrixTransforms"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  Title="Object Matrix Transforms" Height="300" Width="400">
  <StackPanel>
    <Button Click="BtnClose_Click" Margin="15,0,15,5">Close</Button>
    <Canvas Name="canvas1" ClipToBounds="True" Width="270" Height="280">
    <TextBlock Canvas.Top="53" Canvas.Left="90">Original shape</TextBlock>
    <Rectangle Canvas.Top="70" Canvas.Left="100" Width="50" Height="70" Stroke="Black" StrokeThickness="2"
            StrokeDashArray="3,1" />
    <Rectangle Name="rect" Canvas.Top="70" Canvas.Left="100" Width="50" Height="70" Fill="LightCoral"
            Opacity="0.5" Stroke="Black" StrokeThickness="2">
        <Rectangle.RenderTransform>
          <MatrixTransform x:Name="matrixTransform" />
        </Rectangle.RenderTransform>
    </Rectangle>
    </Canvas>
  </StackPanel>
</Window>
//File:Window.xaml.vb

Imports System
Imports System.Windows
Imports System.Windows.Controls
Imports System.Windows.Media
Imports System.Windows.Shapes

Namespace WpfApplication1
  Public Partial Class ObjectMatrixTransforms
    Inherits Window
    Public Sub New()
      InitializeComponent()
    End Sub
    Public Sub BtnClose_Click(sender As Object, e As EventArgs)
      Dim m As New Matrix()
      m.M11 = 1
      m.M12 = 0
      m.M21 = 0
      m.M22 = 1
      m.OffsetX = 1
      m.OffsetY = 2
      matrixTransform.Matrix = m
    End Sub

  End Class
End Namespace
WPF Object Transforms In W P F








16.84.Transform
16.84.1.RenderTransform sectionRenderTransform section
16.84.2.LayoutTransform sectionLayoutTransform section
16.84.3.Transformed Buttons with TranslateTransform X/YTransformed Buttons with TranslateTransform X/Y
16.84.4.Transformed Buttons with ScaleTransform and ScaleYTransformed Buttons with ScaleTransform and ScaleY
16.84.5.Transformed Buttons with SkewTransform and AngleYTransformed Buttons with SkewTransform and AngleY
16.84.6.Transformed Buttons with RotateTransform And AngleTransformed Buttons with RotateTransform And Angle
16.84.7.Animate Button RenderTransformAnimate Button RenderTransform
16.84.8.Animate Button LayoutTransformAnimate Button LayoutTransform
16.84.9.Translate TransformTranslate Transform
16.84.10.ScaleTransformScaleTransform
16.84.11.SkewTransform appliedSkewTransform applied
16.84.12.Applies a RotateTransform to the brush's Transform propertyApplies a RotateTransform to the brush's Transform property
16.84.13.TranslateTransform : LayoutTransform SampleTranslateTransform : LayoutTransform Sample
16.84.14.MatrixTransform SampleMatrixTransform Sample
16.84.15.Rotate Button Along the center and AngleRotate Button Along the center and Angle
16.84.16.Render TranformRender Tranform
16.84.17.Rotate a ButtonRotate a Button
16.84.18.Rotate in a circle, then flip, when clickedRotate in a circle, then flip, when clicked
16.84.19.RotateTransform AppliedRotateTransform Applied
16.84.20.Rotation of content by using RotateTransformRotation of content by using RotateTransform
16.84.21.Object Transforms in WPFObject Transforms in WPF