Adam Calderon – C# MVP Application Development Practice Lead Interknowlogy.

Slides:



Advertisements
Similar presentations
Module 1: Creating an Application by Using Windows Presentation Foundation Overview of WPF Creating a Simple WPF Application Handling Events and Commands.
Advertisements

Developing Event Driven State Machine Workflows S1 S2 S3 S4 Adam Calderon Principal Engineer - Interknowlogy Microsoft MVP – C#
Intro to HTML. HTML HTML = HyperText Markup Language Used to define the content of a webpage HTML is made up of tags and attributes Content.
Introduction to HTML & CSS
15 LAYOUT Controlling the position of elements Creating site layouts Designing for different sized screens.
Project 8 Creating Style Sheets.
CSS BASICS. CSS Rules Components of a CSS Rule  Selector: Part of the rule that targets an element to be styled  Declaration: Two or more parts: a.
Chapter 8 Creating Style Sheets.
Web Design with Cascading Style Sheet Lan Vu. Overview Introduction to CSS Designing CSS Using Visual Studio to create CSS Using template for web design.
Oracle Applications Framework Jason Reedy Sales Consultant Oracle Corporation.
Declarative based UI programming: WPF, Silverlight & Surface Tim Huckaby CEO, InterKnowlogy Microsoft RD & MVP.
Dinko Jakovljević Microsoft Student Partner | BambooLab
16 HTML Tables and Frames Section 16.1 Create a basic table using HTML Define borders Merge cells Align content in tables Section 16.2 Create a frames-based.
Overview of the Composite Application Guidance for WPF Adam Calderon Application Development Practice Lead.
An Introduction To Silverlight Gergely Orosz
1 Chapter 12 Working With Access 2000 on the Internet.
XP 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
OFC312 Developing Workflows for the 2007 Microsoft Office System and Windows SharePoint Services (version 3) Adam Calderon Principal Engineer - Interknowlogy.
Customizing Outlook. Forms Window in which you enter and view information in Outlook Outlook Form Designer The environment in which you create and customize.
Create a Web Site with Frames
Working with Cascading Style Sheets. 2 Objectives Introducing Cascading Style Sheets Using Inline Styles Using Embedded Styles Using an External Style.
Developing a Basic Web Page with HTML
Tutorial 3: Adding and Formatting Text. 2 Objectives Session 3.1 Type text into a page Copy text from a document and paste it into a page Check for spelling.
UX01 A Guided Tour Through SharePoint HTML, CSS, and Master Page Resources Chandima Kulathilake Microsoft MVP (Microsoft Office SharePoint Server)
Working with Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of a document.
XP Tutorial 7New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Jump into WPF! Tim Huckaby CEO, InterKnowlogy Microsoft RD & MVP Level: Beginner / Intermediate.
Ch6:creating consistent looking web sites. Master pages Master page defines a combination of fixed content and content place holder to hold the web page(.aspx)
XP 1 Tutorial 5 Using Frames in a Web Site. XP 2 Tutorial Objectives  Describe the uses of frames in a Web site  Lay out frames within a browser window.
© Ms. Masihi.  The Dreamweaver Welcome Screen first opens when you start Dreamweaver.  This screen gives you quick access to previously opened files,
ASP.NET Web Server Controls Basic Web Server Controls.
Windows Presentation Foundation Adam Calderon Principal Engineer Interknowlogy LLC
Tim Huckaby CEO, InterKnowlogy Microsoft RD & MVP Jump into WPF!
Adam Calderon – C# MVP Application Development Practice Lead Interknowlogy.
Declarative based UI programming: WPF, Silverlight & Surface Tim Huckaby CEO, InterKnowlogy Microsoft RD & MVP.
Tim Huckaby Founder, InterKnowlogy Microsoft RD & MVP SESSION CODE: WEB203.
A Lap Around Windows Presentation Foundation. Why hasn’t UX taken off in software? It’s Difficult! Animation 2D 3D Documents Styled Controls Video Windows.
Web Development 101 Presented by John Valance
Module 13 Animations in WPF. Module Overview Using Animations Using Triggers Implementing Data Visualizations.
CSE 409 – Advanced Internet Technology Today you will learn  Styles  Themes  Master Pages Themes and Master Pages.
Rujchai Ung-arunyawee Department of Computer Engineering Khon Kaen University.
LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE HTML and CSS 8th Edition Chapter 8: Working with Style Sheets.
DYNAMIC HTML What is Dynamic HTML: HTML code that allow you to change/ specify the style of your web pages. Example: specify style sheet, object model.
ControlTemplate and DataTemplate Doncho Minkov Telerik School Academy Technical Trainer
Microsoft ® Official Course Developing a Publishing Site for Web Content Microsoft SharePoint 2013 SharePoint Practice.
CNIT 132 – Week 4 Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of.
Module 4 Taking Control of the User Interface. Module Overview Sharing Logical Resources in an Application Creating Consistent User Interfaces by Using.
Introduction to C# 2.0 An Advanced Look Adam Calderon Principal Engineer - Interknowlogy Microsoft MVP – C#
Windows Presentation Foundation ("Avalon"): Beautiful Code, Beautiful Design - Applications Your Designers Can Work With Robert Ingebretsen PRS317 Program.
Using Document Collaboration, Integration, and Charting Tools
Microsoft Expression Web 3 – Illustrated Unit D: Structuring and Styling Text.
Friday, March 8 Creating real Custom Controls Kelvin van Geene 12:15.
XP New Perspectives on Macromedia Dreamweaver MX 2004 Tutorial 6 1 Creating Dynamic Pages.
Soyatec Contents Needs Architecture XAML fundamentals Data Binding Advanced features Style Q&A.
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
Part of the Microsoft.NET Framework 3.0 Tomer Shamam.NET Technologies Expert Sela Group
1 Cascading Style Sheet (CSS). 2 Cascading Style Sheets (CSS)  a style defines the appearance of a document element. o E.g., font size, font color etc…
Jim Fawcett, Brown Bag Seminar Series Fall 2007
ASP.NET Forms.
Objective % Select and utilize tools to design and develop websites.
Important New Concepts In WPF
Jim Fawcett, Brown Bag Seminar Series Fall 2007
MGB 2003 Adam Calderon – C# MVP Principal Engineer Interknowlogy
Objective % Select and utilize tools to design and develop websites.
The Web Wizard’s Guide To DHTML and CSS
WPF AKEEL AHMED.
.NET and .NET Core 7. XAML Pan Wuming 2017.
Tutorial 7 – Integrating Access With the Web and With Other Programs
MASTER PAGES.
Presentation transcript:

