Class BasicSegmentEditControl
An edit control providing display and editing functionalities for bilingual content. This control is restricted to displaying only one segment. The contents of the segment should be created using the provided ItemFactory. This control is read-only by default.
Inheritance
Implements
Inherited Members
Namespace: SdlSdl.DesktopEditorBasicControls
Assembly: Sdl.DesktopEditor.BasicControls.dll
Syntax
public class BasicSegmentEditControl : UserControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, IContainerControl
Constructors
BasicSegmentEditControl()
Default constructor, display settings are initialized to defaults.
Declaration
public BasicSegmentEditControl()
Properties
IsReadOnly
Determines whether the control is read-only or not. Default is true
.
Declaration
public bool IsReadOnly { get; set; }
Property Value
Type | Description |
---|---|
bool |
ItemFactory
The item factory to use when creating content to display in the control.
Declaration
public IDocumentItemFactory ItemFactory { get; }
Property Value
Type | Description |
---|---|
IDocumentItemFactory |
Methods
Dispose(bool)
Clean up any resources being used.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing | true if managed resources should be disposed; otherwise, false. |
Overrides
GetDocumentSegment()
Provides access to the current document segment as it is in the edit control.
Declaration
public ISegment GetDocumentSegment()
Returns
Type | Description |
---|---|
ISegment | The segment used by the control. |
MoveSelection(TextLocation, TextLocation)
Moves the edit control's text selection to the locations provided.
Declaration
public void MoveSelection(TextLocation fromLocation, TextLocation uptoLocation)
Parameters
Type | Name | Description |
---|---|---|
TextLocation | fromLocation | The starting point of the selection. |
TextLocation | uptoLocation | The finishing point of the selection. |
RedrawControl()
Forces a redraw of the control.
Declaration
public void RedrawControl()
ReplaceDocumentSegment(ISegment)
Replaces the document in the control with the content of the segment.
Declaration
public void ReplaceDocumentSegment(ISegment segment)
Parameters
Type | Name | Description |
---|---|---|
ISegment | segment | The segment containing the content to replace. |
Events
SegmentContentChanged
Event fired when the content of the segment in the control has been manually modified
Declaration
public event EventHandler SegmentContentChanged
Event Type
Type | Description |
---|---|
EventHandler |