如何使 WinForms 表单作为 AvalonDock 中的 DockableContent 工作?
我可以使用 WinForms 控件,但不能使用整个表单:
var foo = new DockableContent();
foo.Title = "Foo";
foo.Name = "FooName";
var c = new WindowsAppFramework.RenderTargetUserControl();
c.Dock = System.Windows.Forms.DockStyle.Fill;
c.AutomaticUpdateFPS = 60;
var host = new System.Windows.Forms.Integration.WindowsFormsHost();
host.Child = c;
foo.Content = host;
foo.ShowAsDocument(dockManager);
foo.Focus();
是否可以使用整个表单?我想利用应用程序中现有的表格。
I am able to use WinForms controls, but not an entire form:
var foo = new DockableContent();
foo.Title = "Foo";
foo.Name = "FooName";
var c = new WindowsAppFramework.RenderTargetUserControl();
c.Dock = System.Windows.Forms.DockStyle.Fill;
c.AutomaticUpdateFPS = 60;
var host = new System.Windows.Forms.Integration.WindowsFormsHost();
host.Child = c;
foo.Content = host;
foo.ShowAsDocument(dockManager);
foo.Focus();
Is it possible to use an entire Form? I want to make use of existing Forms in the Application.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将表单变成子控件:
这实际上将其变成了 UserControl。
You can turn a form into a child control:
Which essentially turns it into a UserControl.