Skip to content
This repository was archived by the owner on Sep 4, 2023. It is now read-only.

This package contains MudBlazor extensions for the CG.Blazor.Forms package.

License

Notifications You must be signed in to change notification settings

CodeGator/CG.Blazor.Forms._MudBlazor

Repository files navigation

CG.Blazor.Forms._MudBlazor:


Build Status Github docs NuGet downloads Azure DevOps coverage Github discussion CG.Blazor.Forms._MudBlazor on fuget.org

What does it do?

The package contains MudBlazor extensions for the CG.Blazor.Forms package.

Commonly used types:

  • CG.Blazor.Forms.Attributes.MudBlazorAttribute
  • CG.Blazor.Forms.Attributes.RenderMudAlertAttribute
  • CG.Blazor.Forms.Attributes.RenderMudAutocompleteAttribute
  • CG.Blazor.Forms.Attributes.RenderMudCheckBoxAttribute
  • CG.Blazor.Forms.Attributes.RenderMudColorPickerAttribute
  • CG.Blazor.Forms.Attributes.RenderMudDatePickerAttribute
  • CG.Blazor.Forms.Attributes.RenderMudFieldAttribute
  • CG.Blazor.Forms.Attributes.RenderMudNumericFieldAttribute
  • CG.Blazor.Forms.Attributes.RenderMudRadioGroupAttribute
  • CG.Blazor.Forms.Attributes.RenderMudSelectAttribute
  • CG.Blazor.Forms.Attributes.RenderMudSliderAttribute
  • CG.Blazor.Forms.Attributes.RenderMudSwitchAttribute
  • CG.Blazor.Forms.Attributes.RenderMudTextFieldAttribute
  • CG.Blazor.Forms.Attributes.RenderMudTimePickerAttribute

What platform(s) does it support?

  • .NET 6.x or higher

How do I install it?

The binary is hosted on NuGet. To install the package using the NuGet package manager:

PM> Install-Package CG.Blazor.Forms._MudBlazor

How do I contact you?

If you've spotted a bug in the code please use the project Issues HERE

We have a discussion group HERE

Is there any documentation?

There is developer documentation HERE

We also blog about projects like this one on our website, HERE


How do I get started?

There is a working quick start sample HERE

Steps to get started:

  1. Create a Blazor project to get started.

  2. Add MudBlazor to the project, since MudBlazor is (so far) the only supported UI package. HERE is a good link to get started with MudBlazor.

  3. Add the CG.Blazor.Forms._MudBlazor NUGET package to the project.

  4. Add @using CG.Blazor.Forms._MudBlazor to the _Imports.razor file.

  5. Add <DynamicForm Model="@Model" OnValidSubmit="OnValidSubmit"/> to the razor component where you want your dynamic form generated. Note that Model is a reference to your POCO object, and OnValidSubmit is a reference to your form's submit handler.

  6. Add services.AddMudBlazorFormGeneration(); to the ConfigureServices method of the Startup class.

  7. Create your model type. Use attributes from the NUGET package to decorate any properties you want to be rendered on the form. Here is an example:

public class MyForm
{
	[RenderMudTextField]
	[Required]
	public string FirstName { get; set; }

	[RenderMudTextField]
	[Required]
	public string LastName { get; set; }

	[RenderMudDatePicker]
	public DateTime? DateOfBirth { get; set; }
}

That's pretty much it! You can, of course, get fancier, but that's up to you.

Disclaimer

This package and it's contents are experimental in nature. There is no official support. Use at your own risk.

About

This package contains MudBlazor extensions for the CG.Blazor.Forms package.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published