private static void AddNameAndBaseTypeProperties(List <InstanceSavePropertyDescriptor> pdc, ElementSave elementSave, InstanceSave instance, bool isReadOnly) { var nameProperty = mHelper.AddProperty( pdc, "Name", typeof(string), TypeDescriptor.GetConverter(typeof(string)), new Attribute[] { new CategoryAttribute("\tObject") // \t isn't rendered, but it is sorted on. Hack to get this property to appear first }); nameProperty.IsReadOnly = isReadOnly; var baseTypeConverter = new AvailableBaseTypeConverter(elementSave, instance); // We may want to support Screens inheriting from other Screens in the future, but for now we won't allow it var baseTypeProperty = mHelper.AddProperty(pdc, "Base Type", typeof(string), baseTypeConverter, new Attribute[] { new CategoryAttribute("\tObject") // \t isn't rendered, but it is sorted on. Hack to get this property to appear first }); baseTypeProperty.IsReadOnly = isReadOnly; }
private static void AddNameAndBaseTypeProperties(List <InstanceSavePropertyDescriptor> pdc, ElementSave elementSave, InstanceSave instance, bool isReadOnly) { var nameProperty = mHelper.AddProperty( pdc, "Name", typeof(string), TypeDescriptor.GetConverter(typeof(string))); nameProperty.IsReadOnly = isReadOnly; var baseTypeConverter = new AvailableBaseTypeConverter(elementSave, instance); // We may want to support Screens inheriting from other Screens in the future, but for now we won't allow it var baseTypeProperty = mHelper.AddProperty(pdc, "Base Type", typeof(string), baseTypeConverter); baseTypeProperty.IsReadOnly = isReadOnly; }