App Bar...

Topics: UI Architecture
Jul 1, 2011 at 5:08 PM

So using View.Context property without having to hack something into (code behind), is there a way with the injection be able to switch out the appbar buttons dynamically?  Say on the new view being injected I wanted different buttons, how can I set them to the appbar.  I guess I am not seeing an easy way to template the appbar based on the view context.

I was able to get the app bar to show with programmatic approach with binding and the only thing does content control bubble the events with the model for the View.Model bound with {Binding}?  Cause at this point nothing hits.

ApplicationBar = {Binding AppBar}

public class SyncViewModel : Screen{

   public SyncViewModel(){

     CurrentView = "_Default";


   private void BindAppBar(){

       case "upload":   AssociatedMethod....
       case "download":   Associated....



   private void UploadAppBar(){
      //create appbar add a CaliburnButton... 



   //Message for CM.AppBarButton...
   public void StartUploadSync() {  }




If there is a better approach please feel free to criticise... :)