Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8993519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:12:32+00:00 2026-06-15T23:12:32+00:00

I am creating an application using the DockPanel for my layout. In the ‘Left’

  • 0

I am creating an application using the DockPanel for my layout. In the ‘Left’ DockPanel I have setup a few links (Labels) that I would like to use to open different UserControls when a link is clicked. I want the UserControls to always open in the ‘Right’ DockPanel when the appropriate link is clicked.

What mechanism in WPF (using MVVM) would I use to accomplish this? Are there any examples that I can view?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T23:12:33+00:00Added an answer on June 15, 2026 at 11:12 pm

    The general pattern to follow is this:

    1. Add a ContentPresenter to the place in your user interface which will host the switch-able content (the right panel of the DockPanel in your case).
    2. The visual representation of each switchable view will be represented by a user control.
    3. The data of each switch-able view will be represented by a viewModel.
    4. Bind the Content property of the ContentPresenter to a property in your view model that is of a viewModel type that represents the view E.G. BoundContent.
    5. When the link is clicked, your viewModel should react to this by changing the bound property and raising the PropertyChanged event to notify your view.
    6. For each ‘view’ that can be switched you will need a DataTemplate that maps each user control to each viewModel.

    Rachel Lims blog contains a couple of examples which demonstrates the above:

    • Switching views in WPF/MVVM
    • Navigation with MVVM
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I creating a web application using JSF,Hibernate,Spring. I have added a filter for checking
I'm creating a web application using spring mvc. I have started to incorporate the
I am creating an application using Griffon->SwingBuilder. I would like to able to center
I am creating an application using WPF which is using Prism framework. I have
I have developed an application using Eclipse IDE. After creating the application I exported
I am creating a chat application using JApplet . I have a TextArea where
I am creating application for MAC using cocoa framework, I would like to know
I am creating an application using the MVVM pattern and somewhere I have a
I am creating a application using jmf that will be launched on a user's
I have some trouble with creating window application using PyQt. For example: we have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.