Jump into WPF! Tim Huckaby CEO, InterKnowlogy Microsoft RD & MVP Level: Beginner / Intermediate.

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

Chapter 3 – Web Design Tables & Page Layout
Expression Blend 4 – deep dive
Introduction to Windows Presentation Foundation (WPF) Dr. Frank McCown COMP 445 – GUI Programming.
Declarative based UI programming: WPF, Silverlight & Surface Tim Huckaby CEO, InterKnowlogy Microsoft RD & MVP.
Intermediate Level Course. Text Format The text styles, bold, italics, underlining, superscript and subscript, can be easily added to selected text. Text.
Dinko Jakovljević Microsoft Student Partner | BambooLab
An Introduction To Silverlight Gergely Orosz
Building Data Visualization Applications with the Windows Presentation Foundation and SilverLight...and Surface Tim Huckaby CEO, InterKnowlogy Microsoft.
Windows Presetation Foundation (WPF) 1. Introduction.
1 Moderne GUI og Silverlight Windows Presentation Foundation.
Delivering the Art of Software WPF & Silverlight: Data Visualization, NUI, and Next Generation of User Experience Tim Huckaby Founder / Chairman, InterKnowlogy.
Level: All About Tim, InterKnowlogy & Actus… InterKnowlogy ( Tim Huckaby, Founder/Chairman ( )  Custom.
WPF 3rd Party Controls WPF = Windows Presentation Foundation
Review of last session The Weebly Dashboard The Weebly Dashboard Controls your account and your sites Controls your account and your sites From here you.
Session Code: IW-02 Building Powerful Applications for the Microsoft Office System Using Microsoft Visual Studio Tools for the Microsoft Office System.
WPF For PowerBuilder Developers
Chapter 4 Dreamweaver: Part II The Web Warrior Guide to Web Design Technologies.
2 A First Look at Windows Presentation Foundation Everywhere ("WPF/E") Joe Stegman Lead Program Manager Microsoft Corporation.
C-ME A Smart Client Front-end for SharePoint 2007 Tim Huckaby CEO – InterKnowlogy Microsoft Regional Director Microsoft MVP –.NET.
Introduction to Silverlight By Alan Cobb 2008-Jan-10 Sacramento, CA
1 COS240 O-O Languages AUBG, COS dept Lecture 33 Building Apps Technologies C# (WPF part 1)
VWP03: Building Data Visualization Applications with WPF & Silverlight Tim Huckaby Founder / Chairman, InterKnowlogy Founder / CEO, Actus Software Microsoft.
Using the Actions Pane, Host Controls, and Smart Tags
Visual Studio Connections
Introduction to Mobile Programming. Slide 2 Overview Fundamentally, it all works the same way You get the SDK for the device (Droid, Windows, Apple) You.
A Jumpstart to WPF by Kevin Grossnicklaus ArchitectNow.
1 Intro XAML Attribute syntax & property syntax Panels Reusable resources Controls Data binding Steen Jensen, spring 2014.
An Introduction to Silverlight Matt Harrington Developer Evangelist, Microsoft October 20, 2011.
Windows Presentation Foundation. Agenda Introduction Developing Applications WPF and WF interoperability Custom Controls Styles and Templates Data Binding.
Virtual techdays INDIA │ Nov 2010 Developing Office Biz Application using WPF on Windows 7 Sarang Datye │ Sr. Consultant, Microsoft Sridhar Poduri.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved. 1 2 Welcome Application Introducing the Visual Basic 2008 Express Edition IDE.
Windows Presentation Foundation Adam Calderon Principal Engineer Interknowlogy LLC
Tim Huckaby CEO, InterKnowlogy Microsoft RD & MVP Declarative based UI programming: WPF, Silverlight & Surface.
Tim Huckaby CEO, InterKnowlogy Microsoft RD & MVP Jump into WPF!
Adam Calderon – C# MVP Application Development Practice Lead Interknowlogy.
LAYOUT CONTROLS. XAML Overview XAML : eXtensible Application Markup Language pronounced (ZAMEL) is a markup language used to design user interfaces XML-based.
Object Oriented Software Development 9. Creating Graphical User Interfaces.
Declarative based UI programming: WPF, Silverlight & Surface Tim Huckaby CEO, InterKnowlogy Microsoft RD & MVP.
Tim Huckaby CEO, InterKnowlogy Microsoft RD & MVP Building Data Visualization Applications with the Windows Presentation Foundation and SilverLight...and.
Copyright ©2004 Virtusa Corporation | CONFIDENTIAL Windows Presentation Foundation Ruwan Wijesinghe.
Tim Huckaby Founder, InterKnowlogy Microsoft RD & MVP SESSION CODE: WEB203.
Declarative Programming Layout and Controls Events and Commands Working with Data Styles.
Adam Calderon – C# MVP Application Development Practice Lead Interknowlogy.
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.
Windows Presentation Foundation (WPF). Introduction Separates appearance of user interface from behavior Appearance usually specified by XAML Behavior.
Building Data Visualization Applications with WPF Tim Huckaby InterKnowlogy, CEO Microsoft RD & MVP VPF303.
Module 3 Designing and Developing a User Interface.
Module 4 Taking Control of the User Interface. Module Overview Sharing Logical Resources in an Application Creating Consistent User Interfaces by Using.
Introduction to HTML. _______________________________________________________________________________________________________________ 2 Outline Key issues.
.NET Framework Presentation. About Me Patrik Löwendahl –C# MVP –Certified Vista Touchdown Trainer Cornerstone
Silverlight 101 Ahead! If you know Silverlight and are looking for more advanced content check out : ‘Microsoft Silverlight “Media” : Moving at 60fps’
An Introduction to Developing Applications for Microsoft Silverlight Jaime Rodriguez
XP New Perspectives on Macromedia Dreamweaver MX 2004 Tutorial 5 1 Adding Shared Site Elements.
Copyright ©2004 Virtusa Corporation | CONFIDENTIAL Windows Presentation Foundation Ruwan Wijesinghe.
Workflow in Microsoft Office SharePoint Server Jessica Gruber Consultant Microsoft Corporation.
Soyatec Contents Needs Architecture XAML fundamentals Data Binding Advanced features Style Q&A.
Part of the Microsoft.NET Framework 3.0 Tomer Shamam.NET Technologies Expert Sela Group
Adam Schultz MVVM and WPF. MVVM Model, View, ViewModel A software architecture designed to separate out User Interface design, Business Logic, and Data.
Chapter 8 Using Document Collaboration, Integration, and Charting Tools Microsoft Word 2013.
Introduction to Silverlight
Windows Presentation Foundation
Important New Concepts In WPF
Tech·Ed North America /20/ :01 PM
MGB 2003 Adam Calderon – C# MVP Principal Engineer Interknowlogy
Introduction to Silverlight
Understand Windows Forms Applications and Console-based Applications
WPF AKEEL AHMED.
Windows Presentation Foundation
Presentation transcript:

Jump into WPF! Tim Huckaby CEO, InterKnowlogy Microsoft RD & MVP Level: Beginner / Intermediate

Jump into WPF! Tim Huckaby CEO, InterKnowlogy Microsoft RD & MVP Level: Beginner / Intermediate

3 Abstract: You’ve seen the beautiful animated user interfaces; you have seen the gratuitous animations; you’ve seen the 3D. You might not be doing it now, but you will eventually – you’ll be building rich client applications in WPF. It’s just a matter of time. This session was designed as an introduction to WPF to get you over the big learning curve that has frustrated many and well on your way to building great applications in WPF. In this session, you’ll learn how to use Visual Studio to help build WPF applications, of course. But you’ll also learn about a number of tools you’ll use to build WPF applications. This is a rare place in the.NET stack where VS doesn’t do it all. In fact, it doesn’t even come close. So we’ll show you tools like those from the Expression Suite, along with some XAML design, syntax and rendering tools. WPF is manifested in three major application platforms (Windows Client, Silverlight, and Microsoft Surface) and all will be covered in this session at some level.

About… InterKnowlogy ( Tim Huckaby, CEO –Custom Application Development / Consulting / Software & Systems Engineering Firm headquartered in Carlsbad, CA –Design, Architect, Build and Deploy Enterprise Class Applications –Industry Experts: Most of the employees are published, MVPs, Speakers, etc. Microsoft.NET Application development since 2000! Microsoft.NET Rich Client Pioneers / industry leaders Information Worker Solutions (VSTO & SharePoint) Integration / Messaging, B2B / B2C, Wireless / Mobility Leading Edge: Surface, WPF, Silverlight, Win7 touch, SharePoint, VSTO Cutting Edge Solutions on emerging Microsoft technologies Largest Client: Microsoft

Session Agenda Quick Demo of the Reference Application WPF, XAML, and Declarative Programming Layout and Controls Events and Commands Working with Data Adding Style To Your Application Summary

6 Reference Application Demo Tim Huckaby CEO, InterKnowlogy Microsoft RD & MVP Project Structure XAML and Code Behind Working with Data Resources

WPF and Declarative Programming XAML replaces code Attributes control Layout and Style Event handlers wired-up in XAML Declarative Data Binding

Sample XAML Runs in a WPF Application: <Window x:Class="WpfApplication2.Window1“ xmlns=" xmlns:x=" Title="Window1" Height="300" Width="300"> Hello World Runs in the Browser: <Canvas xmlns=" xmlns:x=" Hello World

Layout and Controls Layout Basics Controls

Layout Basics Panels UI Element Positioning

Panels StackPanel Arranges child elements into a single line that can be oriented horizontally or vertically. WrapPanel Positions child elements in sequential position from left to right, breaking content to the next line at the edge of the containing box. DockPanel An area where you can arrange child elements either horizontally or vertically, relative to each other. Grid A flexible grid area that consists of columns and rows. Canvas An area within which you can explicitly position child elements by using coordinates that are relative to the Canvas area.

Container Controls Canvas DockPanel DocumentViewer Frame Grid StackPanel Tab

Positioning Horizontal and Vertical Alignment Margin Padding Margin Text Block Padding

Controls Standard Common Controls Menu and Toolbar Controls Container Controls New Controls

Standard Common Controls TextBox Button CheckBox / ComboBox Image Label ListBox Password

Menu and Toolbar Controls Menu Context Menu StatusBar ToolBar ToolBarTray

Controls unique to WPF TextBlock Expander InkCanvas InkPresenter DocumentViewer UniformGrid

18 Screen Layout Demo Tim Huckaby CEO, InterKnowlogy Microsoft RD & MVP

Events and Commands Standard.NET Events Routed Events Commands

Routed Events Bubbling –Starts at the current element and bubbles up to the current element’s parent and that elements parent and so on [MouseLeftButtonDown] Tunneling –Works opposite of bubbling and starts at the root element and works down to the originating element [PreviewMouseLeftButtonDown] Direct –Works like standard.NET event handling with only direct handlers being notified of events [Click]

Working with Events Halting Events Private void Grid_ButtonDown(object sender, RoutedEventArgs e) { //do something here e.Handled = true; } Determining the Target Private void Grid_ButtonDown(object sender, RoutedEventArgs e) { // who is the originator MessageBox.Show(((Control)e.OriginalSource).Name); }

Commands Logical action that can be invoke in several ways Based on the RoutedCommand Class Uses both event tunneling [PreviewExecuteEvent] and event bubbling [ExecuteEvent]

Standard Command Classes Class Command Types ApplicationCommands Commands common to almost all applications. Includes clipboard commands, undo and redo and document level operations (open,close,print,etc..) ComponentCommands Operations for moving through information such as scroll up and down, move to end, and text selection EditCommands Text editing commands such a bold, italic and alignment MediaCommands Media-playing operations such as transport (play,pause,etc..), volume control and track selection

24 Events and Commands Demo Tim Huckaby CEO, InterKnowlogy Microsoft RD & MVP

Working with Data Overview Simple Data Binding Complex Data Binding

Data Binding Simple Field level Data Binding Complex Data Binding to multiple controls at a time (Master/Detail/Detail) Client-Side Sorting and Filtering Support for binding to Objects, XML and Relational data sources

Simple Data Binding Simple Data Binding using Business Objects Support for two-way synchronization in simple objects via the INotifyPropertyChanged interface Implicit and Declarative binding via the DataContext

Complex Data Binding Binding to Lists Supports two-way data binding to list if list inherits from ObservableCollection Data Templates Sorting Filtering Master/Detail/Detail

29 Working with Data Demo Tim Huckaby CEO, InterKnowlogy Microsoft RD & MVP

Adding Style to Your Application Overview Resources Triggers

XAML Styles 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

Overview Cont. Contained in System.Windows.Style Main Properties –Key –TargetType –Setters (Property and Event)

Style Examples

Resources 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

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

Triggers 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

37 Adding Style to Your Application Tim Huckaby CEO, InterKnowlogy Microsoft RD & MVP

Summary Layout in WPF is flexible WPF has a rich set of controls Data Binding is rich & supports many data types Styles bring life to your applications The learning curve can be steep, but is worth it. Download all my resources and dedicate some time to learn.

WPF: Where to go Next Free Resources WindowsClient.net - this is the official Microsoft community portal for WPF development, and is chock full of great resources such as the... WindowsClient.net Learn WPF page - this page links to podcasts, labs, and the very popular "how do I?" videos Learn WPF page MIX University's WPF Bootcamp - this is a full 3-day video training course on WPF, in which expert instructors guide you from the surface into the depths of the technology stack MIX University's WPF Bootcamp

Where to go Next Books Windows Presentation Foundation Unleashed (WPF) by Adam Nathan, Daniel LehenbauerAdam NathanDaniel Lehenbauer Essential Windows Presentation Foundation (WPF) by Chris AndersonChris Anderson

Where to go Next Soon… Windows Presentation Foundation A Scenario-Based Approach by Billy Hollis “Early April…I hope…” B. Hollis, 12/7/07 “October…” B. Hollis, 6/3/08 April 5 th, 2009 Amazon

Tim Huckaby, InterKnowlogy More info on InterKnowlogy: ● Contact me: Tim Huckaby ● or ● Phone: ● Blog : About Tim Huckaby… ● CEO, InterKnowlogy ● Microsoft ® Regional Director – Southern California ● Microsoft ®.NET Partner Advisory Council Founder / Member ● Microsoft ® MVP -.NET ● Microsoft ® Surface Partner Advisory Council ● INETA Speaker – International.NET Users Group Association ● Windows and.NET Magazine Advisory Board Member ●.NET Developers Journal Magazine Advisory Board Member ● Author / Speaker