I have created a simple grid of labels and textboxes.
It's working fine, but it's not looking good.
The Textboxes are not rendered big enough to display the font in full height.
What could be wrong ? Is the theme applied too late ? Why does the TextBox not inform the Layouter about it's minimum size ?
A screenshot is attached, and the code is here:
this
.layoutContainer =
new
GridLayout(2, 3);
layoutContainer.Columns.Clear();
layoutContainer.Rows.Clear();
layoutContainer.Columns.Add(
new
GridLayoutColumn() { SizingType = GridLayoutSizingType.Auto });
layoutContainer.Columns.Add(
new
GridLayoutColumn() { SizingType = GridLayoutSizingType.Auto });
layoutContainer.Rows.Add(
new
GridLayoutRow() { SizingType = GridLayoutSizingType.Auto });
layoutContainer.Rows.Add(
new
GridLayoutRow() { SizingType = GridLayoutSizingType.Auto });
layoutContainer.Rows.Add(
new
GridLayoutRow() { SizingType = GridLayoutSizingType.Auto });
//int num = (int)this.layoutContainer.BindProperty(RadElement.PaddingProperty, (RadObject)this, RadElement.PaddingProperty, PropertyBindingOptions.TwoWay);
this
.layoutContainer.StretchHorizontally =
true
;
this
.layoutContainer.StretchVertically =
false
;
this
.Children.Add((RadElement)
this
.layoutContainer);
var lbl1 =
new
RadLabelElement();
lbl1.Text =
"Minimum"
;
lbl1.SetValue(GridLayout.ColumnIndexProperty, (
object
)0);
lbl1.SetValue(GridLayout.RowIndexProperty, (
object
)0);
layoutContainer.Children.Add(lbl1);
var lbl2 =
new
RadLabelElement();
lbl2.Text =
"Planwert"
;
lbl2.SetValue(GridLayout.ColumnIndexProperty, (
object
)0);
lbl2.SetValue(GridLayout.RowIndexProperty, (
object
)1);
layoutContainer.Children.Add(lbl2);
var lbl3 =
new
RadLabelElement();
lbl3.Text =
"Maximum"
;
lbl3.SetValue(GridLayout.ColumnIndexProperty, (
object
)0);
lbl3.SetValue(GridLayout.RowIndexProperty, (
object
)2);
layoutContainer.Children.Add(lbl3);
var num1 =
new
RadTextBoxControlElement();
num1.StretchVertically =
false
;
num1.SetValue(GridLayout.ColumnIndexProperty, (
object
)1);
num1.SetValue(GridLayout.RowIndexProperty, (
object
)0);
num1.SetValue(GridLayout.CellPaddingProperty, (
object
)
new
Padding(3));
layoutContainer.Children.Add(num1);
var num2 =
new
RadTextBoxControlElement();
num2.StretchVertically =
false
;
num2.SetValue(GridLayout.ColumnIndexProperty, (
object
)1);
num2.SetValue(GridLayout.RowIndexProperty, (
object
)1);
num2.SetValue(GridLayout.CellPaddingProperty, (
object
)
new
Padding(3));
layoutContainer.Children.Add(num2);
var num3 =
new
RadTextBoxControlElement();
num3.SetValue(GridLayout.ColumnIndexProperty, (
object
)1);
num3.SetValue(GridLayout.RowIndexProperty, (
object
)2);
num3.StretchVertically =
false
;
num3.SetValue(GridLayout.CellPaddingProperty, (
object
)
new
Padding(3));
layoutContainer.Children.Add(num3);