-
Notifications
You must be signed in to change notification settings - Fork 90
/
PanZoomPage.xaml
25 lines (21 loc) · 1.29 KB
/
PanZoomPage.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<UserControl
x:Class="PixelLab.SL.Demo.PanZoomPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:bot="http://schemas.thinkpixellab.com/2011/xaml/presentation"
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">
<Grid x:Name="LayoutRoot" Background="White">
<bot:PanZoomControl x:Name="PanZoom" Background="Transparent" MajorGridLineColor="#ebf4e9" MinorGridLineColor="#ebf4e9">
<bot:AsBigAsYouWantPanel SizeChanged="AsBigAsYouWantPanel_SizeChanged">
<TextBlock Text="Monkey!" FontSize="50" />
</bot:AsBigAsYouWantPanel>
</bot:PanZoomControl>
<StackPanel Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Right">
<Button Content="1:1" Command="{Binding Path=ResetCommand, ElementName=PanZoom}" Padding="5" />
<bot:DiscreteSlider x:Name="ZoomSlider" Minimum="0.2" Maximum="2" SmallChange="0.2" LargeChange="0.2" Value="{Binding Path=Scale, ElementName=PanZoom, Mode=TwoWay}" Width="200" />
</StackPanel>
</Grid>
</UserControl>