+ All Categories
Home > Technology > Windows Presentation Foundation for Developers - Part 1

Windows Presentation Foundation for Developers - Part 1

Date post: 15-May-2015
Category:
Upload: goodfriday
View: 390 times
Download: 0 times
Share this document with a friend
Description:
Windows Presentation Foundation (WPF) is a paradigm-shifting framework for building rich Windows applications. Learn how to build an application with seamless deployment, rich user experience, great printing, and the ultimate in information visualization. Walk away understanding the fundamentals of the XAML markup and programming model: layout, controls, documents, media, 2d, 3d, data binding, styling and templating. (This is the first in a two-part series.)
Popular Tags:
33
Transcript
Page 1: Windows Presentation Foundation for Developers - Part 1
Page 2: Windows Presentation Foundation for Developers - Part 1

Fundamentals of WPFTour of Content Families

[email protected] Program Managerrrelyea.spaces.live.com robrelyea.com/events/mix07

Page 3: Windows Presentation Foundation for Developers - Part 1

WPF in 3 Circles or Less

W P F

Page 4: Windows Presentation Foundation for Developers - Part 1

WPF in 3 Circles or Less

Windows Desktop or

Browser

Deep Platform with

IntegrationSimple to Run*

Page 5: Windows Presentation Foundation for Developers - Part 1

5

Content FamiliesSegoe UI

Page 6: Windows Presentation Foundation for Developers - Part 1

6

2D Graphics

Page 7: Windows Presentation Foundation for Developers - Part 1

Using Shapes

demo

Page 8: Windows Presentation Foundation for Developers - Part 1

2D Content

Create in Xaml conversant toolsExpression DesignExpression Blend

Converters/Exporters from well known formats.svgAdobe Illustrator

Programmatic CreationBased on your data

Page 9: Windows Presentation Foundation for Developers - Part 1

Custom Shapes Example

RobbyIngebretsonnotstatic.com/archive/43

Page 10: Windows Presentation Foundation for Developers - Part 1

10

Brushes

Brushes are used to fill geometriesSolid colors, linear and radial gradients, images, visuals, and drawings can be used as brushes

Images, Visuals, and Drawings can tile or stretch

VisualBrushEnables “live” secondary renderings of your content

DrawingBrushAllows you to produce a vector fill that can be tiled

Page 11: Windows Presentation Foundation for Developers - Part 1

Applying 2D Graphics

demo

Page 12: Windows Presentation Foundation for Developers - Part 1

12

Panels & Layout

Adapt UI to Content

Page 13: Windows Presentation Foundation for Developers - Part 1

Using Decorators & Panels

demo

Panel basics, Using custom panels

Page 14: Windows Presentation Foundation for Developers - Part 1

Panels – Build user adaptive UISystem.Windows.Controls

• PanelsPosition/size children using:

Size-to-ContentTransformsOpacity

Children are UIElementsIncluding nested panels

Built in Panels includeCanvas

StackPanel

DockPanel

WrapPanel

Grid

UniformGrid 14

Page 15: Windows Presentation Foundation for Developers - Part 1

15

Layout System

Recursive Layout Process

MeasureParent to Child: How big do you want to be?

Child to Parent: DesiredSize

ArrangeParent to Child: Here is your available space.

Child to Parent: ActualSize

Page 16: Windows Presentation Foundation for Developers - Part 1

Custom Panel Examples

RobRelyea.com/wpf/panels

Page 17: Windows Presentation Foundation for Developers - Part 1

Text

Segoe UI

Page 18: Windows Presentation Foundation for Developers - Part 1

Using TextBlock

demo

Page 19: Windows Presentation Foundation for Developers - Part 1

<StackPanel TextBlock.FontSize="48">

<TextBlock >Hello <Bold>World</Bold>. How are <Italic>you</Italic>?</TextBlock>

<TextBlock > Hello <Span FontWeight="Bold">World</Span>. How are <Span

FontStyle="Italic">you</Span>? </TextBlock>

<TextBlock TextTrimming="CharacterEllipsis"> Hello <Span FontWeight="Bold">World</Span>. How are <Span FontStyle="Italic">you</Span>?</TextBlock>

<TextBlock TextTrimming="WordEllipsis" > Hello <Span FontWeight="Bold">World</Span>. How are <Span FontStyle="Italic">you</Span>?</TextBlock>

<TextBlock TextWrapping="Wrap> Hello <Span FontWeight="Bold">World</Span>. How are <Span FontStyle="Italic">you</Span>?</TextBlock>

</StackPanel>

TextBlock ExampleContent Model, TextTrimming, TextWrapping

Page 20: Windows Presentation Foundation for Developers - Part 1

FlowDocuments

Page 21: Windows Presentation Foundation for Developers - Part 1

Using FlowDocuments

demo

Page 22: Windows Presentation Foundation for Developers - Part 1

XPS Documents

Page 23: Windows Presentation Foundation for Developers - Part 1

XPS Documents

demo

Glyphs, FixedPage, XPS Creation

Page 24: Windows Presentation Foundation for Developers - Part 1

Flow & XPS Applied

Seattle PI ReaderWord 2007 – save as XPS or PDF feature

Page 25: Windows Presentation Foundation for Developers - Part 1

Text Editing

Page 26: Windows Presentation Foundation for Developers - Part 1

Text Editing Demos

demo

TextBox, RichTextBox

Page 27: Windows Presentation Foundation for Developers - Part 1

Native Ink Support

Page 28: Windows Presentation Foundation for Developers - Part 1

Using Ink

demo

Page 29: Windows Presentation Foundation for Developers - Part 1

29

Content FamiliesSegoe UI

Page 30: Windows Presentation Foundation for Developers - Part 1

Call to Action

Build easy-to-run, rich windows applications that integrate with the desktop or the browser.Harness WPF power for your Content!

CreationVisualizationAnnotation

Build a set of skills (.Net, Xaml, System.Windows.*) that are leveragable with Silverlight & WPF

Page 31: Windows Presentation Foundation for Developers - Part 1

Please fill out your eval

evaluation

Page 32: Windows Presentation Foundation for Developers - Part 1

Discussion

robrelyea.com/events/mix07for related resources, slides, demos, pointers to other relevant mix07 talks.

Page 33: Windows Presentation Foundation for Developers - Part 1

© 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions,

it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.


Recommended