Example #1
0
        /// <summary>Linking master page and attaching specific content to it's placeholders</summary>
        public ContainerTag ReusableCreateTagTree(
            PlaceHolderDelegate titleContent, PlaceHolderDelegate mainContent, ViewModels.MasterViewModel model)
        {
            SiteMaster master = this.MasterBuilder();

            master.ParentBuilder = this;
            master.SelfFireOnCreateBuilder();
            return(master
                   // SEE HERE ! - example how to attach specifc content to master page's placeholders
                   .Attach <SiteMaster>(x => x.TitleContent = titleContent)
                   .Attach <SiteMaster>(x => x.MainContent = mainContent)

                   // just call master page method to generate combined content
                   .CreateTags(model));
        }
Example #2
0
 public MasterPage()
 {
     InitializeComponent();
     BindingContext = new ViewModels.MasterViewModel();
 }