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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T19:04:40+00:00 2026-06-05T19:04:40+00:00

Maybe the title is not so descriptive. I’m working right with Galasoft MVVM framework,

  • 0

Maybe the title is not so descriptive.

I’m working right with Galasoft MVVM framework, and I realized in my application I need all the time or use these data in the view models.

The data which I need is this Authentification model

  • Username : string
  • Password : string
  • IsGuest : bool

I guess it is not a good idea and the best way to pass these data through navigation.

A few months ago, I was using Prism and I remember something called Container, where you can register and save your object in all the lifecycle of your application.

Another way which I was thinking is to save it in App class, but I’m not sure if this is a good idea.

By the way, I’m working on Metro UI applications.

  • 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-05T19:04:42+00:00Added an answer on June 5, 2026 at 7:04 pm

    Don’t store the data in the App because it is part of the View. To use it you would effectively have to reference the View from all of your ViewModels. A core principle of MVVM is that the Model(s) only have access to other Model items, the ViewModel has access to other ViewModels and the Model, and the View has access to ViewModels

    There are a couple of choices you could consider

    1. Create a static class AuthenticationData where this gets initialized
    2. Pass the authentication data to the constructor for each view model
    3. Store the authentication data in an IoC container (GalaSoft has a SimpleIoc class)

    Options 2 and 3 could make it easier to mock your authentication data for testing purposes if you use an IAuthenticationData interface

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

Sidebar

Related Questions

I need to have title tags on certain categories but not on all. They
How can I set icon used in my Panel's Title Bar? Maybe I need
Ok, maybe the title isn't the most descriptive thing in the world, but this
maybe the title is not very clear, let me elaborate. I have a python
Maybe the title of the question is not very self-explanatory but I don't know
Maybe the title does not word the question so precisely: I know that when
Possible Duplicate: Accessing nested JavaScript objects with string key Maybe the title is not
Maybe the title could be rephrased slightly better but basically I'm wondering how the
That title may need some work. Perhaps after reading this, you may be able
Hey all, title may be abit misleading but i didnt know the correct way

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.