<?xml version="1.0" encoding="utf-8"?>
<UserControl
    x:Class="Sonex.Client.Controls.SceneCanvas.SceneCanvasToolBar"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="using:Sonex.Client.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <controls:ToolBar>
        <controls:ToolBarGroup x:Name="_EditGroup" Title="Edit">
                <Grid ColumnSpacing="6" RowSpacing="6" HorizontalAlignment="Center">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                <controls:ToolBarButton x:Name="_EditUndoButton" Grid.Row="0" Grid.Column="0" Click="UndoButton_Click" ToolTipService.ToolTip="Undo (Ctrl+Z)" IconSource="/Assets/Icons8/icons8-undo-18.png" />
                <controls:ToolBarButton x:Name="_EditCloneButton" Grid.Row="0" Grid.Column="1" Click="CloneButton_Click" ToolTipService.ToolTip="Clone (Ctrl+D)" IconSource="/Assets/Icons8/icons8-new-copy-18.png" />
                <controls:ToolBarButton x:Name="_EditDeleteButton" Grid.Row="0" Grid.Column="2" Click="DeleteButton_Click" ToolTipService.ToolTip="Delete (Delete)" IconSource="/Assets/Icons8/icons8-delete-18.png" />

                <controls:ToolBarButton x:Name="_EditCutButton" Grid.Row="1" Grid.Column="0" Click="CutButton_Click" ToolTipService.ToolTip="Cut (Ctrl+X)" IconSource="/Assets/Icons8/icons8-cut-18.png" />
                <controls:ToolBarButton x:Name="_EditCopyButton" Grid.Row="1" Grid.Column="1" Click="CopyButton_Click" ToolTipService.ToolTip="Copy (Ctrl+C)" IconSource="/Assets/Icons8/icons8-copy-18.png" />
                <controls:ToolBarButton x:Name="_EditPasteButton" Grid.Row="1" Grid.Column="2" Click="PasteButton_Click" ToolTipService.ToolTip="Paste (Ctrl+V)" IconSource="/Assets/Icons8/icons8-paste-18.png" />
                </Grid>
            </controls:ToolBarGroup>

            <controls:ToolBarGroup x:Name="_ToolsGroup" Title="Tools">
                <Grid ColumnSpacing="6" RowSpacing="6" HorizontalAlignment="Center">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>

                <controls:ToolBarButton x:Name="_AddVerticalGuideButton" Grid.Row="0" Grid.Column="0" Click="AddVerticalGuideButton_Click" ToolTipService.ToolTip="Add vertical guide (Ctrl+Shift+G)" IconSource="/Assets/Icons8/icons8-border-vertical-18.png" />
                <controls:ToolBarButton x:Name="_AddHorizontalGuideButton" Grid.Row="0" Grid.Column="1" Click="AddHorizontalGuideButton_Click" ToolTipService.ToolTip="Add horizontal guide (Ctrl+Shift+J)" IconSource="/Assets/Icons8/icons8-border-horizontal-18.png" />
                <controls:ToolBarButton x:Name="_BringToFrontButton" Grid.Row="0" Grid.Column="2" Click="BringToFrontButton_Click" ToolTipService.ToolTip="Bring to front (Ctrl+Shift+F)" IconSource="/Assets/Icons8/icons8-bring-to-front-18.png" />
                <controls:ToolBarButton x:Name="_SendToBackButton" Grid.Row="0" Grid.Column="3" Click="SendToBackButton_Click" ToolTipService.ToolTip="Send to back (Ctrl+Shift+B)" IconSource="/Assets/Icons8/icons8-send-to-back-18.png" />

                <controls:ToolBarToggleButton x:Name="_EditModeToggleButton" Grid.Row="1" Grid.Column="0" IsChecked="True" Checked="EditModeToggleButton_Changed" Unchecked="EditModeToggleButton_Changed" ToolTipService.ToolTip="Toggle edit mode (Ctrl+E)" IconSource="/Assets/Icons8/icons8-edit-18.png" />
                <controls:ToolBarToggleButton x:Name="_RulerModeToggleButton" Grid.Row="1" Grid.Column="1" Checked="RulerModeToggleButton_Changed" Unchecked="RulerModeToggleButton_Changed" ToolTipService.ToolTip="Toggle ruler mode (Ctrl+R)" IconSource="/Assets/Icons8/icons8-ruler-18.png" />
                    <controls:ToolBarToggleSplitButton
                        x:Name="_MagnetSplitButton"
                        Grid.Row="1"
                        Grid.Column="2"
                        Grid.ColumnSpan="2"
                        IsCheckedChanged="MagnetSplitButton_IsCheckedChanged"
                        ToolTipService.ToolTip="Toggle snap (Ctrl+M)"
                        IconSource="/Assets/Icons8/icons8-magnet-18.png">
                        <controls:ToolBarToggleSplitButton.Flyout>
                            <Flyout Placement="Bottom">
                                <StackPanel Width="220" Spacing="8" Padding="4">
                                    <CheckBox
                                        x:Name="_MagnetActiveLayoutOnlyCheckBox"
                                        Content="Active layout only"
                                        Checked="MagnetActiveLayoutOnlyCheckBox_Changed"
                                        Unchecked="MagnetActiveLayoutOnlyCheckBox_Changed" />
                                    <Border Height="1" Background="{StaticResource PaintToolBarSeparatorBrush}" />
                                    <StackPanel x:Name="_MagnetLayoutsPanel" Spacing="4" />
                                </StackPanel>
                            </Flyout>
                        </controls:ToolBarToggleSplitButton.Flyout>
                    </controls:ToolBarToggleSplitButton>
                </Grid>
            </controls:ToolBarGroup>

            <controls:ToolBarGroup x:Name="_ViewGroup" Title="View">
                <Grid ColumnSpacing="6" RowSpacing="6" HorizontalAlignment="Center">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>

                <controls:ToolBarButton x:Name="_ZoomInButton" Grid.Row="0" Grid.Column="0" Click="ZoomInButton_Click" ToolTipService.ToolTip="Zoom in (NumPad + / Ctrl+Wheel)" IconSource="/Assets/Icons8/icons8-zoom-in-18.png" />
                <controls:ToolBarButton x:Name="_ZoomOutButton" Grid.Row="0" Grid.Column="1" Click="ZoomOutButton_Click" ToolTipService.ToolTip="Zoom out (NumPad - / Ctrl+Wheel)" IconSource="/Assets/Icons8/icons8-zoom-out-18.png" />
                <controls:ToolBarButton x:Name="_FitToObjectsButton" Grid.Row="1" Grid.Column="0" Click="FitToObjectsButton_Click" ToolTipService.ToolTip="Show all objects (Ctrl+0)" IconSource="/Assets/Icons8/icons8-expand-18.png" />
                <controls:ToolBarButton x:Name="_ZoomToSelectionButton" Grid.Row="1" Grid.Column="1" Click="ZoomToSelectionButton_Click" ToolTipService.ToolTip="Zoom to selection (Ctrl+9)" IconSource="/Assets/Icons8/icons8-collapse-18.png" />
                    <controls:ToolBarToggleButton
                        x:Name="_GridVisibilityToggleButton"
                        Grid.Row="0"
                        Grid.Column="2"
                        IsChecked="True"
                        Checked="GridVisibilityToggleButton_Changed"
                        Unchecked="GridVisibilityToggleButton_Changed"
                        ToolTipService.ToolTip="Toggle grid (Ctrl+G)" IconSource="/Assets/Icons8/icons8-grid-18.png" />
                    <controls:ToolBarToggleButton
                        x:Name="_RulersVisibilityToggleButton"
                        Grid.Row="1"
                        Grid.Column="2"
                        IsChecked="True"
                        Checked="RulersVisibilityToggleButton_Changed"
                        Unchecked="RulersVisibilityToggleButton_Changed"
                        ToolTipService.ToolTip="Toggle rulers (Ctrl+Shift+R)" IconSource="/Assets/Icons8/icons8-table-18.png" />
                </Grid>
            </controls:ToolBarGroup>

            <controls:ToolBarGroup x:Name="_AlignGroup" Title="Align">
                <Grid ColumnSpacing="6" RowSpacing="6" HorizontalAlignment="Center">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>

                    <controls:ToolBarButton Grid.Row="0" Grid.Column="0" Tag="Left" Click="AlignButton_Click" ToolTipService.ToolTip="Align left (Ctrl+Alt+Left)" IconSource="/Assets/Icons/SceneCanvas/align_left.svg" />
                    <controls:ToolBarButton Grid.Row="0" Grid.Column="1" Tag="Center" Click="AlignButton_Click" ToolTipService.ToolTip="Align horizontal center (Ctrl+Alt+H)" IconSource="/Assets/Icons/SceneCanvas/align_center_horizontal.svg" />
                    <controls:ToolBarButton Grid.Row="0" Grid.Column="2" Tag="Right" Click="AlignButton_Click" ToolTipService.ToolTip="Align right (Ctrl+Alt+Right)" IconSource="/Assets/Icons/SceneCanvas/align_right.svg" />

                    <controls:ToolBarButton Grid.Row="1" Grid.Column="0" Tag="Top" Click="AlignButton_Click" ToolTipService.ToolTip="Align top (Ctrl+Alt+Up)" IconSource="/Assets/Icons/SceneCanvas/align_top.svg" />
                    <controls:ToolBarButton Grid.Row="1" Grid.Column="1" Tag="Middle" Click="AlignButton_Click" ToolTipService.ToolTip="Align vertical center (Ctrl+Alt+V)" IconSource="/Assets/Icons/SceneCanvas/align_middle_vertical.svg" />
                    <controls:ToolBarButton Grid.Row="1" Grid.Column="2" Tag="Bottom" Click="AlignButton_Click" ToolTipService.ToolTip="Align bottom (Ctrl+Alt+Down)" IconSource="/Assets/Icons/SceneCanvas/align_bottom.svg" />
                </Grid>
            </controls:ToolBarGroup>

            <controls:ToolBarGroup x:Name="_ArrangeGroup" Title="Arrange">
                <Grid ColumnSpacing="6" RowSpacing="6" HorizontalAlignment="Center">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>

                    <controls:ToolBarButton Grid.Row="0" Grid.Column="0" Tag="PackLeftToRight" Click="LayoutButton_Click" ToolTipService.ToolTip="Pack left to right (Ctrl+Alt+Shift+Left)" IconSource="/Assets/Icons/SceneCanvas/layout_pack_left_to_right.svg" />
                    <controls:ToolBarButton Grid.Row="0" Grid.Column="1" Tag="PackRightToLeft" Click="LayoutButton_Click" ToolTipService.ToolTip="Pack right to left (Ctrl+Alt+Shift+Right)" IconSource="/Assets/Icons/SceneCanvas/layout_pack_right_to_left.svg" />
                    <controls:ToolBarButton Grid.Row="0" Grid.Column="2" Tag="DistributeHorizontal" Click="LayoutButton_Click" ToolTipService.ToolTip="Distribute horizontally (Ctrl+Alt+Shift+H)" IconSource="/Assets/Icons/SceneCanvas/layout_distribute_horizontal.svg" />

                    <controls:ToolBarButton Grid.Row="1" Grid.Column="0" Tag="PackTopToBottom" Click="LayoutButton_Click" ToolTipService.ToolTip="Pack top to bottom (Ctrl+Alt+Shift+Up)" IconSource="/Assets/Icons/SceneCanvas/layout_pack_top_to_bottom.svg" />
                    <controls:ToolBarButton Grid.Row="1" Grid.Column="1" Tag="PackBottomToTop" Click="LayoutButton_Click" ToolTipService.ToolTip="Pack bottom to top (Ctrl+Alt+Shift+Down)" IconSource="/Assets/Icons/SceneCanvas/layout_pack_bottom_to_top.svg" />
                    <controls:ToolBarButton Grid.Row="1" Grid.Column="2" Tag="DistributeVertical" Click="LayoutButton_Click" ToolTipService.ToolTip="Distribute vertically (Ctrl+Alt+Shift+V)" IconSource="/Assets/Icons/SceneCanvas/layout_distribute_vertical.svg" />
                    <controls:ToolBarButton Grid.Row="0" Grid.Column="3" Tag="CenterActiveHorizontal" Click="LayoutButton_Click" ToolTipService.ToolTip="Center active object horizontally in selection (Ctrl+Alt+Shift+X)" IconSource="/Assets/Icons/SceneCanvas/align_center_horizontal.svg" />
                    <controls:ToolBarButton Grid.Row="1" Grid.Column="3" Tag="CenterActiveVertical" Click="LayoutButton_Click" ToolTipService.ToolTip="Center active object vertically in selection (Ctrl+Alt+Shift+Y)" IconSource="/Assets/Icons/SceneCanvas/align_middle_vertical.svg" />
                </Grid>
            </controls:ToolBarGroup>

            <controls:ToolBarGroup x:Name="_TransformGroup" Title="Transform">
                <Grid ColumnSpacing="6" RowSpacing="6" HorizontalAlignment="Center">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>

                <controls:ToolBarButton x:Name="_MatchSelectionWidthButton" Grid.Row="0" Grid.Column="0" Click="SetSelectionWidthButton_Click" ToolTipService.ToolTip="Match selection width (Ctrl+Shift+W)" IconSource="/Assets/Icons8/icons8-width-18.png" />
                <controls:ToolBarButton x:Name="_MatchSelectionHeightButton" Grid.Row="0" Grid.Column="1" Click="SetSelectionHeightButton_Click" ToolTipService.ToolTip="Match selection height (Ctrl+Shift+H)" IconSource="/Assets/Icons8/icons8-height-18.png" />
                <controls:ToolBarButton x:Name="_RotateSelectionLeftButton" Grid.Row="1" Grid.Column="0" Click="RotateSelectionLeftButton_Click" ToolTipService.ToolTip="Rotate selection left (Ctrl+Alt+Q)" IconSource="/Assets/Icons8/icons8-rotate-left-18.png" />
                <controls:ToolBarButton x:Name="_RotateSelectionRightButton" Grid.Row="1" Grid.Column="1" Click="RotateSelectionRightButton_Click" ToolTipService.ToolTip="Rotate selection right (Ctrl+Alt+E)" IconSource="/Assets/Icons8/icons8-rotate-right-18.png" />
                </Grid>
            </controls:ToolBarGroup>

            <controls:ToolBarGroup x:Name="_MoveGroup" Title="Move">
                <Grid ColumnSpacing="6" RowSpacing="6" HorizontalAlignment="Center">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>

                    <controls:ToolBarNumberField x:Name="_MoveDeltaXNumberBox" Grid.Row="0" Grid.Column="0" Label="dX:" SmallChange="0.01" />
                    <controls:ToolBarNumberField x:Name="_MoveDeltaYNumberBox" Grid.Row="1" Grid.Column="0" Label="dY:" SmallChange="0.01" />
                    <controls:ToolBarButton x:Name="_ApplyMoveDeltaButton" Grid.Row="0" Grid.Column="1" Grid.RowSpan="2" Click="ApplyMoveDeltaButton_Click" ToolTipService.ToolTip="Move selection by offset (Arrow keys for step move)" IconSource="/Assets/Icons/SceneCanvas/layout_move.svg" />
                </Grid>
            </controls:ToolBarGroup>

            <controls:ToolBarGroup x:Name="_LayoutsGroup" Title="Layouts">
                <Grid ColumnSpacing="6" RowSpacing="6" HorizontalAlignment="Center">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>

                    <ComboBox x:Name="_ActiveLayoutComboBox"  Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="6" HorizontalAlignment="Stretch" DisplayMemberPath="Name" SelectionChanged="ActiveLayoutComboBox_SelectionChanged" ToolTipService.ToolTip="Active layout" />

                    <controls:ToolBarButton x:Name="_AddLayoutButton" Grid.Row="1" Grid.Column="0" Click="AddLayoutButton_Click" ToolTipService.ToolTip="Add layout (Ctrl+Shift+N)" IconSource="/Assets/Icons/SceneCanvas/layout_add.svg" />
                    <controls:ToolBarButton x:Name="_RenameLayoutButton" Grid.Row="1" Grid.Column="1" Click="RenameLayoutButton_Click" ToolTipService.ToolTip="Rename active layout (F2)" IconSource="/Assets/Icons/SceneCanvas/layout_rename.svg" />
                    <controls:ToolBarButton x:Name="_DeleteLayoutButton" Grid.Row="1" Grid.Column="2" Click="DeleteLayoutButton_Click" ToolTipService.ToolTip="Delete active layout (Ctrl+Shift+Delete)" IconSource="/Assets/Icons/SceneCanvas/layout_delete.svg" />
                    <controls:ToolBarButton x:Name="_MoveLayoutUpButton" Grid.Row="1" Grid.Column="3"  Click="MoveLayoutUpButton_Click" ToolTipService.ToolTip="Move layout up (Ctrl+Alt+PageUp)" IconSource="/Assets/Icons/SceneCanvas/layout_pack_bottom_to_top.svg" />
                    <controls:ToolBarButton x:Name="_MoveLayoutDownButton"  Grid.Row="1" Grid.Column="4" Click="MoveLayoutDownButton_Click" ToolTipService.ToolTip="Move layout down (Ctrl+Alt+PageDown)" IconSource="/Assets/Icons/SceneCanvas/layout_pack_top_to_bottom.svg" />
                    <controls:ToolBarSplitButton x:Name="_MoveSelectionLayoutButton" Grid.Row="1" Grid.Column="5" ToolTipService.ToolTip="Move selected to layout (Ctrl+Shift+M moves to active layout)" IconSource="/Assets/Icons/SceneCanvas/layout_move.svg">
                        <controls:ToolBarSplitButton.Flyout>
                            <Flyout Placement="Bottom">
                                <StackPanel Width="190" Spacing="8" Padding="4">
                                    <TextBlock Text="Move selected to layout" />
                                    <ComboBox x:Name="_MoveSelectionLayoutComboBox" DisplayMemberPath="Name" />
                                    <Button x:Name="_ConfirmMoveSelectionButton" Click="ConfirmMoveSelectionButton_Click" Content="Move" />
                                </StackPanel>
                            </Flyout>
                        </controls:ToolBarSplitButton.Flyout>
                    </controls:ToolBarSplitButton>
                </Grid>
            </controls:ToolBarGroup>

            <controls:ToolBarGroup x:Name="_ShapePropertiesGroup" Title="Shape" Visibility="Collapsed">
                <Grid ColumnSpacing="6" RowSpacing="6" HorizontalAlignment="Center">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>

                    <controls:ToolBarNumberField x:Name="_ShapeXNumberBox" Grid.Row="0" Grid.Column="0" Label="X:" SmallChange="0.01" ValueChanged="ShapeNumberBox_ValueChanged" />
                    <controls:ToolBarNumberField x:Name="_ShapeYNumberBox" Grid.Row="0" Grid.Column="1" Label="Y:" SmallChange="0.01" ValueChanged="ShapeNumberBox_ValueChanged" />
                    <controls:ToolBarNumberField x:Name="_ShapeZNumberBox" Grid.Row="0" Grid.Column="2" Label="Z:" SmallChange="0.01" ValueChanged="ShapeNumberBox_ValueChanged" />

                    <controls:ToolBarNumberField x:Name="_ShapeWidthNumberBox" Grid.Row="1" Grid.Column="0" Label="W:" SmallChange="0.01" ValueChanged="ShapeNumberBox_ValueChanged" />
                    <controls:ToolBarNumberField x:Name="_ShapeHeightNumberBox" Grid.Row="1" Grid.Column="1" Label="H:" SmallChange="0.01" ValueChanged="ShapeNumberBox_ValueChanged" />
                    <controls:ToolBarNumberField x:Name="_ShapeRotationNumberBox" Grid.Row="1" Grid.Column="2" Label="R:" SmallChange="0.01" ValueChanged="ShapeNumberBox_ValueChanged" />

                </Grid>
            </controls:ToolBarGroup>

            <controls:ToolBarGroup x:Name="_LinePropertiesGroup" Title="Line" Visibility="Collapsed">

                <Grid ColumnSpacing="6" RowSpacing="6" HorizontalAlignment="Center">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>


                    <controls:ToolBarNumberField x:Name="_LineStartXNumberBox" Grid.Row="0" Grid.Column="0" Label="X1:" SmallChange="0.01" ValueChanged="LineNumberBox_ValueChanged" />
                    <controls:ToolBarNumberField x:Name="_LineStartYNumberBox" Grid.Row="0" Grid.Column="1" Label="Y1:" SmallChange="0.01" ValueChanged="LineNumberBox_ValueChanged" />
                    <controls:ToolBarNumberField x:Name="_LineStartZNumberBox" Grid.Row="0" Grid.Column="2" Label="Z1:" SmallChange="0.01" ValueChanged="LineNumberBox_ValueChanged" />

                    <controls:ToolBarNumberField x:Name="_LineEndXNumberBox" Grid.Row="1" Grid.Column="0" Label="X2:" SmallChange="0.01" ValueChanged="LineNumberBox_ValueChanged" />
                    <controls:ToolBarNumberField x:Name="_LineEndYNumberBox" Grid.Row="1" Grid.Column="1" Label="Y2:" SmallChange="0.01" ValueChanged="LineNumberBox_ValueChanged" />
                    <controls:ToolBarNumberField x:Name="_LineEndZNumberBox" Grid.Row="1" Grid.Column="2" Label="Z2:" SmallChange="0.01" ValueChanged="LineNumberBox_ValueChanged" />

                    <controls:ToolBarNumberField x:Name="_LineThicknessNumberBox" Grid.Row="1" Grid.Column="3" Label="T:" SmallChange="0.01" ValueChanged="LineNumberBox_ValueChanged" />
                </Grid>
            </controls:ToolBarGroup>

    </controls:ToolBar>
</UserControl>





