Hi Duane,
This is not supported out of the box but can be achieved. You can use the
FloatingStripCreated and
EndDrag events of the CommandBarStripElement to update the visibility of the CommandBar. Here is an example (the attached image shows the result):
public
RadForm1()
{
InitializeComponent();
commandBarStripElement2.EnableFloating =
true
;
commandBarStripElement1.EnableFloating =
true
;
radCommandBar1.FloatingStripCreated += RadCommandBar1_FloatingStripCreated;
radCommandBar1.FloatingStripCreated += RadCommandBar1_FloatingStripCreated;
commandBarStripElement1.EndDrag += CommandBarStripElement1_EndDrag;
commandBarStripElement2.EndDrag += CommandBarStripElement1_EndDrag;
}
private
void
CommandBarStripElement1_EndDrag(
object
sender, EventArgs e)
{
if
(radCommandBar1.Rows.Count == 0 || radCommandBar1.Rows[0].Strips.Count == 0)
{
radCommandBar1.Visible =
false
;
}
else
{
radCommandBar1.Visible =
true
;
}
if
(radCommandBar2.Rows.Count == 0 || radCommandBar2.Rows[0].Strips.Count == 0)
{
radCommandBar2.Visible =
false
;
}
else
{
radCommandBar2.Visible =
true
;
}
}
private
void
RadCommandBar1_FloatingStripCreated(
object
sender, EventArgs e)
{
if
(radCommandBar1.Rows.Count == 0 || radCommandBar1.Rows[0].Strips.Count == 0)
{
radCommandBar1.Visible =
false
;
}
else
{
radCommandBar1.Visible =
true
;
}
if
(radCommandBar2.Rows.Count == 0 || radCommandBar2.Rows[0].Strips.Count == 0)
{
radCommandBar2.Visible =
false
;
}
else
{
radCommandBar2.Visible =
true
;
}
}
I hope this helps. Should you have any other questions, do not hesitate to ask.
Regards,
Dimitar
Progress Telerik
Get
quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers.
Learn More.