iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Any suggestions?
Any ideas?
I came up with a better answer, I think.
I'm attaching to the ItemBound event of the UXDesktopDock control.
In the event handler, I'm attaching to the StackOpened event of the UXDesktopDockButton item that was just bound.
In the StackOpened event handler, I'm looping through the Items collection and using the bound data to build a window name string to be used by the UXDesktop.FindWindow(windowName) method to get the associated window.
Then I call the GetThumbnail(false) method to get the thumbnail imagesource and assign it to a property of my bound data item called Thumbnail.
End result - When the stack of instance items is opened from my UXDesktopDockButton, I find the associated window for each UXStackItem, get the thumbnail, and set the Thumbnail property for the data item in the DataContext of the UXStackItem.
This ensures that I get the latest thumbnail to show every time I display the task bar instance items.
Thanks. I came up with the solution by monitoring the LayoutUpdated event of the window and doing some checking to see if a thumbnail needs to be generated. If so, then I call the GetThumbnail method and assign the imagesource to my taskbar sub-item. I'm sure I'll need to do more optimization, but it's working.
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.
How can I control the type of window generated by the UXDesktop control when binding with the ItemsSource property?
New problem...
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.
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.
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.
Another interesting question:
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?
Example Datasource structure:
[AppInstanceGroups collection]
-<AppInstanceGroup>
-Name property
-Icon property
-[AppInstances collection]
-<AppInstance> --> Window needed for each of these.
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.
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.
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?
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.
Is there really any benefit in using the UXDesktop control for my scenario?
More info about what I'm doing...
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.
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).
I'd like to have my desktop bind to the same collection and add/remove windows as the collection changes.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname