02-13-2018, 11:41 AM
Hi,
I am trying to add the ZoomPanel to my image editing application. It works so far but I can not seem to figure out how to zoom out past the ZoomPanel boundaries.
Here is an image of my Minimum Zoom, I can not zoom out further than that.
And here is my code:
Can you help?
I am trying to add the ZoomPanel to my image editing application. It works so far but I can not seem to figure out how to zoom out past the ZoomPanel boundaries.
Here is an image of my Minimum Zoom, I can not zoom out further than that.
And here is my code:
Code:
<UserControl x:Class="Electric.View.CanvasView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:ab2d="clr-namespace:Ab2d.Controls;assembly=Ab2d.Controls.ZoomPanel"
xmlns:local="clr-namespace:Electric.View"
DataContext="{Binding Source={StaticResource Locator}, Path=Canvas}"
mc:Ignorable="d"
d:DesignHeight="800" d:DesignWidth="800"
Background="Green">
<Grid>
<ab2d:ZoomPanel Name="ZoomPanel1" ZoomMode="Rectangle" VerticalAlignment="Center" HorizontalAlignment="Center"
ViewboxLimits="0 0 1 1"
ViewboxMinSize="0.1 0.1"
IsViewboxLimited="False"
IsZoomPositionPreserved="True"
Viewbox="0 0 1 1">
<Image
Source="{Binding ViewerImage}"
Width="{Binding ViewerImage.Width}"
Height="{Binding ViewerImage.Height}"/>
</ab2d:ZoomPanel>
<ab2d:ZoomController VerticalAlignment="Top" HorizontalAlignment="Right"/>
<ab2d:ZoomPanelNavigator VerticalAlignment="Top" HorizontalAlignment="Left"/>
<ab2d:ZoomPanelMiniMap VerticalAlignment="Bottom" HorizontalAlignment="Right"/>
</Grid>
</UserControl>
Can you help?