/// <summary>
        /// Use MoveTextRangeDialog for Move or Compare
        /// </summary>
        /// <param name="mode"></param>
        private void RunMoveCompareDialog(MoveTextRangeDialog.OpMode mode)
        {
            try
            {
                MoveTextRangeDialog dlg = new MoveTextRangeDialog(GetSelectedTextRangeViewModel(), mode, this.CustomList, UpdateHilighter);
                dlg.Owner = Application.Current.MainWindow;
                dlg.ShowDialog();
                switch (mode)
                {
                case MoveTextRangeDialog.OpMode.Move:
                case MoveTextRangeDialog.OpMode.MoveEndpointByRange:
                case MoveTextRangeDialog.OpMode.MoveEndpointByUnit:
                    // scroll into first.
                    UpdateSelectedTextRangeInfo();
                    break;

                case MoveTextRangeDialog.OpMode.Compare:
                case MoveTextRangeDialog.OpMode.CompareEndpoints:
                    break;
                }
            }
#pragma warning disable CA1031 // Do not catch general exception types
            catch (Exception ex)
            {
                ex.ReportException();
                MessageDialog.Show(GetExceptionString(ex));
            }
#pragma warning restore CA1031 // Do not catch general exception types
        }
        /// <summary>
        /// Use MoveTextRangeDialog for Move or Compare
        /// </summary>
        /// <param name="mode"></param>
        private void RunMoveCompareDialog(MoveTextRangeDialog.OpMode mode)
        {
            try
            {
                MoveTextRangeDialog dlg = new MoveTextRangeDialog(GetSelectedTextRangeViewModel(), mode, this.CustomList, UpdateHilighter);
                dlg.Owner = Application.Current.MainWindow;
                dlg.ShowDialog();
                switch (mode)
                {
                case MoveTextRangeDialog.OpMode.Move:
                case MoveTextRangeDialog.OpMode.MoveEndpointByRange:
                case MoveTextRangeDialog.OpMode.MoveEndpointByUnit:
                    // scroll into first.
                    UpdateSelectedTextRangeInfo();
                    break;

                case MoveTextRangeDialog.OpMode.Compare:
                case MoveTextRangeDialog.OpMode.CompareEndpoints:
                    break;
                }
            }
            catch (Exception ex)
            {
                MessageDialog.Show(GetExceptionString(ex));
            }
        }