Answer the question
In order to leave comments, you need to log in
WPF control not drawing on WinForm
Hello.
There is a simple code: Download , which displays a regular WPF control on WinForm.
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
ElementHost elhost = new ElementHost();
elhost.Size = new Size(110, 60);
elhost.Location = new Point(45,35);
MyWPFControl wpfctl = new MyWPFControl();
elhost.Child = wpfctl;
this.Controls.Add(elhost);
}
}
Answer the question
In order to leave comments, you need to log in
Excuse me, but why mix these technologies?
WinForms is not particularly designed for all sorts of prettiness, unlike WPF (XAML)
Draw a form in any one plane
PS After starting this project of yours, this project of yours strangely wrecked the machine
Windows 2008R2, VS 12, used to build .Net - 4.
But I have absolutely all available patches from MS on my machine.
Is it possible that all updates are installed on the problem machine?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question