I'm experimenting the attribute Telerik.Windows.Controls.Data.PropertyGrid.Editor, and in your example, you show the usage of a RadColorEditor as a cusom editor.
I'm doing the same thing with a control (which currently only shows the color), but the template is not being applied. I have put the style with the template in the Themes\Generic.xaml and still nothing.
If I put an instance of that control on the XAML directory, then I see it.
Here is my View Model:
This is the XAML:
This is the code-behind of that window:
The Editor, MyEditor is located on a different DLL:
MyEditor.cs... the break point of the OnApplyTemplate is never reached:
// This is the code of the converter
public class ColorToBrushConverter : IValueConverter
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
if (value is Color)
return new SolidColorBrush((Color)value);
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
throw new NotImplementedException();
Generic.xaml located under the Themes directory
I can do the following code once, when the LayoutUpdated is called for the first time, but it looks dirty, and I'm sure that there are better ways:
Style ts = Application.Current.FindResource(typeof(MyEditor)) as Style;
this.Style = ts;
What am I doing wrong?
What am I missing, and should I do in order to see the editor in the property grid.