Hi
I am trying to use xamComboEditor. In my main project the items have a white foreground and background colour, unless I mouse over the item - in which case I can see the text. Otherwise it just looks blank.
In a stand alone project I can get it too work?
I have tried to apply themes and it still doesnt work?
I cant find anything that would clash with it.
Please help
Chris
code behind binds to dataset then....
this.itemsProvider1.DisplayMemberPath = "Desc";this.itemsProvider1.ValuePath = "ID";
So just to be clear, the text within the items in the dropdown are not visible until you mouse over them. If so then it sounds like the Foreground property is the same as the Background property. The xamComboEditor contains a ComboBox in its EditTemplate and it is that combobox that provides the dropdown. The ComboBox creates a ComboBoxItem for each item in the list. We do not provide a custom style for that class so maybe you have a Style for that class in the ancestor chain that is providing the Foreground/Background that is being used. Without a sample I cannot say what is specifically leading to the problem so you would likely need to run something like Snoop and inspect the tree to see where the values for the Foreground/Background are coming from.
Thanks Andrew. That is what I meant foreground and background same colour for items. To make matters worse the only WPF program that snoop doesnt work on is the one I need it too. Its built upon a large codeplex project.
Is there any way that I can style the ComboBoxItem so that it doesnt inherit? Do you a small example? Im pretty desperate to get over this before saturday so i can get on with the project ;$
Whether you can do this at the page/app/window resources level will depend on whether the elements already have a local style. If they do (e.g. because you set the Theme property) or because there is another local style "closer" to the element then you may not be able to. If that isn't the case then you could possibly do something like:
Thanks for your help on that one. have struggled to find the clash but can work it on the window resources.
Do you know how i can reset the combo box to display without a selectedItem? I have a master detail layout, I wish to change the combo back to default empty and then re-bind the data, so if no selected value for new record the combo doesnt maintain its previous state?
Thanks in advance
Oh yeahI have tried this
this.cboSomething.SelectedIndex = -1;
Sorry to be annoying more info though to save time. The selected index changes to -1, however the display text does not update to display blank? I guess thats the problem...
Thanks
I worked out how to clear the text, so it looks to the user there is nothing selected. Cheers