views:

38

answers:

0

I have following :

<UserControl x:Class="DemoGarbage.MainPage"
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"
d:DesignHeight="300" d:DesignWidth="400">

<UserControl.Resources>
    <Storyboard x:Name="sbScale">
        <DoubleAnimation x:Name="aniScaleX" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" To="0"/>
        <DoubleAnimation x:Name="aniScaleY" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" To="0"/>
    </Storyboard>
</UserControl.Resources>

<Grid x:Name="Root" Background="Black">                   
    <Grid x:Name="LayoutRoot" ShowGridLines="True" RenderTransformOrigin="0.5,0.5">
       --- here goes the content --- other grids, and so on... ---
    </Grid>                            

</Grid>

I'm trying figure it out how to implement pan feature inside the grid LayoutRoot after i zoom in... Zooming is working fine, but with pan I tried several solutions from stackoverflow and silverlight forums.. but with no luck... All solutions use scroll viewer and canvas to do panning... Is it somehow possible to do it without canvas.. just using XAML above... Maybe i need to mention that Grid LayoutRoot have inside him other grids...

Thanks!

EDIT : I tried with this solution http://stackoverflow.com/questions/2179286/grab-to-pan-in-silverlight-app.. But problem is that when I implement that in my solution, after zooming in, scroll viewer isn't visible...