Search Results for

    Show / Hide Table of Contents

    Class EditControlDisplaySettings

    Provides access to the display settings that will be used by the edit control when displaying fonts, colors and other formatting on screen.

    Inheritance
    System.Object
    EditControlDisplaySettings
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Sdl.DesktopEditor.EditorApi.Implementation
    Assembly: Sdl.DesktopEditor.EditorApi.dll
    Syntax
    public class EditControlDisplaySettings

    Constructors

    EditControlDisplaySettings()

    Default constructor

    Declaration
    public EditControlDisplaySettings()

    Fields

    DefaultActiveSegmentColor

    Default setting for the active segment color.

    Declaration
    protected readonly Color DefaultActiveSegmentColor
    Field Value
    Type Description
    System.Drawing.Color

    DefaultAdaptFontColors

    Default setting for enabling of font color adaptation.

    Declaration
    protected readonly bool DefaultAdaptFontColors
    Field Value
    Type Description
    System.Boolean

    DefaultAdaptFontSizes

    Default setting for enabling of font size adaptation.

    Declaration
    protected readonly bool DefaultAdaptFontSizes
    Field Value
    Type Description
    System.Boolean

    DefaultColorDifferenceRatio

    Default setting for the color difference ratio when applying font color adaptation.

    Declaration
    protected readonly int DefaultColorDifferenceRatio
    Field Value
    Type Description
    System.Int32

    DefaultDocumentBackgroundColor

    Default setting for the document background color.

    Declaration
    protected readonly Color DefaultDocumentBackgroundColor
    Field Value
    Type Description
    System.Drawing.Color

    DefaultDocumentTextColor

    Default setting for the default document text color.

    Declaration
    protected readonly Color DefaultDocumentTextColor
    Field Value
    Type Description
    System.Drawing.Color

    DefaultMaxFontSize

    Default setting for maximum font adaptation size.

    Declaration
    protected readonly int DefaultMaxFontSize
    Field Value
    Type Description
    System.Int32

    DefaultMinFontSize

    Default setting for minimum font adaptation size.

    Declaration
    protected readonly int DefaultMinFontSize
    Field Value
    Type Description
    System.Int32

    DefaultReadOnlySegmentColor

    Default setting for the read-only segment color.

    Declaration
    protected readonly Color DefaultReadOnlySegmentColor
    Field Value
    Type Description
    System.Drawing.Color

    DefaultSegmentShadingRatio

    Default setting for the segment shading ratio.

    Declaration
    protected readonly byte DefaultSegmentShadingRatio
    Field Value
    Type Description
    System.Byte

    DefaultSelectedSegmentColor

    Default setting for the selected segment color.

    Declaration
    protected readonly Color DefaultSelectedSegmentColor
    Field Value
    Type Description
    System.Drawing.Color

    DefaultShowTrackedChanges

    Default setting for the color difference ratio when applying font color adaptation.

    Declaration
    protected MarkupDisplayMode DefaultShowTrackedChanges
    Field Value
    Type Description
    MarkupDisplayMode

    DefaultSpellingUnderlineColor

    Default setting for the spell-checking underline color.

    Declaration
    protected readonly Color DefaultSpellingUnderlineColor
    Field Value
    Type Description
    System.Drawing.Color

    DefaultTagFormatHighlightColor

    Default setting for the tag format highlight color.

    Declaration
    protected readonly Color DefaultTagFormatHighlightColor
    Field Value
    Type Description
    System.Drawing.Color

    DefaultTMPlaceableUnderlineColor

    Default setting for the TM placeable underline color.

    Declaration
    protected readonly Color DefaultTMPlaceableUnderlineColor
    Field Value
    Type Description
    System.Drawing.Color

    Properties

    ActiveSegmentColor

    The background color used when displaying the active segment.

    Declaration
    public Color ActiveSegmentColor { get; set; }
    Property Value
    Type Description
    System.Drawing.Color

    AdaptFontColors

    Whether font color adaptation is enabled or not

    Declaration
    public bool AdaptFontColors { get; set; }
    Property Value
    Type Description
    System.Boolean

    AdaptFontSizes

    Whether font size adaptation is enabled or not

    Declaration
    public bool AdaptFontSizes { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    This property has been deprecated by EditControlFontSizeSettings.AdaptFontSizes.

    See Also
    EditControlFontSizeSettings

    AddedTQAFormatting

    The formatting that will be used when displaying TQA content which has been added

    Declaration
    public IFormattingGroup AddedTQAFormatting { get; set; }
    Property Value
    Type Description
    IFormattingGroup

    ColorDifferenceRatio

    The text-to-background color difference ratio to apply to font colors.

    Declaration
    public int ColorDifferenceRatio { get; set; }
    Property Value
    Type Description
    System.Int32

    CommentTQAFormatting

    The formatting that will be used when displaying TQA content which has been commented

    Declaration
    public IFormattingGroup CommentTQAFormatting { get; set; }
    Property Value
    Type Description
    IFormattingGroup

    DefaultAddedTQAFormatting

    Gets the default added TQA formatting.

    Declaration
    protected FormattingGroup DefaultAddedTQAFormatting { get; }
    Property Value
    Type Description
    FormattingGroup

    DefaultCommentTQAFormatting

    Gets the default commented TQA formatting.

    Declaration
    protected FormattingGroup DefaultCommentTQAFormatting { get; }
    Property Value
    Type Description
    FormattingGroup

    DefaultDeletedTagProperties

    Gets the default deleted tag properties.

    Declaration
    protected TagPaintingProperties DefaultDeletedTagProperties { get; }
    Property Value
    Type Description
    TagPaintingProperties

    DefaultDeletedTQAFormatting

    Gets the default deleted TQA formatting.

    Declaration
    protected FormattingGroup DefaultDeletedTQAFormatting { get; }
    Property Value
    Type Description
    FormattingGroup

    DefaultDocumentTagProperties

    Gets the default document tag properties.

    Declaration
    protected TagPaintingProperties DefaultDocumentTagProperties { get; }
    Property Value
    Type Description
    TagPaintingProperties

    DefaultErrorCommentFormatting

    Gets the default error comment formatting.

    Declaration
    protected FormattingGroup DefaultErrorCommentFormatting { get; }
    Property Value
    Type Description
    FormattingGroup

    DefaultFileTagProperties

    Gets the default file tag properties.

    Declaration
    protected TagPaintingProperties DefaultFileTagProperties { get; }
    Property Value
    Type Description
    TagPaintingProperties

    DefaultInformationCommentFormatting

    Gets the default information comment formatting.

    Declaration
    protected FormattingGroup DefaultInformationCommentFormatting { get; }
    Property Value
    Type Description
    FormattingGroup

    DefaultInsertedRevisionFormatting

    Gets the default inserted revision formatting.

    Declaration
    protected FormattingGroup DefaultInsertedRevisionFormatting { get; }
    Property Value
    Type Description
    FormattingGroup

    DefaultInsertedTagProperties

    Gets the default inserted tag properties.

    Declaration
    protected TagPaintingProperties DefaultInsertedTagProperties { get; }
    Property Value
    Type Description
    TagPaintingProperties

    DefaultInternalTagProperties

    Gets the default internal tag properties.

    Declaration
    protected TagPaintingProperties DefaultInternalTagProperties { get; }
    Property Value
    Type Description
    TagPaintingProperties

    DefaultLockedContentFormatting

    Gets the default locked content formatting.

    Declaration
    protected FormattingGroup DefaultLockedContentFormatting { get; }
    Property Value
    Type Description
    FormattingGroup

    DefaultRemovedRevisionFormatting

    Gets the default removed revision formatting.

    Declaration
    protected FormattingGroup DefaultRemovedRevisionFormatting { get; }
    Property Value
    Type Description
    FormattingGroup

    DefaultStructureInfoColors

    Gets the default structure info colors.

    Declaration
    protected ObservableDictionary<string, Color> DefaultStructureInfoColors { get; }
    Property Value
    Type Description
    ObservableDictionary<System.String, System.Drawing.Color>

    DefaultWarningCommentFormatting

    Gets the default warning comment formatting.

    Declaration
    protected FormattingGroup DefaultWarningCommentFormatting { get; }
    Property Value
    Type Description
    FormattingGroup

    DeletedTagProperties

    The display properties used to paint tags that have been deleted.

    Declaration
    public ITagPaintingProperties DeletedTagProperties { get; set; }
    Property Value
    Type Description
    ITagPaintingProperties

    DeletedTQAFormatting

    The formatting that will be used when displaying TQA content which has been deleted

    Declaration
    public IFormattingGroup DeletedTQAFormatting { get; set; }
    Property Value
    Type Description
    IFormattingGroup

    DocumentBackgroundColor

    The color used when displaying the background of the document.

    Declaration
    public Color DocumentBackgroundColor { get; set; }
    Property Value
    Type Description
    System.Drawing.Color

    DocumentTagProperties

    The display properties used to paint the document level tags.

    Declaration
    public ITagPaintingProperties DocumentTagProperties { get; set; }
    Property Value
    Type Description
    ITagPaintingProperties

    DocumentTextColor

    The color used when displaying the text in the document.

    Declaration
    public Color DocumentTextColor { get; set; }
    Property Value
    Type Description
    System.Drawing.Color

    ErrorCommentFormatting

    The formatting that will be used when displaying error level comments.

    Declaration
    public IFormattingGroup ErrorCommentFormatting { get; set; }
    Property Value
    Type Description
    IFormattingGroup

    FileTagProperties

    The display properties used to paint the file level tags.

    Declaration
    public ITagPaintingProperties FileTagProperties { get; set; }
    Property Value
    Type Description
    ITagPaintingProperties

    InformationCommentFormatting

    The formatting that will be used when displaying information level comments.

    Declaration
    public IFormattingGroup InformationCommentFormatting { get; set; }
    Property Value
    Type Description
    IFormattingGroup

    InsertedRevisionFormatting

    The formatting that will be used when displaying revised content that has been inserted.

    Declaration
    public IFormattingGroup InsertedRevisionFormatting { get; set; }
    Property Value
    Type Description
    IFormattingGroup

    InsertedTagProperties

    The display properties used to paint tags that have been inserted.

    Declaration
    public ITagPaintingProperties InsertedTagProperties { get; set; }
    Property Value
    Type Description
    ITagPaintingProperties

    InternalTagProperties

    The display properties used to paint internal tags.

    Declaration
    public ITagPaintingProperties InternalTagProperties { get; set; }
    Property Value
    Type Description
    ITagPaintingProperties

    LockedContentFormatting

    The formatting that will be used when displaying locked content.

    Declaration
    public IFormattingGroup LockedContentFormatting { get; set; }
    Property Value
    Type Description
    IFormattingGroup

    MaxFontSize

    The maximum font size to adapt fonts to

    Declaration
    public int MaxFontSize { get; set; }
    Property Value
    Type Description
    System.Int32
    Remarks

    This property has been deprecated by EditControlFontSizeSettings.MaxFontSize.

    See Also
    EditControlFontSizeSettings

    MinFontSize

    The minimum font size to adapt fonts to

    Declaration
    public int MinFontSize { get; set; }
    Property Value
    Type Description
    System.Int32
    Remarks

    This property has been deprecated by EditControlFontSizeSettings.MinFontSize.

    See Also
    EditControlFontSizeSettings

    ReadOnlySegmentColor

    The background color used for read-only segments. Default is Color.Empty.

    Declaration
    public Color ReadOnlySegmentColor { get; set; }
    Property Value
    Type Description
    System.Drawing.Color

    RemovedRevisionFormatting

    The formatting that will be used when displaying revised content that has been deleted.

    Declaration
    public IFormattingGroup RemovedRevisionFormatting { get; set; }
    Property Value
    Type Description
    IFormattingGroup

    SegmentShadingRatio

    The ratio that will be used to calculate the row shading color applied to alternating rows.

    Declaration
    public byte SegmentShadingRatio { get; set; }
    Property Value
    Type Description
    System.Byte

    SelectedSegmentColor

    The background color used when displaying a selected segment.

    Declaration
    public Color SelectedSegmentColor { get; set; }
    Property Value
    Type Description
    System.Drawing.Color

    ShowTrackedChanges

    Declaration
    public MarkupDisplayMode ShowTrackedChanges { get; set; }
    Property Value
    Type Description
    MarkupDisplayMode

    SpellingUnderlineColor

    The underline color that will be used when displaying a spelling error marker.

    Declaration
    public Color SpellingUnderlineColor { get; set; }
    Property Value
    Type Description
    System.Drawing.Color

    TagFormatHighlightColor

    The background color that will be applied when highlighting tags and formatting in the document for the user to insert.

    Declaration
    public Color TagFormatHighlightColor { get; set; }
    Property Value
    Type Description
    System.Drawing.Color

    TMPlaceableUnderlineColor

    The underline color that will be used when displaying a translation memory placeable marker.

    Declaration
    public Color TMPlaceableUnderlineColor { get; set; }
    Property Value
    Type Description
    System.Drawing.Color

    WarningCommentFormatting

    The formatting that will be used when displaying warning level comments.

    Declaration
    public IFormattingGroup WarningCommentFormatting { get; set; }
    Property Value
    Type Description
    IFormattingGroup

    Methods

    ApplyColorRatio(Color, Color, Int32)

    Compares the background and text colors against the ratio and changes the text color if they are too similar.

    Declaration
    public static Color ApplyColorRatio(Color textColor, Color backColor, int ratio)
    Parameters
    Type Name Description
    System.Drawing.Color textColor
    System.Drawing.Color backColor
    System.Int32 ratio
    Returns
    Type Description
    System.Drawing.Color

    The new text color to use

    ClearFormattingListSettings(ISettingsGroup, String)

    Removes all saved items belonging to this list from the stored settings group. This is called from SaveFormattingGroupSettings(ISettingsGroup, String, IFormattingGroup) to make sure that the settings being updated are all saved cleanly.

    Declaration
    protected virtual void ClearFormattingListSettings(ISettingsGroup settingsGroup, string listSettingId)
    Parameters
    Type Name Description
    ISettingsGroup settingsGroup

    The settings group to remove the settings from.

    System.String listSettingId

    The ID of the setting to remove.

    FireSettingsUpdated()

    Fires the SettingsUpdated event.

    Declaration
    public void FireSettingsUpdated()

    GetSettingFromSettingsGroup<T>(ISettingsGroup, String, T)

    Checks whether the setting exists in the settings group, and retrieves its value (if it exists). If it does not exist, the default value is returned instead.

    Declaration
    protected T GetSettingFromSettingsGroup<T>(ISettingsGroup settingsGroup, string settingName, T defaultValue)
    Parameters
    Type Name Description
    ISettingsGroup settingsGroup

    The settings group in which the setting should be located.

    System.String settingName

    The name of the setting to retrieve.

    T defaultValue

    The default value to return if the setting has not been found.

    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    The type of the setting to retrieve. The type must be the same as at the point of save, or it will not be found. See UpdateSettingInSettingsGroup<T>(ISettingsGroup, String, T, T).

    GetStructureInfoColor(String)

    Returns the color associated with the structure Id in the settings file or System.Drawing.Color.Empty if no color is found

    Declaration
    public Color GetStructureInfoColor(string structureInfoId)
    Parameters
    Type Name Description
    System.String structureInfoId
    Returns
    Type Description
    System.Drawing.Color

    LoadFormattingGroupSettings(ISettingsGroup, String, IFormattingGroup, IFormattingGroup)

    Loads the settings marked with the settings ID from the settings group and into the provided formatting group. If the settings group does not contain formatting settings then the defaults will be loaded.

    Declaration
    protected void LoadFormattingGroupSettings(ISettingsGroup settingsGroup, string settingId, IFormattingGroup formattingGroup, IFormattingGroup defaultFormatting)
    Parameters
    Type Name Description
    ISettingsGroup settingsGroup

    The settings group containing the settings to load.

    System.String settingId

    The ID of the setting to load from the settings group.

    IFormattingGroup formattingGroup

    The formatting group to load the settings into. This will be cleared before loading.

    IFormattingGroup defaultFormatting

    The default formatting to use if there are no settings matching the settings ID.

    PopulateFromSettingsBundle(ISettingsBundle)

    Loads the settings for this object from the settings bundle and populates itself.

    Declaration
    public virtual void PopulateFromSettingsBundle(ISettingsBundle settingsBundle)
    Parameters
    Type Name Description
    ISettingsBundle settingsBundle

    The settings bundle to load the settings from.

    SaveFormattingGroupSettings(ISettingsGroup, String, IFormattingGroup)

    Saves the formatting settings to the settings group using the provided settings ID as the key.

    Declaration
    protected void SaveFormattingGroupSettings(ISettingsGroup settingsGroup, string settingId, IFormattingGroup formattingGroup)
    Parameters
    Type Name Description
    ISettingsGroup settingsGroup

    The settings group to save to.

    System.String settingId

    The ID to use when saving the settings.

    IFormattingGroup formattingGroup

    The formatting group containing the settings to save.

    SaveToSettingsBundle(ISettingsBundle)

    Saves the current state of all members of this object to the provided settings bundle.

    Declaration
    public virtual void SaveToSettingsBundle(ISettingsBundle settingsBundle)
    Parameters
    Type Name Description
    ISettingsBundle settingsBundle

    The settings bundle to save the settings to.

    SetAdaptationDefaults()

    Sets all of the adaptation settings to their default values.

    Declaration
    public void SetAdaptationDefaults()

    SetColorsDefaults()

    Sets all of the colors settings to their default values.

    Declaration
    public void SetColorsDefaults()

    SetRevisionFormattingDefaults()

    Sets the edit distance information formatting to their default values.

    Declaration
    public void SetRevisionFormattingDefaults()

    SetStructureInfoColor(String, Color)

    Sets the color for the structure info with the id provided.

    Declaration
    public void SetStructureInfoColor(string structureInfoId, Color color)
    Parameters
    Type Name Description
    System.String structureInfoId
    System.Drawing.Color color

    SetStructureInfoDefaults()

    Sets the structure context colors to their default values

    Declaration
    public void SetStructureInfoDefaults()

    UpdateSettingInSettingsGroup<T>(ISettingsGroup, String, T, T)

    Checks whether the setting exists in the settings group. If the setting does exist, then it is updated with the new value; if it does not exist, a new setting is created, but only if the value is not the same as the default value (in which case the call is effectively ignored).

    Declaration
    protected void UpdateSettingInSettingsGroup<T>(ISettingsGroup settingsGroup, string settingName, T settingValue, T defaultValue)
    Parameters
    Type Name Description
    ISettingsGroup settingsGroup

    The settings group in which the setting should be saved.

    System.String settingName

    The name of the setting to save.

    T settingValue

    The value of the setting to save.

    T defaultValue

    The default value of the setting. This is used to prevent creating unnecessary settings when the setting to be created is equal to the default value. This does not affect updating a setting, it only applies when creating a new one.

    Type Parameters
    Name Description
    T

    The type of the setting to save. The type must be the same as at the point of retrieval, or it will not be returned again correctly. See GetSettingFromSettingsGroup<T>(ISettingsGroup, String, T).

    Events

    SettingsUpdated

    Event that notifies listeners when these settings have been updated. This event is not fired internally but is instead fired by an external call to FireSettingsUpdated() to reduce the number of reloading required by dependent controls.

    Declaration
    public event EventHandler<EventArgs> SettingsUpdated
    Event Type
    Type Description
    System.EventHandler<System.EventArgs>

    Extension Methods

    WindowsControlUtils.ForWindowFromFrameworkElement(Object, Action<Window>)

    On this page

    • Constructors
      • EditControlDisplaySettings()
    • Fields
      • DefaultActiveSegmentColor
      • DefaultAdaptFontColors
      • DefaultAdaptFontSizes
      • DefaultColorDifferenceRatio
      • DefaultDocumentBackgroundColor
      • DefaultDocumentTextColor
      • DefaultMaxFontSize
      • DefaultMinFontSize
      • DefaultReadOnlySegmentColor
      • DefaultSegmentShadingRatio
      • DefaultSelectedSegmentColor
      • DefaultShowTrackedChanges
      • DefaultSpellingUnderlineColor
      • DefaultTagFormatHighlightColor
      • DefaultTMPlaceableUnderlineColor
    • Properties
      • ActiveSegmentColor
      • AdaptFontColors
      • AdaptFontSizes
      • AddedTQAFormatting
      • ColorDifferenceRatio
      • CommentTQAFormatting
      • DefaultAddedTQAFormatting
      • DefaultCommentTQAFormatting
      • DefaultDeletedTagProperties
      • DefaultDeletedTQAFormatting
      • DefaultDocumentTagProperties
      • DefaultErrorCommentFormatting
      • DefaultFileTagProperties
      • DefaultInformationCommentFormatting
      • DefaultInsertedRevisionFormatting
      • DefaultInsertedTagProperties
      • DefaultInternalTagProperties
      • DefaultLockedContentFormatting
      • DefaultRemovedRevisionFormatting
      • DefaultStructureInfoColors
      • DefaultWarningCommentFormatting
      • DeletedTagProperties
      • DeletedTQAFormatting
      • DocumentBackgroundColor
      • DocumentTagProperties
      • DocumentTextColor
      • ErrorCommentFormatting
      • FileTagProperties
      • InformationCommentFormatting
      • InsertedRevisionFormatting
      • InsertedTagProperties
      • InternalTagProperties
      • LockedContentFormatting
      • MaxFontSize
      • MinFontSize
      • ReadOnlySegmentColor
      • RemovedRevisionFormatting
      • SegmentShadingRatio
      • SelectedSegmentColor
      • ShowTrackedChanges
      • SpellingUnderlineColor
      • TagFormatHighlightColor
      • TMPlaceableUnderlineColor
      • WarningCommentFormatting
    • Methods
      • ApplyColorRatio(Color, Color, Int32)
      • ClearFormattingListSettings(ISettingsGroup, String)
      • FireSettingsUpdated()
      • GetSettingFromSettingsGroup<T>(ISettingsGroup, String, T)
      • GetStructureInfoColor(String)
      • LoadFormattingGroupSettings(ISettingsGroup, String, IFormattingGroup, IFormattingGroup)
      • PopulateFromSettingsBundle(ISettingsBundle)
      • SaveFormattingGroupSettings(ISettingsGroup, String, IFormattingGroup)
      • SaveToSettingsBundle(ISettingsBundle)
      • SetAdaptationDefaults()
      • SetColorsDefaults()
      • SetRevisionFormattingDefaults()
      • SetStructureInfoColor(String, Color)
      • SetStructureInfoDefaults()
      • UpdateSettingInSettingsGroup<T>(ISettingsGroup, String, T, T)
    • Events
      • SettingsUpdated
    • Extension Methods
    Back to top Generated by DocFX