Hello,
I'm trying to achieve a specific behavior with the WinExplorerBar.I'm trying to have the expanded state set to collapsed, and disallow the user to expand it at all.
I'm using the following settings:NavigationPaneExpansionMode set to NoneNavigationPaneExpandedState to CollapsedHandling the NavigationPaneFlyoutDisplaying event and cancelling the flyout.
The problem is that when I set the ExpansionMode to None, the ExpandedState is ignored and set to expanded. Even if I set the ExpandedState to Collapsed again after changing the ExpansionMode, it is ignored and just has the size as if it was collapsed, but showing the content.
See screenshot attached. It contains 2 WinExplorerBar, the left one is collapsed with the expansionmode set to default value, the right one is collapsed with expansionmode set to none. How can I get the right one to be displayed as the left one, while keeping the expansionmode to none ?
Kind regards,
Michael
Michael,
I would suggest that you handle the NavigationPaneExpanding event and cancel it rather than the NavigationPaneFlyoutDisplaying event. If that does not work for you, then could you provide me with a simple sample application that demonstrates this issue you are describing? I don't quite understand how the screenshot corresponds to what you have described. I only see one WinExplorerBar in the picture and not two. If you could give me a sample that I could work with then I will better understand the problem you are having.
Hey Michael,
There are 2 explorerbars on the screenshot, one with buttons (the smiley faces) and one without, you can see the start of a date there. That one doesn't have any buttons currently.
I will attempt to create a sample application to explain the problem better.
I have created a sample application in attachment.
Both mentioned behaviors can be simulating by setting the following options:
1. Leaving the expansionmode, gives the look and feel that I want, however, the user can expand and collapse:ultraExplorerBar1.NavigationPaneExpansionMode = NavigationPaneExpansionMode.OnButtonClickOrSizeChanged;
2.I want to set the epxansionmode to none:ultraExplorerBar1.NavigationPaneExpansionMode = NavigationPaneExpansionMode.None;However, when I do this, the layout of the control changes, it is no longer "collapsed" like in the first option.
So, How can I set the expansionmode to "none" while keeping the layout as in the example when it is not set to none ?
PS: I tried to add the sample + 2 screenshots, however I did not manage to do that. Is there some kind of 1 attachment limit ?
I have modified your sample application. I set the NavigationPaneExpansionMode to OnButtonClickorSizeChange and I cancelled the NavigationPaneFlyoutDisplaying event as well as the NavigationPaneExpanding event and that seems to do what you want. Check it out and let me know if you have further questions.
Thank you, this solved it !I did set the NavigationPaneExpansionMode to OnSizeChanged instead of OnButtonClickorSizeChange, to avoid having a non-working button at the top.