Apr 9

admin

WPF ListView

wpf

The ListView is a control that allows you present data to the user using different layouts. The most common one is showing a table with columns with the information. The ListView inherits from ListBox and in WPF provides a number of features that give it a great deal of extensibility being one of them to present information in different formats. Information or data in the ListView is contained within objects. The most basic one is the ListViewItem object that simply represents and item with a single column ListView.

ListView example

Here’s the code of a ListView sample that contains three basic items in the ListViewItem object:


            
            
        

As you can see, we’re able to create it using simple XAML markup giving us the advantage to shape the information as we wanted using WPF functionality. In the code below we have the same list but with the items in bold and italics:


            
            
            
        

 

No Comments

Add Comment