Class AbstractContentSelection
Base class for content selection
Inherited Members
Namespace: Sdl.TranslationStudioAutomation.IntegrationApi
Assembly: Sdl.TranslationStudioAutomation.IntegrationApi.dll
Syntax
public abstract class AbstractContentSelection
Properties
From
Details on the From position of the current selection. Can be null if there is no row at that position (either because it is invalid or the layout has not be fully generated yet).
Declaration
public ContentSelectionInfo From { get; }
Property Value
| Type | Description |
|---|---|
| ContentSelectionInfo |
IsEmpty
True if the selection is empty.
Declaration
public virtual bool IsEmpty { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
IsReversed
True if the selection is reversed
Declaration
public virtual bool IsReversed { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
IsValid
Tests whether the current selection is valid. The selection is valid when both from and upto positions are valid, otherwise it is not valid. This is useful for testing whether the selection has been initialized properly yet, or is visible on the screen.
Declaration
public virtual bool IsValid { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
UpTo
Details on the UpTo position of the current selection. Can be null if there is no row at that position (either because it is invalid or the layout has not be fully generated yet).
Declaration
public ContentSelectionInfo UpTo { get; }
Property Value
| Type | Description |
|---|---|
| ContentSelectionInfo |
Methods
Collapse(Boolean)
Collapse the selection.
Declaration
public virtual void Collapse(bool toEnd = true)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | toEnd | True to collapse the selection to the end. False to collapse the selection to the start. |
ToString()
Returns a string that represents the current selection
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String | A string that represents the current selection |
Overrides
Events
Changed
Triggered when the document selection has changed.
Declaration
public event EventHandler Changed
Event Type
| Type | Description |
|---|---|
| System.EventHandler |