OpenDocumentOptions Constructors

Definition

Overloads

OpenDocumentOptions()

Initializes a new instance of the OpenDocumentOptions class.

OpenDocumentOptions(Nullable<Range>, Nullable<Range>, Nullable<EnsureRangeVisibleOptions>, Boolean, Nullable<Boolean>, Nullable<LogicalViewKind>, Nullable<Guid>, Nullable<Guid>)

Initializes a new instance of the OpenDocumentOptions class.

OpenDocumentOptions(Nullable<Range>, Nullable<Range>, Nullable<EnsureRangeVisibleOptions>, Boolean, Nullable<Boolean>, Nullable<LogicalViewKind>, Nullable<Guid>, Nullable<Guid>, Nullable<DocumentWindowCaptionKind>, String, Nullable<Boolean>)

Initializes a new instance of the OpenDocumentOptions class.

OpenDocumentOptions()

Initializes a new instance of the OpenDocumentOptions class.

public:
 OpenDocumentOptions();
public OpenDocumentOptions ();
Public Sub New ()

Applies to

OpenDocumentOptions(Nullable<Range>, Nullable<Range>, Nullable<EnsureRangeVisibleOptions>, Boolean, Nullable<Boolean>, Nullable<LogicalViewKind>, Nullable<Guid>, Nullable<Guid>)

Initializes a new instance of the OpenDocumentOptions class.

public:
 OpenDocumentOptions(Nullable<Microsoft::VisualStudio::RpcContracts::Utilities::Range> selection, Nullable<Microsoft::VisualStudio::RpcContracts::Utilities::Range> ensureVisible, Nullable<Microsoft::VisualStudio::RpcContracts::Utilities::EnsureRangeVisibleOptions> ensureVisibleOptions, bool isPreview, Nullable<bool> activate, Nullable<Microsoft::VisualStudio::RpcContracts::OpenDocument::LogicalViewKind> logicalView, Nullable<Guid> projectId, Nullable<Guid> editorType);
public OpenDocumentOptions (Microsoft.VisualStudio.RpcContracts.Utilities.Range? selection = default, Microsoft.VisualStudio.RpcContracts.Utilities.Range? ensureVisible = default, Microsoft.VisualStudio.RpcContracts.Utilities.EnsureRangeVisibleOptions? ensureVisibleOptions = default, bool isPreview = false, bool? activate = default, Microsoft.VisualStudio.RpcContracts.OpenDocument.LogicalViewKind? logicalView = default, Guid? projectId = default, Guid? editorType = default);
public OpenDocumentOptions (Microsoft.VisualStudio.RpcContracts.Utilities.Range? selection, Microsoft.VisualStudio.RpcContracts.Utilities.Range? ensureVisible, Microsoft.VisualStudio.RpcContracts.Utilities.EnsureRangeVisibleOptions? ensureVisibleOptions, bool isPreview, bool? activate, Microsoft.VisualStudio.RpcContracts.OpenDocument.LogicalViewKind? logicalView, Guid? projectId, Guid? editorType);
new Microsoft.VisualStudio.RpcContracts.OpenDocument.OpenDocumentOptions : Nullable<Microsoft.VisualStudio.RpcContracts.Utilities.Range> * Nullable<Microsoft.VisualStudio.RpcContracts.Utilities.Range> * Nullable<Microsoft.VisualStudio.RpcContracts.Utilities.EnsureRangeVisibleOptions> * bool * Nullable<bool> * Nullable<Microsoft.VisualStudio.RpcContracts.OpenDocument.LogicalViewKind> * Nullable<Guid> * Nullable<Guid> -> Microsoft.VisualStudio.RpcContracts.OpenDocument.OpenDocumentOptions
Public Sub New (Optional selection As Nullable(Of Range) = Nothing, Optional ensureVisible As Nullable(Of Range) = Nothing, Optional ensureVisibleOptions As Nullable(Of EnsureRangeVisibleOptions) = Nothing, Optional isPreview As Boolean = false, Optional activate As Nullable(Of Boolean) = Nothing, Optional logicalView As Nullable(Of LogicalViewKind) = Nothing, Optional projectId As Nullable(Of Guid) = Nothing, Optional editorType As Nullable(Of Guid) = Nothing)
Public Sub New (selection As Nullable(Of Range), ensureVisible As Nullable(Of Range), ensureVisibleOptions As Nullable(Of EnsureRangeVisibleOptions), isPreview As Boolean, activate As Nullable(Of Boolean), logicalView As Nullable(Of LogicalViewKind), projectId As Nullable(Of Guid), editorType As Nullable(Of Guid))

Parameters

selection
Nullable<Range>

Range of document text to be selected on document open. If omitted, no text will be selected.

ensureVisible
Nullable<Range>

Range of document text to be visible on document open. If omitted, selection will be used instead.

The view of the open document will not be scrolled if the text in range is completely visible. If the text in the range is partially visible, then the view will be scrolled as little as possible to make the text completely visible. If none of the text in the range was visible, then it will be centered in the view. Providing ensureVisibleOptions allows for more precise control over scrolling behavior.

