views:

433

answers:

2

I'm afraid my Google-Foo is failing me again today. I'm trying to find a good tutorial on creating custom ItemsControls in Silverlight (though I imgaine a WPF version might work as well).

I'm trying to create a custom ItemsControl that will be something of a virtualized ListBox. What I'm trying to accomplish isn't really similar enough to the current ListBox control to justify trying to modify the existing control, so I figure a custom one is in order here. I have a vague concept of how to accomplish it, but there are definite holes in my understanding.

Thanks in advance

+2  A: 

Are you sure you want to create your own custom control from scratch? Altering the templates of an ItemsControl or a ListBox can take you a long way. Are you already familiar with the states and parts model in Silverlight? I know Jesse Liberty has a couple of really good tutorials on how to build user controls and also how to create templates, buthe's moving his blog to wordpress and some of the content seems to be offline atm. Here's where to start.

Cheers,

Phil

Phil
A: 

See http://www.ladimolnar.com/Home/ViewArticle.aspx?ArticleName=HowToCustomizeAnItemsControl. The article has a link to a sample app and sources. The sample app has a custom ItemsControl that also implements virtualization.

Ladi