This is a migrated thread and some comments may be shown as answers.

Collapse QuickToolbar Items

5 Answers 150 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
David DeLella
Top achievements
Rank 1
David DeLella asked on 18 Jul 2008, 06:45 AM
Is there a way, using Q4 2006 to collapse the whole QuickAccessToolbar or items within it?  Apparently the properties of items within the menu can not have the visibility property set to Collapse like the chunks.  The hide would work except it doesnt actually hide the item, it leave a blank space where it would go and it still is available on the drop down arrow at the end of the toolbar.  Here is the example I am trying to accomplish:

Making a developer tool which needs to log in to a database.  Once logged in I will show all the necessary ribbon chunks which contain tools.   I also want a Disconnect button.  The orb menu is a good place but I do not like the way it looks compared to the chunks so I want it on the QuickAccessToolbar.  I can not show or hide the Disconnect button based on the users status.

Any suggestions?

5 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 21 Jul 2008, 12:49 PM
Hello David DeLella,

You are right. You cannot set the Visibility property of the button elements in the RadQuickAccessToolBar to Collapsed. Even if this was possible, when the button is "Collapsed", the correct behavior is still to have an associated item shown in the drop down menu.

However, there is an approach which will lead to the desired results. I have demonstrated it in the sample project attached. Please notice that you have to clear the Items collection of the drop down menu, so to have it synchronized with the buttons visible in the quick access toolbar.

If you have additional questions, feel free to contact me.

All the best,
Nikolay
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
David DeLella
Top achievements
Rank 1
answered on 21 Jul 2008, 01:00 PM
I also found a work around similar to yours but discovered another bug in the process.  The work around I used involved creating the RadButton in the form designer code as a global element so I did not have to create it multiple times and I could use the Resources object to load an image.  I then used remove and add features of the QuickAccessToolbar to hide and show.

The new bug was with standard chunks.  If the initial chunk is set to collapsed by default the ribbon menu for that chunk is still visible when the application loads.  Example is for a login screen.  Hiding all chunks except Help before login.  After login showing all.  The only fix is to make Help the first chunk or do the dynamic add/remove like the QuickAccessToolbar.
0
Nikolay
Telerik team
answered on 25 Jul 2008, 08:34 AM
Hi David DeLella,

I am not quite sure which ribbon menu you are refferring. In my example, when I have a RadRibbonBarChunk initially collapsed, it is not visible, and there is there is no default menu where I can still see the chunk. Please provide me with this additional information about your case. It will allow me to help you further.

Sincerely yours,
Nikolay
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
David DeLella
Top achievements
Rank 1
answered on 25 Jul 2008, 11:53 AM
To duplicate I just added a ribbon bar to a new forum.  Create two tabs each with a single chunk and some icons.  In the form load I collapsed the first chunk.  When the application loads I see only one tab but the chunk and ribbon showing is for the hidden tab and not the tab that is visible.  Apparenly the collapsed tab is still marked as IsSelected = True.  To fix the problem I simply control the IsSelected to the single table which is always showing.

Is there a why to hide all tabs nicely?  I know I can collpase all of them but then the bottom ribbon area shinks up to a single bar.  If perhaps I did not have a complicated menu and just wanted a single ribbon with icons and no tabs or not ribbon at all and just the orb menu and QuickLaunchToolbar.  These are more suggestions.
0
Nikolay
Telerik team
answered on 30 Jul 2008, 11:59 AM
Hi David DeLella,

I followed your steps but did not get results exactly the same like yours. I made two tabs with one chunk in each of them. Then, in the Form_Load event handler I set the chunk in the first tab to be Visible Collapsed. When I ran the application I got two tabs visible (not one as in your case). The chunk set to Collapsed was not visible, while the other was.

Should you want to hide the tabs themselves, just set TabItem.Visibility = ElementVisibility.Collapsed. I demonstrated this in the sample project attached.

As the the bottom ribbon area, if you set the chunks to be Hidden instead of Collapsed and the area will not be shrunk.

If you have additional questions, feel free to contact me.

Best wishes,
Nikolay
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
RibbonBar
Asked by
David DeLella
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
David DeLella
Top achievements
Rank 1
Share this question
or