Developer Programs

Learn

Docs

ClsWin

API Reference > ClsWin
SoapActionn/a
Input NameClsWin
Output NameClsWinResponse
Input Namespacen/a
Group NameXperience
ContainerXP_MsgBus.xsd
ClsWin.cs
private void HandleCloseRequest(ISubscribedMessageContext context)
{
    if (context.Message == null || string.IsNullOrWhiteSpace(context.Message.WinId))
    {
        return;
    }

    var hostedWindow = XperienceContext.Current.WindowManager.GetByWindowId(context.Message.WinId);

    if (hostedWindow != null)
    {
        if (this.ShouldAllowClose())
        {
            hostedWindow.Close();
        }
        else
        {
            hostedWindow.CancelClose();
        }
    }
}

Did this page help you?

Last updated Mon Dec 9 2024