Class SvgCssStyle
Represents an SVG style element with CSS text content.
Inherited Members
Namespace: OpenSvg.SvgNodes
Assembly: OpenSvg.dll
Syntax
public class SvgCssStyle : SvgStyle, IXmlSerializable, IEquatable<SvgElement>, IHasElementContent
Remarks
The style element is used inside SVG documents to embed stylings. CSS can be used as a standalone stylesheet or can be included directly into SVG elements as attributes.
Fields
| Edit this page View Sourcetype
Declaration
protected readonly StringAttr type
Field Value
Type | Description |
---|---|
StringAttr |
Properties
| Edit this page View SourceContent
Gets or sets the content of the element.
Declaration
public string Content { get; set; }
Property Value
Type | Description |
---|---|
string |
Fonts
Declaration
public IReadOnlyList<SvgFont> Fonts { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<SvgFont> |
SvgName
Gets or sets the name of the SVG element.
Declaration
public override string SvgName { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
| Edit this page View SourceType
Declaration
public string Type { get; }
Property Value
Type | Description |
---|---|
string |
Methods
| Edit this page View SourceAdd(SvgFont)
Adds the specified SvgFont to the CSS style.
Declaration
public void Add(SvgFont svgFont)
Parameters
Type | Name | Description |
---|---|---|
SvgFont | svgFont | The SVG font to add. |
Exceptions
Type | Condition |
---|---|
NotSupportedException | Thrown when adding more than one font. |