Reputation: 3555
I want to minimize the ribbon when user click on particular navigation Item. For example - when User clicks on Dashboard nav item, I want the ribbon minimized, and automatically "maximized" on others.
How can I do that ?
Upvotes: 1
Views: 991
Reputation: 203
They released a hotfix for this bug in Devexpress's version 22.1.4. Today I updated to 22.1.4 while getting this error when there was version 22.1.3 and the error was completely resolved.
Upvotes: 0
Reputation: 3555
I've found that I can simple access the ribbon in the ViewController
.
So like usual in XAF, override "OnActivated
" and do the magic there
protected override void OnActivated()
{
if (Frame.Template != null)
{
((XtraFormTemplateBase)Frame.Template)).RibbonTransformer.Ribbon
.Minimized = View.Id == "TestView;
}
base.OnActivated();
}
I got a couple of errors while accessing Frame.Template
being NULL
when I'd hit a dashboardview, with many nested ListView in it. Make sure You don't forget to check it :)
Upvotes: 2