Dynamic App Bar on Windows Phone issue

Topics: Actions & Coroutines
Jan 26, 2012 at 2:46 AM

We have an app with a dynamic application bar that is created programmatically. 

This works as long as we do the construction in OnViewAttached, doing it on OnViewLoaded or OnViewReady appears too late, and the Message property on the AppBarButton/AppBarMenuItem does not work. 

Even with this, if we want to programmatically alter the app bar on a pivot contorl when the user swipes, when we add new app bar buttons programmatically (without any reload of the page), the Message does not wire to the command. 

Is there a way I can force things so that the method in the VM will fire to get Message working?

Otherwise, we're back to code behind land!