Could I use HTML markup in Notification component?

Dear Radzen.Blazor team:

I need to add HTML markup to Notification component,
like "Google".
How can I implement it?

BR,
Brian

Hi @changfeng1800,

This is not supported.

It will be possible in our next update before the end of the week:

1 Like

Still html markup is not rendered in notifications, I wounder it was working before why it has been canceled?

For example:
public class RNote
{
private readonly Radzen.NotificationService srvNotification;

public RNote(Radzen.NotificationService rdzNotificationService)
{
	srvNotification = rdzNotificationService;
}

public void Notify(
	NotificationSeverity nosSeverity,
	string strSummary,
	string strDtHeader,
	string strDetail,
	int intDuration
)
{
	srvNotification.Notify(
		new NotificationMessage()
		{
			Severity = nosSeverity,
			//Payload = "Hello and welcome home",
			Summary = $"<span style='display:block; font-weight:bold;'>{strSummary}</span><hr>",
			Detail = $"<div style='font-weight:700;'>{strDtHeader}</div><span style='display:block; font-weight:500;'>{strDetail}</span>" + "<br><div style='display:block; color:red; font-weight:bold;'>OK</div>",
			CloseOnClick = true,
			Duration = intDuration,
			Style =
				"position: absolute; inset-inline-start:-1300px; top: 100px; width:800px;",
		}
	);
}

}

Calling:
if (intIdnTyIDf == null)
{
RNote.Notify(NotificationSeverity.Warning,
@"Identity type missing: warning raised.",
@"

The identity type refers to a null value.
About this error:
",
@"

  • Identity type is not set.

  • The identity type should be defined.

  • Define the identity type by selecting it from identity types combo box and validate again.

",
40000
);
return bolIsValid = false;
}

it will give the markup in the notification message

The markup is rendered in the above reply :))