Focus
API Reference
>
Focus
| SoapAction | n/a |
| Input Name | Focus |
| Output Name | FocusResponse |
| Input Namespace | n/a |
| Group Name | Xperience |
| Container | XP_MsgBus.xsd |
Did this page help you?
Last updated Mon Dec 9 2024
| SoapAction | n/a |
| Input Name | Focus |
| Output Name | FocusResponse |
| Input Namespace | n/a |
| Group Name | Xperience |
| Container | XP_MsgBus.xsd |
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);
}
}
}