Note that there are some explanatory texts on larger screens.

plurals
  1. POCombobox MVVM silverlight messagebox
    primarykey
    data
    text
    <p>I am working in Silverlight MVVM model. Facing a small problem:</p> <p>There is a combobox which displays two values(One of them is selected by default) when the User changes the value of the combobox a messagebox is displayed which asks for the confirmation of the User, if "yes" then the value will be changed and if "no" then value be remain the same, the messagebox is kept in the ViewModel and is fired on selected Item's set property. The problem i am facing is that when the user selects No(Or Cancel) even though nothing happens(as per the functionality) but the combobox doesnot go back to original position and it remains in the selected posistion(i.e. combobox remain in expanded position).</p> <p>Why is it staying in that expanded position and how to take it to it's original position??</p> <p>Here is some part of the code hope this helps understanding :</p> <pre><code>MessageBoxResult msg = MessageBox.Show("Really delete?","Confirm delete", MessageBoxButtons.OKCancel) if(msg == "OK") { Do this; } else { Do nothing; } </code></pre> <p>Now there are two values in the Combobox say 'A' &amp; 'B'. This popup will comeup when user changes the value i.e. if the default value is A and user changes it to B then the popup will ask whether u want to continue or not, when user clicked on OK everything works fine but when user clicks on Cancel even though nothing happens in the application the Value gets changed in the UI i.e. the User has said Cancel to the change of value from A to B but then also B is displayed in the combobox as selected item. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload