I've seen a few threads on being able to control the height of a dockpanel (or in our case a UserDockControl...we've set TdiContainerVisible to true, and then set the Size...but it is not working in Q3 version...??
Any ideas?
Thanks,
Gary
6 Answers, 1 is accepted
Thank you for writing.
We have found issues related to the layout operation after changing the size from the Width or Height properties of DockPanel. These will be addressed in our upcoming release. Please use the Size property of DockPanel for the resizing operation.
If you have any additional questions, please contact us.
Please use
Regards,
Julian Benkov
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Thank you for the quick reply...We do have one question as to when your upcoming release is supposed to be out?
As well, i think if i read your reply closely you're implying this ability *will work with our current version (Q3if we use RadPanel (vs. UserDockControl?) and its Size property? We've tried this as well and it doesn't seem to work either...One of our dev's code snip below opens the first window with the proper height/width...but as soon as you open a second one the Layout Engine seems to take over, and size as it deems...?
Thanks again...
Gary
namespace
TelerikDockApp
{
public partial class Form1 : Form
{
static int i = 0;
static int j = 0;
public Form1()
{
InitializeComponent();
dockingManager1.TdiContainerVisible =
true;
}
private void button1_Click(object sender, EventArgs e)
{
DockPanel panel = CreatePanel("UserControl1_" + (i.ToString()), DockPosition.Top, new Size(100, 100));
panel.Controls.Add(
new UserControl1());
i++;
}
private void button2_Click(object sender, EventArgs e)
{
DockPanel panel = CreatePanel("UserControl2_" + (j.ToString()), DockPosition.Left, new Size(100, 100));
panel.Controls.Add(
new UserControl2());
j++;
}
DockPanel CreatePanel(string caption, DockPosition dokPos, Size size)
{
DockPanel panel = new DockPanel();
panel.Text = caption;
panel.Size = size;
panel.PreferredDockSize = size;
panel.PreferredFloatSize = size;
this.dockingManager1.SetDock(panel, dokPos);
return panel;
}
}
}
Thank you for writing.
When you add DockPanels, the RadDock layout recalculates and resizes windows using criteria such as the position of newly added window, and the size of the current base docking container (target), among others. You may resize a selected DockPanel to the size you desire. Set the Size property of the DockPanel after all the docking panels have been added and docked.
I hope this was helpful. Contact us again if you have additional questions.
Sincerely yours,
Julian Benkov
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Thanks!
Gary
Gary
Thank you for writing.
The issue will be addressed in the Q3 SP1 release. Currently, you may use this override version of the UserDockControl:
public class MyUserDockControl : UserDockControl |
{ |
public MyUserDockControl() |
{ |
} |
public new Size Size |
{ |
get |
{ |
return base.Size; |
} |
set |
{ |
this.PreferredDockSize = value; |
base.Size = this.PreferredDockSize; |
} |
} |
} |
If you have any additional questions, please contact me.
Greetings,
Julian Benkov
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center