﻿<?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 - Using UXDesktop.ItemsSource???</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Using-UXDesktopItemsSource/</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>Using UXDesktop.ItemsSource???</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Using-UXDesktopItemsSource/</link><pubDate>Wed, 01 Dec 2010 05:29:02 GMT</pubDate><dc:creator>MarTin</dc:creator><category>UXDesktop</category><description>&lt;p&gt;Hello Chris,&lt;/p&gt;
&lt;p&gt;You need to create a class which inherits UXDesktop, and then override &lt;strong&gt;GetContainerForItemOverride()&lt;/strong&gt; method and return a new UXWindow instead of UXWindowChrome.&lt;/p&gt;
&lt;p&gt;I create a class named &lt;strong&gt;GetUXWindow.cs&lt;/strong&gt; and the code looks like following:&lt;/p&gt;&lt;pre&gt;public class GetUXWindow : UXDesktop
{
   protected override DependencyObject GetContainerForItemOverride()
   {
      UXWindow newWindow = new UXWindow();
      newWindow.IsClientVisible = true;
      newWindow.CanMaximize = true;
      newWindow.CanMinimize = true;
      newWindow.CanMove = true;
      newWindow.CanResize = true;
      return newWindow;            
   }
}&lt;/pre&gt;
&lt;p&gt;Declare the new class like following:&lt;/p&gt;&lt;pre&gt;&amp;lt;ViewModels:GetUXWindow x:Key="GetUXWindow"/&amp;gt;&lt;/pre&gt;
&lt;p&gt;Then, replace the UXDesktop control with the class you have created like following:&lt;/p&gt;&lt;pre&gt;&amp;lt;ViewModels:GetUXWindow x:Name="uxMyDesktop" DataContext="{Binding Source={StaticResource ContactsViewModel}, Path=Contacts}" 
                             ItemContainerStyleSelector="{StaticResource ContactStackItemStyleSelector}" ItemsSource="{Binding}" 
                             DisplayMemberPath="Contact.Name" ImageMemberPath="Contact.Photo"&amp;gt;

        &amp;lt;/ViewModels:GetUXWindow&amp;gt;&lt;/pre&gt;
&lt;p&gt;When you run the project, UXDesktop will create UXWindow objects with its behavior.&lt;/p&gt;
&lt;p&gt;Hope this helps.&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;</description></item><item><title>Using UXDesktop.ItemsSource???</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Using-UXDesktopItemsSource/</link><pubDate>Tue, 30 Nov 2010 14:33:05 GMT</pubDate><dc:creator>chrisaswain</dc:creator><category>UXDesktop</category><description>&lt;p&gt;After setting some break points in code, I can see that the UXDesktop is creating UXWindowChrome objects by default instead of UXWindow objects.  The documentation suggests that the control should generate UXWindow objects because the default target for the ItemContainerStyle is the UXWindow control and not chrome.  &lt;/p&gt;
&lt;p&gt;How can I control the type of window generated by the UXDesktop control when binding with the ItemsSource property?&lt;/p&gt;</description></item><item><title>Using UXDesktop.ItemsSource???</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Using-UXDesktopItemsSource/</link><pubDate>Tue, 30 Nov 2010 10:42:09 GMT</pubDate><dc:creator>chrisaswain</dc:creator><category>UXDesktop</category><description>&lt;p&gt;New problem...&lt;/p&gt;
&lt;p&gt;The binding on the UXDesktop control to the ItemsSource property seems to work sort of, but it doesn't generate full window items.  Attached is a test project to show what I mean.  &lt;/p&gt;
&lt;p&gt;In short, items are generated, but they aren't the expected "Window" looking containters.  Instead, they say the name of the object bound in the collection and they have no window header, icon, close button, etc.  &lt;/p&gt;</description></item><item><title>Using UXDesktop.ItemsSource???</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Using-UXDesktopItemsSource/</link><pubDate>Tue, 30 Nov 2010 05:06:16 GMT</pubDate><dc:creator>MarTin</dc:creator><category>UXDesktop</category><description>&lt;p&gt;Hello Chris,&lt;/p&gt;
&lt;p&gt;Please bear with me while I'm investigating your issue. I will let you know the progress.&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;-Martin-&lt;/p&gt;</description></item><item><title>Using UXDesktop.ItemsSource???</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Using-UXDesktopItemsSource/</link><pubDate>Mon, 29 Nov 2010 10:07:19 GMT</pubDate><dc:creator>chrisaswain</dc:creator><category>UXDesktop</category><description>&lt;p&gt;I managed to get it working thanks to your example source code.  I was missing the DisplayMemberPath and the ImageMemberPath properties on my UXDesktop control.  I was under the impression that these were not needed since I was customizing the binding in the ItemContainerStyle, but I guess I was wrong.  &lt;/p&gt;
&lt;p&gt;Another interesting question:&lt;/p&gt;
&lt;p&gt;My datasource for my taskbar is hierarchical so it can show an application instance group button on the task bar and butttons for each instance as stack items.  However, I'd like to bind the UXDesktop to just the instances on the same datasource so a window gets created and managed for each application instance stack item and not just a window for the group of instances.  Any suggestions?&lt;/p&gt;
&lt;p&gt;Example Datasource structure:&lt;/p&gt;
&lt;p&gt;[AppInstanceGroups collection]&lt;/p&gt;
&lt;p&gt;    -&amp;lt;AppInstanceGroup&amp;gt;&lt;/p&gt;
&lt;p&gt;        -Name property&lt;/p&gt;
&lt;p&gt;        -Icon property&lt;/p&gt;
&lt;p&gt;        -[AppInstances collection]&lt;/p&gt;
&lt;p&gt;            -&amp;lt;AppInstance&amp;gt; --&amp;gt; Window needed for each of these.&lt;/p&gt;
&lt;p&gt;                -Name property&lt;/p&gt;
&lt;p&gt;                -Icon property&lt;/p&gt;</description></item><item><title>Using UXDesktop.ItemsSource???</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Using-UXDesktopItemsSource/</link><pubDate>Fri, 26 Nov 2010 04:46:20 GMT</pubDate><dc:creator>MarTin</dc:creator><category>UXDesktop</category><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I have tried to create your scenario using ItemsSource in UXDesktop. Using a sample data created from Intersoft ClientUI Desktop application template, I have bound a ViewModel with Contacts collection and specified ItemContainerStyle for UXDesktop. Here is the code that I used:&lt;/p&gt;&lt;pre&gt;&amp;lt;Intersoft:UXDesktop x:Name="uxMyDesktop" DataContext="{Binding Source={StaticResource ContactsViewModel}, Path=Contacts}" 
                             ItemContainerStyleSelector="{StaticResource ContactStackItemStyleSelector}" ItemsSource="{Binding}" 
                             DisplayMemberPath="Contact.Name" ImageMemberPath="Contact.Photo"&amp;gt;
            
        &amp;lt;/Intersoft:UXDesktop&amp;gt;&lt;/pre&gt;
