dotnet windows forms designtime:
[quoted text, click to view] > 1. The Designer will only serialize a new Model as a constructor call,
> like this:
>
> this.myListView.Model = new Model("Active", false, false,
> SortOrder.None, new string[0]);
this is because you have specified on your typeconverter how to serialize
your Model object using an InstanceDescriptor
[quoted text, click to view] > This means that I have to have a Model constructor just for the
> Designer's use. I would really have preferred syntax like this:
>
> this.myListView.Model = new Model();
> this.myListView.Model.ActiveInactiveProperty = "Active";
> this.myListView.Model.ReadOnly = false;
> this.myListView.Model.MultiSelect = false;
> this.myListView.Model.SortMembers = new string[0];
> this.myListView.Model.Sorting = SortOrder.None;
If you want to have this, just have the Model object instantiated as part of
your custom ListView and add a DesignerSerializationVisibility attribute to
it, set it to Content.
[quoted text, click to view] > 2. I can create a stand-alone Model and set its fields, but the string
> next to Model in the PropertyGrid isn't editable, and the PropertyGrid
> doesn't give me a drop-down from which to pick the Model, even though
> there are ListViewModel component objects defined in the Form, and the
> Designer knows about them. I can tweak the code and the Designer
> understands what's going on, but I can't get it to offer me a choice.
can you post snippet of your listviewmodel class...
--
Joey Calisay
http://spaces.msn.com/members/joeycalisay/