void NodeControl_PreviewKeyDown(object sender, KeyEventArgs e) { //Logging.Info("NodeControl_PreviewKeyDown"); if (false) { } else if (Key.Insert == e.Key) { NodeControl node_control = (NodeControl)sender; if (KeyboardTools.IsCTRLDown()) { object content = new StringNodeContent("Child node"); NodeControlAddingByKeyboard.AddChildToNodeControl(node_control, content); } else { NodeControlAddingByKeyboard.AddSiblingToNodeControl(node_control); } e.Handled = true; } }
public StringNodeContentControl(NodeControl node_control, StringNodeContent string_node_content) { InitializeComponent(); Focusable = true; DataContext = string_node_content.Bindable; ExitEditMode(); MouseDoubleClick += StringNodeContentControl_MouseDoubleClick; KeyDown += StringNodeContentControl_KeyDown; TxtEdit.LostFocus += edit_text_box_LostFocus; TxtEdit.PreviewKeyDown += edit_text_box_PreviewKeyDown; fader = new BackgroundFader(this); }
public StringNodeContentEditor(NodeControl node_control, StringNodeContent string_node_content) { InitializeComponent(); DataContext = string_node_content.Bindable; }