1 Välkommen till Sommarkollo 2006 2006. Windows Presentation Foundation Per Östman ISV Developer...

22
1 Välkommen till Sommarkollo 2006 2006

Transcript of 1 Välkommen till Sommarkollo 2006 2006. Windows Presentation Foundation Per Östman ISV Developer...

Page 1: 1 Välkommen till Sommarkollo 2006 2006. Windows Presentation Foundation Per Östman ISV Developer Evangelist Microsoftpostman@microsoft.com.

1

Välkommen till Sommarkollo

2006

2006

Page 2: 1 Välkommen till Sommarkollo 2006 2006. Windows Presentation Foundation Per Östman ISV Developer Evangelist Microsoftpostman@microsoft.com.

Windows Windows Presentation FoundationPresentation FoundationWindows Windows Presentation FoundationPresentation Foundation

Per ÖstmanPer ÖstmanISV Developer EvangelistISV Developer [email protected]@microsoft.com

Page 3: 1 Välkommen till Sommarkollo 2006 2006. Windows Presentation Foundation Per Östman ISV Developer Evangelist Microsoftpostman@microsoft.com.

The WinFX VisionThe WinFX VisionThe WinFX VisionThe WinFX Vision

Enable developers to take advantage of new Enable developers to take advantage of new technologies and hardware advances technologies and hardware advances

Increase developer productivityImprove application security, deployment and manageabilityLeverage existing developer skills

Enabled by a new programming model, WinFX™Enabled by a new programming model, WinFX™

Built on the .NET Framework

Easily extend Win32 applications

Enable developers to take advantage of new Enable developers to take advantage of new technologies and hardware advances technologies and hardware advances

Increase developer productivityImprove application security, deployment and manageabilityLeverage existing developer skills

Enabled by a new programming model, WinFX™Enabled by a new programming model, WinFX™

Built on the .NET Framework

Easily extend Win32 applications

Page 4: 1 Välkommen till Sommarkollo 2006 2006. Windows Presentation Foundation Per Östman ISV Developer Evangelist Microsoftpostman@microsoft.com.

Presentation Communication Workflow

Base Operating System Services

TM

Windows Vista Developer ArchitectureWindows Vista Developer ArchitectureWindows Vista Developer ArchitectureWindows Vista Developer Architecture

WindowsWindowsCommunicationCommunication

FoundationFoundation

WindowsWindowsPresentationPresentationFoundationFoundation

WindowsWindowsWorkflowWorkflow

FoundationFoundation

Page 5: 1 Välkommen till Sommarkollo 2006 2006. Windows Presentation Foundation Per Östman ISV Developer Evangelist Microsoftpostman@microsoft.com.

Windows Presentation Windows Presentation FoundationFoundation

Windows Presentation Windows Presentation FoundationFoundation

Page 6: 1 Välkommen till Sommarkollo 2006 2006. Windows Presentation Foundation Per Östman ISV Developer Evangelist Microsoftpostman@microsoft.com.

WPF VisionWPF Vision

Unified approach to UI, Unified approach to UI, Documents, and MediaDocuments, and Media

Integration as part of development and experience

Integrated, vector-based Integrated, vector-based composition enginecomposition engine

Utilizing the power of the PC throughout the graphics stack

Declarative programmingDeclarative programmingBringing designers directly into application development

Ease of deploymentEase of deploymentAllowing administrators to deploy and manage applications securely

Page 7: 1 Välkommen till Sommarkollo 2006 2006. Windows Presentation Foundation Per Östman ISV Developer Evangelist Microsoftpostman@microsoft.com.

Unified Approach to UI, Documents, and Unified Approach to UI, Documents, and MediaMediaIntegration: The Guiding VisionIntegration: The Guiding Vision

Application ModelApplication ModelComposable component architectureLayout engineTwo-way transformable data bindingRich visual styling and themingBrowser hosting

Graphics ModelGraphics Model2D & 3D GraphicsImagingTextVideo and audioAnimation

Document ModelDocument ModelFixed, flow and adaptive layoutsAdvanced typographyContainer servicesRights management

Media IntegrationLayer

Media IntegrationLayer

Element ServicesElement Services

Ap

plic

ati

on

Mod

el

Ap

plic

ati

on

Mod

el

Docu

men

tM

od

el

Docu

men

tM

od

el

Gra

ph

ics

Mod

el

Gra

ph

ics

Mod

el

Composition and Rendering

Composition and Rendering

.NET Framework

.NET Framework

DirectXDirectX

WPFWPF

Tools

an

d L

an

gu

ag

es

Tools

an

d L

an

gu

ag

es

