title: using wpf how to enable "enter" key press for a button placed inside a popup
body: <p>I am facing a problem though it might have a simple solution but was not able to find it out.</p>
  
  <p>I have a page (say mainPage) with several buttons inside that on which I enable "Enter" key-press for one button (say Submit) by setting the IsDefault="true" in xaml for that button and it worked fine.</p>
  
  <p>Clicking on the other buttons on my mainPage will open a popup which contain 2 buttons "Yes" and "No". setting IsDefault="true" property for "Yes" will not work when I press enter. (for information it will not work for the Submit button as well and that is also not a problem and I think I have a <a href="http://neilmosafi.blogspot.in/2007/04/default-buttons-in-wpf-and-multiple.html" rel="nofollow">solution</a> for that as well )</p>
  
  <p>how should I enable this feature for the buttons in popup?</p>
  
  <p>(for more info we have a button which create a popup that have button and textbox inside that.in that case setting IsEnable="true" for button inside the popup will do the job for the button but only if we click on the textbox.
  I tried setting focus on the textbox after observing this behavior so it might help but setting focus on the textbox does not work. use to set focus on textbox like this:
  Focusable="True" FocusManager.FocusedElement="{Binding ElementName=textboxName}"  )</p>