Hi
In my project I am using a ComboBox with my custom objects like Employees and using DisplayMemberPath="Description". This all works perfectly as expected.
Because this application is targeted to be used with a touchscreen, I had to style the scrollbar and make it wider which meant that I had to create a new template for the ScrolViewer. This also turned out quite nicely.
The problem comes in when I had to create a new ControlTemplate for the ComboBox which I need so that I can add the ScrollViewerControlTemplate to the ScrollViewer of the ComboBox. I used Blend to generate the ControlTemplate for me and then Bound the ScrollViewerControlTemplate to the ScrollViewer within the ComboBox ControlTemplate.
Excelent, only problem is that the ComboBox displays the correct text within the dropdown part of the control but the ToggleButton part of the control displays the Object Type which is [NameSpace].Employee.
I tried changing the ContentPresenter but without to much success.
<ContentPresenter
Content="{TemplateBinding SelectionBoxItem}"
ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}"
Margin="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
Any help would be greatly appreciated.