Condividi tramite


DocData.OnDocumentReadOnlyChanged Method

Alerts listeners that the read-only state of the document has changed.

Namespace:  Microsoft.VisualStudio.Modeling.Shell
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.Shell.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.Shell.12.0.dll)

Syntax

'Declaration
Protected Overridable Sub OnDocumentReadOnlyChanged ( _
    e As EventArgs _
)
protected virtual void OnDocumentReadOnlyChanged(
    EventArgs e
)
protected:
virtual void OnDocumentReadOnlyChanged(
    EventArgs^ e
)
abstract OnDocumentReadOnlyChanged : 
        e:EventArgs -> unit  
override OnDocumentReadOnlyChanged : 
        e:EventArgs -> unit
protected function OnDocumentReadOnlyChanged(
    e : EventArgs
)

Parameters

Remarks

Raising an event invokes the event handler through a delegate. For more information, see Handling and Raising Events.

The OnDocumentReadOnlyChanged method also allows derived classes to handle the event without attaching a delegate. This technique is recommended for handling the event in a derived class.

Notes to Inheritors

When you override OnDocumentReadOnlyChanged in a derived class, be sure to call the base class’s OnDocumentReadOnlyChanged method so that registered delegates receive the event.

.NET Framework Security

See Also

Reference

DocData Class

Microsoft.VisualStudio.Modeling.Shell Namespace