How do I work with WIndows Forms in WPF?

General software, Operating Systems, and Programming discussion.
Everything from software questions, OSes, simple HTML to scripting languages, Perl, PHP, Python, MySQL, VB, C++ etc.
Post Reply
User avatar
complete
Member
Posts: 75
Joined: Fri Aug 26, 2005 11:08 am

How do I work with WIndows Forms in WPF?

Post by complete »

How do I work with WIndows Forms in WPF?

In my WPF program I created a Windows Form class.
In this Form, I placed an OK button and I went into the properties of the button and set the DialogResult to OK.
Now, I am calling this Dialog (Window Form) from the MainWindow.xaml.cs:

Code: Select all

     dres = form.ShowDialog();
     f (dres != DialogResult.OK) return;
The compiler is complaining:

Code: Select all

Error	3	'System.Nullable<bool>' does not contain a definition for 'OK' and no extension method 'OK' 
accepting a first argument of type 'System.Nullable<bool>' could be found (are you missing a using directive 
or an assembly reference?)
Post Reply