Adam Calderon – C# MVP Application Development Practice Lead Interknowlogy

 More info on InterKnowlogy:  Contact Information Phone: x274 Blog:  About Adam Calderon  Microsoft MVP – C#  Microsoft UI Server Frameworks Advisory Council  Developer / Author / Speaker / Teacher

 What Styles are and how to use them  How Triggers can be used to replace common UI behavior  How Templates can be used to enhance the look of a control

 Styles  Triggers  Templates

 What are styles?  Problems they address in WinForms 2.0  Styling controls one at a time  Unnecessary Custom Control Creation  Similarities to Cascading Style Sheets  Inline declaration  Page level declaration  Separate file declaration

 Contained in System.Windows.Style  Main Properties  Key  TargetType  Setters ▪ Property – Can set element properties ▪ Event – Can set names to common event handlers

Some Text

 Static Resources  Loaded when Window or Page Loads  Leads to slower page loading  Changes to underlining values are not propagated  Dynamic Resources  More overhead to allow for constant updates  Can only be used to set dependency properties  Can potentially improve Page and Window load time

 Contains hash table of resources  Great way to organize resources  Resource.MergedDictionaries combines many different file based resources

 Application Level  Application.Resources  Page/Window Level  Window.Resources  Page.Resources  Element Level  Grid.Resources

 Order of Precedence  Application Level ▪ Page/Window Level (Overrides Application) ▪ Element Level (Final Override)  BasedOn Property  Style-based  Element-based

 Organize styles into scope areas  Application  Page  Element  Use Resource Dictionaries  Use inheritance (BasedOn) in cases where you want to override a style for a particular application area  Try to limit element use of element based styles

Styles in Action

 Styles  Triggers  Templates

 Setters that are set based on one or more conditions  Three Types of Triggers  Property – Invoked when the value of a dependency property changes  Data – Invoked when the value of a plain.NET property changes  Event – Invoked when a routed event changes

 Based on System.Windows.Trigger  Set when a specified property has a specified value  Reset when the property no longer has this value

 Set when a specified property (.NET based or dependency) has a specified value  Reset when the property no longer has this value <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self},Path=Text}" Value="Color">

 Triggers can be logically Or’d together to solve unique problems  If both conditions are true the last one wins Last one Wins when both are true

 Triggers can be logically AND’d together to solve unique problems  Implemented using MultiTrigger

Triggers in Action

 Styles  Triggers  Templates

 Pick up where properties leave off  Provide ability to completely replace a controls visual tree  Not about replacing functionality  Reinforces separation of functionality and view  Out-of-box controls get their visual appearance from Templates  Brings together layout, styles and triggers

 Three types of templates:  ControlTemplate  ItemsPanelTemplate  DataTemplate

<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/> <Button Height="20" Width="40" Background=“Blue” Template="{StaticResource ButtonTemplate}">Ok

 Based on System.Windows.Controls.ControlTemplate  Resources  TargetType  Trigggers  TemplateBinding links template and control properties  ContentPresenter can be used to display controls content

 Markup extension similar to binding  More lightweight than binding and designed for templates  Data source is always the target control

 Provides ability to show all types of content  Preferred way to provide ability for your template to show content  Remember that your are replacing the visual representation of a control and correctly showing contained content is important

Templates in Action

 Styles are powerful and flexible  Triggers eliminate user interaction-based UI coding  Controls are more about behavior  Control Templates modify visual aspects of controls

 MSDN ® Links Microsoft Windows ® Vista ™ development center: us/windowsvista/default.aspx us/windowsvista/default.aspx Microsoft.NET Framework 3.0 for developers:  Other Links Microsoft.NET Framework:

 More info on InterKnowlogy:  Contact Information Phone: x274 Blog:  About Adam Calderon  Microsoft MVP – C#  Microsoft UI Server Frameworks Advisory Council  Developer / Author / Speaker / Teacher