I have a winforms usercontrol with multiple buttons in a WPF Control.
My usercontrol was previously hosted in a windows form and I was able to so
this.ParentForm.AcceptButton = this.btnSearch;
I'm trying to establish how to do similar on the usercontrol now that it is in the WindowsFormHost. The ParentForm property is null.
There are two things I would ideally like to achieve.
- AcceptButton behaviour (Enter key triggers button press)
- AcceptButton formatting - i.e. the winforms button has the alternate formatting for accept buttons applied.
Many thanks, Chris