I have a login window with a "Sign In" button which is set as the default button (IsDefault="True"). The sign in button is supposed to open a new window which also has a default button.
When the user hits the enter key, the Sign In button click event is raised and a new window is opened. But, for some reason the click event for the default button on the new window is also raised as soon as the window is opened.
This behavior is not observed if the user clicks the sign in button with the mouse or tabs to it and presses the space bar.
Any ideas on why this is happening or how to work around it?
NOTE: I tried setting the IsDefault=true in the new window's loaded event (instead of in xaml) but that didn't help.