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

ComboBox in PropertyGrid

Developer
Oct 21, 2014 at 12:46 PM
hi..
is it possible to add combo box to property window ?
like
Gender : Male/Female (in combo box )
Developer
Oct 21, 2014 at 12:53 PM
The PropertyGrid will use a ComboBoxEditor for properties of type enum.
public enum Gender
    {
      Male,
      Female
    }

 _propertyGrid.SelectedObject = new MySubData()
      {
          FirstName = "Tom",
         MyGender = Gender.Male
      };

public class MySubData
  {
    public WpfApplication118.MainWindow.Gender MyGender
    {
      get;
      set;
    }
    public string FirstName
    {
      get;
      set;
    }
  }