Minimize AgentDesktop window on startup

Jul 24, 2012 at 10:28 AM
Edited Jul 24, 2012 at 10:33 AM

Hi all,
my question could be very simple and probably it is but I'm facing some issue trying minimize AgentDesktop MainWindow.
I tryed to set WindowState = Minimized in every event handler on the MainWindow but it seems to not have effects: the window remain always and however maximized.
Then I tried to hide the window with the Hide() method but, in this case, AgentDesktop end the execution without exception and without errors logged in logging file.
I experimented these "techniques" in a simple demo wpf application and they worked correctly, therefore I can't understand what happens in the CCA Backstage.
Could someone give me some suggestions or workaround to solve this my problem?
Resuming, I need to minimize AgentDesktop window on startup.

Thanks in advance.


Jul 31, 2012 at 2:55 PM
Edited Jul 31, 2012 at 2:56 PM

Is this the example CCA Desktop? The Solution Starter Desktop or something else?

The example CCA Desktop does start up in such a way that its easier to follow but much less flexible, the Solution Starter is more in line with the way that you would normally do it for a “real” project.

The issue that the you will see with the CCA Desktop is that if you hide the window or prevent the UI Tree from being created, UII will not load and abort the desktop. UII’s initialization is tied to the desktop “onloaded” event.

Create a desktop with the Solution Starters and follow how the execution flows., it will make a bit more sense.. The Minimizes/ Maximized behavior is also already implemented in that shell.  You will see the desktop actually being maximized in the DesktopServices_UiiLoaderComplete event


Jul 31, 2012 at 3:06 PM

Thank you very much Matt.
In effect, I have already worked on the Solution Starter and all worked fine as you told me.
I followed the flow and I have minimized the window in the opportune event handler.
Thank again.