WPF C# - 如何避免对任务栏图标进行分组? [英] WPF C# - How do I avoid grouping taskbar icons?

查看:30
本文介绍了WPF C# - 如何避免对任务栏图标进行分组?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用 .Show() 创建一个新窗口时,它会显示新窗口,但是我的图标分组如下:

When I create a new window using .Show(), it shows the new window, however my icons are grouped like below:

我不想那样.我希望图标是分开的,因为我希望我的用户可以轻松打开他们想要的窗口,而不必单击它,查看打开的窗口列表,然后每次都选择他们想要的窗口.我不想想要使用 .ShowDialog() 因为我需要用户能够专注于任何一个窗口,而不管另一个窗口的状态如何.这意味着,两个窗口都需要打开,并且用户需要能够与这些窗口中的每一个进行交互,而不管另一个窗口是打开还是最小化.

I don't want that. I want the icons to be separate because I want my users to easily open the window that they want instead of having to click it, view the list of open windows, then choosing which one they want every time. I don't want to use .ShowDialog() because I need the users to be able to focus on either window no matter the state of the other. Meaning, both windows will need to be open and the user will need to be able to interact with each of those windows regardless of if the other window is open or minimized.

我试过设置父级,但我认为我没有采取正确的方法.我以前从未使用过图标,所以请原谅我缺乏知识.

I've tried setting the parent, but I don't think I'm taking the right approach. I've never worked with icons before, so excuse my lack of knowledge.

var w = new Window();
w.Owner = Window.GetWindow(this);
w.Show();

我将更改打开的第二个窗口的图标,以便用户根据他们的需要知道要单击哪个窗口.我只是想绕过似乎是默认的分组.

I will be changing the icon of the second window that gets opened so that the user knows which one to click on based on what they want. I'm just trying to get around the grouping that seems to be the default.

推荐答案

(如果我是对的)在 Windows 中,可以为您的快捷方式图标分配一个单独的 AppUserModelID 以防止默认分组图标,这是解释页面如何定义和分配单独的 AppUserModelID.我建议您仔细阅读所提供的来源.

(If i'm correct) In Windows it's possible to assign a seperate AppUserModelID to your shortcut icon to prevent the default grouping of icons, this is the page explaining how to define and assign a seperate AppUserModelID. I would suggest reading the provided source thouroughly.

这篇关于WPF C# - 如何避免对任务栏图标进行分组?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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