This question is locked. New answers and comments are not allowed.
Hi,
I have to develop an IDE with some toolbars. I want create also a menu "View" where i can open and close the different toolbars.
I have put in the form one radToolStrip that contains two radToolStripElement. Each radToolStripElement contains some radToolStripItem.
In the contructor of the form i have inserted the following statements:
RadToolStripDockSite dockSite = new RadToolStripDockSite();
InitializeComponent();
dockSite.AddToolStrip(this.radToolStrip1);
and i set the following properties of the radToolStrip using designer
allowDragging = true
allowFloating = true
Now i want implement the code to toggle visibility of each radToolStripItem.
I tried with the following code to toggle visibility:
if (radToolStripItem1.Visibility != ElementVisibility.Visible)
radToolStripItem1.Visibility = ElementVisibility.Visible;
else
radToolStripItem1.Visibility = ElementVisibility.Hidden;
but doesn't work. I also tried to use ElementVisibility.Collapsed but doesn't work.
I have two problems:
1. When I drag one radToolStripItem in floating mode the code can't close the radToolStripItem. If i drag back the item in not floating mode the code doesn't work again
2. When I close one radToolStripItem and one radToolStripElement has no more visible item, the radToolStripElement remains visible.
What is the best way to solve my problems?
Thanks for support.
Lorenzo
I have to develop an IDE with some toolbars. I want create also a menu "View" where i can open and close the different toolbars.
I have put in the form one radToolStrip that contains two radToolStripElement. Each radToolStripElement contains some radToolStripItem.
In the contructor of the form i have inserted the following statements:
RadToolStripDockSite dockSite = new RadToolStripDockSite();
InitializeComponent();
dockSite.AddToolStrip(this.radToolStrip1);
and i set the following properties of the radToolStrip using designer
allowDragging = true
allowFloating = true
Now i want implement the code to toggle visibility of each radToolStripItem.
I tried with the following code to toggle visibility:
if (radToolStripItem1.Visibility != ElementVisibility.Visible)
radToolStripItem1.Visibility = ElementVisibility.Visible;
else
radToolStripItem1.Visibility = ElementVisibility.Hidden;
but doesn't work. I also tried to use ElementVisibility.Collapsed but doesn't work.
I have two problems:
1. When I drag one radToolStripItem in floating mode the code can't close the radToolStripItem. If i drag back the item in not floating mode the code doesn't work again
2. When I close one radToolStripItem and one radToolStripElement has no more visible item, the radToolStripElement remains visible.
What is the best way to solve my problems?
Thanks for support.
Lorenzo