<UserControl x:Class="StructureHelper.Windows.UserControls.WorkPlanes.GridLayer"
             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:local="clr-namespace:StructureHelper.Windows.UserControls.WorkPlanes"
             mc:Ignorable="d" 
             d:DataContext="{d:DesignInstance local:WorkPlaneRootViewModel}"
             x:Name="GridRoot"
             d:DesignHeight="450" d:DesignWidth="800">
    <Grid>
        <Canvas>
            <Canvas.Background>
                <VisualBrush TileMode="Tile"
                         Viewport="{Binding CanvasViewportSize, ElementName=GridRoot}"
                         ViewportUnits="Absolute"
                         Viewbox="{Binding CanvasViewportSize, ElementName=GridRoot}"
                         ViewboxUnits="Absolute">
                    <VisualBrush.Visual>
                        <Rectangle
                        Width="{Binding GridSize, ElementName=GridRoot}"
                        Height="{Binding GridSize, ElementName=GridRoot}"
                        Stroke="{Binding GridColorBrush, ElementName=GridRoot}"
                        StrokeThickness="{Binding GridLineThickness, ElementName=GridRoot}" />
                    </VisualBrush.Visual>
                </VisualBrush>
            </Canvas.Background>
        </Canvas>
    </Grid>
</UserControl>
