Table of Contents

Class ElementStyle

Namespace
C4.Net
Assembly
C4.Net.Core.dll

A definition of an element style.

[DataContract]
public sealed class ElementStyle
Inheritance
ElementStyle
Inherited Members

Constructors

ElementStyle(string)

Creates an element style for the supplied tag.

public ElementStyle(string tag)

Parameters

tag string

The tag this style applies to.

Properties

Background

Defines the background color of the element as a six-digit hexadecimal value such as #1168bd.

[DataMember(Name = "background", EmitDefaultValue = false)]
public string Background { get; set; }

Property Value

string

Exceptions

ArgumentException

Thrown when the value is not a valid hexadecimal color code.

Border

The border to use when rendering the element.

[DataMember(Name = "border", EmitDefaultValue = false)]
public Border Border { get; set; }

Property Value

Border

Color

Defines the foreground text color as a six-digit hexadecimal value such as #000000.

[DataMember(Name = "color", EmitDefaultValue = false)]
public string Color { get; set; }

Property Value

string

Exceptions

ArgumentException

Thrown when the value is not a valid hexadecimal color code.

Description

A flag to indicate whether the element description should be shown or not.

[DataMember(Name = "description", EmitDefaultValue = false)]
public bool? Description { get; set; }

Property Value

bool?

FontSize

The standard font size used to render text, in pixels.

[DataMember(Name = "fontSize", EmitDefaultValue = false)]
public int? FontSize { get; set; }

Property Value

int?

The standard font size used to render text, in pixels.

Height

The height of the element, in pixels.

[DataMember(Name = "height", EmitDefaultValue = false)]
public int? Height { get; set; }

Property Value

int?

Icon

Specifies an icon URL or data URI rendered with the element.

[DataMember(Name = "icon", EmitDefaultValue = false)]
public string Icon { get; set; }

Property Value

string

Exceptions

ArgumentException

Thrown when the value is not a URL or image data URI.

Metadata

A flag to indicate whether the element metadata should be shown or not.

[DataMember(Name = "metadata", EmitDefaultValue = false)]
public bool? Metadata { get; set; }

Property Value

bool?

Opacity

The opacity of the line/text; 0 to 100.

[DataMember(Name = "opacity", EmitDefaultValue = false)]
public int? Opacity { get; set; }

Property Value

int?

Shape

The shape used to render the element.

[DataMember(Name = "shape", EmitDefaultValue = false)]
public Shape Shape { get; set; }

Property Value

Shape

Stroke

Defines the stroke color of the element as a six-digit hexadecimal value such as #ffffff.

[DataMember(Name = "stroke", EmitDefaultValue = false)]
public string Stroke { get; set; }

Property Value

string

Exceptions

ArgumentException

Thrown when the value is not a valid hexadecimal color code.

Tag

The tag to which this element style applies.

[DataMember(Name = "tag", EmitDefaultValue = false)]
public string Tag { get; set; }

Property Value

string

Width

The width of the element, in pixels.

[DataMember(Name = "width", EmitDefaultValue = false)]
public int? Width { get; set; }

Property Value

int?