title: ContextMenu.StaysOpen Property (WPF)
body: <p>Simple question here: what does the <a href="http://msdn.microsoft.com/en-us/library/system.windows.controls.contextmenu.staysopen.aspx" rel="nofollow noreferrer"><code>StaysOpen</code></a> property of the <code>ContextMenu</code> (or equivalently <code>Popup</code>) control actually do? I have tried observing the difference in behaviour, but I notice none whatsoever.</p>
  
  <p>MSDN states the following:</p>
  
  <blockquote>
    <p>true if the menu should stay open until the  IsOpen property changes to false; otherwise, false. The default is false.</p>
  </blockquote>
  
  <p>However, this is really quite vague, and is of no help to me. I was previously guessing that the popup would only be closed when <code>IsOpen</code> is set to false from code - and not when it loses focus/mouse capture (my desired behaviour), but this seems to not be the case.</p>
  
  <p>Could someone please explain what exactly this property is meant to do? Ideally, an exampe identify that difference in behaviour would be most helpful. Finally, if you have any suggestions how I might get my desired behaviour, that would be great.</p>