WPF ist seit .NET 3.0 released. Für Desktop-Applikationen wird mittlerweile die Universal Windows Platform mit der Windows Runtime von Microsoft bevorzugt. Wie einfach ist der Umstieg? Wie kann möglichst viel Code gemeinsam mit UWP und WPF verwendet werden?
11. Desktop Bridge
• Supports Build 14393, Anniversary Edition
• Deployment
• Use Windows Runtime APIs
• Add UWP Features over time
12. Warum UWP
• UWP ist die Microsoft Desktop-Plattform
• Deployment (APPX)
• Windows 10 S
• Modernes Styling
• Runs Native
• Windows 10 verwendet UWP
• Neue Features in der Windows Runtime (Updates 2 x im Jahr)
13. UWP Features
• Easy Deployment/Updates
• Native, Compiled Binding
• Layout
• RelativePanel, AdaptiveTrigger, NavigationView
• Data Sharing
• Tile Updates, Notifications
• Multiple Windows
• Sideloaded Installation
19. Views
• XAML
• Wenig Code-Behind
• User Controls
• Styles in Resource
Dictionaries
20. Binding
• Binding to Lists und Elements
• Binding to Properties & Commands
• Where to put the BindingContext?
• Pages / User Controls
21. Binding
• Binding mit Listen und Elementen
• Binding zu Properties & Commands
• Wohin mit dem BindingContext?
• Pages / User Controls
• Data Context wird an User Controls
weitergereicht
24. View-Models
• Basisklassen für gemeinsame Features
• Progress-Information
• Error-Handling
• Master/Detail
• Keine UI Typen im View-Model
• Properties und Commands für das View
25. View-Models
• Basisklassen für gemeinsame Features
• Progress-Information
• Error-Handling
• Master/Detail
• Keine UI Typen im View-Model
• Properties und Commands für das View
26. View-Models für Items
• Items in Listen brauchen oft Commands
• View-Models können in Listen verwendet werden
35. UWP - Modern Controls
• Layout
• NavigationView
• RelativePanel
• Hub
• Flip View
• Elements and Lists
• TextBox mit Header
• CommandBar/AppBar
• Inking
• AutoSuggest
36. UWP – Compiled Binding
• Compiler Errors
• Schneller (ohne Reflection)
• Kein DataContext
• ViewModel an User Controls weitergeben
37. Sharing Code
• .NET Standard 2.0
• Windows 10 Fall Creators Update
• .NET Standard 1.4
• Windows 10+
• Das gleiche View-Model
• Die gleichen Services
• Contracts für Platform-specific Services
38. Summary
• Sharing Code mit WPF und UWP
• MVVM Pattern
• Dependency Injection
• UWP für Desktop Applikationen
40. More Information (1)
• https://blogs.windows.com
• Sample Code:
• https://github.com/CNinnovation
41. More Information (2)
• https://github.com/ProfessionalCSharp
• https://csharp.christiannagel.com
• https://www.cninnovation.com
• Training & Coaching