|
@@ -94,27 +94,33 @@
|
|
|
LockRotation="{Binding Document.TransformViewModel.LockRotation}"
|
|
|
InternalState="{Binding Document.TransformViewModel.InternalState, Mode=TwoWay}"
|
|
|
ZoomboxScale="{Binding Zoombox.Scale}" />
|
|
|
+ <Grid IsHitTestVisible="False" SnapsToDevicePixels="True"
|
|
|
+ ShowGridLines="True" Width="{Binding Document.Width}" Height="{Binding Document.Height}" Panel.ZIndex="10"
|
|
|
+ Visibility="{Binding GridLinesVisible, Converter={converters:BoolToVisibilityConverter}, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:Viewport}}">
|
|
|
+ <Grid.Resources>
|
|
|
+ <converters:ThresholdVisibilityConverter Threshold="10" x:Key="ThresholdVisibilityConverter"/>
|
|
|
+ </Grid.Resources>
|
|
|
+ <Rectangle Focusable="False" Visibility="{Binding Zoombox.Scale, Converter={StaticResource ThresholdVisibilityConverter}}">
|
|
|
+ <Rectangle.Fill>
|
|
|
+ <VisualBrush Viewport="{Binding Document.Height, Converter={converters:IntToViewportRectConverter}, ConverterParameter=vertical}" ViewboxUnits="Absolute" TileMode="Tile" >
|
|
|
+ <VisualBrush.Visual>
|
|
|
+ <Line X1="0" Y1="0" X2="0" Y2="1" Stroke="#88888888" StrokeThickness="{Binding Zoombox.Scale, Converter={converters:ReciprocalConverter}}"/>
|
|
|
+ </VisualBrush.Visual>
|
|
|
+ </VisualBrush>
|
|
|
+ </Rectangle.Fill>
|
|
|
+ </Rectangle>
|
|
|
+ <Rectangle Focusable="False" Visibility="{Binding Zoombox.Scale, Converter={StaticResource ThresholdVisibilityConverter}}">
|
|
|
+ <Rectangle.Fill>
|
|
|
+ <VisualBrush Viewport="{Binding Document.Height, Converter={converters:IntToViewportRectConverter}}" ViewboxUnits="Absolute" TileMode="Tile" >
|
|
|
+ <VisualBrush.Visual>
|
|
|
+ <Line X1="0" Y1="0" X2="1" Y2="0" Stroke="#88888888" StrokeThickness="{Binding Zoombox.Scale, Converter={converters:ReciprocalConverter}}"/>
|
|
|
+ </VisualBrush.Visual>
|
|
|
+ </VisualBrush>
|
|
|
+ </Rectangle.Fill>
|
|
|
+ </Rectangle>
|
|
|
+ </Grid>
|
|
|
</Grid>
|
|
|
</Border>
|
|
|
</zoombox:Zoombox>
|
|
|
- <Grid
|
|
|
- Focusable="False">
|
|
|
- <Grid.ColumnDefinitions>
|
|
|
- <ColumnDefinition
|
|
|
- Width="1*" />
|
|
|
- <ColumnDefinition
|
|
|
- Width="2*" />
|
|
|
- <ColumnDefinition
|
|
|
- Width="1*" />
|
|
|
- </Grid.ColumnDefinitions>
|
|
|
- <Grid.RowDefinitions>
|
|
|
- <RowDefinition
|
|
|
- Height="1*" />
|
|
|
- <RowDefinition
|
|
|
- Height="2*" />
|
|
|
- <RowDefinition
|
|
|
- Height="1*" />
|
|
|
- </Grid.RowDefinitions>
|
|
|
- </Grid>
|
|
|
</Grid>
|
|
|
</UserControl>
|