-
-
Notifications
You must be signed in to change notification settings - Fork 235
/
Copy pathMainWindow.xaml.cs
41 lines (35 loc) · 1.13 KB
/
MainWindow.xaml.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using Nodify.Interactivity;
namespace Nodify.StateMachine
{
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
ConnectorState.EnableToggledConnectingMode = true;
NodifyEditor.EnableCuttingLinePreview = true;
EditorGestures.Mappings.Connection.Disconnect.Unbind();
EditorGestures.Mappings.Editor.ZoomModifierKey = ModifierKeys.Control;
EditorGestures.Mappings.Editor.PanWithMouseWheel = true;
}
private void ScrollViewer_PreviewKeyDown(object sender, KeyEventArgs e)
{
if (Keyboard.Modifiers != ModifierKeys.Shift)
return;
var scrollViewer = (ScrollViewer)sender;
if (e.Key == Key.PageUp)
{
scrollViewer.PageLeft();
e.Handled = true;
}
else if (e.Key == Key.PageDown)
{
scrollViewer.PageRight();
e.Handled = true;
}
}
}
}