This is a mirror of official site: http://jasper-net.blogspot.com/

How to use Image Zoom In, Zoom Out, and Rotate in Silverlight 4

| Sunday, November 7, 2010
This article will demonstrate Image Zoom In, Zoom Out, Rotate functionality in Silverlight 4. First of all make a new silverlight project using visual studio 2010 and place a project name and save location in local directory. Let's drag and drop one image control and three button on page and add an image using Add Existing Items menu click.

<UserControl x:Class="TestStoryBoard.Test"
   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
   xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
   xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
   mc:Ignorable="d">
   <Grid x:Name="mainCanvas" Height="404" Width="733" Background="Black">
       <Grid.ColumnDefinitions>
           <ColumnDefinition />
           <ColumnDefinition Width="Auto" MinWidth="95" />
       </Grid.ColumnDefinitions>
       <Grid x:Name="grid1" Height="400" Width="636" HorizontalAlignment="Center" VerticalAlignment="Center">
           <Image x:Name="image1"
              Source="orton-nomercy07.jpg"
              Stretch="Uniform"
              HorizontalAlignment="Center" VerticalAlignment="Center"
              RenderTransformOrigin="0.5, 0.5">
               <Image.RenderTransform>
                   <TransformGroup>
                       <RotateTransform x:Name="Rotator"/>
                       <ScaleTransform x:Name="Scale" />
                   </TransformGroup>
               </Image.RenderTransform>
           </Image>
       </Grid>

Read more: C# Corner

Posted via email from .NET Info

0 comments: