I have a WPF app - an XBAP - with a ComboBox on the main page. When I select an item in the ComboBox, an event handler rebuilds a collection which is the data source for a listbox. Seems like pretty simple stuff, all stuff I've done in WPF before.
This is what my dropdown looks like after selecting an item from the list:
Where on earth did the red border come from? I am building the form from scratch, there is no styling or anything on it right now. The text "red" is not even mentioned anywhere in the project. It will not go away once it appears, and it shows up over anything that I place on top of the control.
Here's the markup:
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource ResourceKey=DeviceInfoNameConverter}}"></TextBlock>
</DataTemplate>
</ComboBox.ItemTemplate>
Some more details:
- This is an XBAP application running in IE8
- Other dropdown controls on the same page are not doing this
- The border disappears when I attempt to examine the control tree with Snoop
- The converter is not the source of the problem, I've tried binding directly to a property on the underlying object and the box still appears.
My only guess so far from searching is that there is some sort of default error template that is being applied to the control. I'm working with WIA, and there are several COM exceptions that appear in the VS output window, apparently related to the databinding for the ListView. The data source to the control is a WIA.DeviceInfo object, the converter is just getting the name property for the dropdown text.