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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:52:01+00:00 2026-05-25T11:52:01+00:00

Please assist with MVVM design/understanding problem. Given that we have a Windows Phone app

  • 0

Please assist with MVVM design/understanding problem.

Given that we have a Windows Phone app with following UI structure:

MainPage.xaml body:

<views:PanoramaView/>

DataContext is set via MVVM Light view-model locator to a static MainViewModel class instance.

Views/PanoramaView.xaml body:

<UserControl.DataContext>
        <ViewModels:PanoramaViewModel/>
</UserControl.DataContext>

<StackPanel x:Name="LayoutRoot">
        <controls:Panorama Background="{Binding PanoramaBackgroundBrush}"
                           ItemsSource="{Binding PanoramaItems}"
                           ItemTemplate="{StaticResource panoramaItemTemplate}"
                           />
</StackPanel>

At that point I have stumbled upon a question – What should I do in case I want all my PanoramaItems to be comprised of a different user controls? If I define a panorama item template, I doom all of them to be alike. But my intention is to have serveral, compeltely different panorama items. I wanted to have a class (presumably PanoramaViewModel) that would allow me control which panorama items are displayed at a given moment of time.

So there has to be a way for me to still stick to MVVM, but to be able to instantiate new Views(Panorama Items) and inject them into a PanoramaItems collection of my PanoramaViewModel. Where and how do I do that?

  • 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-25T11:52:01+00:00Added an answer on May 25, 2026 at 11:52 am

    You have to define resource key to define a data template with view setter for the view item being rendered for the different view model class types, and derive VM classes from a common base class (PanoramaViewModel, i.e)

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

Sidebar

Related Questions

Can some one please assist me in this example of TabHost? The problem i
I have the following directory structure: APPDIR/ APPDIR/APPHDRS (has *.h) APPDIR/APPLIBSRCS (has *.cpp need
Please assist, I am trying to format a phone number like (111)111-1111 . I
I have a project that requires me to do development in SQL Server 2005,
I have model/controller called notification. I want to make a new url so that
I have the following code....and I can't seem to get the ads to run
In my forum I have a BB code to display youtube videos. following options
I have a flipView class that I allocate and initiate. But, when I release
in my app,in a EditText i have to set dollar sign permanently , always
Please assist. How do i get the list of hex addresses between a specific

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.