Page 8: 1 Välkommen till Sommarkollo 2006 2006. Windows Presentation Foundation Per Östman ISV Developer Evangelist Microsoftpostman@microsoft.com.
Page 9: 1 Välkommen till Sommarkollo 2006 2006. Windows Presentation Foundation Per Östman ISV Developer Evangelist Microsoftpostman@microsoft.com.
Page 10: 1 Välkommen till Sommarkollo 2006 2006. Windows Presentation Foundation Per Östman ISV Developer Evangelist Microsoftpostman@microsoft.com.
Page 11: 1 Välkommen till Sommarkollo 2006 2006. Windows Presentation Foundation Per Östman ISV Developer Evangelist Microsoftpostman@microsoft.com.
Page 12: 1 Välkommen till Sommarkollo 2006 2006. Windows Presentation Foundation Per Östman ISV Developer Evangelist Microsoftpostman@microsoft.com.

Open XML Paper Specification (XPS)Open XML Paper Specification (XPS)

Open Packaging ConventionsOpen Packaging Conventions

Organized storage of a Organized storage of a document's parts and document's parts and relationships between them.relationships between them.

Defines common services for any Defines common services for any package: package:

.XPS, Office Open XML Formats, 3.XPS, Office Open XML Formats, 3rdrd party app formatsparty app formats

““Electronic Paper”Electronic Paper”

Paginated, visual representation Paginated, visual representation based on subset of Avalon XAMLbased on subset of Avalon XAML

Core of next generation print Core of next generation print architecturearchitecture

Native Avalon print output Native Avalon print output

akaaka “Reach Package” “Reach Package”

XPS DocumentXPS Document

Page 13: 1 Välkommen till Sommarkollo 2006 2006. Windows Presentation Foundation Per Östman ISV Developer Evangelist Microsoftpostman@microsoft.com.

Markup for WindowsMarkup for WindowsBuild applications in simple declarative statementsCan be used for any CLR object hierarchy

Code and content are separateCode and content are separateStreamline collaboration between designers and developers

Easy for tools to consume and generateEasy for tools to consume and generate

<Button Width="100"> OK <Button.Background> LightBlue </Button.Background></Button>

Button b1 = new Button();b1.Content = "OK";b1.Background = new SolidColorBrush(Colors.LightBlue);b1.Width = 100;

Dim b1 As New Buttonb1.Content = "OK"b1.Background = New _ SolidColorBrush(Colors.LightBlue)b1.Width = 100

Page 14: 1 Välkommen till Sommarkollo 2006 2006. Windows Presentation Foundation Per Östman ISV Developer Evangelist Microsoftpostman@microsoft.com.

Simple SampleSimple Sample

<Window x:Class="WPFTest.TestWindow"<Window x:Class="WPFTest.TestWindow"

xxmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"mlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

xmlns:x="http://schemas.microsoft.com/winfx/2005xmlns:x="http://schemas.microsoft.com/winfx/2005/xaml/xaml""

Title="WPFTest">Title="WPFTest">

<Button Width=”100” Height=”100” Click=”button_Click”><Button Width=”100” Height=”100” Click=”button_Click”>

<Image Source=”peo.jpg”/><Image Source=”peo.jpg”/>

</Button></Button>

</Window></Window>

Page 15: 1 Välkommen till Sommarkollo 2006 2006. Windows Presentation Foundation Per Östman ISV Developer Evangelist Microsoftpostman@microsoft.com.

ControlsControls

<Button><Button>

<TextBox><TextBox>

<Image><Image>

<CheckBox><CheckBox>

<ComboBox><ComboBox>

<Label><Label>

<ListBox><ListBox>

<Menu><Menu>

<Slider><Slider>

<ToolBar><ToolBar>

<TreeView><TreeView>

<Rectangle><Rectangle>

<Canvas><Canvas>

<ContextMenu><ContextMenu>

<Line><Line>

<Polygon><Polygon>

<Polyline><Polyline>

<Path><Path>

<ProgressBar><ProgressBar>

<RadioButton><RadioButton>

<Scrollbar><Scrollbar>

<StatusBar><StatusBar>

<ViewBox><ViewBox>

<PasswordBox><PasswordBox>

<Grid><Grid>

<GroupBox><GroupBox>

<MediaElement><MediaElement>

<Page><Page>

<Popup><Popup>

<RichTextBox><RichTextBox>

<Separator><Separator>

<TabPanel><TabPanel>

<ToggleButton><ToggleButton>

<ToolTip><ToolTip>

<Ellips><Ellips>

Page 16: 1 Välkommen till Sommarkollo 2006 2006. Windows Presentation Foundation Per Östman ISV Developer Evangelist Microsoftpostman@microsoft.com.

LayoutLayout

<DockPanel><DockPanel>

<StackPanel><StackPanel>

<Grid><Grid>

<Canvas><Canvas>

