0% found this document useful (0 votes)
42 views9 pages

Decoupling The UI Parts: Thomas Claudius Huber

The document discusses decoupling the UI parts of an application. It proposes creating a LookupDataService to provide data to the views. It also recommends creating a NavigationViewModel and NavigationView to handle navigation, and a separate FriendDetailViewModel and FriendDetailView to display friend details. The new structure separates concerns so that views are decoupled from their data and navigation logic.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views9 pages

Decoupling The UI Parts: Thomas Claudius Huber

The document discusses decoupling the UI parts of an application. It proposes creating a LookupDataService to provide data to the views. It also recommends creating a NavigationViewModel and NavigationView to handle navigation, and a separate FriendDetailViewModel and FriendDetailView to display friend details. The new structure separates concerns so that views are decoupled from their data and navigation logic.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Decoupling the UI Parts

Thomas Claudius Huber


MICROSOFT MVP (WINDOWS DEVELOPMENT)

@thomasclaudiush www.thomasclaudiushuber.com
The Current UI Structure
Module
Plan the new structure
Outline
Create a LookupDataService
Create a NavigationView
and a NavigationViewModel
Create a FriendDetailView
and a FriendDetailViewModel
Plan the New Structure

MainWindow MainViewModel

ListView
ItemsSource Friends

SelectedItem SelectedFriend

TextBox Text FirstName

DataContext
Plan the New Structure

MainWindow MainViewModel

NavigationView
Navigation
DataContext
ViewModel

FriendDetailView
FriendDetail
DataContext
ViewModel

DataContext
Plan the New Structure

MainWindow MainViewModel

NavigationView
Navigation
DataContext
ViewModel

FriendDetailView
FriendDetail
DataContext
ViewModel

DataContext
Plan the New Structure

MainWindow MainViewModel

NavigationView
Navigation Lookup
DataContext is using
ViewModel DataService

FriendDetailView
FriendDetail Friend
DataContext is using
ViewModel DataService

DataContext
Demo Create the LookupDataService
Create the NavigationViewModel
and the NavigationView
Create the FriendDetailViewModel
and the FriendDetailView
Summary Decoupled the UI parts
- MainWindow
- NavigationView
- FriendDetailView

Created a LookupDataService

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy