Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Master Pages, Themes, and Site Navigation Bradley Millington Program Manager Web Platform and Tools Overview Agenda • What is Good UI? – – – – Not just visually appealing… Consistent, Accessible, Standards Compliant Modular/Interchangeable styles Time/Cost efficient • ASP.NET 2.0 Features and Usage – Master Pages – Content and Layout of your Site – Themes – Modify Appearances independently of Content – Navigation – Menu, TreeView, SiteMapPath, and More Master Pages Current Situation • • • • Hundreds of pages difficult to update Layout is reused across site: header, footer, nav Code and markup not reused = duplication Current solutions: – Include Files - unbalanced tags, many files – User Controls - pages littered with controls, many files – Tools-based solution – design-time only, commitment Master Pages Introduction • Factor redundancies into reusable templates • Inheritance concept baked-in architecturally • Unlimited Nesting • Less Files, Controls • Balanced tags per file • Runtime merge Master Pages Master Pages + Content Pages Master Pages ContentPlaceHolders + Content Controls demo Master Pages Bradley Millington Program Manager Web Platform and Tools Navigation Introduction Server Controls Site Navigation API M enu TreeView SiteM apPath SiteM apDataSource SiteM apNode SiteM apNode SiteM apNode SiteM ap class XmlSiteM apProvider (SiteM apProvider) Provider Layer web.sitemap Relational Store User Defined demo Site Navigation Bradley Millington Program Manager Web Platform and Tools Themes Current Situation Themes Introduction Themes Theme Folders and Skin Files Themes CSS and Image Files Themes Options • Declaring the Theme – Per Page – Page Directive – Per Application or Directory – Web.config • Applying a Theme in Code – Set Theme Property Dynamically in PreInit • Two Different Ways to Apply Themes – StyleSheetTheme – “Suggested” Look and Feel – Theme – “Enforced” Look and Feel • Themeable Properties – Simple Properties, Collections, Templates – Static Values, Data Bindings, Localization Expressions demo Themes Bradley Millington Program Manager Web Platform and Tools Resources • My Slides and Demos – http://www.bradmi.net/presentations • ASP.NET 2.0 Quickstarts – http://www.asp.net/quickstart • ASP.NET Forums – http://www.asp.net/forums • SiteMap Provider Architecture and Source Code – http://msdn.microsoft.com/asp.net/downloads/providers/default.a spx?pull=/library/en-us/dnaspp/html/asp2prvdr04.asp • ASP.NET 2.0 Master Pages Intro and Tips, Tricks and Traps (K. Scott Allen) – http://www.odetocode.com/Articles/419.aspx – http://odetocode.com/Articles/450.aspx