I've created a Wizard using the Extended WPF Toolkit by Xceed and need to set the IsDefault property of the Next button to true (Clicks button when Enter is pressed).
We have a user credentials page where clicking the Next button validates the credentials and performs other actions. I'd like the the page to behave like people would expect, type in credentials and press Enter to continue. Looking through the documentation, the only button properties that seem to be exposed for the built-in buttons are Visibility and Content.
I can't figure out how to access all the other available properties for the Button Class on those built-in Wizard Buttons.
The
Wizardcontrol does not expose any property to set the default button. However, you can copy the default style from GitHub and adapt it like below. I set theIsDefaultproperty for Next and Finish.Copy this style to any parent resource dictionary. As it is and implicit style, it will be applied automatically to all
Wizards in scope. You can alternatively add anx:Keyand reference it explicitly.If you need a more flexible approach, you will have to create a custom control derived from
Wizardthat exposes a dependency property, e.g. of an enum type for the button, to be able to specify the default button. You could then get the template parts (the buttons) in the control and set theirIsDefaultproperty accordingly in the property changed callback of the dependency property.