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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T14:30:25+00:00 2026-06-05T14:30:25+00:00

I hope I didn’t oversee an old question that’s has stated the same, but

  • 0

I hope I didn’t oversee an old question that’s has stated the same, but as far as I can see they were all more specialized.

I wanted to know, if I am “on the right track”. In the past I did some WinForms stuff with C# (mainly .net-3.5) and now I want to use / learn WPF for a little side-project. At the moment I am reading much about MVVM and other implementing-details when using WPF (.net4).

What I need to achieve is:

I want to have a kind of searchtool for an oracle-database. The Database-connection and so on is fixed, up and running. So no work to do on this part. The new tool should be ran on a windows7-desktop-pc and a windows7-tablet-pc. So I want/need two different Views one usual mouse-keyboard-interaction-gui and one optimized for touch-input.

So I had the idea of using one Model, one View-Model and two Views. I wouldn’t want to use IOC via Unity or something of this kind as this would add a layer of complexity that would be overkill for this little side-project.

My actual Question:

Is this the right approach (using 2 Views with one View-Model) or am I completely wrong here (maybe DataTemplates would be better here?)? And what are good approaches to have this implemented?

Thanks in advance!

  • 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-05T14:30:26+00:00Added an answer on June 5, 2026 at 2:30 pm

    The idea behind having a ViewModel would be to have a place to consolidate view-related logic in a place that has no direct dependencies to view-specific stuff. So, yes, I’d say your approach is fine.

    DataTemplates seem more suited for “smaller” View Models, so while a DataTemplateSelector could nicely do the job of selecting a Template based on your circumstances I think it’s worth investing some extra code that can do that for you for full-sized Controls.

    You will have to figure out whether you can automatically detect the way your users are using the app and maybe have your view names follow a convention such that choice of view can happen more or less automatically.

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

Sidebar

Related Questions

I hope this question is not a duplicate but I didn't find anything equivalent
I hope that this question hasn't been asked already, but I was looking for
I hope that I won't start a topic that's done already but I didn't
I hope this is not an duplicate question, but a quick search didn't give
I know this very regular question But i didn't get that's way ask here
I didn't find an answer on the net and i hope this question have
(I hope this question is on-topic -- I tried searching for an answer but
I have checked the suggestions that came up before posting, hope I didn't miss
I hope I'm not duplicating a post; but I didn't quite know what to
Hope you guys don't mind me asking this question, but I find myself at

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.