Hello,
I have followed your WPF example:
public class PlayerTypeConverter : TypeConverter
{
public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
{
return true;
}
public override bool GetStandardValuesExclusive(ITypeDescriptorContext context)
{
return true;
}
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
{
return new StandardValuesCollection(new string[] { "Mark Wright", "Ian Rush", "John Barnes",
"Paul Ince", "Jamie Redknapp", "Sami Hyypia", "Steven Gerrard ", "Jordan Henderson" });
}
}
and attached the converter to my property:
/// <
summary
>
/// Sets the algorithm that is available for the mode.
/// </
summary
>
[Category("Reconstruction")]
// [Editor(typeof(AlgorithmEditor), typeof(UITypeEditor))]
[Telerik.Windows.Controls.Data.PropertyGrid.Editor(typeof(ComboBox))]
[TypeConverter(typeof(AlgorithmConverter))]
[Description("Sets the algorithm that is available for the mode.")]
public string Algorithm
{
get => GetProperty<
string
>();
set => SetProperty(value);
}
Unfortunately when setting the property to the PropertyGrid the combobox does not show up.
The type converter is not even used. Originally I had the PropertyInspector which is still active until I have transitioned to the RadPropertyGrid, here the TypeConverter is used without any problems.
What could be the problem?
Thanks
Martin