public object Create(PropertyInfo propertyInfo)
{
TotalStepComboBox = new ComboBox();
{
if (propertyInfo.Name == "TotalSteps")
{
TotalStepComboBox.Items.Add("0");
TotalStepComboBox.Items.Add("1");
TotalStepComboBox.SelectedIndex = 0;
}
if (propertyInfo.Name == "Steps")
{
TotalStepComboBox.Items.Add("0");
TotalStepComboBox.Items.Add("1");
TotalStepComboBox.Items.Add("2");
TotalStepComboBox.SelectedIndex = 0;
}
}
TotalStepComboBox.SelectionChanged += ComboBox_SelectionChanged;
return TotalStepComboBox;
}
private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
}
I have this in my code, but since both are using TotalStepComboBox, I cannot do the function i mentioned above, but if I change the type of steps, and create another CustomEditor, but if using that way, I cannot get the name of steps.