I would like to have a drop down selection for a custom property on a User Control in WPF. Everything works fine when I use an Enum as the property:
/// <summary>
/// Interaction logic for Sample.xaml
/// </summary>
public partial class Sample : System.Windows.Controls.UserControl
{
public Sample()
{
InitializeComponent();
}
[DefaultValue(Letters.A)]
[Browsable(true)]
[Category("ControlDisplay")]
[Description("Letter")]
public Letters Letter { get; set; }
public enum Letters
{
A,
B,
C,
D
}
}
Awesome :).
But I want to achieve this for a custom class or even a string. How Should I do it?
Thanks in advance.