Ejemplo n.º 1
0
        public ActorPropertyEditor()
        {
            InitializeComponent();
            var a = new Actor();
            a.RenderableAsset = new Rend();
            dynamic model = new PropertyEditorModel(a);
            model.lol = "lol";
            //var model = new CustomObjectType
            //{
            //    Name = "Foo",
            //    Properties =
            //    {
            //        new CustomProperty { Name = "Bar", Type = typeof(int), Desc = "I'm a bar"},
            //        new CustomProperty { Name = "When", Type = typeof(DateTime), Desc = "When it happened"},
            //    }
            //};

            propertyGrid1.SelectedObject = model;
            _t = new T() { Title = "lol"};
            //propertyGrid1.SelectedObject = _t;
        }
Ejemplo n.º 2
0
 public DynamicPropertyDescriptor(PropertyEditorModel obj,
     string propertyName, Type propertyType, Attribute[] propertyAttributes)
     : base(propertyName, propertyAttributes)
 {
     this.obj = obj;
     this.propertyType = propertyType;
 }