How to Assing Scale and Rotate Transform.

Jun 24, 2011 at 3:33 PM

Hello Guys I am Using WriteableBitmapEx and I am phasing problem to assing RotateTransform and ScaleTransform.

suppose I have two Image Image1 and Image2,

and my Image1 like this.

<Image.RenderTransform> 
	<TransformGroup> 
		<RotateTransform x:Name="Rotator"> 
			<RotateTransform.Angle> 
				<Binding ElementName="sldVerHorizontal" Path="Value" Mode="TwoWay"/> 
			</RotateTransform.Angle> 
		</RotateTransform> 
		
		<ScaleTransform x:Name="Scale">
		 	<ScaleTransform.ScaleX> 
				<Binding ElementName="sldZoomInOut" Path="Value" Mode="TwoWay"/>
			</ScaleTransform.ScaleX>
		 	<ScaleTransform.ScaleY> 
				<Binding ElementName="sldZoomInOut" Path="Value" Mode="TwoWay"/>
		 	</ScaleTransform.ScaleY>
	 	</ScaleTransform> 
	</TransformGroup> 
</Image.RenderTransform> 
Rotating.

Rotator.Angle -= 90;

 

Rotator.Angle += 90;

 
 ZoomIn.

Scale.ScaleX += 0.01;

Scale.ScaleY += 0.01;

 

Zoomout

Scale.ScaleX -= 0.01;

Scale.ScaleY -= 0.01;

 
So I am assing the value like this 
image2.RenderTransform = image1.RenderTransform
it will not work correct me..
Thanks...!!