Developer Programs

Learn

Docs

Focus

API Reference > Focus
SoapActionn/a
Input NameFocus
Output NameFocusResponse
Input Namespacen/a
Group NameXperience
ContainerXP_MsgBus.xsd
Focus.cs
private void ButtonFocusRqClick(object sender, RoutedEventArgs e)
{
    var focusRq = new FocusRq_MType();

    if (string.IsNullOrWhiteSpace(this.TextBoxMisc.Text))
    {
        var hostedWindow = XperienceContext.Current.WindowManager.MainHostedWindow;
        focusRq.WinId = hostedWindow.WindowId;
    }
    else
    {
        focusRq.AppId = this.TextBoxMisc.Text;
    }

    var callback = this.messageBus.Send(focusRq);
    var errors = Helper.CallbackErrors(callback, "ButtonFocusRqClick");
    if (!string.IsNullOrWhiteSpace(errors))
    {
        this.UpdateListbox(errors);
    }
    else
    {
        try
        {
            this.OnFocusRs(callback.WaitForResponse(TimeSpan.FromSeconds(30)));
        }
        catch (Exception ex)
        {
            this.UpdateListbox("ButtonFocusRqClick exception:  " + ex.Message);
        }
    }
}

Did this page help you?

Last updated Mon Dec 9 2024