Click here to Skip to main content
15,117,095 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
s there a way that i can assign Windows control button to forms control button.

As i am trying to assign DialogResult.Yes or No when clicked on button in WPF form.



"cannot implicitly convert type 'system.windows.controls.button' to 'system.windows.forms.button control'"

What I have tried:

Form prompt = new Form();
prompt.AcceptButton = wpfform.btn;//This is the wpf button handler and getting the above error
Posted
Updated 19-Oct-21 22:38pm

1 solution

No.
The WPF controls are not derived from the WinForms Control class or vice versa.
   
Comments
Rocky_Bas 20-Oct-21 4:21am
   
Ok atleast is there a way i can close the WPF user control form so that it proceeds to the next step.
BillWoodruff 20-Oct-21 5:36am
   
"Close" means hide, or means dispose of the instance ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900