OpenDocumentOptions 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 OpenDocumentOptions 类的新实例。
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);
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)
参数
要在文档打开时显示的文档文本范围。 如果省略, selection 则改为使用。
如果范围中的文本完全可见,则不会滚动打开的文档的视图。
如果范围中的文本部分可见,则视图将尽可能少地滚动,使文本完全可见。 如果该范围中的文本都不可见,则该范围将在视图中居中。
提供 ensureVisibleOptions 可更精确地控制滚动行为。
- ensureVisibleOptions
- Nullable<EnsureRangeVisibleOptions>
提供参数时用于控制滚动行为的选项 ensureVisible 。 如果省略,则使用 None。
- isPreview
- Boolean
是否在预览模式下打开文档。 如果省略,则文档将在持久模式下打开。
- logicalView
- Nullable<LogicalViewKind>
要打开的一种逻辑文档视图。 如果省略,则使用 Primary。