WPF用户控件v WinForm用户控件 [英] WPF UserControl v WinForm UserControl

查看:75
本文介绍了WPF用户控件v WinForm用户控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尊敬的先生/女士:

我用几个winForms创建了一个C#项目.我也有几个winForm UserControls.在该项目中,我还添加了WPF UserControl.

现在我的问题是...

如何从Form1调用此 WPF UserControl 并将其显示在Form1中.

(我已经知道如何像这样从Form1调用winForm UserControl)

Dear Sir/Madam

I have created a C# project with couple of winForms. I also have couple of winForm UserControls. In this project I also added a WPF UserControl.

Now my question is...

How can I call this WPF UserControl from Form1 and display-it into the Form1.

(I allready know how to call the winForm UserControl from Form1 like this)

FastBarUserControl fabaUC = new FastBarUserControl();
            this.fabaUC.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.fabaUC.Location = new System.Drawing.Point(0, 0);
            this.fabaUC.Size = new System.Drawing.Size(700, 560);
            this.fabaUC.Enabled = true;
            this.fabaUC.Visible = true;
            this.FastBarPanel.Controls.Add(fabaUC);




关于如何从Form1调用WPF UserControl的任何帮助将非常感激.


在此先感谢


LAPECI




Any help on how to call WPF UserControl from Form1 would be very gratefull.


Thanks in Advance


LAPECI

推荐答案

已阅读^ ]文章.


这篇关于WPF用户控件v WinForm用户控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