问题
When I create a new window using .Show()
, it shows the new window, however my icons are grouped like below:
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.
回答1:
(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.
来源:https://stackoverflow.com/questions/50847905/wpf-c-sharp-how-do-i-avoid-grouping-taskbar-icons