[PR #2170] [MERGED] add icon in Title Dialog #3114

Closed
opened 2026-01-29 18:21:58 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/radzenhq/radzen-blazor/pull/2170
Author: @bikotoru
Created: 5/23/2025
Status: Merged
Merged: 5/26/2025
Merged by: @enchev

Base: masterHead: master


📝 Commits (3)

📊 Changes

2 files changed (+28 additions, -3 deletions)

View changed files

📝 Radzen.Blazor/DialogService.cs (+22 -3)
📝 Radzen.Blazor/Rendering/DialogContainer.razor (+6 -0)

📄 Description

Add Icon Support to Dialog Titles

What

Added icon display functionality to Radzen dialog titles.

Changes

  • Added Icon property to DialogOptions - icon name to display
  • Added IconColor property to DialogOptions - icon color
  • Added IconStyle property to DialogOptions - custom CSS for icon
  • Updated dialog component to render icon when provided

Examples

await DialogService.OpenAsync<StateTransitionConfirmModal>(
    $"Change to {transition.DisplayName ?? transition.To}",
    parameters,
    new DialogOptions 
    { 
        Width = "600px", 
        CloseDialogOnOverlayClick = false,
        ShowTitle = true,
        ShowClose = true,
        Icon = "add",
        IconColor = Colors.Danger,
        IconStyle = "border: solid 1px"
    });

image

 await DialogService.OpenAsync<StateTransitionConfirmModal>(
     $"Cambiar a {transition.DisplayName ?? transition.To}",
     parameters,
     new DialogOptions
     {
         Width = "600px",
         CloseDialogOnOverlayClick = false,
         ShowTitle = true,
         ShowClose = true,
         Icon = "add",
         IconColor = Colors.Success,

     });

image

Notes

  • All new properties are optional

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/radzenhq/radzen-blazor/pull/2170 **Author:** [@bikotoru](https://github.com/bikotoru) **Created:** 5/23/2025 **Status:** ✅ Merged **Merged:** 5/26/2025 **Merged by:** [@enchev](https://github.com/enchev) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (3) - [`749eb1a`](https://github.com/radzenhq/radzen-blazor/commit/749eb1a7729423e04f0cf42f1b6a096e6a4b0834) add icon in Title Dialog - [`07e7ba7`](https://github.com/radzenhq/radzen-blazor/commit/07e7ba7331a30c8d4ba38a380683f0c6beb65637) fix IconColor in DialogService.cs - [`9eefc2d`](https://github.com/radzenhq/radzen-blazor/commit/9eefc2dc37ab684ab771ae6fb60a94782ad3093a) fix variables ### 📊 Changes **2 files changed** (+28 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `Radzen.Blazor/DialogService.cs` (+22 -3) 📝 `Radzen.Blazor/Rendering/DialogContainer.razor` (+6 -0) </details> ### 📄 Description # Add Icon Support to Dialog Titles ## What Added icon display functionality to Radzen dialog titles. ## Changes - Added `Icon` property to `DialogOptions` - icon name to display - Added `IconColor` property to `DialogOptions` - icon color - Added `IconStyle` property to `DialogOptions` - custom CSS for icon - Updated dialog component to render icon when provided ## Examples ```csharp await DialogService.OpenAsync<StateTransitionConfirmModal>( $"Change to {transition.DisplayName ?? transition.To}", parameters, new DialogOptions { Width = "600px", CloseDialogOnOverlayClick = false, ShowTitle = true, ShowClose = true, Icon = "add", IconColor = Colors.Danger, IconStyle = "border: solid 1px" }); ``` ![image](https://github.com/user-attachments/assets/9047ebf2-770f-433f-a07c-41ac07b33d9b) ``` await DialogService.OpenAsync<StateTransitionConfirmModal>( $"Cambiar a {transition.DisplayName ?? transition.To}", parameters, new DialogOptions { Width = "600px", CloseDialogOnOverlayClick = false, ShowTitle = true, ShowClose = true, Icon = "add", IconColor = Colors.Success, }); ``` ![image](https://github.com/user-attachments/assets/5dc1813f-9b0f-4375-a7e1-c74c958f24dc) ## Notes - All new properties are optional --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 18:21:58 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#3114