Class RenderMudTabPanelAttribute
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 MudBlazor.MudTabPanel component.
Inheritance
Inherited Members
Namespace: CG.Blazor.Forms.Attributes
Assembly: CG.Blazor.Forms._MudBlazor.dll
Syntax
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
public class RenderMudTabPanelAttribute : 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 RenderMudTabsAttribute attribute.
Examples
Here is an example of decorating a view-model to render content within a MudBlazor.MudTabs component:
using CG.Blazor.Forms.Attributes;
[RenderMudTabs]
class MyModel
{
[RenderMudTabPanel(Text = "Panel A")]
public MyModel2 MyProperty { get; set; }
}
Constructors
RenderMudTabPanelAttribute()
This constructor creates a new instance of the RenderMudTabPanelAttribute class.
Declaration
public RenderMudTabPanelAttribute()
Properties
BadgeColor
This property contains the color of the badge.
Declaration
public Color BadgeColor { get; set; }
Property Value
Type | Description |
---|---|
MudBlazor.Color |
BadgeData
This property contains optional data to be rendered within the badge.
Declaration
public object BadgeData { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
BadgeDot
This property indicates whether or not to show a dot on the badge.
Declaration
public bool BadgeDot { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Class
This property contains user class names, separated by spaces.
Declaration
public string Class { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Disabled
This property indicates whether the component is disaled, or not.
Declaration
public bool Disabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Icon
This property contains the icon palaced before the text, in the tab.
Declaration
public string Icon { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Id
This property contains a unique TabPanel ID. Useful for activation when Panels are dynamically generated.
Declaration
public object Id { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
Style
This property contains user styles, applied on top of the component's own classes and styles
Declaration
public string Style { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Tag
This property contains 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 |
Text
This property contains the to be displayed in the TabPanel as TabTitle.
Declaration
public string Text { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ToolTip
This property contains a tooltip for the TablPanel.
Declaration
public string ToolTip { get; set; }
Property Value
Type | Description |
---|---|
System.String |
UserAttributes
This property contains attributes you add to the component that don't match any of its parameters.
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> |