Back to Devexpress

PopupShownEventArgs Class

blazor-devexpress-dot-blazor-f65ab785.md

latest2.5 KB
Original Source

PopupShownEventArgs Class

Contains data for the Shown event.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
public class PopupShownEventArgs :
    EventArgs

PopupShownEventArgs is the data class for the following events:

Remarks

The Shown event fires after the Popup is displayed in one of the following ways:

Handle the Shown event to process show actions. You can also handle the Showing event that fires before the Popup is displayed and allows you to cancel this action.

The following example allows users to display the Popup only after they enable the checkbox:

razor
<div>
    <DxCheckBox @bind-Checked="@Checked">
        Allow Popup
    </DxCheckBox>
    @*...*@
    <DxButton RenderStyle="ButtonRenderStyle.Primary" Text="Show"
              Click="() => PopupVisible = true"/>
</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."
         Showing="PopupShowing"
         Shown="PopupShown">
</DxPopup>
@code {
    bool Checked { get; set; }
    bool PopupVisible { get; set; }

    void PopupShowing(PopupShowingEventArgs args) {
        args.Cancel = !Checked;
    }

    void PopupShown(PopupShownEventArgs args) {
        Checked = false;
    }
}

Inheritance

Object EventArgs PopupShownEventArgs

See Also

PopupShownEventArgs Members

DevExpress.Blazor Namespace