I can style the items in the combobox just fine. Is there a way to style the textblock selected item without overriding the default style? If I need to override the default ControlTemplate, can you point me in the correct direction? I am using the Office2013 theme.
Thanks!
Jon
Hello Jon,
Thank you for your post.
I have been investigating into this, and I would recommend that you modify the default control template of the ComboEditorTool to achieve this requirement. As you are currently using the Office2013 theme, you will want to modify the Office2013 control template. This template can be found in the RibbonOffice2013.xaml file that commonly exists at the following directory: C:\Program Files (x86)\Infragistics\<your version here>\WPF\DefaultStyles\Ribbon.
Once you implement the default style for ComboEditorTool and all of the dependencies on that default style, I would recommend that you take a look at the Grid element within the default template named "TextBlockGrid." I would recommend adding an additional ColumnDefinition to this grid to contain the Image that you are looking to place inside and modify the ToggleButton and TextBlock children that were the pre-existing children of that grid to be in their correct Grid.Column as well.
I have attached a sample project to demonstrate the above. I hope this helps you.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate DeveloperInfragistics Inc.www.infragistics.com/support
Thank you for the quick reply!
I am trying to get the image to appear in the dropdown as well as in the TextBox and I'm struggling here.
Can you modify the sample to demonstrate this? Also, the image will need to be bound to the comboboxitem to show a different image based on the value in the combobox.
Thanks you!
Here is a screenshot that shows the problem. If I have an item selected in the box, when I open the dropdown there is some overlap. This seems to happen even worse when I have set the ItemTemplate as well. I look forward to hearing back from you.
Thanks for your help.
From your most recent screenshot, it appears that there may be an issue with the Grid.Column setting of the TextBlock and the Image in the control template for the ComboEditorTool, but I can't be entirely sure. There isn't any overlap of the two elements on my end, though. Would it be possible for you to include the control template that you are currently using with your ComboEditorTool?
Regarding your previous post, I have modified the sample project I had originally sent you to include an ItemTemplate with an Image in it, as well as a binding in the ComboEditorTool's control template so that the Image in there can be bound to the Image of the SelectedItem of the ComboEditorTool. I have attached the sample to this post.
I hope this helps. Please let me know if you have any other questions or concerns on this matter.