C# Класс Open.Core.Css

CSS utility.
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
Classes CoreCssClasses
Urls CoreCssUrls

Открытые методы

Метод Описание
AbsoluteFill ( jQueryObject element ) : jQueryObject

Sets the given element to absolute positioning and sets all edges to 0px.

AddClasses ( jQueryObject target, string classValue ) : jQueryObject

Adds a single class, or multiple classs from a space seperated list.

AddOrRemoveClass ( jQueryObject element, string cssClass, bool add ) : jQueryObject

Adds or removes a class from the given element.

ApplyDropshadow ( jQueryObject element, string opacity ) : jQueryObject

Applies a drop shadow.

Center ( jQueryObject element, jQueryObject within, Spacing offset ) : jQueryObject

Sets the left and top position of an element so it is centered within another element.

CenterHorizontally ( jQueryObject element, jQueryObject within, Spacing offset ) : jQueryObject

Sets the left position of an element so it is horizontally centered within another element.

CenterVertically ( jQueryObject element, jQueryObject within, Spacing offset ) : jQueryObject

Sets the top position of an element so it is vertically centered within another element.

CopyClasses ( jQueryObject source, jQueryObject target ) : void

Copies the CSS classes from one element to another.

GetDimension ( jQueryObject element, SizeDimension dimension ) : int

Retrieves the size for the given dimension (Width or Height).

GetLink ( string url ) : Element

Retrieves the CSS with the given source (src) URL.

GetPixelBorder ( jQueryObject element ) : Spacing

