Search results

Show Dialog with fullscreen in Blazor Dialog component

You can show the dialog in fullscreen by passing true as argument to the dialog Show method. By using Visible property you can prevent the dialog from showing initially.

@using Syncfusion.Blazor
@using Syncfusion.Blazor.Popups
@using Syncfusion.Blazor.Buttons

<SfButton @onclick="@OnBtnClick">Open</SfButton>
<SfDialog @ref="@dialogObj" Width="250px" ShowCloseIcon="true" @bind-Visible="@isVisible">
        <Header> Dialog</Header>
        <Content> This is a Dialog with button and primary button</Content>
        <DialogButton OnClick="@OnClick">
            <DialogButtonModel Content="OK" IsPrimary="true"></DialogButtonModel>
        <DialogButton OnClick="@OnClick">
            <DialogButtonModel Content="Cancel"></DialogButtonModel>

@code {
    private SfDialog dialogObj;
    private bool isVisible { get; set; } = false;
    private void OnClick()
        this.isVisible = false;

    private void OnBtnClick()