windows 8 - Choosing between XAML's ListView and GridView in WinRT -
the gridview , listview in xaml seem same control.
how developer choose between two?
the gridview control typically scrolls horizontally. also, see native spacing between items greater in listview. spacing there because of intent how controls used in windows store apps. (read on)
- like listview inherits itemscontrol.
- like listview groups using groupstyle.
- like listview supports 2 new virtualization strategies.
- like listview supports different selection modes.
sample syntax:
<gridview> <x:string>item 1</x:string> <x:string>item 2</x:string> </gridview> the listview control typically scrolls vertically.
sample syntax:
<listview> <x:string>item 1</x:string> <x:string>item 2</x:string> </listview> this answer
the general differentiation between 2 occurance in views. gridview tends appear in fullview, fillview, , portait. listview, because of vertical orientation, tends appear in snapview. either control can appear in either view, local diversion of 2 controls.

msdn: listview , gridview controls both used display collections of data in app. have similar functionality, display data differently. both derived itemscontrol class. when talk itemscontrol, info applies both listview , gridview controls.
the listview displays data stacked vertically. it's used show ordered list of items, such list of emails or search results. it's useful in master-detail scenarios, list items contain small amount of info , details of selected item shown separately.
the gridview displays data stacked horizontally. it's used when need show rich visualization of each item takes more space, such photo gallery.*
Comments
Post a Comment