I'm developing some prototype and i'd like to make use of ribbon bar just like an office application, for example, i want the ribbon bar to have that application menu with some options like, new, save, and stuff like that. I'm also using a panel bar as a side menu.
The scenario is:
I need to change the tabs and buttons of the ribbon bar with an event from the side bar.
The event on the sidebar changes the xml that populates the ribbon bar but that is where I have a problem.
To change the ribbon bar with xml I have to remove the application menu because with it, I get some exception.
Failed to load viewstate. The control tree into which viewstate is being
loaded must match the control tree that was used to save viewstate during
the previous request. For example, when adding controls dynamically, the
controls added during a post-back must match the type and position of the
controls added during the initial request.
I believe that it could be solved if I add definitions for application menu in the xml and use my population event.
But the xml that was created from the method from ribbonbar ("GetXml()") didn't create anything.
I'd like to know if I should add it manually or the tags to do so. (if possible)
Or even another way to make something like that (use the dynamic population for the ribbon bar with application menu)