1 / 31

Présentation de Windows Presentation Foundation

Présentation de Windows Presentation Foundation. Vers une nouvelle génération d’interfaces graphiques. Windows Presentation Foundation - Agenda. Windows Presentation Foundation Les Bases Le DataBinding Les animations / Les transformations La 3D Interop WPF/WindowsForms

asabi
Download Presentation

Présentation de Windows Presentation Foundation

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. Présentation de Windows Presentation Foundation Vers une nouvelle génération d’interfaces graphiques

  2. Windows Presentation Foundation - Agenda • Windows Presentation Foundation • Les Bases • Le DataBinding • Les animations / Les transformations • La 3D • Interop WPF/WindowsForms • Applications navigateurs • Conclusion • Ressources

  3. Windows Presentation Foundation

  4. Le Framework .NET 3.0

  5. Windows Presentation Foundation Uneapproche productive et unifiée de l’interfaceutilisateur, des médias et des documents afin de livreruneexpérienceutilisateurinégalée

  6. Créationd’interfacesutilisateurinnovatrices Augmentation de la productivité Designer-Développeur Réalisation d’un déploiementd’application flexible Accroissement de la base existante de code et de l’ensemble des techniques Windows Presentation Foundation Une UX supérieureréunissantl’interface, les médias et les documents

  7. DOCUMENT SERVICES USER INTERFACE SERVICES XPS Documents Application Services Controls Databinding Packaging Services Deployment Services Layout MEDIA INTEGRATION LAYER BASE SERVICES XPS Viewer Windows Presentation Foundation Imaging 2D Audio XAML Text Effects 3D Video Accessibility Animation Input & Eventing Composition Engine Property System Unmanaged Managed Input / Eventing System Property Engine .NET Framework 2.0 Composition Engine Desktop Windows Manager Windows Media Foundation Media Integration Layer Print Spooler DirectX Windows Vista Display Driver (LDDM) L’architecture de WPF

  8. Productivité Développeur-Designer • Outils Microsoft pour les développeurs et les designers • Programmationdéclarative avec XAML • Outilsd’éditeurs tiers (Aurora de Mobiform, ZAM 3D de Electric Rain) • Avec XAML, les développeurs et les designers peuventaffinerleur collaboration Les designers conçoivent les UI Et les développeursajoute la logique métier

  9. XAML = Extensible Application Markup Language XAML C# VB.NET <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 Button b1.Content = "OK" b1.Background = New _ SolidColorBrush(Colors.LightBlue) b1.Width = 100 XAML ou la programmation déclarative • Facilementutilisable, basésur le XML • Code et contenusontséparés • Peut-êtreaffichédans un navigateurouune application

  10. Windows Presentation Foundation

  11. Windows Presentation Foundation

  12. Les contrôles • Windows Presentation Foundation fournit un nombre important de contrôles: • Button • Frame • Grid • ListBox • Etc.. • Certains contrôles (contrôles de date, NumericUpDown, ColorPicker) ne sont pas présents • D’autres (Canvas, DockPanel, Grid, etc…) sont destinés au positionnement des éléments

  13. Les styles • Définissent l’apparence des éléments au sein de l’application • Utilisation des Setter pour définir la propriété à modifier et sa valeur: <Style x:Key="Slider_RepeatButton" TargetType="{x:Type RepeatButton}"> <Setter Property="OverridesDefaultStyle" Value="True" /> <Setter Property="IsTabStop" Value="false" /> <Setter Property="Focusable" Value="false" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type RepeatButton}"> <Border Background="Transparent" /> </ControlTemplate> </Setter.Value> </Setter> </Style>

  14. Templated Button Les Templates • Contenu variable • Template = Définition du contenu • Notion de « graph d’objets »: • Button • ContentPresenter • Image • …

  15. Texte et Documents • Support des polices ClearType • Support de l’anti-aliasing • API pour faciliter la lecture • Zoom • Recherche • Multipages

  16. <Border Width="400" BorderBrush="Green" BorderThickness="9"> <StackPanel> <MediaElement Source="aero.wmv" /> <Button>Hello</Button> </StackPanel> </Border> Audio et Video • Formats: WMV, MPEG, AVIs • Peuvent être synchronisés avec des animations

  17. Contrôles, styles, templates, etc….

  18. Cible Source Dependency Object Object OneWay Dependency Property Property TwoWay OneWayToSource Data Binding • L’interface utilisateur peut être liée à des objets .NET ou à du XML • Les “Dependency properties” peuvent également être liées aux objets ADO.NET ou aux Web Services • Les “Data templates” peuvent être appliqués aux données métiers • Possibilité de représenter visuellement une classe Person, Product, etc…. UI & Databinding <StackPanel> <Label>Select A Customer</Label> <ListBox Name="myListBox" Background="HoneyDew" ItemsSource="{Binding {StaticResource myDataSource}}" </ListBox> </StackPanel>

  19. Les Animations / Transformations <StackPanel> <StackPanel.Triggers> <EventTrigger RoutedEvent=“Button.Click"> <EventTrigger.Actions> <BeginStoryboard> <BeginStoryboard.Storyboard> <Storyboard> <ColorAnimation To="Yellow" Duration="0:0:0.5“ Storyboard.TargetName="TheBrush" Storyboard.TargetProperty="Color" /> <DoubleAnimation To="45" Duration="0:0:2" Storyboard.TargetName="LowerEllipseTransform" Storyboard.TargetProperty="Angle" /> ... </StackPanel.Triggers> </StackPanel> • Fournissent une meilleure expérience utilisateur • Peuvent être utilisées sur toutes les DependencyProperties • Classe Transform: • Rotation • Translation • Agrandissement/Réduction

  20. WPF et la 3D • Les APIs de WPF pour la 3D facilitent la création de contrôles/dessins 3D • Namespace System.Windows.Media.Media3D: • Définit des transformations, animations, outils pour créer des contrôles et dessins 3D

  21. Animations, Transformations, 3D

  22. Intéropérabilité WindowsForms / WPF Incorporez WPF dansvos applications WindowsForms tout en conservantvotreexistant

  23. Interopérabilité WindowsForms / WPF

  24. Applications navigateurs • Applications WPF fonctionnant dans un navigateur Web • Le même code XAML est utilisé pour: • Les applications « stand alone » • Les applications navigateurs • Fonctionnalités en grande partie identiques aux applications « stand alone »

  25. Applications navigateurs

  26. Windows Presentation Foundation

  27. Disponibilité et packaging La RTM du Framework .NET 3.0 est disponible depuis Novembre 2006 WPF • Composant du Framework .NET 3.0 pour Windows Vista • Fonctionne sur Windows Vista, Windows XP & Windows Server 2003 • Fait partit de Windows – pas de cout supplémentaire Visual Studio “Orcas” sera disponible après Windows Vista MS Expression Interactive Designer sera, lui aussi, disponible après Windows Vista Q12006 Q2 Q3 Q4 Q12007 Q2 Q3 Q4

  28. Conclusions Fournir des expériencesutilisateurinnovantes Améliorer la productivitéDéveloppeur-Designer Permettre un déploiementapplicatiffléxible Accroitre la base de code et les techniques existantes

  29. Ressources • WPF @ Windows Vista Developer Centerhttp://msdn.microsoft.com/windowsvista/building/presentation/ • http://wpf.netfx3.com • http://blogs.developpeur.org/tom • http://morpheus.developpez.com • Contact: t-thole@microsoft.com

More Related