Class RenderMudTabsAttribute
This class is an attribute that, when applied to a class causes the form generator to render any instances of the class wrapped inside a MudBlazor.MudTabs component.
Inheritance
System.Object
System.Attribute
CG.Blazor.Forms.Attributes.FormGeneratorAttribute
CG.Blazor.Forms.Attributes.RenderObjectAttribute
RenderMudTabsAttribute
Inherited Members
CG.Blazor.Forms.Attributes.RenderObjectAttribute.VisibleExp
CG.Blazor.Forms.Attributes.FormGeneratorAttribute.ToAttributes()
System.Attribute.Equals(System.Object)
System.Attribute.GetCustomAttribute(System.Reflection.Assembly, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.Assembly, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.MemberInfo, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.MemberInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.Module, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.Module, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.ParameterInfo, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.ParameterInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Module)
System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Type, System.Boolean)
System.Attribute.GetHashCode()
System.Attribute.IsDefaultAttribute()
System.Attribute.IsDefined(System.Reflection.Assembly, System.Type)
System.Attribute.IsDefined(System.Reflection.Assembly, System.Type, System.Boolean)
System.Attribute.IsDefined(System.Reflection.MemberInfo, System.Type)
System.Attribute.IsDefined(System.Reflection.MemberInfo, System.Type, System.Boolean)
System.Attribute.IsDefined(System.Reflection.Module, System.Type)
System.Attribute.IsDefined(System.Reflection.Module, System.Type, System.Boolean)
System.Attribute.IsDefined(System.Reflection.ParameterInfo, System.Type)
System.Attribute.IsDefined(System.Reflection.ParameterInfo, System.Type, System.Boolean)
System.Attribute.Match(System.Object)
System.Attribute.TypeId
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: CG.Blazor.Forms.Attributes
Assembly: CG.Blazor.Forms._MudBlazor.dll
Syntax
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public class RenderMudTabsAttribute : RenderObjectAttribute
Remarks
This attribute is only valid when placed on a class definition.
This attribute looks for object properties decorated with the RenderMudTabPanelAttribute attribute. Any properties not properly decorated are ignored. Any properties that aren't of object type are ignored.
This attribute is only effective when applied to the top-level model's class definition. It is not intended to be used for generating tabs on ancestor models (child, grandchild great-grandchild, etc).
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; }
}
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
CG.Blazor.Forms.Attributes.RenderObjectAttribute.Generate(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder, System.Int32, Microsoft.AspNetCore.Components.IHandleEvent, System.Collections.Generic.Stack<System.Object>, System.Reflection.PropertyInfo, Microsoft.Extensions.Logging.ILogger<CG.Blazor.Forms.Services.IFormGenerator>)