private void DeactivateLastInlineBoxed()
        {
            if (mLastInlineBoxed != null)
            {
                TextMediaBindableRun newRun = mLastInlineBoxed.CloseSelf(false);

                addMouseButtonEventHandler(newRun);

                mLastInlineBoxed = null;
            }
        }
        private void DoMouseDownStuff(TextMediaBindableRun run, InlineCollection inlines)
        {
            DeactivateLastInlineBoxed();

            TextMediaTextBox  tb             = new TextMediaTextBox(run.TextMedia);
            InlineUIContainer newInlineBoxed = new InlineUIContainer(tb);

            inlines.InsertAfter(run, newInlineBoxed);
            inlines.Remove(run);

            run.MouseDown  -= new MouseButtonEventHandler(curRun_MouseDown);
            run.MouseEnter -= new MouseEventHandler(curRun_MouseEnter);
            run.MouseLeave -= new MouseEventHandler(curRun_MouseLeave);

            run.InvalidateBinding();

            mLastInlineBoxed = tb;
        }
 public void ResetLastInlineBoxed()
 {
     mLastInlineBoxed = null;
 }