1 välkommen till sommarkollo 2006 2006. windows presentation foundation per Östman isv developer...
TRANSCRIPT
1
Välkommen till Sommarkollo
2006
2006
Windows Windows Presentation FoundationPresentation FoundationWindows Windows Presentation FoundationPresentation Foundation
Per ÖstmanPer ÖstmanISV Developer EvangelistISV Developer [email protected]@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
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
Windows Presentation Windows Presentation FoundationFoundation
Windows Presentation Windows Presentation FoundationFoundation
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
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
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
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
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>
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>
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>
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>
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>
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>
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
PresentationsPresentations
www.microsoft.com/sverige/partner/www.microsoft.com/sverige/partner/education/education/