Implement custom text context menus to fix crashes (#18854)

This works around a bug in WinUI where it creates a single context
menu/flyout for text elements per thread, not per `XamlRoot`, similar to
many other areas. Since the `XamlRoot` cannot change after creation,
this means that once you've opened the flyout, you're locked into that
window (= XAML root) forever. You can't open the flyout in another
window and once you've closed that window, you can't open it anywhere at
all.

Closes #18599

## Validation Steps Performed
* Flies out right click in the
  * About dialog 
  * Search dialog 
  * Word delimiters setting 
  * Launch size setting 
* Across two windows 
This commit is contained in:
Leonard Hecker
2025-05-14 21:47:23 +02:00
committed by GitHub
parent f769597d89
commit 076746a7a6
28 changed files with 521 additions and 36 deletions

View File

@@ -128,6 +128,7 @@ Blt
blu
BLUESCROLL
bmi
bodgy
BODGY
BOLDFONT
Borland
@@ -371,8 +372,8 @@ Dcd
DColor
dcommon
DComposition
dde
DDDCCC
dde
DDESHARE
DDevice
DEADCHAR