Retrieves the border outline size for the given element (if it's border styles are specified in pixels).

HasPosition ( jQueryObject element ) : bool

Retrieves whether the element has a position value.

InsertLink ( string url ) : void

Inserts a CSS link within the document head (only if the CSS is not already present).

IsLinked ( string url ) : bool

Determines whether the specified URL has a link within the page.

IsVisible ( jQueryObject element ) : bool

Determines whether the element is visible (has any display value other than 'None').

RoundedCorners ( jQueryObject element, int topLeft, int topRight, int bottomRight, int bottomLeft ) : void

Applies rounded corners to the given element.

SelectFromId ( string identifier ) : jQueryObject

Performs a jQuery CSS selection with the given ID (pre-processing the ID format using the ToId() method).

SetDimension ( jQueryObject element, SizeDimension dimension, int value ) : void

Sets the size for the given dimension (Width or Height).

SetDisplay ( jQueryObject element, bool isVisible ) : jQueryObject

Shows or hides the given element using the Display property (collapses when not visible).

SetOpacity ( jQueryObject element, double percent ) : jQueryObject

Applies opacity.

SetOverflow ( jQueryObject element, CssOverflow value ) : jQueryObject

Sets the overflow style on the given element.

SetSize ( jQueryObject element, int width, int height ) : jQueryObject

Sets the size of the element.

SetVisibility ( jQueryObject element, bool isVisible ) : jQueryObject

Shows or hides the given element using the Visibility property (retains space when not visible).

ToClass ( string @class ) : string

Prepends the period (.) to a CSS class name if it's not present (eg: id='one' would be '.one').

ToId ( string identifier ) : string

Prepends the # to a CSS identifier if it's not present (eg: id='one' would be '#one').

ToSizeDimension ( Plane plane ) : SizeDimension

Converts an X:Y plane dimension to it's corresponding size-dimension.

Приватные методы

Метод Описание
Center ( jQueryObject element, jQueryObject within ) : jQueryObject
CenterHorizontally ( jQueryObject element, jQueryObject within ) : jQueryObject
CenterVertically ( jQueryObject element, jQueryObject within ) : jQueryObject
GetBorderEdge ( jQueryObject element, System.Edge edge ) : int
PrependSelectorPrefix ( string value, string prefix ) : string
RoundedCorners ( jQueryObject element, int pixelRadius ) : void

Описание методов

AbsoluteFill() публичный статический Метод

Sets the given element to absolute positioning and sets all edges to 0px.
public static AbsoluteFill ( jQueryObject element ) : jQueryObject
element jQueryObject The element to update.
Результат jQueryObject

AddClasses() публичный статический Метод

Adds a single class, or multiple classs from a space seperated list.
public static AddClasses ( jQueryObject target, string classValue ) : jQueryObject
target jQueryObject The target element to add to.
classValue string The class attribute value to apply.
Результат jQueryObject

AddOrRemoveClass() публичный статический Метод

Adds or removes a class from the given element.
public static AddOrRemoveClass ( jQueryObject element, string cssClass, bool add ) : jQueryObject
element jQueryObject The element to add or remove from.
cssClass string The CSS class name.
add bool Flag indicating whether the class should be added (true) or removed (false).
Результат jQueryObject

ApplyDropshadow() публичный статический Метод

Applies a drop shadow.
public static ApplyDropshadow ( jQueryObject element, string opacity ) : jQueryObject
element jQueryObject The element to update.
opacity string Opacity of the drop-shadow (005, 010, 020, 030, 040, 050, 060).
Результат jQueryObject

Center() публичный статический Метод

Sets the left and top position of an element so it is centered within another element.
public static Center ( jQueryObject element, jQueryObject within, Spacing offset ) : jQueryObject
element jQueryObject The element to center.
within jQueryObject The element to center within.
offset Spacing The offset to take into account when calculating position.
Результат jQueryObject

CenterHorizontally() публичный статический Метод

Sets the left position of an element so it is horizontally centered within another element.
public static CenterHorizontally ( jQueryObject element, jQueryObject within, Spacing offset ) : jQueryObject
element jQueryObject The element to horizontally center.
within jQueryObject The element to center within.
offset Spacing The offset to take into account when calculating position.
Результат jQueryObject

CenterVertically() публичный статический Метод

Sets the top position of an element so it is vertically centered within another element.
public static CenterVertically ( jQueryObject element, jQueryObject within, Spacing offset ) : jQueryObject
element jQueryObject The element to vertically center.
within jQueryObject The element to center within.
offset Spacing The offset to take into account when calculating position.
Результат jQueryObject

CopyClasses() публичный статический Метод

Copies the CSS classes from one element to another.
public static CopyClasses ( jQueryObject source, jQueryObject target ) : void
source jQueryObject The source element to copy from.
target jQueryObject The target element to copy to.
Результат void

GetDimension() публичный статический Метод

Retrieves the size for the given dimension (Width or Height).
public static GetDimension ( jQueryObject element, SizeDimension dimension ) : int
element jQueryObject The element to read.
dimension SizeDimension The dimension.
Результат int

GetLink() публичный статический Метод

Retrieves the CSS with the given source (src) URL.
public static GetLink ( string url ) : Element
url string The path to the CSS document to match (not case-sensitive).
Результат System.Html.Element

GetPixelBorder() публичный статический Метод

Retrieves the border outline size for the given element (if it's border styles are specified in pixels).
public static GetPixelBorder ( jQueryObject element ) : Spacing
element jQueryObject The element to examine.
Результат Spacing

HasPosition() публичный статический Метод

Retrieves whether the element has a position value.
public static HasPosition ( jQueryObject element ) : bool
element jQueryObject The element to examine.
Результат bool

InsertLink() публичный статический Метод

Inserts a CSS link within the document head (only if the CSS is not already present).
Thrown if a URL was not specified.
public static InsertLink ( string url ) : void
url string The URL of the CSS to load.
Результат void

IsLinked() публичный статический Метод

Determines whether the specified URL has a link within the page.
public static IsLinked ( string url ) : bool
url string The path to the CSS document to match (not case-sensitive).
Результат bool

IsVisible() публичный статический Метод

Determines whether the element is visible (has any display value other than 'None').
public static IsVisible ( jQueryObject element ) : bool
element jQueryObject The element to display.
Результат bool

RoundedCorners() публичный статический Метод

Applies rounded corners to the given element.
public static RoundedCorners ( jQueryObject element, int topLeft, int topRight, int bottomRight, int bottomLeft ) : void
element jQueryObject The element to apply rounded corners to.
topLeft int The top-left pixel radius.
topRight int The top-right pixel radius.
bottomRight int The bottom-right pixel radius.
bottomLeft int The bottom-left pixel radius.
Результат void

SelectFromId() публичный статический Метод

Performs a jQuery CSS selection with the given ID (pre-processing the ID format using the ToId() method).
public static SelectFromId ( string identifier ) : jQueryObject
identifier string The ID of the element.
Результат jQueryObject

SetDimension() публичный статический Метод

Sets the size for the given dimension (Width or Height).
public static SetDimension ( jQueryObject element, SizeDimension dimension, int value ) : void
element jQueryObject The element to read.
dimension SizeDimension The dimension.
value int The value to set.
Результат void

SetDisplay() публичный статический Метод

Shows or hides the given element using the Display property (collapses when not visible).
public static SetDisplay ( jQueryObject element, bool isVisible ) : jQueryObject
element jQueryObject The element to effect.
isVisible bool The desired visibility state.
Результат jQueryObject

SetOpacity() публичный статический Метод

Applies opacity.
public static SetOpacity ( jQueryObject element, double percent ) : jQueryObject
element jQueryObject The element to effect.
percent double The opacity percentage (0..1).
Результат jQueryObject

SetOverflow() публичный статический Метод

Sets the overflow style on the given element.
public static SetOverflow ( jQueryObject element, CssOverflow value ) : jQueryObject
element jQueryObject The element to update.
value CssOverflow The overflow value.
Результат jQueryObject

SetSize() публичный статический Метод

Sets the size of the element.
public static SetSize ( jQueryObject element, int width, int height ) : jQueryObject
element jQueryObject The element to effect.
width int The pixel width of the element.
height int The pixel height of the element.
Результат jQueryObject

SetVisibility() публичный статический Метод

Shows or hides the given element using the Visibility property (retains space when not visible).
public static SetVisibility ( jQueryObject element, bool isVisible ) : jQueryObject
element jQueryObject The element to effect.
isVisible bool The desired visibility state.
Результат jQueryObject

ToClass() публичный статический Метод

Prepends the period (.) to a CSS class name if it's not present (eg: id='one' would be '.one').
public static ToClass ( string @class ) : string
@class string
Результат string

ToId() публичный статический Метод

Prepends the # to a CSS identifier if it's not present (eg: id='one' would be '#one').
public static ToId ( string identifier ) : string
identifier string The ID value.
Результат string

ToSizeDimension() публичный статический Метод

Converts an X:Y plane dimension to it's corresponding size-dimension.
public static ToSizeDimension ( Plane plane ) : SizeDimension
plane Plane The plane to convert.
Результат SizeDimension

Описание свойств

Classes публичное статическое свойство

public static CoreCssClasses,Open.Core Classes
Результат CoreCssClasses

Urls публичное статическое свойство

public static CoreCssUrls,Open.Core Urls
Результат CoreCssUrls