Interface IPreviewType
Describes a type of preview that is available for a file type through its file type definition. This interface is further specialized into IControlPreviewType and IApplicationPreviewType for previews that can be hosted in controls or launch standalone applications. The preview type is normally defined as part of a IPreviewSet. The preview set determines whether the preview type is used as a source, target, or side-by-side preview in the user interface.
Namespace: SdlSdl.FileTypeSupportFrameworkIntegrationApi
Assembly: Sdl.FileTypeSupport.Framework.Core.dll
Syntax
public interface IPreviewType
Remarks
The preview type determines which preview file generators should be used for generating the preview files.
Different generator types can be defined for source and target files. However,
very often the same generator is used for both. By setting the generator id
to Default (which is the equivalent to default(GeneratorId)
or new GenertorId(null)
) the default generator type defined for the file
type will be used. (This is the default value. It will be used in case it is not explicitly set.)
Generators can be either of the type IFileGenerator or IBilingualDocumentGenerator. It is up to the host application to determine which one, and set up the file conversion (and the output properties) accordingly.
Properties
SourceGeneratorId
Identifier for the generator that can generate the source language file to be displayed using the preview.
Declaration
GeneratorId? SourceGeneratorId { get; set; }
Property Value
Type | Description |
---|---|
GeneratorId |
Remarks
If null
, the TargetGeneratorId will be used also
to generate the source file (if applicable).
TargetGeneratorId
Identifier for the generator that can generate the target language file to be displayed in the preview.
Declaration
GeneratorId TargetGeneratorId { get; set; }
Property Value
Type | Description |
---|---|
GeneratorId |
Remarks
To use the default generator associated with the file type, set this
value to GeneratorId.Default
.