Interface INavigablePreview
Provides services for navigating in a preview, to highlight a specific segment in the preview, and to generate events when the user selects a segment in the preview.
Namespace: Sdl.FileTypeSupport.Framework.IntegrationApi
Assembly: Sdl.FileTypeSupport.Framework.Core.dll
Syntax
public interface INavigablePreview
Remarks
Preview implementations may choose to provide only part of this functionality, e.g. they might let the host application highlight a segment, but may not support users selecting as segment in the preview. It is up to the implementation to choose what to support, and simply provide no implementation for the other parts of this interface.
Properties
PreferredHighlightColor
Set by the host application to indicate the preferred color to be used for highlighting the current segment in the preview when NavigateToSegment(SegmentReference) is called.
Declaration
Color PreferredHighlightColor { get; set; }
Property Value
Type | Description |
---|---|
System.Drawing.Color |
Remarks
Using the highlight color is optional, but leads to an enhanced user experience. This will typically be the same color as the background color that is used for the active segment row in the editor, which makes it easier for the user to see that the two segments (i.e. from the bilingual document and the preview) relate to each other.
Methods
NavigateToSegment(SegmentReference)
Called by the host application to request that the preview should scroll to the specified segment.
Declaration
void NavigateToSegment(SegmentReference segment)
Parameters
Type | Name | Description |
---|---|---|
SegmentReference | segment |
Remarks
The implementation may specifically highlight the segment in the preview (if possible).
Events
SegmentSelected
Raised when the user interacts with the preview, selecting a different segment than the one that is currently highlighted.
Declaration
event EventHandler<SegmentSelectedEventArgs> SegmentSelected
Event Type
Type | Description |
---|---|
System.EventHandler<SegmentSelectedEventArgs> |
Remarks
The host application typically handles this event by changing the active segment in the editor to the one that the user has selected in the preview.