Show / Hide Table of Contents

# Class StyleModel

Superclass for all versions of the Dalamud style model.

##### Inheritance

System.Object
StyleModel
StyleModelV1

##### Inherited Members

System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()

###### Namespace: Dalamud.Interface.Style

###### Assembly: Dalamud.dll

##### Syntax

    public abstract class StyleModel

### Properties

| Improve this Doc View Source

#### BuiltInColors

Gets or sets class representing Dalamud-builtin ImGuiColors.

##### Declaration

    [JsonProperty("dol")]
    public DalamudColors BuiltInColors { get; set; }

##### Property Value

Type | Description
--- | ---
DalamudColors |

| Improve this Doc View Source

#### Name

Gets or sets the name of the style model.

##### Declaration

    [JsonProperty("name")]
    public string Name { get; set; }

##### Property Value

Type | Description
--- | ---
System.String |

| Improve this Doc View Source

#### Version

Gets or sets version number of this model.

##### Declaration

    [JsonProperty("ver")]
    public int Version { get; set; }

##### Property Value

Type | Description
--- | ---
System.Int32 |

### Methods

| Improve this Doc View Source

#### Apply()

Apply this style model to ImGui.

##### Declaration

    public abstract void Apply()

| Improve this Doc View Source

#### Deserialize(String)

Deserialize a style model.

##### Declaration

    public static StyleModel Deserialize(string model)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | model | The serialized model.

##### Returns

Type | Description
--- | ---
StyleModel | The deserialized model.

##### Exceptions

Type | Condition
--- | ---
System.ArgumentException | Thrown in case the version of the model is not known.

| Improve this Doc View Source

#### GetConfiguredStyle()

Get the current style model, as per configuration.

##### Declaration

    public static StyleModel GetConfiguredStyle()

##### Returns

Type | Description
--- | ---
StyleModel | The current style, as per configuration.

| Improve this Doc View Source

#### GetConfiguredStyles()

Get an enumerable of all saved styles.

##### Declaration

    public static IEnumerable<StyleModel> GetConfiguredStyles()

##### Returns

Type | Description
--- | ---
System.Collections.Generic.IEnumerable<StyleModel> | Enumerable of saved styles.

| Improve this Doc View Source

#### GetFromCurrent()

Get a StyleModel based on the current Dalamud style, with the current version.

##### Declaration

    public static StyleModel GetFromCurrent()

##### Returns

Type | Description
--- | ---
StyleModel | The current style.

| Improve this Doc View Source

#### Pop()

Pop this style model from the ImGui style/color stack.

##### Declaration

    public abstract void Pop()

| Improve this Doc View Source

#### Push()

Push this StyleModel into the ImGui style/color stack.

##### Declaration

    public abstract void Push()

| Improve this Doc View Source

#### Serialize()

Serialize this style model.

##### Declaration

    public string Serialize()

##### Returns

Type | Description
--- | ---
System.String | Serialized style model as string.

##### Exceptions

Type | Condition
--- | ---
System.ArgumentOutOfRangeException | Thrown when the version of the style model is unknown.

| Improve this Doc View Source

#### TransferOldModels()

[TEMPORARY] Transfer old non-polymorphic style models to the new format.

##### Declaration

    public static void TransferOldModels()