在Visual Studio 2012中显示WPF窗口。 [英] Show WPF window in Visual Studio 2012.

查看:318
本文介绍了在Visual Studio 2012中显示WPF窗口。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello everebody。

Hello everebody.

我的DSL解决方案带有自定义上下文菜单。其中一个上下文菜单项显示了一些自定义WPF窗口。但是我有一个问题 - 这个窗口不显示在打开的Visual Studio实例的顶部。 

I have DSL solution with a custom contet menu. One of the context menu item show some custom WPF Window. but I have one issue - this window is show not on the top of opened Visual Studio instance. 

window.Topmost = true

属性无法正常工作,因为我的窗口位于每个操作系统窗口的顶部,但我只需要将其设置为我的Visual Studio 2012实例的最顶层。 

问题是如何做到的? 

property does not working correctly, because putting my window on the top for EVERY OS windows, but I just need to make it Topmost for my Visual Studio 2012 instance. 
Question is How to do it? 

ps在普通的WPF中,您可以将window.Owner分配给Perrent WPF窗口,它可以正常工作,但在我的情况下,Owner是Visual Studio实例,我不知道如何将它分配给我的WPF窗口。

p.s. In regular WPF you can just assign window.Owner to Perrent WPF window, and it will be work fine, but in my case Owner is Visual studio instance, and I don't know how to assign it to my WPF window.

Regurds,

Serhiy

推荐答案

Hello Serhiy

Hello Serhiy

我相信您可以在以下文章中找到答案:
Visual Studio中的WPF 2010年 - 第4部分:直接托管WPF内容

I believe that you might find your answer in the following article: WPF in Visual Studio 2010 - Part 4 : Direct Hosting of WPF content

关心

Regards


这篇关于在Visual Studio 2012中显示WPF窗口。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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