Class RenderMuddyGroupBoxAttribute
This class is an attribute that, when applied to a property of type: object, causes the form generator to render the property wrapped inside a MuddyGroupBox component.
Inheritance
Inherited Members
Namespace: CG.Blazor.Forms.Attributes
Assembly: CG.Blazor.Forms._MudBlazor.dll
Syntax
[AttributeUsage(AttributeTargets.Property)]
public class RenderMuddyGroupBoxAttribute : RenderObjectAttribute
Remarks
This attribute is only valid when placed on a property of type: object.
This attribute only makes sense to apply to an object property when the parent of that property has been decorated with a RenderMuddyGroupBoxAttribute attribute.
Examples
Here is an example of decorating a view-model to render content within a MuddyGroupBox component:
using CG.Blazor.Forms.Attributes;
class MyModel
{
[RenderMuddyGroupBox]
public MyModel2 MyProperty { get; set; }
}
Constructors
RenderMuddyGroupBoxAttribute()
This constructor creates a new instance of the RenderMuddyGroupBoxAttribute class.
Declaration
public RenderMuddyGroupBoxAttribute()
Properties
Class
This property contains any CSS classes to use for the control.
Declaration
public string Class { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Elevation
This property contains the elevation to use for the control.
Declaration
public int Elevation { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Label
This property contains the label for the component.
Declaration
public string Label { get; set; }
Property Value
Type | Description |
---|---|
System.String |
LabelColor
This property contains the color for the label.
Declaration
public Color LabelColor { get; set; }
Property Value
Type | Description |
---|---|
MudBlazor.Color |
LabelTypo
This property contains the typography for the label.
Declaration
public Typo LabelTypo { get; set; }
Property Value
Type | Description |
---|---|
MudBlazor.Typo |
Outlined
This property indicates whether the control should be outlined, or not.
Declaration
public bool Outlined { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Square
This property indicates whether the control should show square corners, or not.
Declaration
public bool Square { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Style
This property indicates the CSS styles to use for the control.
Declaration
public string Style { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Tag
This property contain a tag to attach any user data object to the component for your convenience.
Declaration
public object Tag { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
UserAttributes
This property contains attributes you add to the component that don't match any of its parameters. They will be splatted onto the underlying HTML tag.
Declaration
public IDictionary<string, object> UserAttributes { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, System.Object> |
Methods
Generate(RenderTreeBuilder, Int32, IHandleEvent, Stack<Object>, PropertyInfo, ILogger<IFormGenerator>)
Declaration
public override int Generate(RenderTreeBuilder builder, int index, IHandleEvent eventTarget, Stack<object> path, PropertyInfo prop, ILogger<IFormGenerator> logger)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder | builder | |
System.Int32 | index | |
Microsoft.AspNetCore.Components.IHandleEvent | eventTarget | |
System.Collections.Generic.Stack<System.Object> | path | |
System.Reflection.PropertyInfo | prop | |
Microsoft.Extensions.Logging.ILogger<CG.Blazor.Forms.Services.IFormGenerator> | logger |
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
ToAttributes()
Declaration
public override IDictionary<string, object> ToAttributes()
Returns
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, System.Object> |