Пример #1
0
 private void createTextBox(string type)
 {
     //creating a style to eliminate extra whitespace
     Style style = new Style(typeof(TextBox));
     style.Setters.Add(new Setter(TextBox.PaddingProperty, new Thickness(-1)));
     //flag_hasSocks = true;
     switch (type)
     {
         case "INT":
             NumericTextBox numTextBox = new NumericTextBox();
             numTextBox.Width = 100;
             numTextBox.Height = LayoutRoot.Height - 19;
             numTextBox.Style = style;
             innerPane.Children.Add(numTextBox);
             break;
         case "STRING":
             TextBox textBox = new TextBox();
             textBox.Width = 100;
             textBox.Height = LayoutRoot.Height - 15;
             textBox.Style = style;
             innerPane.Children.Add(textBox);
             break;
         default:
             Debug.WriteLine("error");
             break;
     }
 }