Ok. I'm not 100% sure how to explain this: so here goes.
I have a user control that I made (see attachment control.jpg).
on loading the application I use the following code to dynamically create tabs. (Page is the usercontrol).
for (int i = 0; i < dtTabs.Rows.Count; i++) |
{ |
Page cp = new Page(dtTabs.Rows[i].ItemArray[1].ToString(), sCon, at, isPrimary,this); |
cp.Dock = DockStyle.Fill; |
RadPanel rp = new RadPanel(); |
rp.Controls.Add(cp); |
rp.Dock = DockStyle.Fill; |
TabItem tab = new TabItem(); |
tab.Alignment = System.Drawing.ContentAlignment.BottomLeft; |
tab.Name = dtTabs.Rows[i].ItemArray[1].ToString(); |
tab.Text = dtTabs.Rows[i].ItemArray[1].ToString(); |
tab.DisplayStyle = DisplayStyle.ImageAndText; |
tab.TextImageRelation = TextImageRelation.ImageBeforeText; |
tab.ContentPanel.Controls.Add(rp); |
cp.StartRefresh(); |
tabMain.Items.Add(tab); |
} |
however when I use the dock.Fill property, or the anchor properties... the control does not display properly... it cuts off the bottom of the control and the right of the control.. See attachment (main.jpg);