Translate Transform : Transform « Windows Presentation Foundation « VB.Net

Home
VB.Net
1.2D
2.Application
3.Class
4.Data Structure
5.Data Types
6.Database ADO.net
7.Date Time
8.Development
9.Event
10.File Directory
11.Generics
12.GUI
13.Internationalization I18N
14.Language Basics
15.LINQ
16.Network Remote
17.Reflection
18.Security
19.Thread
20.Windows Presentation Foundation
21.Windows System
22.XML
23.XML LINQ
VB.Net Tutorial
VB.Net by API
VB.Net » Windows Presentation Foundation » TransformScreenshots 
Translate Transform
Translate Transform
     

<Window x:Class="WPFTransformations.Translate"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  Title="Translate Transform" Height="300" Width="300">
    <Grid>
        <StackPanel Margin="8">
            <ListBox Height="100" Width="200" BorderThickness="2">
                <ListBoxItem Content="Item 1"/>
                <ListBoxItem Content="Item 2"/>
                <ListBoxItem Content="Item 3"/>
                <ListBoxItem Content="Item 4"/>
                <ListBox.RenderTransform>
                    <TranslateTransform X="{Binding Path=Value, ElementName=sliderX}" 
                                        Y="{Binding Path=Value, ElementName=sliderY}"/>
                </ListBox.RenderTransform>
            </ListBox>

            <TextBlock Height="65" Width="100"/>
            <Grid HorizontalAlignment="Center" Margin="2">
                <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition Width="110"/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>

                <TextBlock Grid.Row="0" Grid.Column="0" Text="X:"/>
                <Slider Grid.Row="0" Grid.Column="1" Name="sliderX"/>
                <TextBox Grid.Row="0" Grid.Column="2" Text="{Binding Path=Value, ElementName=sliderX}"/>
            </Grid>
        </StackPanel>
        <StackPanel Margin="8">
            <Rectangle Height="100" Width="200" Stroke="Red" Fill="Red" Opacity=".05"/>
        </StackPanel>
    </Grid>
</Window>

   
    
    
    
    
  
Related examples in the same category
1.RenderTransform sectionRenderTransform section
2.LayoutTransform sectionLayoutTransform section
3.Transformed Buttons with TranslateTransform X/YTransformed Buttons with TranslateTransform X/Y
4.Transformed Buttons with ScaleTransform and ScaleYTransformed Buttons with ScaleTransform and ScaleY
5.Transformed Buttons with SkewTransform and AngleYTransformed Buttons with SkewTransform and AngleY
6.Transformed Buttons with RotateTransform And AngleTransformed Buttons with RotateTransform And Angle
7.Animate Button RenderTransformAnimate Button RenderTransform
8.Animate Button LayoutTransformAnimate Button LayoutTransform
9.ScaleTransformScaleTransform
10.SkewTransform appliedSkewTransform applied
11.Applies a RotateTransform to the brush's Transform propertyApplies a RotateTransform to the brush's Transform property
12.TranslateTransform : LayoutTransform SampleTranslateTransform : LayoutTransform Sample
13.MatrixTransform SampleMatrixTransform Sample
14.Rotate Button Along the center and AngleRotate Button Along the center and Angle
15.Render Tranform
16.Rotate a ButtonRotate a Button
17.Rotate in a circle, then flip, when clickedRotate in a circle, then flip, when clicked
18.RotateTransform AppliedRotateTransform Applied
19.Rotation of content by using RotateTransformRotation of content by using RotateTransform
20.Object Transforms in WPFObject Transforms in WPF
ww__w__._j__a_v___a2_s.c___o__m | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.