Back to Devexpress

IPopupElementInfo.CloseCallback Property

blazor-devexpress-dot-blazor-dot-ipopupelementinfo.md

latest2.3 KB
Original Source

IPopupElementInfo.CloseCallback Property

Specifies the predefined event callback that closes a popup window.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
EventCallback CloseCallback { get; }

Property Value

TypeDescription
EventCallback

An event handler delegate.

|

Remarks

An IPopupElementInfo object is passed as the context parameter to the following templates:

In a template, you can use the parameter’s CloseCallback property to implement the Close button:

razor
<div @onclick="@(() => PopupVisible = true)">
    <p>CLICK TO SHOW A POP-UP WINDOW</p>
</div>

<DxPopup @bind-Visible="@PopupVisible"
         HeaderText="Header"
         BodyText="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris sit amet metus vel
             nisi blandit tincidunt vel efficitur purus. Nunc nec turpis tempus, accumsan orci auctor,
             imperdiet mauris. Fusce id purus magna."
         ShowFooter="true">
    <FooterContentTemplate>
        <DxButton RenderStyle="ButtonRenderStyle.Primary" Text="OK"
                  Click="@context.CloseCallback" />
    </FooterContentTemplate>
</DxPopup>

@code {
    bool PopupVisible { get; set; } = false;
}

Run Demo: Popup - Customization

See Also

IPopupElementInfo Interface

IPopupElementInfo Members

DevExpress.Blazor Namespace