Bagikan melalui


Move hosted controls between panels at runtime

Unified Service Desk provides the ability to move applications between panels at runtime. You can do so by using the MoveToPanel action for the Global Manager hosted control type. This action takes two parameters:

  • app: name of the hosted control to be moved.

  • panel: target panel for the hosted control.

This can also be done through code where developers can program this while creating new panel types. Unified Service Desk provides a special panel called the Unknown panel. This panel is a temporary storage for hosted controls when the panel layout they were intended to be placed on, is not yet loaded. Let’s suppose that you have a Horizontal Split panel populated with a CRM Page type of hosted control, but you have closed your Horizontal Split panel. The CRM Page hosted control is still loaded but has been moved to the Unknown panel, which is not visible. Once the Horizontal Split panel is loaded again, the CRM Page hosted control would be moved from the Unknown panel to the appropriate panel again.

IDesktopFeatureAccess desktop = AifServiceContainer.Instance.GetService<IDesktopFeatureAccess>();
if (desktop != null)
{
   desktop.SendApplicationToUnknownPanel(this, tabApp);
}

The IDesktopFeatureAccess class has another function, MoveApplicationToPanel, which allows you to move a hosted control from and to arbitrary panels. This function takes a reference to the hosted application you wish to move and a string that represents the panel name, which is the name of the hosted control defined as a panel layout.

See Also

Concepts

Panels, panel types, and panel layouts in Unified Service Desk
Global Manager (Hosted Control)
CRM Page (Hosted Control)

Unified Service Desk
Send comments about this topic to Microsoft.
© 2015 Microsoft. All rights reserved.