Showing posts with label WPF. Show all posts
Showing posts with label WPF. Show all posts

Tuesday, June 25, 2013

Transformations in WPF

It will use to change the position of a control in particular angle is called Transformation.WPF supports three types of
Transformations.
1.Rotate Transformation
2.Skew Transformation
3.Scale Transformation

Example:
Open WPF project
Replace grid with Canvas tag
Type as follows with in the Canvas
<Button.Render.Tranformation>
<Rotate Transform Angle="45"/>
//Skew:
<skew Transform angle x="30" ,angle y="30"/>
//Scale :
<Scale Transform scale x="2" scale y="2"/>

Thursday, November 22, 2012

How to create object reference in Wpf

The creation of object reference in wpf will be easy when we compare with previous version of XAML.In previous versions we have to declare and binding Element name .In updated XAML we can used X:Reference to create object reference
<Label Target="{Binding ElementName=OId}">OrderId</Label>
<TextBox x:Name="Oid" />

 updated version:
<Label Target="{x:Reference Oid}">OrderId</Label>
<TextBox x:Name="Oid" />
<Label Target="{x:Reference Oname}">OrderName</Label>
<TextBox x:Name="Oname" />
<Label Target="{x:Reference Oslaes}">Sales</Label>
<TextBox x:Name="Osales" />
 
Note:The XAML X:Reference can supported in WPF frame work.In  XAML 2006 we have to use binding to reference the object
 

Bel