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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T00:34:48+00:00 2026-06-05T00:34:48+00:00

I am required to use the mvvm pattern. I know that the viewmodel should

  • 0

I am required to use the mvvm pattern. I know that the viewmodel should not care about the view from what I been reading. As a result I don’t know how to solve this problem:

I have a dll that basically turns a textbox and listview into an autocomplete control:

SomeDll.InitAutocomplete<string>(TextBox1, ListView1, SomeObservableCollection);

anyways I don’t know how to call that method from the viewmodel using the mvvm patter. if I reference the controls in the view I will be braking the rules.

I am new to MVVM pattern and my company requires me to follow it. what will be the most appropriate way of solving this problem?

I know I will be able to solve it by passing the entire view to the viewmodel as a constructor parameter but that will totaly break the mvvm pattern just because I need to reference two controls in the view.

  • 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-05T00:34:50+00:00Added an answer on June 5, 2026 at 12:34 am

    What you’re doing here is a pure view concern, so I’d recommend doing it in the view (i.e. the code-behind). The view knows about the VM and its observable collection, so why not let the code behind make this call?

    (I’d also recommend seeing if you can get a non-code/XAML API for “SomeDll”, but I have no idea how much control you might have over that)

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

Sidebar

Related Questions

I am trying to implement MVVM (Model View ViewModel) pattern for my WinForms application.
Do I understand the new Std right that shared_ptr is not required to use
What should I use in the following statement? Include or required. if(a ==b){ require
I am required to use custom fonts in my application. Problem: For ListViews that
In my WPF application I use the MVVM pattern together with dependency injection. The
Anyone know what library/header is required to use the make64 high32 and low32 functions
I am new to MVVM/WPF and know how to use Grid and StackPanel layout
I'm required to use Firefox 1.5 (yes I know...) for an in house tool,
When starting a new project that required the use of membership providers I found
We are required to use a specific library for serialization, that is used like

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.