How do I work with WIndows Forms in WPF?

Posted by xarzu on Stack Overflow See other posts from Stack Overflow or by xarzu
Published on 2010-05-26T19:11:29Z Indexed on 2010/05/26 19:21 UTC
Read the original article Hit count: 300

Filed under:
|
|

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:

     dres = form.ShowDialog();
     if (dres != DialogResult.OK) return;

The compiler is complaining:

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?)

© Stack Overflow or respective owner

Related posts about c#

Related posts about wpf