<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>UISerializer</title><link>http://weblogs.asp.net/eporter/archive/2003/06/06/8364.aspx</link><description>I had talked in a previous entry about serializing User Interface elements. I went ahead and finished something that works (mostly anyway, haven't tested all scenarios, especially object references, etc). You can download " UISerializer " here . The UISerializer</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>re: UISerializer</title><link>http://weblogs.asp.net/eporter/archive/2003/06/06/8364.aspx#16176</link><pubDate>Sat, 07 Jun 2003 22:58:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:16176</guid><dc:creator>HumanCompiler</dc:creator><author>HumanCompiler</author><description>Interesting indeed...i think i know what the problem is...has to do with what type the Tag is...it's an Object Property, but obviously would allow you to store a string (or anything else) in it and I didn't take that into consideration...I'll have to think about the best way to approach that one as I'm sure it would happen quite often...glad you got it and thanks for making me think  ;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=16176" width="1" height="1"&gt;</description></item><item><title>re: UISerializer</title><link>http://weblogs.asp.net/eporter/archive/2003/06/06/8364.aspx#16175</link><pubDate>Sat, 07 Jun 2003 22:52:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:16175</guid><dc:creator>Mike Gunderloy</dc:creator><author>Mike Gunderloy</author><description>Hmmmm.....interesting. Because actually - the Tag property on the TreeView that I used to create the XML (via your SaveXML call) stores literal strings in the Tag property. These strings happen to be the names of Panel controls on the same form, but I'm not actually putting direct object references in the tag.
&lt;br&gt;

&lt;br&gt;
So, I hand-edited the XML to make the Tag System.String, and it now loads like a champ. Looks like the issue is on the Save side instead.&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=16175" width="1" height="1"&gt;</description></item><item><title>re: UISerializer</title><link>http://weblogs.asp.net/eporter/archive/2003/06/06/8364.aspx#16171</link><pubDate>Sat, 07 Jun 2003 22:20:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:16171</guid><dc:creator>HumanCompiler</dc:creator><author>HumanCompiler</author><description>Mike, yah, sorry about that, it's not perfect  ;)  It seems not to do very well with object references and in the case of your TreeNode with the Tag with an object reference to your pnlMain, it obvious didn't do it right  :P  I'm still trying to figure out how to setup Object References  :(  So no, I have no quick fix yet for you, sorry!
&lt;br&gt;

&lt;br&gt;
I'd imagine that if there is interest in this, I can expand it to include assembly references (which would also shorten the XML, so you wouldn't have to put the full name every time  :P), object references (that would point to another node or something like that so it wouldn't redefine the entire object again), etc...but for now I have some other projects I have to take care of.  :-\&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=16171" width="1" height="1"&gt;</description></item><item><title>re: UISerializer</title><link>http://weblogs.asp.net/eporter/archive/2003/06/06/8364.aspx#16169</link><pubDate>Sat, 07 Jun 2003 22:07:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:16169</guid><dc:creator>Mike Gunderloy</dc:creator><author>Mike Gunderloy</author><description>I took a look at XmlTreeView, because it would actually be useful in one of my current projects. However, it appears to be barfing on Tag properties when reloading. I'm getting &amp;quot;Value cannot be null&amp;quot; from somewhere deep inside the serialization layer. Here's a stripped-down XML that will (I think) trigger the problem:
&lt;br&gt;

&lt;br&gt;
&amp;lt;System.Windows.Forms.TreeNodeCollection&amp;gt;
&lt;br&gt;
  &amp;lt;System.Windows.Forms.TreeNode&amp;gt;
&lt;br&gt;
    &amp;lt;System.Boolean Name=&amp;quot;Checked&amp;quot;&amp;gt;False&amp;lt;/System.Boolean&amp;gt;
&lt;br&gt;
    &amp;lt;System.Windows.Forms.TreeNodeCollection Name=&amp;quot;Nodes&amp;quot;&amp;gt;
&lt;br&gt;
      &amp;lt;System.Windows.Forms.TreeNode&amp;gt;
&lt;br&gt;
        &amp;lt;System.Boolean Name=&amp;quot;Checked&amp;quot;&amp;gt;False&amp;lt;/System.Boolean&amp;gt;
&lt;br&gt;
        &amp;lt;System.Windows.Forms.TreeNodeCollection Name=&amp;quot;Nodes&amp;quot;&amp;gt;
&lt;br&gt;
          &amp;lt;System.Windows.Forms.TreeNode&amp;gt;
&lt;br&gt;
            &amp;lt;System.Boolean Name=&amp;quot;Checked&amp;quot;&amp;gt;False&amp;lt;/System.Boolean&amp;gt;
&lt;br&gt;
            &amp;lt;System.String Name=&amp;quot;Text&amp;quot;&amp;gt;Publish Names&amp;lt;/System.String&amp;gt;
&lt;br&gt;
            &amp;lt;System.Int32 Name=&amp;quot;ImageIndex&amp;quot;&amp;gt;-1&amp;lt;/System.Int32&amp;gt;
&lt;br&gt;
            &amp;lt;System.Int32 Name=&amp;quot;SelectedImageIndex&amp;quot;&amp;gt;-1&amp;lt;/System.Int32&amp;gt;
&lt;br&gt;
            &amp;lt;System.Object Name=&amp;quot;Tag&amp;quot;&amp;gt;pnlPublishNames&amp;lt;/System.Object&amp;gt;
&lt;br&gt;
          &amp;lt;/System.Windows.Forms.TreeNode&amp;gt;
&lt;br&gt;
        &amp;lt;/System.Windows.Forms.TreeNodeCollection&amp;gt;
&lt;br&gt;
      &amp;lt;/System.Windows.Forms.TreeNode&amp;gt;
&lt;br&gt;
    &amp;lt;/System.Windows.Forms.TreeNodeCollection&amp;gt;
&lt;br&gt;
    &amp;lt;System.String Name=&amp;quot;Text&amp;quot;&amp;gt;CopyBoy 2.0 Beta 1&amp;lt;/System.String&amp;gt;
&lt;br&gt;
    &amp;lt;System.Int32 Name=&amp;quot;ImageIndex&amp;quot;&amp;gt;-1&amp;lt;/System.Int32&amp;gt;
&lt;br&gt;
    &amp;lt;System.Int32 Name=&amp;quot;SelectedImageIndex&amp;quot;&amp;gt;-1&amp;lt;/System.Int32&amp;gt;
&lt;br&gt;
    &amp;lt;System.Object Name=&amp;quot;Tag&amp;quot;&amp;gt;pnlMain&amp;lt;/System.Object&amp;gt;
&lt;br&gt;
  &amp;lt;/System.Windows.Forms.TreeNode&amp;gt;
&lt;br&gt;
&amp;lt;/System.Windows.Forms.TreeNodeCollection&amp;gt;
&lt;br&gt;

&lt;br&gt;
I'll pound on this a bit myself, but figured you might have a quick &amp;quot;aha&amp;quot; fix :)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=16169" width="1" height="1"&gt;</description></item><item><title>re: UISerializer</title><link>http://weblogs.asp.net/eporter/archive/2003/06/06/8364.aspx#16163</link><pubDate>Sat, 07 Jun 2003 19:23:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:16163</guid><dc:creator>HumanCompiler</dc:creator><author>HumanCompiler</author><description>Cool, Don! There's a lot more that could be done with it, but I hope you enjoy what's there! ;) 
&lt;br&gt;

&lt;br&gt;
JosepheCooney, yah, your brother's project sounds really cool! I'll have to check it out. That thought (in one way or another) was crossing my mind too, as in, &amp;quot;why not just send entire apps over the net this way, so you don't have to deal with the security hassles of 'no touch' deployment'&amp;quot;...thanks for the link! :)
&lt;br&gt;

&lt;br&gt;
oh and btw, you can serialize more than just the UI (at least I think), as it's just using reflection and grabbing anything public, but it does have to be a project that has access to WindowsForms though, because it uses the Design Time support to figure out what should and shouldn't be serialized.&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=16163" width="1" height="1"&gt;</description></item><item><title>re: UISerializer</title><link>http://weblogs.asp.net/eporter/archive/2003/06/06/8364.aspx#16162</link><pubDate>Sat, 07 Jun 2003 19:13:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:16162</guid><dc:creator>JosephCooney</dc:creator><author>JosephCooney</author><description>My brother Dominic is working on a mobilization framework for .NET applications as part of his Ph.D. Instead of serializing the UI you can serialize a whole thread and send it to another computer (providing they have the right stuff installed) where it will re-hydrate and continue running. He has a &amp;quot;mobliezed&amp;quot; version of notepad which I have seen him enter text into on his lap top, drag and drop it on his iPaq in network neighbourhood, where it appears and continues running with the same stuff on the screen. Obviously it is not limited to serializing UI but that is one of the coolest ways to demo it. Check it out here if you're interested...(appologies to my brother if I've in any way mis-represented his cool Ph.D project).
&lt;br&gt;

&lt;br&gt;
http://www.dcooney.com/mobile.html&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=16162" width="1" height="1"&gt;</description></item><item><title>re: UISerializer</title><link>http://weblogs.asp.net/eporter/archive/2003/06/06/8364.aspx#16154</link><pubDate>Sat, 07 Jun 2003 15:23:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:16154</guid><dc:creator>DonXML</dc:creator><author>DonXML</author><description>Erik,
&lt;br&gt;
Cool.  I've downloaded it, and will be playing with it over the weekend.
&lt;br&gt;

&lt;br&gt;
DonXML&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=16154" width="1" height="1"&gt;</description></item></channel></rss>