In this post about Unified Service Desk for Microsoft Dynamics CRM I am going to describe the RealignWindow action.
The RealignWindow action lets you decide the position of floating panels, including their size and screen. (2 screens are supported, 3 or more screens isn’t available.)
First of all, you will need a hosted control that can display in a floating panel, that is simply as case of setting the display group on a hosted control to “FloatingPanel”. I have given an example below for one I use to display several websites. (Quite useful to have this outside of the USD interface so it doesn’t clutter up the main USD panel!)
NOTE:
You can use the “MoveToPanel” action to move a panels. I sometimes open tabs in my MainPanel and give the user to convert them into a “new window” by turning them into a FloatingPanel. I mention this as I have found that a hosted control needs to start off as a FloatingPanel for the RealignWindow action to work.
How you will need an action for the “RealignWindow”, an example is below.
Notice that my action is “RealignWindow” and the details in the data portion are significant;
- “screen=2”, valid options for screen are 1 and 2. (I have 4 monitors on my PC and was quite disappointed I couldn’t show FloatingPanels in all of them automatically.)
- “top=0”, the position of the top of the screen. This is a percentage from 0 to 100. 0 being the top. (And 100 being the bottom.)
- “left=0”, the position from the left hand side. This is a percentage 0 being the far left and 100 being the far right.
- “width=100”, the width of the window. A percentage. 100 being the full width of the monitor.
- “height=100”, height of the window. A percentage. 100 being the full height of the monitor.
Meaning my settings below show the hosted control on my second screen, maximised.
I have an action to display a website in this tab which is called from my DeskTopReady event of my global manager. I have simply added this addition action to the DeskTopReady event. (Hence me having an order of 6 as I wanted it to occur after the load of the hosted control.)
A pretty simple configuration but one that works quite well when your application needs to work with two screens. J
Leave a comment