Skip to content

Bind own Window as ContextMenu #79

Answered by HavenDV
steam3d asked this question in Q&A
Discussion options

You must be logged in to vote

No, the code to create the second WinUI window is here:

private void PrepareContextMenuWindow()
{
if (ContextFlyout == null ||
ContextMenuMode != ContextMenuMode.SecondWindow)
{
return;
}
var frame = new Frame
{
Background = new SolidColorBrush(Colors.Transparent),
};
var window = new Window()
{
Content = frame,
};
ActualThemeChanged += (_, _) => frame.RequestedTheme = ActualTheme;
var handle = WindowNative.GetWindowHandle(window);
WindowUtilities.MakeTransparent(handle);
var

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@steam3d
Comment options

Answer selected by steam3d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants