How can I calculate relative position of my elements (Lift, LArmPosition, PArmPosition) in code behind, where their position depends on the Canvas Width(X) and Height(Y) and the Width(X) and Height(Y) from other/same elements(Lift, LArmPosition, PArmPosition, Rectanngle).
I have absolute values now, for example max (570) and min (80), which are hard coded, for moving my elements left, right, up and down.
Here is my XAML:
<UserControl x:Class="WPF_AnimatedLift.View.Prozess"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:WPF_AnimatedLift.View" xmlns:viewmodel="clr-namespace:WPF_AnimatedLift.ViewModel"
mc:Ignorable="d"
d:DesignHeight="600" d:DesignWidth="1000" Background="WhiteSmoke">
<Canvas x:Name="MyCanvas" Margin="0,0,-163,-83">
<Path x:Name="Lift" Fill="#FF808080" Data="m 67.621819 110.44866 v 16.55811 H 176.13074 v -16.55811 z m 0.143117 16.70929 v 1.59777 h 0.743496 v 4.86682 h 18.534155 v -4.86682 H 140.4094 v 4.84489 h 18.53416 v -4.84489 h 17.04716 v -1.59777 z m 93.167904 1.59774 c 0.10872 56.40049 0.026 57.01222 0.026 57.01222 l 15.18908 17.62703 -0.005 -74.7721 -15.21024 0.13288" Canvas.Left="600.622" Canvas.Top="{Binding LiftScreenPosition, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Height="175.277" Stretch="Fill" Width="185.378"/>
<Rectangle Canvas.Left="786" Width="150" Height="449" Fill="#FFB3B3B3" StrokeThickness="0.264583" Canvas.Top="114" x:Name="Rectanngle"/>
<Path x:Name="LArmPosition" Fill="#FFB3B3B3" StrokeThickness="0.251214" Stroke="#FF000000" StrokeMiterLimit="4" Data="M 83.254456 115.22409 H 118.4004 v 17.92124 H 83.254456 Z m -10.289864 17.79897 h 55.592058 v 3.17904 H 72.964592 Z m -3.608147 3.17904 h 62.140165 v 39.12671 H 69.356445 Z" Height="70" Canvas.Left="{Binding LArmPositionX, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Stretch="Fill" Canvas.Top="{Binding LArmPositionY, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Width="78"/>
<Rectangle Canvas.Left="{Binding PArmPositionX, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Canvas.Top="{Binding LiftScreenPosition, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Width="214" Height="15" x:Name="PArmPosition" Fill="#FFCCCCCC" StrokeThickness="0.264583"/>
<Path x:Name="ClampR" Fill="#FF000000" StrokeThickness="2.12787" Data="M 524.2207 473.57227 L 524.2207 563.57227 L 137.14258 563.57227 L 137.14258 652.14258 L 571.42773 652.14258 L 571.42773 563.57227 L 571.36328 563.57227 L 571.36328 473.57227 L 524.2207 473.57227 z " Height="63.65" Stretch="Fill" Width="115.168" Canvas.Left="{Binding RightClampPositionX}" Canvas.Top="{Binding ClampsPositionY}" >
<Path.LayoutTransform>
<TransformGroup>
<ScaleTransform ScaleY="0.265" ScaleX="0.265"/>
<SkewTransform/>
<RotateTransform CenterX="0.5" CenterY="0.5" Angle="{Binding ClampRechtsAngle}"/>
<TranslateTransform/>
</TransformGroup>
</Path.LayoutTransform>
</Path>
<Path x:Name="ClampL" Fill="#FF000000" StrokeThickness="2.12787" Data="M 110 344.28516 L 110 434.28516 L 110 485.71484 L 110 522.85742 L 544.28516 522.85742 L 544.28516 434.28516 L 157.14258 434.28516 L 157.14258 344.28516 L 110 344.28516 z " Height="63.908" Stretch="Fill" Width="113.752" Canvas.Left="{Binding LeftClampPositionX}" Canvas.Top="{Binding ClampsPositionY}">
<Path.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleY="0.265" ScaleX="0.265"/>
<SkewTransform/>
<RotateTransform Angle="{Binding ClampLinksAngle}"/>
<TranslateTransform/>
</TransformGroup>
</Path.RenderTransform>
</Path>
<TextBox Height="30" Canvas.Left="176" TextWrapping="Wrap" Canvas.Top="203" Width="120" FontSize="20" Text="{Binding PArmPositionInput, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
<Label Content="PArmPosition" Canvas.Left="65" Canvas.Top="204" FontWeight="Bold" FontSize="15"/>
<TextBox x:Name="TxtBoxY" Height="30" Canvas.Left="156" TextWrapping="Wrap" Canvas.Top="84" Width="120" FontSize="20" Text="{Binding LiftPosInput, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" UndoLimit="600"/>
<Label Content="LiftPosition" Canvas.Left="48" Canvas.Top="84" FontWeight="Bold" FontSize="15" Width="104"/>
<Button Content="START" Canvas.Left="135" Canvas.Top="403" Width="106" Height="48" FontSize="30" FontWeight="Bold" Command="{Binding StartCommand}"/>
<Button Content="{Binding ButtonMessage}" Canvas.Left="135" Canvas.Top="486" Width="200" FontSize="20" Height="37" Command="{Binding ChangeClampStateCommand}"/>
<TextBox Height="30" Canvas.Left="179" TextWrapping="Wrap" Canvas.Top="313" Width="120" FontSize="20" Text="{Binding LArmPositionInput, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
<Label Content="LArmPosition" Canvas.Left="69" Canvas.Top="314" FontWeight="Bold" FontSize="15"/>
</Canvas>
<UserControl.DataContext>
<viewmodel:ProzessViewModel/>
</UserControl.DataContext>
</UserControl>
You set the position of an element relative to the top-left corner of the parent Canvas using the Canvas.Left and Canvas.Top attached properties.
Related
So I am trying to flip an image and a canvas within a Grid with other canvas and label, but other canvas object mouse move coordinate system is affected.
Using rendertransform.scaletransform to flip the image and a canvas also flips the coordinate system of the canvas with MeasurementControl (named CanvasOverlay). Just don't understand why.
My understanding is that a transform will act on the object it is contained in and not other objects. But clearly that is not the case.
One other key is that the interaction.trigger is changing the transform property ProbeAlignRight to either 1 or -1. This should flip the image and the canvas with ellipse and polygon. Problem is that CanvasOverlay is not flipped but when the control is moved it moves mirrored to the mouse. Clearly it is flipped the coordinate system from upper left 0,0 to upper right. This is so confusing.
<Grid>
<Image Name="usimagesrc" Source="{Binding UltrasoundImageSource, Converter={StaticResource nullValueConverter}}" Height="512" Width="512"
RenderTransformOrigin="0.5,0.5">
<Image.RenderTransform>
<ScaleTransform ScaleX="{Binding ProbeAlignRight}"/>
</Image.RenderTransform>
</Image>
<Canvas RenderTransformOrigin="0.5,0.5" Focusable="True" Height="25" VerticalAlignment="Top">
<Ellipse x:Name="circleFrench" Height="25" Width="25" Fill="{DynamicResource StepperButtonBlueBorderBrush}" HorizontalAlignment="Left" VerticalAlignment="Top" />
<Polygon Points="0,0 0.05,0.5 0,1 0.5,0.5" Fill="{DynamicResource StepperButtonBlueBorderBrush}" Width="25" Height="25" Stretch="Fill" HorizontalAlignment="Left" VerticalAlignment="Top" Canvas.Left="25" />
<Canvas.RenderTransform>
<ScaleTransform ScaleX="{Binding ProbeAlignRight}" />
</Canvas.RenderTransform>
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseDown" >
<i:InvokeCommandAction Command="{Binding _flipImageCommandObj}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</Canvas>
<Canvas>
<Label Canvas.Top="-2" Canvas.Left="18" Style="{DynamicResource InstructionsLabel}" Content="{lex:Loc DragMeasurementCircle}" Visibility="{Binding EnableMeasurementMessage, Converter={StaticResource BooleanToVisibilityConverter}}"/>
</Canvas>
<Canvas x:Name="CFMBoxCanvas" ClipToBounds="True" />
<UIUtilities:UltrasoundDepthGauge x:Name="DepthGauge" Opacity=".4" DepthInCentimeters="{Binding DepthInCentimeters}"/>
<Canvas x:Name="CanvasOverlay" Visibility="{Binding EnableMeasureController, Converter={StaticResource BooleanToVisibilityConverter}}" >
<UIUtilities:MeasurementControl x:Name="MeasurementTool" Canvas.Top="100" Canvas.Left="300"/>
</Canvas>
<Label Content="{Binding DepthString}" Foreground="White" FontSize="16" FontWeight="Bold" VerticalAlignment="Bottom" HorizontalAlignment="Center" Background="Black"/>
</Grid>
i am trying to make a ListBox that contains a string at right side of Item and one in left side i've tried this but those string become over each other.
<ListBox Name="ChaptersList" Height="200" Margin="10,10,10,0" VerticalAlignment="Top" SelectionChanged="ChaptersList_SelectionChanged" MouseDoubleClick="ChaptersList_MouseDoubleClick" RenderTransformOrigin="0.5,0.5" TextOptions.TextHintingMode="Animated">
<ListBox.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform/>
<TranslateTransform/>
</TransformGroup>
</ListBox.RenderTransform>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>
<Label Content="{Binding Path=Title}" VerticalAlignment="Center" Margin="5"/>
<Label Content="{Binding Path=Name}" HorizontalAlignment="Right" Margin="5"/>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
(my first string should be multiline)
You can use Grid with two rows (where Height is set to Auto) and to text wrapping behaviour you must add ScrollViewer.HorizontalScrollBarVisibility="Disabled" property to ListBox.
<ListBox Name="ChaptersList"
Height="250" Margin="10,10,10,0" VerticalAlignment="Top" RenderTransformOrigin="0.5,0.5" TextOptions.TextHintingMode="Animated"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
>
<ListBox.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform/>
<TranslateTransform/>
</TransformGroup>
</ListBox.RenderTransform>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Text="{Binding Path=Title}" TextWrapping="Wrap" HorizontalAlignment="Left" Margin="5"/>
<TextBlock Grid.Row="1" Text="{Binding Path=Name}" HorizontalAlignment="Right" Margin="5"/>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
Use StackPanel:
<ListBox Name="ChaptersList" Height="200" Margin="10,10,10,0" VerticalAlignment="Top" SelectionChanged="ChaptersList_SelectionChanged" MouseDoubleClick="ChaptersList_MouseDoubleClick" RenderTransformOrigin="0.5,0.5" TextOptions.TextHintingMode="Animated">
<ListBox.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform/>
<TranslateTransform/>
</TransformGroup>
</ListBox.RenderTransform>
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Label Content="{Binding Path=Title}" VerticalAlignment="Center" Margin="5"/>
<Label Content="{Binding Path=Name}" HorizontalAlignment="Right" Margin="5"/>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
EDIT: i've found an easy solution: using Expression Blend end edit Template. it gives you a designer to adjust layouts.
I have a listbox with ~20 items.If orientation is portait the margin of the grid must be "140,25,5,0" and width of stackpanel inside 320
If orientation is landscape margin must be "350,25,5,0" and width of stackpanel is 450.How I can change it dinamically such as conversation view in WP7?
<Grid x:Name="LayoutRoot" >
<ListBox ScrollViewer.VerticalScrollBarVisibility="Disabled" x:Name="listmy">
<ListBox.ItemTemplate>
<DataTemplate>
<local:TypeMessage Content="{Binding}">
<local:TypeMessage.Me>
<DataTemplate>
<Grid HorizontalAlignment="Right" Margin="350,25,5,0">
<TextBlock HorizontalAlignment="Right" Margin="0,-25,30,0" TextWrapping="Wrap" Text="Вы" VerticalAlignment="Top"/>
<StackPanel Background="{StaticResource PhoneAccentBrush}" Width="320">
<TextBlock TextWrapping="Wrap" Foreground="{Binding read_state, Converter={StaticResource ReadConverter}}" Text="{Binding text}" Margin="5,3" />
<TextBlock Text="{Binding date_time}" TextAlignment="Right" Margin="5,0"/>
</StackPanel>
<Path Data="m 0,0 l 16,0 l 0,16 l -16,-16"
Fill="{StaticResource PhoneAccentBrush}"
HorizontalAlignment="Right" UseLayoutRounding="False" d:LayoutOverrides="VerticalAlignment, GridBox" Height="16" VerticalAlignment="Top" Margin="0,-15.167,8.757,0" RenderTransformOrigin="0.5,0.5">
<Path.RenderTransform>
<CompositeTransform Rotation="91.157"/>
</Path.RenderTransform>
</Path>
</Grid>
</DataTemplate>
</local:TypeMessage.Me>
<local:TypeMessage.You>
<DataTemplate>
<Grid Margin="5,25,30,0" >
<Path Data="m 0,0 l 0,16 l 16,0 l -16,-16"
Fill="{StaticResource PhoneAccentBrush}"
Margin="9.5,-16,0,0" UseLayoutRounding="False" Height="16" VerticalAlignment="Top" d:LayoutOverrides="VerticalAlignment" HorizontalAlignment="Left"/>
<StackPanel Background="{StaticResource PhoneAccentBrush}" Width="320">
<TextBlock TextWrapping="Wrap" Foreground="{Binding read_state,Converter={StaticResource ReadConverter}}" Text="{Binding text}" />
<TextBlock TextAlignment="Right" Text="{Binding date_time}" />
</StackPanel>
<TextBlock HorizontalAlignment="Left" Margin="28,-27,0,0" TextWrapping="Wrap" Text="{Binding author_name}" VerticalAlignment="Top"/>
</Grid>
</DataTemplate>
</local:TypeMessage.You>
</local:TypeMessage>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
You could detect the orientation change (in the OnOrientationChanged event) and adjust the margins accordingly.
In terms of working with lots of items.
If items share the same margins you could bind the values and update the VM in the event handler.
If everything has a different margin it may be appropriate to use a different template for each orientation.
Alterntively you could look to move to a more fluid layout. Without seeing what the actual design(s) should be it's not posible to say how suitable this may be though.
In the following:
<Rectangle Height="60" HorizontalAlignment="Left" Margin="50,100,0,0" Name="rectangle2" Stroke="Black" VerticalAlignment="Top" Width="60" >
<Rectangle.RenderTransform>
<TransformGroup>
<RotateTransform Angle="45" CenterX="30" CenterY="30"/>
</TransformGroup>
</Rectangle.RenderTransform>
To rotate the rectangle on its centre I have to set the CenterX and Y to half of the Rectangle's size. Is there a way to do that in markup?
Something like CenterX="{Binding Path=Width\2}" ?
You can set RenderTrasformOrigin property on the Rectangle itself:
<Rectangle Height="60" HorizontalAlignment="Left" Margin="50,100,0,0" Name="rectangle2"
Stroke="Black" VerticalAlignment="Top" Width="60"
RenderTrasformOrigin="0.5,0.5">
<Rectangle.RenderTransform>
<TransformGroup>
<RotateTransform Angle="45" />
</TransformGroup>
</Rectangle.RenderTransform>
I am trying to model the layout that is displayed in this image.
If you take a look, it has a number of textBoxes/checkboxes/buttons, a couple of diagonal controls, and another separate control (in a red outline).
The bottom screenshot shows what I would like to happen when a checkbox is checked in that separate control.
Any tips on how to lay this out and handle those diagonal portions? I tried just rotating textBlocks with borders but then the borders remain as rectangular, not cut off as in the image. I also had some trouble with getting them to position properly. I would also need the width of those diagonal sections to be bound somehow to the checkbox/textBox portion of that separate control in the red border.
Is my only choice to rotate borderless textBlocks and draw the lines myself using Paths and for the width expanding, bind it to some property of my separate control?
Thanks for any advice.
This looked like a fun challenge. Give the following XAML a try. It will automatically adjust the size of the columns as the content expands. The key is placing some canvas elements in a grid to allow the lines of the borders to flow into the adjacent cells. This could certainly be cleaned up with some styles and will be a little fragile if you need to tweak the sizes, but I think it demonstrates the approach:
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="ButtonStyleTestApp.MainWindow"
x:Name="Window"
Title="MainWindow"
Width="640" Height="480">
<Grid x:Name="LayoutRoot" Background="#FF44494D" SnapsToDevicePixels="True">
<Grid.Resources>
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
</Grid.Resources>
<Grid Background="#DDD">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition MinWidth="30" Width="Auto"/>
<ColumnDefinition MinWidth="30" Width="Auto"/>
<ColumnDefinition MinWidth="30" Width="Auto"/>
<ColumnDefinition MinWidth="30" Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="60"/>
<RowDefinition Height="30"/>
</Grid.RowDefinitions>
<Border BorderThickness="1 1 0 1" BorderBrush="#888" Grid.Column="0" Grid.Row="1">
<TextBox Margin="10 5" VerticalAlignment="Center"/>
</Border>
<Border BorderThickness="1 1 0 1" BorderBrush="#888" Grid.Column="1" Grid.Row="1">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<CheckBox x:Name="CheckBox1" Margin="5" VerticalAlignment="Center"></CheckBox>
<TextBox Visibility="{Binding IsChecked, ElementName=CheckBox1, Converter={StaticResource BooleanToVisibilityConverter}}" Width="100" Margin="5" VerticalAlignment="Center"/>
</StackPanel>
</Border>
<Border BorderThickness="1 1 0 1" BorderBrush="#888" Grid.Column="2" Grid.Row="1">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<CheckBox x:Name="CheckBox2" Margin="5" VerticalAlignment="Center"></CheckBox>
<TextBox Visibility="{Binding IsChecked, ElementName=CheckBox2, Converter={StaticResource BooleanToVisibilityConverter}}" Width="100" Margin="5" VerticalAlignment="Center"/>
</StackPanel>
</Border>
<Border BorderThickness="1 1 0 1" BorderBrush="#888" Grid.Column="3" Grid.Row="1">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<CheckBox x:Name="CheckBox3" Margin="5" VerticalAlignment="Center"></CheckBox>
<TextBox Visibility="{Binding IsChecked, ElementName=CheckBox3, Converter={StaticResource BooleanToVisibilityConverter}}" Width="100" Margin="5" VerticalAlignment="Center"/>
</StackPanel>
</Border>
<Border BorderThickness="1" BorderBrush="#888" Grid.Column="4" Grid.Row="1">
<Button Margin="3" FontSize="10" VerticalAlignment="Center" Width="40">Click</Button>
</Border>
<Canvas Grid.Column="1">
<Grid ClipToBounds="False" Canvas.Top="30">
<Border
BorderBrush="#888"
BorderThickness="0 1 0 0"
RenderTransformOrigin="0 0"
Height="20"
Width="100"
Margin="0 0 0 -80">
<Border.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="-45"/>
<TranslateTransform/>
</TransformGroup>
</Border.RenderTransform>
<TextBlock VerticalAlignment="Center" TextAlignment="Left" Margin="21 1 1 1" FontSize="11">
Testing 1
</TextBlock>
</Border>
</Grid>
</Canvas>
<Canvas Grid.Column="2">
<Grid ClipToBounds="False" Canvas.Top="30">
<Border
BorderBrush="#666"
BorderThickness="0 1 0 0"
RenderTransformOrigin="0 0"
Height="20"
Width="100"
Margin="0 0 0 -80">
<Border.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="-45"/>
<TranslateTransform/>
</TransformGroup>
</Border.RenderTransform>
<TextBlock VerticalAlignment="Center" TextAlignment="Left" Margin="21 1 1 1" FontSize="11">
Testing 2
</TextBlock>
</Border>
</Grid>
</Canvas>
<Canvas Grid.Column="3">
<Grid ClipToBounds="False" Canvas.Top="30">
<Border
BorderBrush="#666"
BorderThickness="0 1 0 0"
RenderTransformOrigin="0 0"
Height="20"
Width="100"
Margin="0 0 0 -80">
<Border.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="-45"/>
<TranslateTransform/>
</TransformGroup>
</Border.RenderTransform>
<TextBlock VerticalAlignment="Center" TextAlignment="Left" Margin="21 1 1 1" FontSize="11">
Testing 3
</TextBlock>
</Border>
</Grid>
</Canvas>
<Canvas Grid.Column="4">
<Grid ClipToBounds="False" Canvas.Top="30">
<Border
BorderBrush="#666"
BorderThickness="0 1 0 0"
RenderTransformOrigin="0 0"
Height="20"
Width="100"
Margin="0 0 0 -80">
<Border.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="-45"/>
<TranslateTransform/>
</TransformGroup>
</Border.RenderTransform>
</Border>
</Grid>
</Canvas>
</Grid>
</Grid>
</Window>
I hope it helps.
It's definitely doable with borders and textblocks but it's tedious.
you'd have to play with negative margins a lot.
You could work it out with images instead of borders but you still need the textblocks on an angle using rendertransform
I'd definitely approach it using a Grid with a lot of columns of width Auto, place the easy components first then the tricky ones and do the rotations + neg margins last.
HTH.
As far as handling the diagonal elements goes, try putting the TextBlock within a Border, and transforming the border with a RotateTransform and SkewTransform. This should get you started:
<Grid HorizontalAlignment="Left" Height="100" Margin="64,60.5,0,0" VerticalAlignment="Top" Width="100" Background="Blue">
<Border BorderBrush="Black" BorderThickness="1" Margin="20,25.5,20.5,41.5" RenderTransformOrigin="0.5,0.5">
<Border.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform AngleY="20"/>
<RotateTransform Angle="90"/>
<TranslateTransform/>
</TransformGroup>
</Border.RenderTransform>
<TextBlock TextWrapping="Wrap" Text="TextBlock" RenderTransformOrigin="0.5,0.5">
<TextBlock.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="180"/>
<TranslateTransform/>
</TransformGroup>
</TextBlock.RenderTransform>
</TextBlock>
</Border>
</Grid>