$30 off During Our Annual Pro Sale. View Details »

Creating Desktop Apps with UWP (Show IT, Bratislava 2017)

Creating Desktop Apps with UWP (Show IT, Bratislava 2017)

How to best support both WPF and UWP, and move from WPF to UWP

Christian Nagel

February 07, 2017
Tweet

More Decks by Christian Nagel

Other Decks in Programming

Transcript

  1. Creating Desktop Apps
    with UWP
    Christian Nagel
    @christiannagel
    www.cninnovation.com

    View Slide

  2. Goals
    • When & how to use UWP for Data-Driven
    Business Applications
    • Moving from WPF to UWP
    • Introducing important concepts for UWP

    View Slide

  3. Non-Goals
    • A complete application
    • UI Styles
    • Desktop Bridge for UWP
    • No Crashes (using Visual Studio 2017 RC)

    View Slide

  4. Agenda
    WPF or
    UWP?
    Sharing
    Code
    UWP
    XAML
    Features

    View Slide

  5. Christian Nagel
    • Training
    • Coaching
    • Consulting
    • Microsoft MVP
    • thinktecture
    • www.cninnovation.com

    View Slide

  6. View Slide

  7. WPF OR UWP?
    1

    View Slide

  8. All your users
    upgraded to
    Windows 10!

    View Slide

  9. No

    View Slide

  10. Why not always WPF?
    • Use New Features
    • Modern Styling and APIs
    • Different Devices
    • Windows 10 uses UWP
    • Performance

    View Slide

  11. UWP Features
    • Easy Deployment/Updates
    • New Controls
    • Data Sharing
    • Tile Updates, Notifications

    View Slide

  12. Windows 7 Users
    • WPF is necessary
    • Desktop Bridge to add UWP Features for
    Win10 Users
    • Write the UI multiple times
    • Just the UI

    View Slide

  13. SHARING CODE
    2

    View Slide

  14. Libraries
    • .NET Libraries only for WPF/.NET Framework
    • .NET Core Libraries only for .NET Core
    • Portable Libraries for …
    • .NET Standard makes sharing easier

    View Slide

  15. MVVM Pattern
    View
    View-Model
    Model
    INotifyPropertyChanged
    INotifyPropertyChanged
    Data Binding, Binding to Commands
    XAML

    View Slide

  16. Dependency Injection

    View Slide

  17. What you’ve seen
    • Portable Libraries
    • MVVM removes strong dependencies
    • DI Container makes DI easy

    View Slide

  18. UWP XAML FEATURES
    3

    View Slide

  19. Assigning Commands

    View Slide

  20. Compiled Binding

    View Slide

  21. Controls

    View Slide

  22. What you’ve seen
    • AppBar
    • Compiled Binding
    • Enhanced TextBox
    • SplitView
    • RelativePanel
    • Adaptive Trigger

    View Slide

  23. Summary
    • Use MVVM and DI with XAML
    • Portable / .NET Standard Library
    • XAML Features

    View Slide

  24. Questions?

    View Slide

  25. More Information (1)
    • https://docs.microsoft.com
    • Sample Code:
    • https://github.com/CNinnovation

    View Slide

  26. More Information (2)
    • https://github.com/ProfessionalCSharp
    • https://csharp.christiannagel.com
    • https://www.cninnovation.com
    • Training & Coaching

    View Slide

  27. Thank you!

    View Slide

  28. Images Copyright
    • Decision Time © Steve Woods
    • Yeah © Redbaron
    • Sulky angry child © Godfer
    • Diversity workers © Vladimir
    Mucibabic
    • Injection © Maybe123
    • Spousal Abuse Humor © Ken
    Hurst
    • Communication © Fantasista
    • Pilots in the plane © Nikolai
    Sorokin
    • Bratislava © Tomas1111
    • http://www.dreamstime.com

    View Slide

  29. www.showit.sk
    www.gopas.sk

    View Slide