-
Jan 17th, 2016, 10:21 PM
#1
Thread Starter
Lively Member
[RESOLVED] Run winform inside WPF window.
Very new to xaml. Is it possible to place a window form inside a WPF window. I realize that winform controls can be used , but I'm talking about the whole form being placed in the WPF window. Thank you.
-
Jan 17th, 2016, 10:33 PM
#2
Re: Run winform inside WPF window.
It seems an odd thing to do but a form is a control too so you can use it like any other control. You'd have to add it to the container at run time and you should set its TopLevel property to False.
-
Jan 17th, 2016, 10:35 PM
#3
Re: Run winform inside WPF window.
That said, WPF is not Modern/Metro. You can publish XAML apps to the Store but they are not WPF. If this is genuinely a WPF app then this is the wrong forum for this thread and if it is a Store app then it's not WPF and you won't be able to load a Windows Form.
-
Jan 18th, 2016, 12:49 AM
#4
Thread Starter
Lively Member
Re: Run winform inside WPF window.
Thank you for the timely response. It is a WTP.
So this is the code for a textbox.
<WindowsFormsHost Margin="0,23,0.4,-23.2">
<wf:TextBox x:Name="textbox1" Text="Hello World"/>
</WindowsFormsHost>
What would you use for a whole form?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|