Closed KaivnD closed 1 year ago
updates:
just try bind mouse event like this, it works, but editor.IsPanning
is true even I'm not paning.
<nodify:NodifyEditor
x:Name="Editor"
MouseLeftButtonDown="Editor_MouseLeftButtonDown"
MouseRightButtonDown="Editor_MouseRightButtonDown"
......
private void Editor_MouseRightButtonDown(object sender, MouseButtonEventArgs e)
{
if (e.Handled || sender is not NodifyEditor editor) return;
if (DataContext is not NodeEditorViewModel vm) return;
if (!editor.IsPanning)
{
e.Handled = true;
vm.Library.OpenAt(editor.MouseLocation);
}
}
updates:
my bad! that's so stupid. I should bind MouseRightButtonUp
instead of MouseRightButtonDown
, problem solved!
Hi! I have some trouble with trying to implement OperationsMenuView in mulitiple instance of nodify editor, the EventManager.RegisterClassHandler not acting right, like this.
https://github.com/miroiu/nodify/assets/37983330/cda4a339-2578-420b-b485-69f092eb74f3
and here is my code. WpfApp2.zip