Windows Presentation Foundation

Similar documents
Windows Presentation Foundation (WPF)

Windows Presentation Foundation Tutorial 1

Visual Studio 2008: Windows Presentation Foundation

Essentials of Developing Windows Store Apps Using C# MOC 20484

Mapping to the Windows Presentation Framework

Understanding In and Out of XAML in WPF

Microsoft Technology Practice Capability document. WPF and Silverlight Building Rich Interactive Applications with XAML. Overview

Data Binding with WPF: Binding to XML

JavaFX Session Agenda

Windows Store App Development

Adobe Dreamweaver Exam Objectives

CA Plex and Microsoft Windows Presentation

Creating Next-Generation User Experience with Windows Aero, Windows Presentation Foundation and Silverlight on Windows Embedded Standard 7

Microsoft Virtual Labs. Building Windows Presentation Foundation Applications - C# - Part 1

How to start creating a VoIP solution with Ozeki VoIP SIP SDK

WEBfactory Silverlight vs. HTML 5 Version 1.0. July

Using WPF for Computer Graphics

Advanced Presentation Features and Animation

Programming in HTML5 with JavaScript and CSS3

Hands-On Lab. Building a Data-Driven Master/Detail Business Form using Visual Studio Lab version: Last updated: 12/10/2010.

Desktop, Web and Mobile Testing Tutorials

Software Development Interactief Centrum voor gerichte Training en Studie Edisonweg 14c, 1821 BN Alkmaar T:

Visual C# 2012 Programming

Designing for Windows Phone

Implementing multi-user multi-touch scenarios using WPF in Windows* 8 Desktop Apps

Web Enabling Solution for Windows Desktop Applications. White Paper

Windows Presentation Foundation Using C#

Upgrade to Microsoft Web Applications

Skills for Employment Investment Project (SEIP)

Silverlight for Windows Embedded Graphics and Rendering Pipeline 1

App Development for Modern UI MODULE 4: APP DEVELOPMENT ESSENTIALS

20481C: Essentials of Developing Windows Store Apps Using HTML5 and JavaScript

Key Benefits of Microsoft Visual Studio 2008

INTERNET PROGRAMMING AND DEVELOPMENT AEC LEA.BN Course Descriptions & Outcome Competency

Web Development I & II*

Performance and Usability Improvements for Massive Data Grids using Silverlight

ComponentOne. Windows for WPF

MS WORD 2007 (PC) Macros and Track Changes Please note the latest Macintosh version of MS Word does not have Macros.

Developing ASP.NET MVC 4 Web Applications Course 20486A; 5 Days, Instructor-led

Click on various options: Publications by Wizard Publications by Design Blank Publication

Joseph M Conaty Software Engineer

1. WPF Tutorial Page 1 of 359 wpf-tutorial.com

HTML5. Turn this page to see Quick Guide of CTTC

Why HTML5 Tests the Limits of Automated Testing Solutions

Introduction to C#, Visual Studio and Windows Presentation Foundation

Pro WPF in C# Windows Presentation Foundation with.net 3.5 SECOND EDITION. Matthew MacDonald. Apress 8. [] rj G

Search Engine Optimization for Silverlight Applications

Top 50 WPF Interview Questions

CommonTime Making Business Mobile. Enterprise. CommonTime. Mobile Solutions. mdesign Platform.

Introduction to the BackgroundWorker Component in WPF

1. WPF Tutorial Page 1 of 431 wpf-tutorial.com

AppDev OnDemand UX Design Library

Catálogo de cursos plataforma elearning Microsoft Imagine Academy: Microsoft SQL Server y Visual Studio

What is Microsoft PowerPoint?

ART 379 Web Design. HTML, XHTML & CSS: Introduction, 1-2

EDIT202 PowerPoint Lab Assignment Guidelines

Windows Presentation Foundation: What, Why and When

Microsoft Silverlight 4 Step by Step

