Dynamically hide/show items in the menu based on where the user clicked
Avoids the need to reassign the viewer's context menu when clicked (which sometimes causes a crash in avalonia11-preview6)
Notes:
-Uses a copy of VirtualizingStackPanel (to include fixes done after preview6) + fix another issue in lists
-Fixes memory leaks when closing windows (by setting DataContext to null, etc.)