Why are ListViewItem's and ColumnHeaders so limited

I just got done creating a BindableListView control in the full framework with a full designer interface one would expect in a 2.0 bindable control. I wanted to port it to the compact framework (where i need it the most) and when doing that I find that
1. CF yells at all my deisgn time only attributes.
2. ListViewItemCollection and ColumnHeaderCollection both do not have constructors and thus I cannot inherit them to give VS the ability to add them via the designer.

I can still use my BindableListViewItem and BindableColumnHeader classes but all programmatically and not visually like I wanted.

I guess I'm just wondering why those two classes were given no constructors and thus made unable to be inherited? The metadata lists a bunch of virtual methods for both of them but without a constructor making them virtual is basically pointless.
What I find even more puzzling is that the SelectedListViewItemCollection has a constructor and holds a list of ListViewItems just like the ListViewItemCollection while just implementing the bare minimum for the same exact interfaces.

While I'm on the subject why in the conversion from 1.0 to 2.0 the DataGrid and ListView controls were not enhanced at all?

[1229 byte] By [Tagnarth] at [2007-12-25]
# 1
Tagnarth - sorry for the slow response. I've contacted someone on my team to address your question.
RobUnoki at 2007-8-31 > top of Msdn Tech,Smart Device Development,.NET Compact Framework...
# 2
Thanks.
I also noticed that these collections implement the ICollection interface but do not all of it's methods, namely IsSynchronized and SyncRoot.

Jeff Klawiter
Sierra Bravo Corp
jklawite@sierra-bravo.com

Tagnarth at 2007-8-31 > top of Msdn Tech,Smart Device Development,.NET Compact Framework...
# 3

NETCF is not used at design time, so design time attributes are cut to save space.

NETCF V1/VS 2003 needs special design time assembly compiled against desktop:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/html/DTPick_WD.asp

VS 2005/NETCF V2 has different designer model with attributes located in a special file:

http://dotnet.sys-con.com/read/113332.htm

Apparently there are some inconsistencies in factorization. Please go ahead and file a bug report on product feedback center:

http://connect.microsoft.com/Main/content/content.aspx?ContentID=2220

DataGrid was extended in NETCF V2 SP1. Please see this:

http://blogs.msdn.com/netcfteam/archive/2006/04/25/583542.aspx

IlyaTumanov at 2007-8-31 > top of Msdn Tech,Smart Device Development,.NET Compact Framework...
# 4

Yes I know about the designer models. I have tried creating my own design time components and set things up via the class designer. I did have some problems with that when using CF compared to framework.

I created my own collection classes for my inherited versions of ColumnHeader and ListViewItem. I set my new collection to the property DataColumns. Then when I'd add a BindableColumnHeader item via the CollectionsDesigner it would look like it worked. But going into the form.designer.cs (or compiling) proved otherwise.

BindableColumnHeader bindableColumnHeader1 = ((BindableColumnHeader) new ColumnHeader());

Which of course is not right at all. When I copied all this code and ran it in the full framework it worked properly. I guess this is what you mean by the factorization.

I even tried having my BindableColumnHeaderCollection class use the ListView.Columns collection as it's internal storage so adding my new column headers. I originally started out by hiding the ListView.Columns with my own collection. I tried everything I can think of and just when I though I had it the designer declaration of the BindableColumnHeader would bite me in the ***

I also ran into problems when creating a collection class that mimicked the interfaces the ColumnHeaderCollection implemented. VS 2005 wanted me to implement the full framework interfaces and not the CF ones. It would force me to implement things like AddRange. I found that peculiar as well.

I'll try to post some of the code later. For now I've resigned to having the collection use the main collection as it's storage and to create the columns explicitly in code. It's working rather well.

I did all this developing the BindableListView in a Compact Framework Library project and tested with a CF Application targetted at Windows Mobile 5 Pocket PC.

Tagnarth at 2007-8-31 > top of Msdn Tech,Smart Device Development,.NET Compact Framework...
# 5

By factorization I meant "cutting stuff out compared to desktop". In this case constructor was cut for some reason preventing your scenario.

IlyaTumanov at 2007-8-31 > top of Msdn Tech,Smart Device Development,.NET Compact Framework...