Class TagOptions
Options which determine how the tag is to be generated / rendered.
Inheritance
System.Object
TagOptions
Namespace: ToSic.Razor.Markup
Assembly: ToSic.Razor.dll
Syntax
public class TagOptions
Remarks
In v4.0 it was changed to be read-only for reliably fluid APIs.
Constructors
| Improve this Doc View SourceTagOptions()
Declaration
public TagOptions()
TagOptions(TagOptions, AttributeOptions, Nullable<Boolean>, Nullable<Boolean>)
Declaration
public TagOptions(TagOptions original = null, AttributeOptions attributeOptions = null, bool? close = null, bool? selfClose = null)
Parameters
Type | Name | Description |
---|---|---|
Tag |
original | |
Attribute |
attributeOptions | |
System. |
close | |
System. |
selfClose |
Fields
| Improve this Doc View SourceDefaultClose
By default, all tags close.
Declaration
public const bool DefaultClose = true
Field Value
Type | Description |
---|---|
System. |
DefaultOptions
Declaration
public static TagOptions DefaultOptions
Field Value
Type | Description |
---|---|
Tag |
DefaultSelfCloseIfNoContent
By default, tags without content don't self close - they add a separate close-tag.
Declaration
public const bool DefaultSelfCloseIfNoContent = false
Field Value
Type | Description |
---|---|
System. |
Properties
| Improve this Doc View SourceAttribute
Declaration
public AttributeOptions Attribute { get; }
Property Value
Type | Description |
---|---|
Attribute |
Close
Determines if this tag will close - eg. img
or br
tags don't close
Declaration
public bool Close { get; }
Property Value
Type | Description |
---|---|
System. |
SelfClose
Determines if this tag self-closes, like an HTML4 br tag. Not really in use in HTML5
Declaration
public bool SelfClose { get; }
Property Value
Type | Description |
---|---|
System. |