Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

WPF: Derive from the ListView or expose Dependency Properties in the base List view control ?

$
0
0

Hi,

I have a custom ListView control with 5 columns. Now, I want exactly the same ListView elsewhere with 2 columns (subset of above) and a different datasource (of course).

Everything else remains the same.

Is it a good practice to add Dependency Properties in the Main ListView for hiding columns and then set those properties from the target usage? If not, then how do I make a derived ListView control from my custom ListView such that I can re-use everything including the XAML and define/override the columns (<GridViewColumn/>) in the derived control's XAML?







Viewing all articles
Browse latest Browse all 18858

Trending Articles