Custom ComboBox Property Editor

Grids for WPF Forum

Posted 9 years ago by Matt Swanton
Version: 10.1.0521
Avatar
Hi,

I'm trying to create a custom property editor for displaying a drop down list of people objects.

I have looked at the Rect property editor on the sample project which I am using as the basis for my custom property editor. However, everytime I run my project I get a ResourceReferenceKeyNotFoundException exception.

In order to narrow down the problem, I have copied and pasted the exact classes used by the sample (PropertyEditors.cs, PropertyEditors.xaml, and RectPropertyEditor.cs) into my project, but when the project is run I still get the ResourceReferenceKeyNotFoundException;

'TargetType=ActiproSoftware.Windows.ProductSamples.EditorsSamples.Demo.PropertyGridIntegrationCustom.PropertyEditors ID=RectValueTemplate' resource not found.

I'm sure I'm missing something simple on my project, but I can't for the life of me figure out what it is?

Comments (2)

Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Matt,

Sounds like you are not merging the PropertyEditors.xaml into your Resources. That QuickStart merges PropertyEditors.xaml into the MainControl.Resources, but you may want to merge into your App.Resources. Something like:
<UserControl.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="PropertyEditors.xaml" />
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
</UserControl.Resources>
Or you did not alter the ComponentResourceKey used as a key for the DataTemplate to a type in your project.

[Modified at 05/12/2010 01:50 PM]


Actipro Software Support

Posted 9 years ago by Matt Swanton
Avatar
How stupid of me - yes of course that was it - thanks!
The latest build of this product (v2019.1 build 0681) was released 9 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.