﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - Code</title><link>http://www.intersoftsolutions.com/Community/Tags/Code/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>Open and Close Windows via code</title><link>http://www.intersoftsolutions.com/Community/Tags/Code/</link><pubDate>Thu, 23 Sep 2010 09:29:06 GMT</pubDate><dc:creator>prpmlp</dc:creator><category>ClientUI</category><category>UXWindow</category><category>Code</category><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am trying to Close a window via code. In the code behine of the UXPage I have the following code:&lt;/p&gt;&lt;pre&gt;&lt;pre&gt;var window =(UXWindow) this.GetWindowHost();
window.Hide();&lt;/pre&gt;&lt;/pre&gt;
&lt;p&gt;This however throws an exception&lt;/p&gt;
&lt;p&gt;((System.Exception)(ex.InnerException)).StackTrace&lt;/p&gt;
&lt;p&gt;   at Intersoft.Client.UI.Aqua.UXDock.UXDock.GetContainerFromIndex(Int32 index)&lt;br&gt;&lt;/br&gt;   at Intersoft.Client.UI.Aqua.UXDock.UXDesktopDock.FindButton(Object targetContext, SearchFlags searchButtonFlags)&lt;br&gt;&lt;/br&gt;   at Intersoft.Client.UI.Aqua.UXDock.UXDesktopDock.(Object sender, WindowEventArgs e)&lt;/p&gt;
&lt;p&gt;I have tried using window.Close(); but still throws the exception. If I put a catch around this it. The error is not thrown and the window closes.&lt;/p&gt;
&lt;p&gt;The 2nd problem is trying to programatically open a window without clicking of the navigation docking component.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Please could you also update when help file will be available&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Kind Regards&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item></channel></rss>