Hi Al,
I confirm that it is already possible to use MarkupString or HTML within the TelerikNotification. To achieve this, utilize the Notification Template. Here is an example:
<TelerikButton OnClick="@AddNotification">Open a notification</TelerikButton>
<TelerikNotification VerticalPosition="@NotificationVerticalPosition.Top" @ref="@NotificationReference" Class="MyTelerikNotification">
<Template>
@{
var item = context.Text;
@((MarkupString)item.Replace("\n", "<br />"))
}
</Template>
</TelerikNotification>
@code {
public TelerikNotification NotificationReference { get; set; }
string message = "Firstline\n" + "Secondline\n" + "Thirdline\n";
public void AddNotification()
{
NotificationReference.Show(new NotificationModel()
{
Text = message,
ThemeColor = "primary"
});
}
}
<style>
.MyTelerikNotification .k-notification-container .k-notification-wrap {
width: 300px;
height: 150px;
font-size: 1.5em;
text-align: center;
align-items: center;
}
</style>
Therefore, I'm marking this as "Completed".
Regards,
Hristian Stefanov
Progress Telerik