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 795413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T22:28:37+00:00 2026-05-14T22:28:37+00:00

I have an application which I am developing using WPF\Prism\MVVM. All is going well

  • 0

I have an application which I am developing using WPF\Prism\MVVM. All is going well and I have some pleasing MVVM implementations. However, in some of my views I would like to be able to bind application settings e.g. when a user reloads an application, the checkbox for auto-scrolling a grid should be checked in the state it was last time the user used the application.

My view needs to bind to something that holds the “auto-scroll” setting state. I could put this on the view-model, but applications settings are orthogonal to the purpose of the view-model. The “auto-scroll” setting is controlling an aspect of the view. This setting is just an example. There will be quite a number of them and splattering my view-models with properties to represent application settings (so I can bind them) feels decidedly yucky.

One view-model per view seems to be de rigeuer…

What is best\usual practice here?

  • Splatter my view-models with application settings?
  • Have multiple view-models per view so settings can be represented in their own right?
  • Split views so that controls can bind to an ApplicationSettingsViewModel? = too many views?
  • Something else?

Edit 1

To add a little more context, I am developing a UI with a dynamic tabbed interface. Each tab will host a single widget and there are a variety of widgets. Each widget is a Prism composition of individual views. Some views are common amongst widgets e.g. a file picker view. Whilst each widget is composed of several views, conceptually a widget has a single set of user settings e.g. last file selected, auto-scroll enabled, etc. These need to be persisted and retrieved\applied when the application starts again, and the widget views are re-created.

My question is focused on the fact that conceptually a widget has a single set of user settings which is at right-angles to the fact that a widget consists of many views. Each view in the widget has it’s own view-model (which works nicely and logically) but if I stick to a one view-model per view, I would have to splatter each view-model with user setting backed properties (so I can databind).

A single view-model per view doesn’t sound right here if I have to splatter each view-model with user setting properties.

  • 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-05-14T22:28:38+00:00Added an answer on May 14, 2026 at 10:28 pm

    The basic problem here is using Prism to compose sub-views to make the widget – sub-views are too fine-grained.

    A widget is a collection of sub-views (user controls) that work together to form a single view e.g. combining a “file picker” and a “grid list”. The sub-views should be composed using straightforward Xaml to make a composite view. You still get the re-usability of the individual user controls, but the composition of the widget is fixed at design time.

    Now that we have a single view: WidgetView (made of user controls), we can bind that view to a single viewmodel: WidgetViewModel. Handling the settings for the widget view is then handled by composing multiple viewmodels. Simply place a property on WidgetViewModel that exposes a WidgetSettingsViewModel. User controls bind WidgetViewModel for interacting with the underlying model, but bind to WidgetSettingsViewModel for widget settings.

    In this way we can have a main viewmodel and a settings viewmodel bound to a widget.

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

Sidebar

Ask A Question

Stats

  • Questions 512k
  • Answers 512k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer It's really wrapping not hyphenation. And one can overcome this… May 16, 2026 at 5:32 pm
  • Editorial Team
    Editorial Team added an answer Try this: // get the total number of images inserted… May 16, 2026 at 5:32 pm
  • Editorial Team
    Editorial Team added an answer Apparently there is a way to have a Web Browser… May 16, 2026 at 5:32 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have an application I'm developing which closely mirrors Windows 7's Device Stage. In
I am developing a WPF UI application . I have a menu on top
I'm currently developing a application where I will have multiple windows open using C#
I'm developing a Grails (Version 1.3.3) Web-Application using the Grails Spring-Security Plugin, Spring-Security-Core-1.0.1 (which,
My company is to develop a touchscreen application. We have some prior experience with
I started developing simple application in WPF and XAML. I want to try accessign
We are developing a rather large WPF based application and would like to include
I'm considering developing a WPF application, to be hosted by a legacy Windows app
We're developing a large desktop application using Windows Presentation Foundation. Currently, the application is
I'm developing an EMR Application as my project. there Im using WCF to transfer

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.