Search Results for

    Show / Hide Table of Contents

    Class RenderMudSelectAttribute

    This class is an attribute that, when applied to a string property, causes the form generator to render the property as a MudBlazor.MudSelect`1 component.

    Inheritance
    System.Object
    System.Attribute
    CG.Blazor.Forms.Attributes.FormGeneratorAttribute
    MudBlazorAttribute
    RenderMudSelectAttribute
    Inherited Members
    MudBlazorAttribute.Class
    MudBlazorAttribute.Style
    MudBlazorAttribute.Tag
    MudBlazorAttribute.UserAttributes
    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.Property)]
    public class RenderMudSelectAttribute : MudBlazorAttribute
    Remarks

    This attribute is only valid when placed on a property of type: System.String.

    Examples

    Here is an example of decorating a model property to render a MudBlazor.MudSelect`1:

    using CG.Blazor.Forms.Attributes;
    class MyModel
    {
        [RenderSelect(Options = "1 2 3 4")]
        public string MyProperty { get;set; }
    }

    Constructors

    RenderMudSelectAttribute()

    This constructor creates a new instance of the RenderMudSelectAttribute class.

    Declaration
    public RenderMudSelectAttribute()

    Properties

    Adornment

    This property contains the Start or End Adornment if not set to None.

    Declaration
    public Adornment Adornment { get; set; }
    Property Value
    Type Description
    MudBlazor.Adornment

    AdornmentColor

    This property contains the color of the adornment if used. It supports the theme colors.

    Declaration
    public Color AdornmentColor { get; set; }
    Property Value
    Type Description
    MudBlazor.Color

    AdornmentIcon

    This property contains the Icon that will be used if Adornment is set to Start or End.

    Declaration
    public string AdornmentIcon { get; set; }
    Property Value
    Type Description
    System.String

    AdornmentText

    This property contains text that will be used if Adornment is set to Start or End, the Text overrides Icon.

    Declaration
    public string AdornmentText { get; set; }
    Property Value
    Type Description
    System.String

    AutoFocus

    This property indicates the input will focus automatically, when true.

    Declaration
    public bool AutoFocus { get; set; }
    Property Value
    Type Description
    System.Boolean

    Clearable

    This property indicates whether to show the clear button, or not.

    Declaration
    public bool Clearable { get; set; }
    Property Value
    Type Description
    System.Boolean

    CloseIcon

    This property contains the close select icon.

    Declaration
    public string CloseIcon { get; set; }
    Property Value
    Type Description
    System.String

    Dense

    This property, if true, causes compact vertical padding to be applied to all Select items.

    Declaration
    public bool Dense { get; set; }
    Property Value
    Type Description
    System.Boolean

    Direction

    This property sets the direction the Select menu should open.

    Declaration
    public Direction Direction { get; set; }
    Property Value
    Type Description
    MudBlazor.Direction

    Disabled

    This property, if true, the input will be disabled.

    Declaration
    public bool Disabled { get; set; }
    Property Value
    Type Description
    System.Boolean

    DisableUnderLine

    This property, if true, disables the under line for the input.

    Declaration
    public bool DisableUnderLine { get; set; }
    Property Value
    Type Description
    System.Boolean

    Format

    This property contains the conversion format parameter for ToString(), which can be used for formatting primitive types, DateTimes and TimeSpans

    Declaration
    public string Format { get; set; }
    Property Value
    Type Description
    System.String

    FullWidth

    This property indicates whether the input will take up the full width of its container, or not.

    Declaration
    public bool FullWidth { get; set; }
    Property Value
    Type Description
    System.Boolean

    IconSize

    This property indicates the icon size.

    Declaration
    public Size IconSize { get; set; }
    Property Value
    Type Description
    MudBlazor.Size

    Immediate

    This property indicates whether the the input will update the Value immediately on typing. If false, the Value is updated only on Enter.

    Declaration
    public bool Immediate { get; set; }
    Property Value
    Type Description
    System.Boolean

    InputMode

    This property hints at the type of data that might be entered by the user while editing the input

    Declaration
    public InputMode InputMode { get; set; }
    Property Value
    Type Description
    MudBlazor.InputMode

    Label

    This property contains an optional label for the text field.

    Declaration
    public string Label { get; set; }
    Property Value
    Type Description
    System.String

    Lines

    This property contains the number of lines that the input will display.

    Declaration
    public int Lines { get; set; }
    Property Value
    Type Description
    System.Int32

    Margin

    This property indicates how much to change the vertical spacing.

    Declaration
    public Margin Margin { get; set; }
    Property Value
    Type Description
    MudBlazor.Margin

    MaxHeight

    This property indicates the maximum height the select can have when open.

    Declaration
    public int MaxHeight { get; set; }
    Property Value
    Type Description
    System.Int32

    MultiSelection

    This property, if true, multiple values can be selected via checkboxes which are automatically shown in the dropdown

    Declaration
    public bool MultiSelection { get; set; }
    Property Value
    Type Description
    System.Boolean

    OffsetX

    This property, if true, the Select menu will open either before or after the input (left/right).

    Declaration
    public bool OffsetX { get; set; }
    Property Value
    Type Description
    System.Boolean

    OffsetY

    This property, if true, the Select menu will open either before or after the input (top/bottom).

    Declaration
    public bool OffsetY { get; set; }
    Property Value
    Type Description
    System.Boolean

    OpenIcon

    This property contains the open select icon.

    Declaration
    public string OpenIcon { get; set; }
    Property Value
    Type Description
    System.String

    Options

    This property contains a comma separated list of options, for the dropdown.

    Declaration
    public string Options { get; set; }
    Property Value
    Type Description
    System.String

    OptionsFunc

    This property contains the name of an optional function, on either the top-level view-model, or the the associated model. That returns a list of strings, for options.

    Declaration
    public string OptionsFunc { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    The method should have this signature: IEnumerable{string} Func()

    Pattern

    This property contains the pattern attribute, when specified, is a regular expression which the input's value must match in order for the value to pass constraint validation. It must be a valid JavaScript regular expression. Not Supported in multline input

    Declaration
    public string Pattern { get; set; }
    Property Value
    Type Description
    System.String

    ReadOnly

    This property, if true, the input will be read-only.

    Declaration
    public bool ReadOnly { get; set; }
    Property Value
    Type Description
    System.Boolean

    Strict

    This propert, ff true, the Select's input will not show any values that are not defined in the dropdown. This can be useful if Value is bound to a variable which is initialized to a value which is not in the list and you want the Select to show the label / placeholder instead.

    Declaration
    public bool Strict { get; set; }
    Property Value
    Type Description
    System.Boolean

    Variant

    This property contains the variant to use with the control.

    Declaration
    public Variant Variant { get; set; }
    Property Value
    Type Description
    MudBlazor.Variant

    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.FormGeneratorAttribute.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>)

    ToAttributes()

    Declaration
    public override IDictionary<string, object> ToAttributes()
    Returns
    Type Description
    System.Collections.Generic.IDictionary<System.String, System.Object>
    Overrides
    MudBlazorAttribute.ToAttributes()
    In This Article
    Back to top Generated by DocFX