Microsoft Essentials of Developing Windows Store Apps Using HTML5 and JavaScript

VPAT. Voluntary Product Accessibility Template. Version 1.5. Summary Table VPAT. Voluntary Product Accessibility Template. Supporting Features

AppDev OnDemand Microsoft Development Learning Library

ArcGIS Viewer for Silverlight An Introduction

Voluntary Product Accessibility Template Blackboard Learn Release 9.1 April 2014 (Published April 30, 2014)

Introducing Silverlight 1.1

Section Software Applications and Operating Systems - Detail Voluntary Product Accessibility VPSX. Level of Support & Supporting Features

Fundamentals of Web Design (One Semester)

Chapter 13 Computer Programs and Programming Languages. Discovering Computers Your Interactive Guide to the Digital World

WEB DEVELOPMENT IA & IB (893 & 894)

Windows Presentation Foundation (WPF)

Chapter 3. Application Software. Chapter 3 Objectives. Application Software

Going Beyond SAP ITS Mobile Apps to a Responsive Design Mobile Apps. JK (JayaKumar Pedapudi) Principal Consultant NTT DATA, Inc.

EUROPEAN COMPUTER DRIVING LICENCE / INTERNATIONAL COMPUTER DRIVING LICENCE WEB EDITING

ASP.NET. Web Programming. Telemark University College Department of Electrical Engineering, Information Technology and Cybernetics

Using HTML5 Pack for ADOBE ILLUSTRATOR CS5

paragraph(s). The bottom mark is for all following lines in that paragraph. The rectangle below the marks moves both marks at the same time.

Rich Internet Applications

Platform. Developing ISV Applications using Microsoft Dynamics CRM. Microsoft Dynamics CRM 4.0 DAVID YACK. May 2008

Creative Cloud for Web Design

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Windows 10 Apps Development

GUI and Web Programming

ASP.NET Overview. Ken Casada Developer Evangelist Developer & Platform Evangelism Microsoft Switzerland

Developing ASP.NET MVC 4 Web Applications

SENSE/NET 6.0. Open Source ECMS for the.net platform. 1

How To Write A Powerpoint (For A Powerbook) On A Microsoft Powerbook On A Windows 7.5 (For Windows 7) On An Ipa 2.3.

Transcription:

Windows Presentation Foundation C# Programming April 18

Windows Presentation Foundation WPF (code-named Avalon ) is the graphical subsystem of the.net 3.0 Framework It provides a new unified way to develop richer UIs for both desktop and web applications Much richer than that WinForms supports advanced 2-D and 3-D graphics, animation, audio, video, and more Provides a greater separation of UI and business logic

XAML Extensible Application Markup Language is used to describe the controls on the UI Controls on the application s Window or Page form a element tree hierarchy Set properties of controls in XAML Also set up event handlers that are defined in the.cs files behind the UI

Installed with Vista Platforms / Tools Can also be added on to XPSP2 and Server 2003 There are many tools to help develop XAML UIs: XamlPad.NET 3.0 extension for Visual Studio 2005 Visual Studio Orcas Microsoft Expression Blend (code-named Sparkle ) Desktop apps run standalone on.net 3.0 Web apps run within the browser with restricted security Microsoft Silverlight (formerly known as WPF Everywhere) is a lightweight subset of WPF for mobile devices

Hello, Desktop World <Window xmlns="http://schemas.microsoft.com/winfx/2006/ xaml/presentation" Title="Hello, Desktop World!"> <Button>Click Me!</Button> </Window>

Hello, Web World <Page xmlns="http://schemas.microsoft.com/winfx/2006/ xaml/presentation" Title="Hello, Web World!"> <Button>Click Me!</Button> </Page>

Setting Properties and Handlers <Window x:class="windowsapplication8.window1" xmlns="http://schemas.microsoft.com/winfx/2006/ xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/ xaml" Title="WindowsApplication8" Height="200" Width="200"> <Button Background="Red" Height="100" Width="100" HorizontalAlignment="Center" Click="ClickHandler">Click Me</Button> </Window> ClickHandler is a method defined in the code-behind file Window1.xaml.cs

