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

  • SEARCH
  • Home
  • 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 8603731
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T02:23:33+00:00 2026-06-12T02:23:33+00:00

In a MVVM MDI app with singleton tool windows (think of Visual Studio), the

  • 0

In a MVVM MDI app with singleton tool windows (think of Visual Studio), the tool window contents change according to current selected document. There are 5 tool windows now and more to come.

I can either reuse or create new View and/or ViewModel for each tool window per each document. My question is whether there is an overwhelming reason to choose or exclude one of these options? Is there another option I totally missed?

For each tool window:

  1. Create a new View+ViewModel per document. When the user switches document, the tool window switches View+ViewModel. The memory cost is higher with this option but perf is good.

  2. Create a ViewModel per document but reuse View. With MVVM pattern this is doable but UI re-layout can be expensive.

  3. Reuse both View and ViewModel to minimize memory usage. Resetting ViewModel and loading another set of data could be hard to get right.

  • 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-12T02:23:34+00:00Added an answer on June 12, 2026 at 2:23 am

    I ended up reusing View but not ViewModel i.e. option 2.

    To answer the original question, option 3 should be excluded from consideration. Reusing VM is pointless – if the previous VM can be reused, it can as well be disposed and creating a new VM for the new data is much easier to do at a very ignorable mem/perf cost.

    Option 1 vs. 2 depends on rendering complexity, performance goal and memory quota. In most cases the performance hit of switching data on the same UI should be acceptable. If the rendering really take as long as I need to save the view, there might be something wrong.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When you use the MVVM Visual Studio Template , then your ViewModels are bound
In MVVM pattern I don't want to think about the view while creating the
I have a simple MVVM application. It contains a property, which I will change
With MVVM, I think of a view-model as a class that provides all the
I'm using an MDI solution (see http://wpfmdi.codeplex.com/ ) and MVVM. I use one RelayCommand
I use MVVM pattern in my multithreading WPF app. Now in the model I
I'm writing an MVVM WPF app with a datagrid of values which needs to
I have a MVVM-based Window with many controls, and my Model implements IDataErrorInfo .
I use prism/mvvm/mef for my app, and loading all Views marked with ViewExport(Region) does
Using MVVM 4 ASP in a SharePoint Visual WebPart I am coming across a

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.