// Token: 0x06007CC4 RID: 31940 RVA: 0x00231550 File Offset: 0x0022F750
        internal bool IsSelected(ITextRange selection)
        {
            if (selection == null)
            {
                throw new ArgumentNullException("selection");
            }
            Invariant.Assert(this._attachedAnnotation != null, "No _attachedAnnotation");
            TextAnchor textAnchor = this._attachedAnnotation.FullyAttachedAnchor as TextAnchor;

            return(textAnchor != null && textAnchor.IsOverlapping(selection.TextSegments));
        }
예제 #2
0
        internal bool IsSelected(ITextRange selection)
        {
            if (selection == null)
            {
                throw new ArgumentNullException("selection");
            }
            Invariant.Assert(_attachedAnnotation != null, "No _attachedAnnotation");

            // For activation based on the selection state, we need to use anchors that
            // span virtualized content (i.e., content that isn't visible).  For that we
            // grab the 'fullly resolved' anchors instead of the anchors used by the
            // framework for all other purposes.
            TextAnchor fullAnchor = _attachedAnnotation.FullyAttachedAnchor as TextAnchor;

            //Debug.Assert(fullAnchor != null, "null TextAnchor");
            if (fullAnchor == null)
            {
                return(false);
            }

            return(fullAnchor.IsOverlapping(selection.TextSegments));
        }