This project has moved. For the latest updates, please go here.

PropertyGrid ComboBox and Office themes

Mar 8, 2013 at 9:02 AM
Is there a problem with the ComboBoxItem template/style, or is it me? I find that, with a custom ItemsSource and one of the Office 2007 themes (BureauBlue), that the items in the combo don't get rendered and just show as "Xceed.Wpf.Toolkit.PropertyGrid.Attributes.Item". Without this or any theme, all is fine - you see the strings in the drop-down as expected.

My workaround was to put a key on the ComboBoxItem style in the theme, but this will affect all combo boxes in the application, of course, and I lose the theme style in the Propertygrid combos. As it happens, I don't have many other combos anyway, and those that I have are heavily customised already.

But, is there a better solution? I would prefer to alter/define a style for the Xceed...Attributes.Item, but all attempts have failed so far.


Mar 8, 2013 at 4:35 PM
The behavior on my side was working properly by modifying the "CustomItemsSource.xaml" file from the "Providing an ItemsSource" sample:
<sample:DemoView x:Class="Samples.Modules.PropertyGrid.Views.CustomItemsSource"
                 Title="Custom ItemsSource"
                 Description="Sometimes it is desirable to want to provide a collection of values represented by a ComboBox for a given property.  The PropertyGrid supports this scenario by create a class that implements IItemsSource and decorating your property with the ItemsSourceAttribute.">
   <StackPanel Margin="10">
               <xctt:Office2007BlueResourceDictionary StyleUsageMode="Implicit" />
               <xcpt:Office2007BlueResourceDictionary StyleUsageMode="Implicit"/>
      <TextBlock Text="Providing a Custom ItemsSource:" Style="{StaticResource Header}" />
      <TextBlock Text="This example uses a collection of Doubles to represent the available options for the WritingFontSize property." TextWrapping="Wrap" />
      <xctk:PropertyGrid x:Name="_propertyGrid" Width="450" Margin="10" />
Since you seems to be a "Plus" edition subscriber (or trial) I would recommend to contact our support team with a sample app that reproduce your problem so we can help you out.
Mar 11, 2013 at 7:33 AM
Thanks for your prompt reply. Unfortunately I am using the freeware 'community' edition, and so don't seem to have access to the required DLL in order to use the resource dictionary in that way. The workaround will have to suffice!