I can't find any documentation on how to size the dropdown portion of the combobox. I have two columns and 4 or 5 rows. I want all columns and rows to be visible when the use expands their selections. Right now it's only as wide as the combo and it's showing less than one row.
Thank you.
Mike
Hi Mike,
Let me know if you have any further questions on this matter.
Sounds good. Let me know how it goes.
Rob,
Thanks for your help on these final details. I'll look at this later today and get back with you.
You have been very helpful to me.
The row that has a height of 21.96 is the header row. I was under the impression from my own tests though that the header panel was always first in the MultiColumnComboItemsPanel container but in your case you're saying that isn't always the case.
To remedy this you will need to modify the code a bit to perform a search for the header row and then search for the first non-header row. You can then multiply the height of the non-header row by the number of rows and add the header row height to the result. Something like this:
ComboCellsPanel headerPanel = null; ComboCellsPanel actualRowPanel = null; foreach (ComboCellsPanel panel in itemsPanel.Children) { if (panel.Row is ComboHeaderRow) headerPanel = panel; else if (actualRowPanel == null) actualRowPanel = panel; } double totalHeight = actualRowPanel.ActualHeight * numRows + headerPanel.ActualHeight;
I saw how you changed your code, and what you did was very interesting. thank you for your help.
I have an additional question here that is vexing me. In the line where you are getting the actual row panel's actual height, sometimes the value is 66.0 pixels which is correct. However sometimes the value is 21.96 which is not correct and I can't understand why that would be since every row has a picture in it and every row should be 66.0. Do you have any thoughts about it? I have 8 combo boxes for different phases of diagnosis and they all come from the same object list. For now I am hard coding this value, but I don't understand why sometimes the first row is 66.0 and then at other times it is 21.96.
Thanks,