<Grid><Grid>

<Grid.RowDefinitions><Grid.RowDefinitions>

<RowDefinition/><RowDefinition/>

<RowDefinition/><RowDefinition/>

</Grid.RowDefinitions></Grid.RowDefinitions>

<Button Grid.Row=”0”/><Button Grid.Row=”0”/>

<Button Grid.Row=”1”/><Button Grid.Row=”1”/>

</Grid></Grid>

Page 17: 1 Välkommen till Sommarkollo 2006 2006. Windows Presentation Foundation Per Östman ISV Developer Evangelist Microsoftpostman@microsoft.com.

StylesStyles

<Style x:Key="Style1"><Style x:Key="Style1">

<Setter Property="Control.Background" Value="Yellow"/><Setter Property="Control.Background" Value="Yellow"/>

</Style></Style>

<Label Content="Yellow Background" Style="{StaticResource Style1}"/><Label Content="Yellow Background" Style="{StaticResource Style1}"/>

<Style TargetType="{x:Type TextBlock}"><Style TargetType="{x:Type TextBlock}">

<Setter Property="FontFamily" Value="Segoe Black" /><Setter Property="FontFamily" Value="Segoe Black" />

<Setter Property="HorizontalAlignment" Value="Center" /><Setter Property="HorizontalAlignment" Value="Center" />

<Setter Property="FontSize" Value="12pt" /><Setter Property="FontSize" Value="12pt" />

<Setter Property="Foreground" Value="#777777" /><Setter Property="Foreground" Value="#777777" />

</Style></Style>

Page 18: 1 Välkommen till Sommarkollo 2006 2006. Windows Presentation Foundation Per Östman ISV Developer Evangelist Microsoftpostman@microsoft.com.

TriggersTriggers

<Style x:Key="Triggers" TargetType="{x:Type Button}"><Style x:Key="Triggers" TargetType="{x:Type Button}">

<Style.Triggers><Style.Triggers>

<Trigger Property="Button.IsMouseOver" Value="true"><Trigger Property="Button.IsMouseOver" Value="true">

<Setter Property="Background" Value="Red"/><Setter Property="Background" Value="Red"/>

</Trigger></Trigger>

<Trigger Property="Button.IsPressed" Value="true"><Trigger Property="Button.IsPressed" Value="true">

<Setter Property="Foreground" Value="Green"/><Setter Property="Foreground" Value="Green"/>

</Trigger></Trigger>

</Style.Triggers></Style.Triggers>

</Style></Style>

Page 19: 1 Välkommen till Sommarkollo 2006 2006. Windows Presentation Foundation Per Östman ISV Developer Evangelist Microsoftpostman@microsoft.com.

Data BindingData Binding

<?Mapping XmlNamespace=”local” ClrNamespace=”PersonBinding” ?><?Mapping XmlNamespace=”local” ClrNamespace=”PersonBinding” ?>

<Window … xmlns:local=”local”><Window … xmlns:local=”local”>

<Window.Resources><Window.Resources>

<local:Person x:Key=”Peo” Name=”Peo” Age=”42”><local:Person x:Key=”Peo” Name=”Peo” Age=”42”>

</Window.Resources></Window.Resources>

<Grid DataContext=”{StaticResource Peo}”><Grid DataContext=”{StaticResource Peo}”>

<TextBlock=”{Binding Path=Name}”/><TextBlock=”{Binding Path=Name}”/>

<TextBlock=”{Binding Path=Age}”/><TextBlock=”{Binding Path=Age}”/>

</Grid></Grid>

Page 20: 1 Välkommen till Sommarkollo 2006 2006. Windows Presentation Foundation Per Östman ISV Developer Evangelist Microsoftpostman@microsoft.com.

New tools for designersNew tools for designers

Expression Graphic Designer - AcrylicExpression Graphic Designer - AcrylicGrafical designVector and pixel grafics

Expression Interactive Designer – SparkleExpression Interactive Designer – SparkleInteractiv design of Windows applicationsSame project structure as in Visual Studio

Expression Web Designer - QuartzExpression Web Designer - QuartzInteractive web solutionsReal-time transformation of XSLT

””Visual Studio Extensions” – CiderVisual Studio Extensions” – CiderVisual design of XAMLSame flow as in Visual Studio

Page 21: 1 Välkommen till Sommarkollo 2006 2006. Windows Presentation Foundation Per Östman ISV Developer Evangelist Microsoftpostman@microsoft.com.

PresentationsPresentations

www.microsoft.com/sverige/partner/www.microsoft.com/sverige/partner/education/education/

Page 22: 1 Välkommen till Sommarkollo 2006 2006. Windows Presentation Foundation Per Östman ISV Developer Evangelist Microsoftpostman@microsoft.com.