Hi Psyk,
Greetings from Syncfusion support.
We have validated your query “In the dialog content I would like to insert a new line in my content. How can I achieve that?”
The can be achieved by using the ‘<br/>’ tag for the new line and then using the ‘MarkupString’ to convert this ‘<br>’ tag as a new line. We have prepared a sample based on the code snippet shared for your reference,
Code Snippet:
|
SfDialog Width="250px" ShowCloseIcon="true" @bind-Visible="@IsVisible">
<DialogTemplates>
<Header>@DialogTitle</Header>
<Content>@((MarkupString)this.Message) </Content>
</DialogTemplates>
<DialogButtons>
<DialogButton Content="OK" IsPrimary="true" OnClick="@CloseDialog" />
<DialogButton Content="Cancel" OnClick="@CloseDialog" />
</DialogButtons>
<DialogEvents OnOverlayClick="@CloseDialog"></DialogEvents>
</SfDialog>
@code {
private string DialogTitle { get; set; } = "Dialog Header";
private string Message { get; set; } = "line1<br/>line2";
} |
Please check the above code snippet and the sample and let us know if it resolves your issue.
Regards,
Revanth