API ReferenceSandbox.UI

StyleSheetCollectionclass

A collection of `Sandbox.UI.StyleSheet` objects applied directly to a panel. See `Sandbox.UI.Panel.StyleSheet`.

objectStyleSheetCollection
Namespace
Sandbox.UI
Assembly
Sandbox.Engine
Declaration
public sealed struct Sandbox.UI.StyleSheetCollection

Methods6

Showing 6 methods

public void Add(Sandbox.UI.StyleSheet sheet)PUBLIC

Add a stylesheet directly

ParameterTypeDescription
sheetStyleSheet
Returns:void

public System.Collections.Generic.IEnumerable`1<System.ValueTuple`2<string,string>> CollectVariables()PUBLIC

Returns all CSS variables from the owning panel and its ancestors.

Returns:IEnumerable<ValueTuple<string,string>>

public void Load(string filename, bool inheritVariables = True, bool failSilently = False)PUBLIC

Load the stylesheet from a file.

ParameterTypeDescription
filenamestring
inheritVariables = Truebool
failSilently = Falsebool
Returns:void

public void Parse(string stylesheet, bool inheritVariables = True)PUBLIC

Load the stylesheet from a string.

ParameterTypeDescription
stylesheetstring
inheritVariables = Truebool
Returns:void

On this page