Class Stylesheet
Represents a Stylesheet file
Namespace: Umbraco.Core.Models
Assembly: Umbraco.Core.dll
Syntax
[Serializable]
[DataContract(IsReference = true)]
public class Stylesheet : File, IRememberBeingDirty, ICanBeDirty, IFile, IEntity, IDeepCloneable
Constructors
View SourceStylesheet(String)
Declaration
public Stylesheet(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path |
Properties
View SourceContent
Gets or sets the Content of a File
Declaration
public override string Content { get; set; }
Property Value
Type | Description |
---|---|
System.String |
HasIdentity
Indicates whether the current entity has an identity, which in this case is a path/name.
Declaration
public override bool HasIdentity { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
Overrides the default Entity identity check.
Properties
Returns a list of umbraco back office enabled stylesheet properties
Declaration
[IgnoreDataMember]
public IEnumerable<StylesheetProperty> Properties { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<StylesheetProperty> |
Remarks
An umbraco back office enabled stylesheet property has a special prefix, for example:
/** umb_name: MyPropertyName */ p { font-size: 1em; }
Methods
View SourceAddProperty(StylesheetProperty)
Adds an Umbraco stylesheet property for use in the back office
Declaration
public void AddProperty(StylesheetProperty property)
Parameters
Type | Name | Description |
---|---|---|
StylesheetProperty | property |
RemoveProperty(String)
Removes an Umbraco stylesheet property
Declaration
public void RemoveProperty(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name |