Hi.
On a form, I am programmaticaly creating radButtons in tow different tabPages. The UI is rendered correctly in the first tab (see "Tab1.png") but not in the second ("Tab2.png"). They are generated the same way:
// For tab 1
RadButton b =
new
RadButton();
b.EnableTheming =
true
;
b.ThemeName =
new
DesertTheme().ThemeName;
b.Name = n;
b.Text = n;
b.Left = 10;
b.Top = (22 * i++);
b.MinimumSize =
new
Size(ptp1.Width - 40, 20);
b.MaximumSize =
new
Size(ptp1.Width - 40, 0);
b.AutoSize =
true
;
b.Padding =
new
Padding(4);
((TextPrimitive)b.ButtonElement.Children[1].Children[1]).TextWrap =
true
;
b.RootElement.StretchVertically =
false
;
b.TextAlignment = ContentAlignment.MiddleCenter;
b.Click +=
new
EventHandler(onBtnRechercheClick);
tt.SetToolTip(b, b.Name);
ptp1.WindowsControl.Controls.Add(b);
// For tab 2
RadButton b2 = new RadButton();
b2.EnableTheming = true;
b2.ThemeName = new DesertTheme().ThemeName;
b2.Name = n2;
b2.Text = n2;
b2.Left = 10;
b2.Top = (22 * i2++);
b2.MinimumSize = new Size(ptp2.Width - 40, 20);
b2.MaximumSize = new Size(ptp2.Width - 40, 0);
b2.AutoSize = true;
b2.Padding = new Padding(4);
((TextPrimitive)b2.ButtonElement.Children[1].Children[1]).TextWrap = true;
b2.RootElement.StretchVertically = false;
b2.TextAlignment = ContentAlignment.MiddleCenter;
b2.Click += onBtnRechercheClick;
tt.SetToolTip(b2, b2.Name);
ptp2.WindowsControl.Controls.Add(b2);