To reproduce:
- Add some controls to a command bar.
- Get the PreferredSize like this:
Console.WriteLine(radCommandBar1.PreferredSize.ToString());
Workaround:
class MyCommandBar : RadCommandBar
{
public override Size GetPreferredSize(Size proposedSize)
{
if (proposedSize.Width == 0 && proposedSize.Height == 0)
{
return this.Size;
}
return base.GetPreferredSize(proposedSize);
}
}