S&box Wiki

Sandbox.UI.Length

Sandbox.UI.Length

A variable unit based length. ie, could be a percentage or a pixel length

Fields

Properties

static Sandbox.UI.Length Auto { get; }
static Sandbox.UI.Length Contain { get; }
static Sandbox.UI.Length Cover { get; }

Methods

static Sandbox.UI.Length? Fraction( float fraction )
Create a length in percents
float GetPixels( float dimension, float contentSize )
Get the pixel size but also evaluate content size to support use Start, End, Center
static Sandbox.UI.Length? Parse( string value )
Parse a length. This is used by the stylesheet parsing system.
static Sandbox.UI.Length? Percent( float percent )
Create a length in percents
static Sandbox.UI.Length? Pixels( float pixels )
Create a length in pixels

Special Pages


Wikis

?

Render Time: 48ms

DB GetPage 39
Generate Html 0
SaveChanges (1) 5
Render Body 0
Render Sidebar 1