There is A tool For Wpf which can do Zoom Panning and also can give zoom in Zoomout effect in animated version but it is a Paid Tool for 69$ something
http://www.wpf-graphics.com/ZoomPanel.aspx[
^]
There is also a method to give Zoom effect to Image in C# codes goes this way
note use any Image I hv used Sketch.jpg here
In Xmal
<Window x:Class="MoveAndZoom.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="500" Width="500">
<Canvas Grid.Row="1" Grid.Column="1" Grid.RowSpan="2" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" x:Name="ImageHolder" >
<Image Canvas.Left="0" MouseWheel="Img_MouseWheel" MouseMove="Img_MouseMove"
MouseDown="Img_MouseDown" MouseUp="Img_MouseUp" Panel.ZIndex="0"
Cursor="Hand" Canvas.Top="0" Height="150" Width="150" Source="sketch.jpg"
x:Name="Img">
</Image>
</Canvas>
</Window>
and the Code Behind are
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace MoveAndZoom
{
public partial class Window1 : Window
{
Point p;
public Window1()
{
InitializeComponent();
}
private void Img_MouseWheel(object sender, MouseWheelEventArgs e)
{
Img.Height += e.Delta;
Img.Width += e.Delta;
}
private void Img_MouseMove(object sender, MouseEventArgs e)
{
Point x = e.GetPosition(ImageHolder);
if (e.LeftButton == MouseButtonState.Pressed)
{
Canvas.SetLeft(Img, Canvas.GetLeft(Img) + (x.X - p.X));
Canvas.SetTop(Img, Canvas.GetTop(Img) + (x.Y - p.Y));
}
p = x;
}
private void Img_MouseDown(object sender, MouseButtonEventArgs e)
{
Img.CaptureMouse();
p = e.GetPosition(ImageHolder);
}
private void Img_MouseUp(object sender, MouseButtonEventArgs e)
{
Img.ReleaseMouseCapture();
}
}
}
U can use the Same codes for Videos too