private StackPanel CreateConnectToHostPanel(RadioButtonGroup optionsRadioGroup)
        {
            var root = new StackPanel(FlowDirection.LeftToRight)
            {
                Anchor = AnchorStyles.Left | AnchorStyles.Right
            };

            var radio = new UntabbableRadioButton {
                Margin   = Padding.Empty,
                Padding  = new Padding(0, 2, 5, 0),
                AutoSize = true
            };

            optionsRadioGroup.Add(radio);
            root.Add(radio);

            var body = new StackPanel(FlowDirection.TopDown)
            {
                Anchor = AnchorStyles.Left | AnchorStyles.Right
            };

            root.Add(body, true);

            var bodyLabel = new ResetLabel {
                Text   = "Connect to Host:",
                Anchor = AnchorStyles.Left,
                Font   = new Font(FontFamily.GenericSansSerif, 8.75f, FontStyle.Bold, GraphicsUnit.Point)
            };

            body.Add(bodyLabel);

            var inputTextBox = new TextBox {
                Margin = new Padding(0, 0, 0, 2),
                Anchor = AnchorStyles.Left | AnchorStyles.Right
            };

            body.Add(inputTextBox);

            Label usageLabel;

            body.Add(CreateLabeledLabelPanel("Usage:", SystemColors.GrayText, out usageLabel));
            usageLabel.Text = "<hostname>:<port>";

            Label errorLabel;
            var   errorlabelPanel = CreateLabeledLabelPanel("Error:", Color.FromArgb(192, 0, 0), out errorLabel);

            errorLabel.Text = "asdf<hostname>:<port>\r\nHello\r\nDSFJOI";
            errorlabelPanel.Hide();
            body.Add(errorlabelPanel);

            ProxySelection(body, radio);

            return(root);
        }
        private StackPanel CreateLabeledLabelPanel(string label, Color foreColor, out Label labeledLabel)
        {
            var root = new StackPanel(FlowDirection.LeftToRight)
            {
                Anchor = AnchorStyles.Left
            };

            root.Add(new ResetLabel(true)
            {
                Text      = label,
                Anchor    = AnchorStyles.Top,
                ForeColor = foreColor,
                Font      = new Font("Segoe UI", 7.5f, FontStyle.Bold, GraphicsUnit.Point)
            });
            root.Add(labeledLabel = new ResetLabel(true)
            {
                Anchor    = AnchorStyles.Top,
                ForeColor = foreColor,
                Font      = new Font("Segoe UI", 7.5f, FontStyle.Regular, GraphicsUnit.Point)
            });

            return(root);
        }
      private StackPanel CreateConnectToHostPanel(RadioButtonGroup optionsRadioGroup) {
         var root = new StackPanel(FlowDirection.LeftToRight) {
            Anchor = AnchorStyles.Left | AnchorStyles.Right
         };

         var radio = new UntabbableRadioButton {
            Margin = Padding.Empty,
            Padding = new Padding(0, 2, 5, 0),
            AutoSize = true
         };
         optionsRadioGroup.Add(radio);
         root.Add(radio);

         var body = new StackPanel(FlowDirection.TopDown) {
            Anchor = AnchorStyles.Left | AnchorStyles.Right
         };
         root.Add(body, true);

         var bodyLabel = new ResetLabel {
            Text = "Connect to Host:",
            Anchor = AnchorStyles.Left,
            Font = new Font(FontFamily.GenericSansSerif, 8.75f, FontStyle.Bold, GraphicsUnit.Point)
         };
         body.Add(bodyLabel);

         var inputTextBox = new TextBox {
            Margin = new Padding(0, 0, 0, 2),
            Anchor = AnchorStyles.Left | AnchorStyles.Right
         };
         body.Add(inputTextBox);

         Label usageLabel;
         body.Add(CreateLabeledLabelPanel("Usage:", SystemColors.GrayText, out usageLabel));
         usageLabel.Text = "<hostname>:<port>";

         Label errorLabel;
         var errorlabelPanel = CreateLabeledLabelPanel("Error:", Color.FromArgb(192, 0, 0), out errorLabel);
         errorLabel.Text = "asdf<hostname>:<port>\r\nHello\r\nDSFJOI";
         errorlabelPanel.Hide();
         body.Add(errorlabelPanel);

         ProxySelection(body, radio);

         return root;
      }
      private StackPanel CreateLabeledLabelPanel(string label, Color foreColor, out Label labeledLabel) {
         var root = new StackPanel(FlowDirection.LeftToRight) { Anchor = AnchorStyles.Left };

         root.Add(new ResetLabel(true) {
            Text = label,
            Anchor = AnchorStyles.Top,
            ForeColor = foreColor,
            Font = new Font("Segoe UI", 7.5f, FontStyle.Bold, GraphicsUnit.Point)
         });
         root.Add(labeledLabel = new ResetLabel(true) {
            Anchor = AnchorStyles.Top,
            ForeColor = foreColor,
            Font = new Font("Segoe UI", 7.5f, FontStyle.Regular, GraphicsUnit.Point)
         });

         return root;
      }