Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
785
How to save the NavigationAreaMaxGroups accross sessions
posted

Hi,

 

I'm dynamically loading views inside the XamWebOutlookBar. It works great and I've got no issue with it.

I'm now tasked with saving the state of the XamWebOutlookBar accross sessions. If the user drags the splitter down and shows less groups, I've got to save this number (it's the NavigationAreaMaxGroups property AFAIK).

Unfortunately, I can't see any event triggering the change of the property value.

 

I tried listening on the NavigationAreaGroups.CollectionChanged but it will be called when I dynamically add the views to the outlookbar as well as when the user drags the splitter.

 

Is there an event I'm missing or is there a good way of saving this NavigationAreaMaxGroups so that the user will see the same visible groups on the new session?

 

 

Cheers.

Parents
No Data
Reply
  • 785
    posted

    I think I solved the issue.

    I listen on the NavigationAreaGroups.CollectionChanged event and save the NavigationAreaMaxGroups each time:

     

    userState.MaxNumberOfNavigationItems = _hostControl.NavigationAreaMaxGroups == _hostControl.Groups.Count ? -1 : _hostControl.NavigationAreaMaxGroups;

     

    Is this the best approach?

Children