"In the XamMultiColumnComboEditor, I want to stop the dropdown from resizing past the last column in the grid. I also want the dropdown to initially display the full width of the grid."
The XamMultiColumnComboEditor uses a Popup control for the drop down so you need to use this to find the column CellControls which will give you the widths you need. The only problem is that using the combo editor's DropDownOpened event won't give you the widths on the first try because the Columns haven't been created yet. This is where you need to handle the Popup's Opened event. This event occurs after the columns are created so we'll use it to traverse down the VisualTree of the popup and look for the first row in the grid. We then add up the widths of all the cells in that row and set the popup's width. At the same time we should set the Popup's MaxWidth to the same value so that resizing the dropdown won't let you go past the last column.
I've attached a sample that demonstrates the above method.
Hi Joe,
You can reopen the panes after they have been closed as long as you know which pane you want. The XamDockManager has a FindPane method that you can use to find the pane, even when it is closed. It searches the ClosedPanes collection along with the other pane collections. You can then set the returned pane's Visibility property to Visibile and the pane will re-open. This should move it ouf of the closed pane collection into the open pane collection.
Rob,
Thnks for the update and I will get this implmented ASAP. However, while I was waiting for your response I was working on another part of our application and it involves the XamDockManager. I am taking advantage of the DockManagers DocumentContentHost for displaying multiple tabbed documents. However I found that once I close all of the tabs contained in my TabGroupPane from the pane collection of the DocumentContentHost, that I cannot restore them. They end up in the ClosedPanes collection of the XamDockManager. So my next question would be can I move these panes from the ClosedPanes collection of XamDockManager to the Panes collection of the DocumentcontentHost and have them get displayed?
I know this is a new topic, but I wanted to continue moving forward while waiting. Thank for you help,
Joe
Well after a lot of playing around with it, the fact that controls aren't in the visual tree at the time they are loaded was a real set back, I think I've found a solution for this although it's a very hacky one. I don't know if there's a better way to do this but I ended up using the LayoutUpdated event as a psuedo-Loaded event since I know that when LayoutUpdated is hit the controls are in the visual tree. A couple of other changes were made as well with calculating the height of a row since initially the height the row would return was smaller than it actually ends up as. This was again because not all the cells were loaded.
I've attached an updated sample for Silverlight 5 using the 12.1 Infragistics assemblies. Let me know if you have any questions on this.
Good Morning Rob,
Thanks for the update, it is encouraging to hear that things operate adifferently in Sliverlight, I was starting to think I was going nuts. Like I said once everything gets rendered (I think) I am able set the width to what I want and it stays. I was going to try and navigate to each item in the list before trying to size it to see if that made a difference. I am curious as to what you come up with.
It looks like the timing between when controls trigger the Loaded event and when they are added to the visual tree is a bit different than in WPF. In my WPF sample by the time the Loaded event is called for the XamMultiColumnComboEditor, it's already in the visual tree. With Silverlight when the Loaded event fires, the control is still not in the visual tree so using this exact code for the Silverlight version won't work. I'll need to figure out a different way to handle this and make the appropriate modifications. Give me a couple of days and I should have something useable.