﻿<?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 - ClientUI - Is UXDesktopDock bindable to a heirachical data template?</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Is-UXDesktopDock-bindable-to-a-heirachical-data-template/</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>Is UXDesktopDock bindable to a heirachical data template?</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Is-UXDesktopDock-bindable-to-a-heirachical-data-template/</link><pubDate>Wed, 22 Dec 2010 22:31:15 GMT</pubDate><dc:creator>Glayaar</dc:creator><category>Silverlight</category><category>ClientUI</category><category>UXDesktopDock</category><category>Hierarchical Data Template</category><description>&lt;p&gt;Based on my test using the attached simple sample, the provided suggestion run as intended. The sample page requires some images which you could retrieve from our provided ClientUI sample.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Is UXDesktopDock bindable to a heirachical data template?</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Is-UXDesktopDock-bindable-to-a-heirachical-data-template/</link><pubDate>Wed, 22 Dec 2010 06:57:24 GMT</pubDate><dc:creator>mpryce</dc:creator><category>Silverlight</category><category>ClientUI</category><category>UXDesktopDock</category><category>Hierarchical Data Template</category><description>&lt;p&gt;Hi, Andry...&lt;/p&gt;
&lt;p&gt;unfortunately the approach you have posted does not work. I tested it with "Intersoft WebUI Studio 2010 R1". The items will be bound but not displayed.&lt;/p&gt;
&lt;p&gt;What went wrong?&lt;/p&gt;
&lt;p&gt;Best,&lt;/p&gt;
&lt;p&gt;Maxwell&lt;/p&gt;</description></item><item><title>Is UXDesktopDock bindable to a heirachical data template?</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Is-UXDesktopDock-bindable-to-a-heirachical-data-template/</link><pubDate>Fri, 09 Jul 2010 00:51:44 GMT</pubDate><dc:creator>ansoesil</dc:creator><category>Silverlight</category><category>ClientUI</category><category>UXDesktopDock</category><category>Hierarchical Data Template</category><description>&lt;p&gt;Hi Rick,&lt;/p&gt;
&lt;p&gt;This feature has a bug in RC version and currently being fixed.&lt;/p&gt;
&lt;p&gt;But to make sure that we can cover your scenario i'll explained how we can achive it and there some workaround you can try on with the RC version.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;From my understanding it seems that you want to bind UXDesktopDock to an hierarchical object model and want to change the settings of each UXDesktopDockButton and its StackItems.&lt;/p&gt;
&lt;p&gt;This is do-able but not through HierarhicalDataTemplate.&lt;/p&gt;
&lt;p&gt;HierarchicalDataTemplate is used to define template in a uniform hierarhical structure such as MenuItem and TreeViewItem ( we don't have treeview component yet, but thats the idea)&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;For your scenario this is what you want to do.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;First, prepare a data structure where the parent object contains collection property. &lt;pre&gt;public class Item
{
     public ChildrenItemCollection Children
     public string DisplayText
     public ImageSource DisplayImage
}

public class ChildrenItem
{
     public string DisplayChildText
     public ImageSource DisplayChildImage
}
&lt;/pre&gt;
&lt;p&gt;then do the binding as follows:&lt;/p&gt;&lt;pre&gt;&amp;lt;Grid x:Name="LayoutRoot" &lt;br /&gt;      DataContext="{Binding Source={StaticResource SampleDataSource}}"&amp;gt;
    &amp;lt;Intersoft:UXDesktopDock &lt;strong&gt;CollectionMemberPath&lt;/strong&gt;="Children" &lt;br /&gt;                             &lt;strong&gt;DisplayMemberPath&lt;/strong&gt;="DisplayText" &lt;br /&gt;                             &lt;strong&gt;ImageMemberPath&lt;/strong&gt;="DisplayImage" &lt;br /&gt;                             ItemsSource="{Binding Collection}"&lt;br /&gt;                             ItemContainerStyle="{StaticResource UXDesktopDockButtonStyle1}"/&amp;gt;	
&amp;lt;/Grid&amp;gt;
&lt;/pre&gt;
&lt;p&gt;This will define the first level binding (Item lvl) to create the UXDockButton. &lt;/p&gt;
&lt;p&gt;Note that there's definition call CollectionMemberPath, this define the path to look for SubItem Collection and since our data structure use Children as its property name we specify Children for CollectionMemberPath value.&lt;/p&gt;
&lt;p&gt;The second steps is bind the second level (SubItem lvl) to do this you need to create a style for &lt;strong&gt;ItemContainerStyle&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;ItemContainerStyle basically provide style across all item that belong to that specific control (in this case UXDesktopDock)&lt;/p&gt;&lt;pre&gt;&amp;lt;Style x:Key="UXDesktopDockButtonStyle1" TargetType="Intersoft:UXDesktopDockButton"&amp;gt;
    &amp;lt;Setter Property="ImageMemberPath" Value="DisplayChildImage"/&amp;gt;
    &amp;lt;Setter Property="StackMode" Value="GridStyle"/&amp;gt;	
&amp;lt;/Style&amp;gt;&lt;/pre&gt;
&lt;p&gt;This will specify binding definition for ChildrenItem (StackItem)&lt;/p&gt;
&lt;p&gt;Note that you can try on with ImageMemberPath in this level for RC version, the other properties such as DisplayMemberPath is not working but it will be in RTM version.&lt;/p&gt;
&lt;p&gt;To workaround this you need to have the same property name for parent and child.&lt;/p&gt;&lt;pre&gt;public class Item
{
     public ChildrenItemCollection Children
     public string DisplayText
     public ImageSource DisplayImage
}

public class ChildrenItem
{
     public string &lt;strong&gt;DisplayText&lt;/strong&gt;
     public ImageSource &lt;strong&gt;DisplayImage&lt;/strong&gt;
}
&lt;/pre&gt;
&lt;p&gt;If you have the same property name DisplayText at parent and DisplayText at children.&lt;/p&gt;
&lt;p&gt;You do not need to specify anything at child level, since the parent - child settings will be applied (meaning if the child property isn't changed it will use the parent one)&lt;/p&gt;&lt;pre&gt;&amp;lt;Style x:Key="UXDesktopDockButtonStyle1" TargetType="Intersoft:UXDesktopDockButton"&amp;gt;
    &amp;lt;Setter Property="FlippingEffectEnabled" Value="True"/&amp;gt;
    &amp;lt;Setter Property="StackMode" Value="GridStyle"/&amp;gt;	
&amp;lt;/Style&amp;gt;&lt;/pre&gt;
&lt;p&gt;Hope this helps&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Andry&lt;/p&gt;</description></item><item><title>Is UXDesktopDock bindable to a heirachical data template?</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Is-UXDesktopDock-bindable-to-a-heirachical-data-template/</link><pubDate>Thu, 08 Jul 2010 13:22:08 GMT</pubDate><dc:creator>Rico</dc:creator><category>Silverlight</category><category>ClientUI</category><category>UXDesktopDock</category><category>Hierarchical Data Template</category><description>&lt;p&gt;Can one set the ItemsSource at the root level of a UXDesktopDock to an ObJectModel with children and have that bind via a heirarchical data template.  This should drive the creation of not only the Top-Level buttons, but also the childlevel StackItems?  &lt;br /&gt;&lt;/p&gt;
&lt;p&gt;If so, can you provide an example soon.  Thanks.&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>