Should MultiWindowCommand work when in Alarm-Manager, or Access-Control?

SmartClient-Plug-in: I used MultiWindowCommand code from one of your samples. Sample was probably: “SCViewAndWindow”.

Works great when Mode.ClientLive.

My question is … Is it possible to pop-up a window when in Alarm-Manager, or Access-Control Tabs?

My code (base on your sample) seems to only allow floating windows when the TAB that is open is either Live-Tab or Playback-Tab.

More Info …

************** Inner Exception **************

Exception type:System.InvalidOperationException

Exception message:The calling thread must be STA, because many UI components require this.

Exception source:PresentationCore

Exception Target Site: .ctor

at System.Windows.Input.InputManager..ctor()

at System.Windows.Input.InputManager.GetCurrentInputManagerImpl()

at System.Windows.Input.KeyboardNavigation..ctor()

at System.Windows.FrameworkElement.FrameworkServices..ctor()

at System.Windows.FrameworkElement.EnsureFrameworkServices()

at System.Windows.FrameworkElement..ctor()

at System.Windows.Controls.Control..ctor()

at System.Windows.Window..ctor()

at VideoOS.RemoteClient.Application.Controllers.MultiWindowController.OpenFloatingWindow(View view, Guid workSpaceId, Point location, Size size, IList`1 viewItemStates, Boolean persistWindowState, Boolean isSingleWorkspaceWindow, Boolean openInPreviewMode, ScreenInfo screenInfo, Boolean maximize)

at VideoOS.RemoteClient.Application.Actions.MultiWindowOpenFloatingWindowAction.MultiWindowOpenFloatingWindow(String viewName, Int32 x, Int32 y, Int32 width, Int32 height, Boolean playbackSupported, Int32 screenIndex)

************** Outer Exception **************

Exception type:System.Reflection.TargetInvocationException

Exception message:Exception has been thrown by the target of an invocation.

Exception source:mscorlib

Exception Target Site: InvokeMethod

at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)

at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)

at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

at VideoOS.RemoteClient.Application.Actions.ActionBase.InvokeAction(Object[] parameters)

at VideoOS.RemoteClient.Application.MIP.Manager.MessageManager.MultiWindowCommandHandler(Message message, FQID dest, FQID source)

************** System Info **************

Date and time: 1/7/2022 11:48:55 AM

Machine Name: ATC-PD-01

Processors count: 6

OS version: Microsoft Windows NT 6.2.9200.0

64 bit OS: True

64 bit process: True

IP address: ::1 (ATC-PD-01)

Current user: ATC-PD-01\admin

I believe the error is saying that you must be on the UI thread, but you are not.

Try to use

virtual void VideoOS.Platform.ClientControl.CallOnUiThread
(
    Action
    actionToBeInvoked
)

https://doc.developer.milestonesys.com/html/index.html?base=miphelp/class_video_o_s_1_1_platform_1_1_client_control.html&tree=tree_search.html?search=callonuithread