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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:33:08+00:00 2026-05-25T10:33:08+00:00

I am trying to achieve a simple thing, or i think it’s simple but

  • 0

I am trying to achieve a simple thing, or i think it’s simple but i don’t know if it’s possible…

Imagine the following scenario… In the ViewModel i have one Property called SelectedProduct and other one called NewProduct (both of the same type, the model).

In my MainWindow we have a ListView and two buttons, one is the Add button and the other is the Update button (and this one will update the Selected Item in the ListView), and both will open the same window but will do different things.

I am using Commands in the buttons, so i think i can use one Command if have clicked in the Add button of the MainWindow or use the other Command.

So if we click in the Add button, the controls (TextBoxes and ComboBoxes) in the second window will bind the NewProduct property, and if we click in the Update button the second window will bind the SelectedProduct property.

Is there any way to achieve this?

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-05-25T10:33:09+00:00Added an answer on May 25, 2026 at 10:33 am

    Why don’t you just create a single EditedProduct property and give that the appropriate value?

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

Sidebar

Related Questions

im trying to achieve something but i dont really know how I have set
I am trying to achieve a very simple thing in MATLAB. I have a
There is a relatively simple thing I'm trying to achieve but I'm unsure how
I've been trying to think of the most elegant way to achieve the following...
I am trying to achieve a very simple thing using C++ templates. I would
I'm trying to do a dead simple thing but cannot find an effective way
I am trying to achieve a very simple goal, however it does not seem
I am trying to achieve something in MySQL but even with all the answers
I am trying to learn Lex. I have a simple program where i want
I don't know why I can't figure this out, I think it should be

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.