title: WPF mvvm binding, get/set value: issue with preventing update value
body: <p>I'm working in a WPF mvvm environment.</p>
  
  <p>I have some binded vars and data from cs file to xaml.</p>
  
  <p>One is different from others: it is the index of the selected tab in my tabsCollection. When the user has more than one tab opened and has got mods to save, I show him a dialog. If he cliks "ok", he proceed with the change of the tab, if he clicks "cancel", the tab must remain the same.</p>
  
  <p>this is my code:</p>
  
  <pre><code>private int p_SelectedDocumentIndex;
  public int SelectedDocumentIndex{ get { return p_SelectedDocumentIndex; }
      set {
          if (tabsCollection.Count() &gt; 1 &amp;&amp; CanSave() == true)
          {
              if (dm.ShowMessage1(ServiceContainer.GetService&lt;DevExpress.Mvvm.IDialogService&gt;("confirmYesNo")))
              {
                  p_SelectedDocumentIndex = value;
                  base.RaisePropertiesChanged("SelectedDocumentIndex");
              }
              //else {
              //    CODE FOR NOT CHANGE THE VALUE 
              //}
          }
          else {
              p_SelectedDocumentIndex = value;
              base.RaisePropertiesChanged("SelectedDocumentIndex");
          }
      }
   }
  </code></pre>
  
  <p>So, the question is: how can I not apply the change in the "set" section? (like an undo, I think)</p>
  
  <p>This  is simpliest way to do it, but, if this approach is incorrect, how can I do? </p>
  
  <p>Previous failed attempts:</p>
  
  <pre><code>1)
  p_SelectedDocumentIndex = p_SelectedDocumentIndex
  base.RaisePropertiesChanged("SelectedDocumentIndex");
  
  2)
  base.RaisePropertiesChanged("SelectedDocumentIndex");
  
  3)
  nothing in the else branch
  </code></pre>