Exemplo n.º 1
0
        void MoveUpByLineExecuted(object target, ExecutedRoutedEventArgs e)
        {
            TextPointer tp = CaretPosition;
            Rect        r  = CaretPosition.GetCharacterRect(LogicalDirection.Forward);

            CommandBindings.Remove(cbup);
            EditingCommands.MoveUpByLine.Execute(null, this);
            CommandBindings.Add(cbup);
            if (tp.CompareTo(CaretPosition) == 0)
            {
                MoveToLiveEventArgs l = new MoveToLiveEventArgs(MyEdit.MoveToPrevLine, r);
                RaiseEvent(l);
            }
        }
Exemplo n.º 2
0
 void MoveUpByLineExecuted(object target, ExecutedRoutedEventArgs e)
 {
     TextPointer tp = CaretPosition;
     Rect r = CaretPosition.GetCharacterRect(LogicalDirection.Forward);
     CommandBindings.Remove(cbup);
     EditingCommands.MoveUpByLine.Execute(null, this);
     CommandBindings.Add(cbup);
     if (tp.CompareTo(CaretPosition) == 0)
     {
         MoveToLiveEventArgs l = new MoveToLiveEventArgs(MyEdit.MoveToPrevLine, r);
         RaiseEvent(l);
     }
 }