diff --git a/demo/StaticSample/StaticSample.Client/Components/MyMudProviders.razor b/demo/StaticSample/StaticSample.Client/Components/MyMudProviders.razor
index 847ca7c..e95c615 100644
--- a/demo/StaticSample/StaticSample.Client/Components/MyMudProviders.razor
+++ b/demo/StaticSample/StaticSample.Client/Components/MyMudProviders.razor
@@ -1,6 +1,6 @@
@inject ISnackbar Snackbar
-
+
diff --git a/demo/StaticSample/StaticSample.Client/Components/MyMudThemeProvider.razor b/demo/StaticSample/StaticSample.Client/Components/MyMudThemeProvider.razor
index 963d5dd..97a8f0a 100644
--- a/demo/StaticSample/StaticSample.Client/Components/MyMudThemeProvider.razor
+++ b/demo/StaticSample/StaticSample.Client/Components/MyMudThemeProvider.razor
@@ -1,11 +1,9 @@
-
-
-
+
@code {
public static MudTheme MyTheme => new()
{
- Palette = new PaletteLight()
+ PaletteLight = new PaletteLight()
{
Primary = Colors.Teal.Default,
AppbarBackground = Colors.Teal.Default
diff --git a/demo/StaticSample/StaticSample.Client/StaticSample.Client.csproj b/demo/StaticSample/StaticSample.Client/StaticSample.Client.csproj
index 706819a..7522765 100644
--- a/demo/StaticSample/StaticSample.Client/StaticSample.Client.csproj
+++ b/demo/StaticSample/StaticSample.Client/StaticSample.Client.csproj
@@ -10,9 +10,9 @@
-
-
-
+
+
+
diff --git a/demo/StaticSample/StaticSample/StaticSample.csproj b/demo/StaticSample/StaticSample/StaticSample.csproj
index 6f2b8c2..43b1ea8 100644
--- a/demo/StaticSample/StaticSample/StaticSample.csproj
+++ b/demo/StaticSample/StaticSample/StaticSample.csproj
@@ -9,15 +9,14 @@
-
-
-
-
-
+
+
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
diff --git a/src/Components/MudStaticButton.razor b/src/Components/MudStaticButton.razor
index 5822069..da4b8ca 100644
--- a/src/Components/MudStaticButton.razor
+++ b/src/Components/MudStaticButton.razor
@@ -62,7 +62,7 @@ else
;
}
- private RenderFragment RenderHiddenReturnUrl()
+ private RenderFragment? RenderHiddenReturnUrl()
{
if (!string.IsNullOrEmpty(ReturnUrl))
{
diff --git a/src/Components/MudStaticButton.razor.cs b/src/Components/MudStaticButton.razor.cs
index be43704..8dd6fe5 100644
--- a/src/Components/MudStaticButton.razor.cs
+++ b/src/Components/MudStaticButton.razor.cs
@@ -1,5 +1,4 @@
-using System.Windows.Input;
-using Microsoft.AspNetCore.Components;
+using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Web;
namespace MudBlazor.StaticInput;
@@ -14,10 +13,7 @@ public partial class MudStaticButton : MudButton
protected new ButtonType ButtonType { get; set; }
protected new string HtmlTag { get; set; } = "button";
protected new string? Href { get; set; }
- protected new string? Link { get; set; }
protected new string? Target { get; set; }
- protected new ICommand? Command { get; set; }
protected new bool ClickPropagation { get; set; }
- protected new object? CommandParameter { get; set; }
protected new EventCallback OnClick { get; set; }
}
\ No newline at end of file
diff --git a/src/Components/MudStaticCheckBox.razor b/src/Components/MudStaticCheckBox.razor
index 0dfad7d..2cead7e 100644
--- a/src/Components/MudStaticCheckBox.razor
+++ b/src/Components/MudStaticCheckBox.razor
@@ -12,7 +12,7 @@
id="@($"static-checkbox-{_elementId}")" disabled="@GetDisabledState()" @onclick:preventDefault="@GetReadOnlyState()"/>
-
@if (!string.IsNullOrEmpty(Label))
diff --git a/src/Components/MudStaticCheckBox.razor.cs b/src/Components/MudStaticCheckBox.razor.cs
index c101d24..4f7bfa7 100644
--- a/src/Components/MudStaticCheckBox.razor.cs
+++ b/src/Components/MudStaticCheckBox.razor.cs
@@ -8,10 +8,9 @@ public partial class MudStaticCheckBox : MudCheckBox
* Hide these inherited properties to prevent *
* consumers from modifying them directly. *
**********************************************/
- protected new bool Checked { get; set; }
+ protected new bool Value { get; set; }
protected new bool TriState { get; set; }
protected new bool KeyboardEnabled { get; set; }
protected new EventCallback ValueChanged { get; set; }
- protected new EventCallback CheckedChanged { get; set; }
protected new string IndeterminateIcon { get; set; } = Icons.Material.Filled.IndeterminateCheckBox;
}
\ No newline at end of file
diff --git a/src/Components/MudStaticSwitch.razor b/src/Components/MudStaticSwitch.razor
index a70e776..4cf925e 100644
--- a/src/Components/MudStaticSwitch.razor
+++ b/src/Components/MudStaticSwitch.razor
@@ -84,7 +84,7 @@
container.classList.toggle("@UncheckedHoverColor", !force)
switchTrack.classList.toggle("@CheckedColor", force);
- switchTrack.classList.toggle("@UncheckedColor", !force)
+ switchTrack.classList.toggle("@UnCheckedColor", !force)
if (switchToggle.checked) {
emptySwitch.removeAttribute("name");
diff --git a/src/Components/MudStaticSwitch.razor.cs b/src/Components/MudStaticSwitch.razor.cs
index f832218..5f2391e 100644
--- a/src/Components/MudStaticSwitch.razor.cs
+++ b/src/Components/MudStaticSwitch.razor.cs
@@ -8,21 +8,20 @@ public partial class MudStaticSwitch : MudSwitch
* Hide these inherited properties to prevent *
* consumers from modifying them directly. *
**********************************************/
- protected new bool Checked { get; set; }
+ protected new bool Value { get; set; }
protected new EventCallback ValueChanged { get; set; }
- protected new EventCallback CheckedChanged { get; set; }
/*
* Options for SwitchClassname
*/
private string CheckedTextColor => $"mud-{Color.ToDescriptionString()}-text";
private string CheckedHoverColor => $"hover:mud-{Color.ToDescriptionString()}-hover";
- private string UncheckedTextColor => $"mud-{UnCheckedColor.ToDescriptionString()}-text";
- private string UncheckedHoverColor => $"hover:mud-{UnCheckedColor.ToDescriptionString()}-hover";
+ private string UncheckedTextColor => $"mud-{UncheckedColor.ToDescriptionString()}-text";
+ private string UncheckedHoverColor => $"hover:mud-{UncheckedColor.ToDescriptionString()}-hover";
/*
* Options for TrackClassname
*/
private string CheckedColor => $"mud-{Color.ToDescriptionString()}";
- private string UncheckedColor => $"mud-{UnCheckedColor.ToDescriptionString()}";
+ private string UnCheckedColor => $"mud-{UncheckedColor.ToDescriptionString()}";
}
\ No newline at end of file
diff --git a/src/Components/MudStaticTextField.razor b/src/Components/MudStaticTextField.razor
index 66d1d08..2464c18 100644
--- a/src/Components/MudStaticTextField.razor
+++ b/src/Components/MudStaticTextField.razor
@@ -10,8 +10,8 @@
@code {
[Parameter] public Expression>? ValueExpression { get; set; }
- private string _name;
- private string _elementId;
+ private string _name = string.Empty;
+ private string _elementId = string.Empty;
private bool HasDefaultContent => ShrinkLabel ||
HasNativeHtmlPlaceholder() ||
Adornment == Adornment.Start ||
@@ -19,7 +19,7 @@
protected override void OnParametersSet()
{
- UserAttributes["id"] = _elementId;
+ UserAttributes["data-static-id"] = _elementId;
UserAttributes["name"] = _name;
base.OnParametersSet();
@@ -58,7 +58,7 @@