private bool UpdateCursorPosition()
        {
            ObservableDiagram od = ((DiagramEditorViewModel)(DataContext)).ObservableDiagram as ObservableDiagram;

            if (null != od)
            {
                Point p = MouseUtils.CorrectGetPosition(DiagramImage);
                od.CursorX = p.X;
                od.CursorY = p.Y;
                return(od.ValidCommandsAtCursor);
            }
            return(false);
        }
Example #2
0
        private bool UpdateCursorPosition()
        {
            ObservableDiagram od = VM.ObservableDiagram;

            if (null != od)
            {
                Point p = MouseUtils.CorrectGetPosition(DiagramImage);
                od.CursorX = p.X;
                od.CursorY = p.Y;
                return(od.ValidCommandsAtCursor);
            }
            return(false);
        }