Layout The controls on a window or page are organized in an element tree There are different kinds of Panels for organizing controls in different ways By nesting panels, arbitrarily complex UIs can be organized

Canvas The most flexible panel is Canvas It behaves similar to WinForms in that controls are specified by absolute x- and y-position relative to the canvas Items that appear in last in the tree have the highest z-order

<Canvas> <Canvas Height="100" Width="100" Top="0" Left="0" Background="Red"/> <Canvas Height="100" Width="100" Top="100" Left="100" Background="Green"/> <Canvas Height="100" Width="100" Top="50" Left="50" Background="Blue"/> </Canvas>

DockPanel DockPanel is a container that positions its elements along the edges of the container Elements can be position at the Top, Bottom, Left, or Right You can also have the last element added fill the remaining space of the container

<DockPanel LastChildFill="True"> <Border Height="25" Background="SkyBlue" BorderBrush="Black" BorderThickness="1" DockPanel.Dock="Top"> <TextBlock Foreground="Black">Dock = "Top"</TextBlock> </Border> <Border Height="25" Background="SkyBlue" BorderBrush="Black" BorderThickness="1" DockPanel.Dock="Top"> <TextBlock Foreground="Black">Dock = "Top"</TextBlock> </Border> <Border Height="25" Background="LemonChiffon" BorderBrush="Black" BorderThickness="1" DockPanel.Dock="Bottom"> <TextBlock Foreground="Black">Dock = "Bottom"</TextBlock> </Border> <Border Width="200" Background="PaleGreen" BorderBrush="Black" BorderThickness="1" DockPanel.Dock="Left"> <TextBlock Foreground="Black">Dock = "Left"</TextBlock> </Border> <Border Background="White" BorderBrush="Black" BorderThickness="1"> <TextBlock Foreground="Black">This content will "Fill" the remaining </Border> </DockPanel>

More Panels The other two major types of panels are StackPanel and Grid StackPanels position all their children from top to bottom or left to right Grids break up the display into rows and columns that contain elements You can use a Grid to specify that a particular row or column should occupy a fixed percentage of the window size

Resources For each element you can provide a resource dictionary This contains values that can be used within the scope of the element <Window> <Window.Resources> <Color x:key="mycolor" R="10" G="3" B="100" /> </Window.Resources> <Button Background="{StaticResource MyColor}" /> </Window>

Styles A very useful resource is a Style A Style can be used to set properties of several controls in a concise and organized way Styles also make it very easy to change the look of the UI, like CSS does for webpages

<Window xmlns="..."> <Window.Resources> <Style TargetType="Button"> <Setter Property="Background" Value="Orange" /> <Setter Property="Margin" Value="10, 10, 10, 10" /> <Setter Property="FontFamily" Value="Verdana" /> <Setter Property="FontSize" Value="20" /> </Style> </Window.Resources> <Grid> <Grid.RowDefinitions><RowDefinition/> <RowDefinition/></Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition /> <ColumnDefinition /></Grid.ColumnDefinitions> <Button Grid.Column="0" Grid.Row="0">1</Button> <Button Grid.Column="1" Grid.Row="0">2</Button> <Button Grid.Column="0" Grid.Row="1">3</Button> <Button Grid.Column="1" Grid.Row="1">4</Button> </Grid> </Window>

Styles

2-D Graphics Common shapes are pre-defined elements Can define custom vector shapes These elements, like any other, can received keyboard and mouse input!...this would have been nice for the Vector Graphics assignment :-)

[Samples] 3-D Graphics and Animation

Data binding Video and audio elements Fixed and flow documents Other Features Bottom line: You know how to design GUIs using WinForms, but there are a lot of features to learn in WPF that help create better looking user interfaces!