Repository: MudBlazor/MudBlazor (2026-03-27T14:38:12Z)

Issue:
Add IDialogService.ShowAsync<T>(DialogParameters<T> parameters) method
### Describe your idea

Most of the time I'm going to use a dialog, I don't need a custom title. Many times I end up specifying `string.Empty` in the first argument, because the `DialogParameters` are right after it, and it's quite annoying. I had to create an ExtensionMethod to skip that annoying step, but it would be great if IDialogService already provided that in its signature.

This is the ExtensionMethod I am currently using:
```
public static class IDialogServiceMethods
{
    public static async Task<IDialogReference> ShowAsync<T>(this IDialogService dialogService, DialogParameters<T> parameters) where T : IComponent
    {
        return await dialogService.ShowAsync<T>("", parameters);
    }
}
```


### Example code and screenshots

Currently I would have to specify, without help from my ExtensionMethod:
`await dialogService.ShowAsync<MyDialog>("", new DialogParameters<MyDialog>() {  { x => x.MyParam, "value" } });`

You could create a new method signature to be able to use `IDialogService` as follows:
`await dialogService.ShowAsync<MyDialog>(new DialogParameters<MyDialog>() {  { x => x.MyParam, "value" } });`


Discussion:

Patch:
diff --git a/src/MudBlazor/Services/Dialog/DialogService.cs b/src/MudBlazor/Services/Dialog/DialogService.cs
index 46715054cb03..68c31e130554 100644
--- a/src/MudBlazor/Services/Dialog/DialogService.cs
+++ b/src/MudBlazor/Services/Dialog/DialogService.cs
@@ -80,6 +80,12 @@ public static RenderFragment Wrap(RenderFragment renderFragment)
             return ShowAsync<T>(title, DialogParameters.Default, options);
         }
 
+        /// <inheritdoc />
+        public Task<IDialogReference> ShowAsync<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] T>(DialogParameters parameters) where T : IComponent
+        {
+            return ShowAsync<T>(string.Empty, parameters, DialogOptions.Default);
+        }
+
         /// <inheritdoc />
         public Task<IDialogReference> ShowAsync<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] T>(string? title, DialogParameters parameters) where T : IComponent
         {
diff --git a/src/MudBlazor/Services/Dialog/IDialogService.cs b/src/MudBlazor/Services/Dialog/IDialogService.cs
index 2475b3ab6e11..055b8b210597 100644
--- a/src/MudBlazor/Services/Dialog/IDialogService.cs
+++ b/src/MudBlazor/Services/Dialog/IDialogService.cs
@@ -52,6 +52,14 @@ public interface IDialogService
         /// <returns>A reference to the dialog.</returns>
         Task<IDialogReference> ShowAsync<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TComponent>(string? title, DialogOptions options) where TComponent : IComponent;
 
+        /// <summary>
+        /// Displays a dialog with parameters.
+        /// </summary>
+        /// <typeparam name="TComponent">The dialog to display.</typeparam>
+        /// <param name="parameters">The custom parameters to set within the dialog.</param>
+        /// <returns>A reference to the dialog.</returns>
+        Task<IDialogReference> ShowAsync<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TComponent>(DialogParameters parameters) where TComponent : IComponent;
+
         /// <summary>
         /// Displays a dialog with a custom title and parameters.
         /// </summary>


Test patch:
diff --git a/src/MudBlazor.UnitTests/Components/DialogTests.cs b/src/MudBlazor.UnitTests/Components/DialogTests.cs
index 9debbb4d703f..9df922078d7d 100644
--- a/src/MudBlazor.UnitTests/Components/DialogTests.cs
+++ b/src/MudBlazor.UnitTests/Components/DialogTests.cs
@@ -970,6 +970,28 @@ public async Task AsyncDialogParametersGenericShouldPassParameters()
             textField.ReadText.Should().Be("test");
         }
 
+        [Test]
+        public async Task ShowAsyncWithParametersOnly_ShouldPassParameters()
+        {
+            var comp = Context.Render<MudDialogProvider>();
+            comp.Markup.Trim().Should().BeEmpty();
+            var service = Context.Services.GetRequiredService<IDialogService>();
+            service.Should().NotBe(null);
+
+            var parameters = new DialogParameters<DialogWithParameters>
+            {
+                { x => x.TestValue, "test" },
+                { x => x.ColorTest, Color.Error }
+            };
+            IDialogReference dialogReference = null!;
+            await comp.InvokeAsync(async () => dialogReference = await service.ShowAsync<DialogWithParameters>(parameters));
+            dialogReference.Should().NotBe(null);
+
+            var textField = comp.FindComponent<MudInput<string>>().Instance;
+            textField.ReadText.Should().Be("test");
+            ((DialogWithParameters)dialogReference.Dialog).ColorTest.Should().Be(Color.Error);
+        }
+
         [Test]
         public async Task ShowGeneric_ShouldProvideDefaultOptions_WhenOverloadIsCalled()
         {