WPF中的IWin32Window
发布时间:2020-12-14 01:41:33 所属栏目:Windows 来源:网络整理
导读:我有一个excel AddIn,它暴露了IWin32Window作为它的主要UI. 我想显示一个 WPF窗口,使用它作为它的父. 我该怎么做呢? 您可以使用 WindowInteropHelper适当地对WPF窗口进行父代: var helper = new WindowInteropHelper(theWpfWindow);helper.Owner = win32Wi
我有一个excel AddIn,它暴露了IWin32Window作为它的主要UI.
我想显示一个 WPF窗口,使用它作为它的父. 我该怎么做呢?
您可以使用
WindowInteropHelper适当地对WPF窗口进行父代:
var helper = new WindowInteropHelper(theWpfWindow); helper.Owner = win32Window.Handle; theWpfWindow.Show(); // This is now parented appropriately (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- windows-server-2008 – 任务计划程序无法应用我的更改 –
- windows-7 – 错误:“保存给定卷的扩展区的所有磁盘必须具
- windows server 2008 r2 环境下,实现域名和IP同时都能访问
- .net – 任务栏中应用程序图标上的Win7进度条?
- windows – 如何获取JUnit版本
- windows – 使用IE9嵌入WebBrowser控件时覆盖IE设置
- 跨平台 – 使用Flutter在Windows环境中开发iOS设备
- windows下控制台程序实现窗口显示
- windows – 将PID从任务列表传递到taskkill,以通过它保持打
- Windows SSH客户端