From 153e4a782d9c1e5d4ca617cc49c0b61d130b443c Mon Sep 17 00:00:00 2001
From: Mop1398 <46262900+Mop1398@users.noreply.github.com>
Date: Mon, 5 Aug 2024 12:42:03 +0330
Subject: [PATCH 1/2] Mouse ContextFlyout (instead of ContextMenu) commands fix
in AvaloniaEdit.Demo
---
src/AvaloniaEdit.Demo/MainWindow.xaml | 12 ++++++++-
src/AvaloniaEdit.Demo/MainWindow.xaml.cs | 5 ++--
.../ViewModels/MainWIndowViewModel.cs | 27 +++++++++++++++++++
3 files changed, 41 insertions(+), 3 deletions(-)
diff --git a/src/AvaloniaEdit.Demo/MainWindow.xaml b/src/AvaloniaEdit.Demo/MainWindow.xaml
index 685a509f..916d7a5e 100644
--- a/src/AvaloniaEdit.Demo/MainWindow.xaml
+++ b/src/AvaloniaEdit.Demo/MainWindow.xaml
@@ -51,6 +51,16 @@
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Visible"
FontWeight="Light"
- FontSize="14" />
+ FontSize="14" >
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/AvaloniaEdit.Demo/MainWindow.xaml.cs b/src/AvaloniaEdit.Demo/MainWindow.xaml.cs
index 696f0f5e..8881c4aa 100644
--- a/src/AvaloniaEdit.Demo/MainWindow.xaml.cs
+++ b/src/AvaloniaEdit.Demo/MainWindow.xaml.cs
@@ -51,7 +51,8 @@ public MainWindow()
_textEditor.HorizontalScrollBarVisibility = Avalonia.Controls.Primitives.ScrollBarVisibility.Visible;
_textEditor.Background = Brushes.Transparent;
_textEditor.ShowLineNumbers = true;
- _textEditor.ContextMenu = new ContextMenu
+ // The ContextMenu has been defined in MainWindow.xaml
+ /*_textEditor.ContextMenu = new ContextMenu
{
ItemsSource = new List