Compartilhar via


IReadOnlyRegionEdit.CreateDynamicReadOnlyRegion Method

Marks a span of text in this buffer as conditionally read-only, subject to a check performed when the region is queried. The span remains read-only until it is marked as writable or forced writable again.

Namespace:  Microsoft.VisualStudio.Text
Assembly:  Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)

Syntax

'Declaração
Function CreateDynamicReadOnlyRegion ( _
    span As Span, _
    trackingMode As SpanTrackingMode, _
    edgeInsertionMode As EdgeInsertionMode, _
    callback As DynamicReadOnlyRegionQuery _
) As IReadOnlyRegion
IReadOnlyRegion CreateDynamicReadOnlyRegion(
    Span span,
    SpanTrackingMode trackingMode,
    EdgeInsertionMode edgeInsertionMode,
    DynamicReadOnlyRegionQuery callback
)
IReadOnlyRegion^ CreateDynamicReadOnlyRegion(
    Span span, 
    SpanTrackingMode trackingMode, 
    EdgeInsertionMode edgeInsertionMode, 
    DynamicReadOnlyRegionQuery^ callback
)
abstract CreateDynamicReadOnlyRegion : 
        span:Span * 
        trackingMode:SpanTrackingMode * 
        edgeInsertionMode:EdgeInsertionMode * 
        callback:DynamicReadOnlyRegionQuery -> IReadOnlyRegion 
function CreateDynamicReadOnlyRegion(
    span : Span, 
    trackingMode : SpanTrackingMode, 
    edgeInsertionMode : EdgeInsertionMode, 
    callback : DynamicReadOnlyRegionQuery
) : IReadOnlyRegion

Parameters

Return Value

Type: Microsoft.VisualStudio.Text.IReadOnlyRegion
The IReadOnlyRegion used to track this read-only region. This object will be used to remove the read-only region.

Exceptions

Exception Condition
ArgumentNullException

span is nulla null reference (Nothing in Visual Basic).

ArgumentOutOfRangeException

span is past the end of the buffer.

Remarks

Zero-length read-only regions restrict inserts only at the exact point defined by the region. A deletion or modification that includes that point can still occur.

.NET Framework Security

See Also

Reference

IReadOnlyRegionEdit Interface

Microsoft.VisualStudio.Text Namespace