&lt;p&gt;When I run the project with these settings, the UXDesktop will bind the Contacts collection and create UXWindow objects automatically.&lt;/p&gt;
&lt;p&gt;Will this code useful for your scenario?&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;</description></item><item><title>Using UXDesktop.ItemsSource???</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Using-UXDesktopItemsSource/</link><pubDate>Thu, 25 Nov 2010 09:26:24 GMT</pubDate><dc:creator>chrisaswain</dc:creator><category>UXDesktop</category><description>&lt;p&gt;I have a ViewModel with an ObservableCollection property I want to bind to my UXDesktop.ItemsSource.  I have an ItemContainerStyle specified for my UXDesktop where I define some properties.  &lt;/p&gt;
&lt;p&gt;I want the UXDesktop to bind to my ObservableCollection and create UXWindow objects.  I was under the impression that the ItemsSource property on the UXDesktop was there so you could bind any collection to it and the desktop would generate window objects for you.  &lt;/p&gt;</description></item><item><title>Using UXDesktop.ItemsSource???</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Using-UXDesktopItemsSource/</link><pubDate>Thu, 25 Nov 2010 04:22:21 GMT</pubDate><dc:creator>MarTin</dc:creator><category>UXDesktop</category><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;It depends on your scenario whether you need to use UXDesktop or not.&lt;/p&gt;
&lt;p&gt;What is your difficulty to use ItemSource in UXDesktop? And, how do you want to apply them? I might need a more details scenario to have a better idea for this issue.&lt;/p&gt;
&lt;p&gt;If your scenario works without UXDesktop, then it is not necessary to use/integrate with UXDesktop.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;</description></item><item><title>Using UXDesktop.ItemsSource???</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Using-UXDesktopItemsSource/</link><pubDate>Wed, 24 Nov 2010 15:43:18 GMT</pubDate><dc:creator>chrisaswain</dc:creator><category>UXDesktop</category><description>&lt;p&gt;I suppose I should ask if I should even be using the UXDesktop control since I'm not integrating with the UXDesktopDock in the traditional manner?  &lt;/p&gt;
&lt;p&gt;I could just create my own ItemsControl and ItemContainerGenerator that will wrap my items in UXWindow controls.  Then I could handle the window arrangement myself.  &lt;/p&gt;
&lt;p&gt;Is there really any benefit in using the UXDesktop control for my scenario?&lt;/p&gt;</description></item><item><title>Using UXDesktop.ItemsSource???</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Using-UXDesktopItemsSource/</link><pubDate>Wed, 24 Nov 2010 13:11:07 GMT</pubDate><dc:creator>chrisaswain</dc:creator><category>UXDesktop</category><description>&lt;p&gt;More info about what I'm doing...&lt;/p&gt;
&lt;p&gt;I have a single ViewModel for both my desktop and taskbar.  It has an ObservableCollection that keeps track of my app instances.  An "Instance" being a window containing some functionality and a corresponding taskbar instance stack item.  &lt;/p&gt;
&lt;p&gt;I need to bind to this collection in both the desktop and the taskbar.  Right now, I have the binding working great in the taskbar (UXDesktopDock).  It is successfully creating application "group" buttons and application "instance" stack items when an app is opened (functionality like the Windows 7 taskbar).  &lt;/p&gt;
&lt;p&gt;I'd like to have my desktop bind to the same collection and add/remove windows as the collection changes.  &lt;/p&gt;</description></item><item><title>Using UXDesktop.ItemsSource???</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Using-UXDesktopItemsSource/</link><pubDate>Wed, 24 Nov 2010 13:01:50 GMT</pubDate><dc:creator>chrisaswain</dc:creator><category>UXDesktop</category><description>&lt;p&gt;Is there an example of how to use the ItemsSource property of the UXDesktop control?&lt;/p&gt;
&lt;p&gt;I tried using it in a similar way to how I'm using the ItemsSource property on the UXDesktopDock control, but it doesn't seem to work.  An example would be great!&lt;/p&gt;
&lt;p&gt;I've tried binding the ItemsSource property to the underlying collection in my ViewModel and setting the ItemContainerStyleTemplate to a template the does the PropertyBinding and sets the IsActive property to True.  But still no windows show up.  &lt;/p&gt;</description></item></channel></rss>