1 / 48

Windows Presentation Foundation ("Avalon"): Beautiful Code, Beautiful Design - Applications Your Designers Can

Windows Presentation Foundation ("Avalon"): Beautiful Code, Beautiful Design - Applications Your Designers Can Work With. Robert Ingebretsen PRS317 Program Manager, WPF Microsoft Corporation. 89. %.

beth
Télécharger la présentation

Windows Presentation Foundation ("Avalon"): Beautiful Code, Beautiful Design - Applications Your Designers Can

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Windows Presentation Foundation ("Avalon"): Beautiful Code, Beautiful Design - Applications Your Designers Can Work With Robert Ingebretsen PRS317 Program Manager, WPF Microsoft Corporation

  2. 89 % Percentage of business readers who called design“an essential way to make lasting connections with consumers” Source: Fast Company magazine, June 2005

  3. good enough.

  4. good enough, meet… great!

  5. powerfulvisual and interactive capabilities cleanseparation of UI and logic great toolsfor developers and designers

  6. PhotoStore Basic UI

  7. developer / designer workflow

  8. Designer DetailsLost in Translation

  9. while (!design.IsPerfect) { Designer.CreateNewDesign(); Developer.ImplementNewDesign(); design.IsPerfect = false; }

  10. while (!design.IsPerfect) { Designer.CreateNewDesign(); Developer.ImplementNewDesign(); design.IsPerfect = false; if (Schedule.SlipCount >= x) break; }

  11. designer: independent UI creator no more “translation” errors parallel workflow realtime iteration and feedback

  12. projectstructure Window1.xaml.cs Contains: Application logic Created by: Application developer Window1.xaml Contains: Principal UI (controls, layout, etc.) Created by: Application developer or designer Design Experience: By hand or using a visual tool Styles.xaml Contains: Application “style” (visual description of UI elements) Created by: Application designer Design Experience: By hand or using a visual tool Data model, event names, element names, etc. Resource names and element types.

  13. PhotoStore Project

  14. styling is… resources styles templates triggers storyboards

  15. styles centrally define the appearance and interactive behaviors of the elements in your app

  16. style drilldown lookup key can be a name or a type <Style x:Key=“MyStyle” TargetType=“{x:Type Button}”> </Style> Styled Button

  17. style drilldown lookup key can be a name or a type <Style TargetType=“{x:Type Button}”> </Style> Styled Button

  18. style drilldown use <Setter> to set properties onthe styled element <Style x:Key=“MyStyle” TargetType=“{x:Type Button}”> <Setter Property=“Background” Value=“Green” /> </Style> Styled Button

  19. style drilldown styles can be based on other styles <Style x:Key=“BaseStyle” > <Setter Property=“Foreground” Value=“Orange” /> </Style> <Style x:Key=“MyStyle”BasedOn=“{StaticResource BaseStyle}” /> <Setter Property=“Background” Value=“Green” /> </Style> Styled Button

  20. Styles and Resources

  21. templates describe the visual structureof a control

  22. template drilldown control introduces the Template propertywhich defines the control’s structure and appearance <Button Template=“{StaticResource MyButton}” />

  23. template drilldown use composition to describe the control’s visual tree <ControlTemplate x:Key=“MyButton” TargetType=“{x:Type Button}”> <Grid> <Ellipse /> <ContentPresenter /> </Grid> </ControlTemplate> <Button Template=“{StaticResource MyButton}” /> TemplatedButton

  24. template drilldown use contract elements to ensure correct functionality <ControlTemplate x:Key=“MyButton” TargetType=“{x:Type Button}”> <Grid> <Ellipse /> <ContentPresenter /> </Grid> </ControlTemplate> <Button Template=“{StaticResource MyButton}” /> TemplatedButton

  25. template drilldown use <DataTemplates> to define a visualrepresentation of a data object <DataTemplate DataType=“{x:Type PhotoObject}”> <Image Source=“{Binding FileName}” /> </ControlTemplate>

  26. Templates

  27. triggers and storyboards Use with styles and templates tocreate rich and dynamic interaction

  28. triggers and storyboards drilldown triggers are activated when a specified condition becomes true <Trigger Property=“IsMouseOver” Value=“true”> </Trigger>

  29. triggers and storyboards drilldown define “triggered”property changes using <Setter> (the previous state gets cached) <Trigger Property=“IsMouseOver” Value=“true”> <Setter Property=“Background” Value=“Orange” /> </Trigger> Styled Button

  30. triggers and storyboards drilldown use storyboards with <EventTrigger> to add dynamic animations <EventTrigger RoutedEvent=“Mouse.Enter”> <Storyboard TargetProperty=“MaxWidth”> <DoubleAnimation Duration=“0:0:1” To=“150” /> </Storyboard> </EventTrigger> Styled Button

  31. Storyboards and Triggers

  32. projectstructure Window1.xaml.cs Contains: Application logic Created by: Application developer Window1.xaml Contains: Principal UI (controls, layout, etc.) Created by: Application developer or designer Design Experience: By hand or using a visual tool Styles.xaml Contains: Application “style” (visual description of UI elements) Created by: Application designer Design Experience: By hand or using a visual tool

  33. targeted experiences Window1.xaml.cs Contains: Application logic Created by: Application developer Window1.xaml ProfessionalVersion Window1.xaml ConsumerVersion Window1.xaml MCEVersion

  34. Keyword: targeted

  35. Targeted Experiences

  36. with power comes responsibility

  37. HTML The Early Years

  38. Font Salad WordArt Frankly, didn't help

  39. building great software with WPF Start with what you know Involve a designerwhen in unchartered territory Create apps that are appropriatefor the intended audience or user Remember that your brand is the entire experience Draw focus to hero and McGuffin moments Make software that lasts—just as enjoyable the 100th time as the 1st

  40. Good design means that beauty andusability are in balance. Donald A. Norman, Interactions, July/August 2002

  41. related talks databinding: PRS324 (Thursday, 3:45) building controls: PRS431 (Friday, 10:30) layout: PRS329 (Thursday, 5:15) rich content: PRS330 (Friday, 8:30) designer tool overview: TLN213 (Thursday, 11:30) me email: robertin@microsoft.com blog: http://www.notstatic.com demo source: http://www.notstatic.com/pdc2005

  42. thank you.

  43. © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

More Related