ensureVisibleOptions
Nullable<EnsureRangeVisibleOptions>

Options to control scrolling behavior when ensureVisible argument is provided. If omitted, None is used.

isPreview
Boolean

Whether to open document in preview mode. If omitted, document will be open in durable mode.

activate
Nullable<Boolean>

Whether to activate the document after opening by sending an expicit focus. If omitted, the document is activated if isPreview is false.

logicalView
Nullable<LogicalViewKind>

A kind of logical document view to open. If omitted, Primary is used.

projectId
Nullable<Guid>

A project to open document in. If ommitted, document will be open in first project containing the document.

editorType
Nullable<Guid>

Unique identifier of the editor type. If omitted, standard editor will be created.

Applies to

OpenDocumentOptions(Nullable<Range>, Nullable<Range>, Nullable<EnsureRangeVisibleOptions>, Boolean, Nullable<Boolean>, Nullable<LogicalViewKind>, Nullable<Guid>, Nullable<Guid>, Nullable<DocumentWindowCaptionKind>, String, Nullable<Boolean>)

Initializes a new instance of the OpenDocumentOptions class.

public OpenDocumentOptions (Microsoft.VisualStudio.RpcContracts.Utilities.Range? selection = default, Microsoft.VisualStudio.RpcContracts.Utilities.Range? ensureVisible = default, Microsoft.VisualStudio.RpcContracts.Utilities.EnsureRangeVisibleOptions? ensureVisibleOptions = default, bool isPreview = false, bool? activate = default, Microsoft.VisualStudio.RpcContracts.OpenDocument.LogicalViewKind? logicalView = default, Guid? projectId = default, Guid? editorType = default, Microsoft.VisualStudio.RpcContracts.OpenDocument.DocumentWindowCaptionKind? documentWindowCaptionKind = default, string? customDocumentWindowCaption = default, bool? isUserReadonly = default);
new Microsoft.VisualStudio.RpcContracts.OpenDocument.OpenDocumentOptions : Nullable<Microsoft.VisualStudio.RpcContracts.Utilities.Range> * Nullable<Microsoft.VisualStudio.RpcContracts.Utilities.Range> * Nullable<Microsoft.VisualStudio.RpcContracts.Utilities.EnsureRangeVisibleOptions> * bool * Nullable<bool> * Nullable<Microsoft.VisualStudio.RpcContracts.OpenDocument.LogicalViewKind> * Nullable<Guid> * Nullable<Guid> * Nullable<Microsoft.VisualStudio.RpcContracts.OpenDocument.DocumentWindowCaptionKind> * string * Nullable<bool> -> Microsoft.VisualStudio.RpcContracts.OpenDocument.OpenDocumentOptions
Public Sub New (Optional selection As Nullable(Of Range) = Nothing, Optional ensureVisible As Nullable(Of Range) = Nothing, Optional ensureVisibleOptions As Nullable(Of EnsureRangeVisibleOptions) = Nothing, Optional isPreview As Boolean = false, Optional activate As Nullable(Of Boolean) = Nothing, Optional logicalView As Nullable(Of LogicalViewKind) = Nothing, Optional projectId As Nullable(Of Guid) = Nothing, Optional editorType As Nullable(Of Guid) = Nothing, Optional documentWindowCaptionKind As Nullable(Of DocumentWindowCaptionKind) = Nothing, Optional customDocumentWindowCaption As String = Nothing, Optional isUserReadonly As Nullable(Of Boolean) = Nothing)

Parameters

selection
Nullable<Range>

Range of document text to be selected on document open. If omitted, no text will be selected.

ensureVisible
Nullable<Range>

Range of document text to be visible on document open. If omitted, selection will be used instead.

The view of the open document will not be scrolled if the text in range is completely visible. If the text in the range is partially visible, then the view will be scrolled as little as possible to make the text completely visible. If none of the text in the range was visible, then it will be centered in the view. Providing ensureVisibleOptions allows for more precise control over scrolling behavior.

ensureVisibleOptions
Nullable<EnsureRangeVisibleOptions>

Options to control scrolling behavior when ensureVisible argument is provided. If omitted, None is used.

isPreview
Boolean

Whether to open document in preview mode. If omitted, document will be open in durable mode.

activate
Nullable<Boolean>

Whether to activate the document after opening by sending an expicit focus. If omitted, the document is activated if isPreview is false.

logicalView
Nullable<LogicalViewKind>

A kind of logical document view to open. If omitted, Primary is used.

projectId
Nullable<Guid>

A project to open document in. If ommitted, document will be open in first project containing the document.

editorType
Nullable<Guid>

Unique identifier of the editor type. If omitted, standard editor will be created.

documentWindowCaptionKind
Nullable<DocumentWindowCaptionKind>

The kind of the document window caption.

customDocumentWindowCaption
String

Custom document window caption with optional substitutions.

isUserReadonly
Nullable<Boolean>

Whether the document should be open in user readonly mode.

Applies to