public static void DoLabeledControl(Label Label, Control Control, Control Parent, Labeled_Mod.LabelPositions Labelposition)
 {
     switch (Labelposition)
     {
         case Labeled_Mod.LabelPositions.Left:
             {
                 Parent.Height = Control.Height;
                 Label.Dock = DockStyle.Left;
                 Control.Dock = DockStyle.Fill;
                 break;
             }
         case Labeled_Mod.LabelPositions.Top:
             {
                 Parent.Height = Control.Height * 2;
                 Label.Dock = DockStyle.Top;
                 Control.Dock = DockStyle.Fill;
                 break;
             }
         case Labeled_Mod.LabelPositions.Right:
             {
                 Parent.Height = Control.Height;
                 Label.Dock = DockStyle.Right;
                 Control.Dock = DockStyle.Fill;
                 break;
             }
         case Labeled_Mod.LabelPositions.Bottom:
             {
                 Parent.Height = Control.Height * 2;
                 Label.Dock = DockStyle.Bottom;
                 Control.Dock = DockStyle.Fill;
                 break;
             }
         default:
             {
                 Label.Dock = DockStyle.None;
                 Control.Dock = DockStyle.None;
                 break;
             }
     }
 }
        public static void DoLabeledControl(Control control1, Control control2, Grid grid, Labeled_Mod.LabelPositions labelPosition)
        {
            switch (labelPosition)
            {
                case Labeled_Mod.LabelPositions.Left:
                    {
                        grid.Height = control2.Height;
                        grid.ColumnDefinitions.Clear();
                        grid.RowDefinitions.Clear();
                        grid.ColumnDefinitions.Add(new ColumnDefinition());
                        grid.ColumnDefinitions.Add(new ColumnDefinition());
                        grid.ColumnDefinitions[0].Width = System.Windows.GridLength.Auto;
                        Grid.SetColumn(control1, 0);
                        Grid.SetColumn(control2, 1);
                        control1.HorizontalContentAlignment = System.Windows.HorizontalAlignment.Left;
                        break;
                    }

                case Labeled_Mod.LabelPositions.Top:
                    {
                        grid.Height = control2.Height * 2;
                        grid.Height = control2.Height;
                        grid.ColumnDefinitions.Clear();
                        grid.RowDefinitions.Clear();
                        grid.RowDefinitions.Add(new RowDefinition());
                        grid.RowDefinitions.Add(new RowDefinition());
                        Grid.SetRow(control1, 0);
                        Grid.SetRow(control2, 1);
                        control1.HorizontalContentAlignment = System.Windows.HorizontalAlignment.Left;
                        break;
                    }

                case Labeled_Mod.LabelPositions.Right:
                    {
                        grid.Height = control2.Height;
                        grid.ColumnDefinitions.Clear();
                        grid.RowDefinitions.Clear();
                        grid.ColumnDefinitions.Add(new ColumnDefinition());
                        grid.ColumnDefinitions.Add(new ColumnDefinition());
                        grid.ColumnDefinitions[1].Width = System.Windows.GridLength.Auto;
                        Grid.SetColumn(control1, 1);
                        Grid.SetColumn(control2, 0);
                        control1.HorizontalContentAlignment = System.Windows.HorizontalAlignment.Right;
                        break;
                    }

                case Labeled_Mod.LabelPositions.Bottom:
                    {
                        grid.Height = control2.Height * 2;
                        grid.Height = control2.Height;
                        grid.ColumnDefinitions.Clear();
                        grid.RowDefinitions.Clear();
                        grid.RowDefinitions.Add(new RowDefinition());
                        grid.RowDefinitions.Add(new RowDefinition());
                        Grid.SetRow(control1, 1);
                        Grid.SetRow(control2, 0);
                        control1.HorizontalContentAlignment = System.Windows.HorizontalAlignment.Left;
                        break;
                    }

                default:
                    {
                        break;
                    }
            }
        }