Attempt at fixing links to other posts within blog

This commit is contained in:
Beatriz Stollnitz 2019-08-05 22:22:45 -07:00
Родитель c9237d5022
Коммит 799393c569
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -57,7 +57,7 @@ ListView has a View property of type ViewBase. Currently, the only class that de
You can use one of two GridViewColumn properties to control the way each planet data item is displayed: CellTemplate or DisplayMemberBinding. CellTemplate takes a DataTemplate, allowing maximum flexibility in how we visualize the data. In this particular sample, I used it for the "Name" column because I wanted it to be bold and for the "Image" column because I wanted to display the actual image (and not the name of the image, which is what is stored in the data source). DisplayMemberBinding (notice this was renamed from DisplayMemberPath in Jan CTP) should be used when we want to display the data we are binding to directly in a TextBlock.
This is all it takes to display data in a ListView - it's really simple. This is great, but we want to make the data more readable by alternating the background color from one row to the next. We need the help of a StyleSelector to accomplish this. I talked in my <a href="http://www.zagstudio.com/blog/361">Jan 14</a> post about using a DataTemplateSelector to display some data items differently from others, based on custom logic. A StyleSelector does the same thing, but instead allows us to pick a different Style for each ListViewItem, which is what we want in this scenario. In case you are not familiar with the very important difference between styles and templates: styles allow you to set properties on any FrameworkElement; templates completely override the look of a particular Control (ControlTemplate) or its data portion (DataTemplate).
This is all it takes to display data in a ListView - it's really simple. This is great, but we want to make the data more readable by alternating the background color from one row to the next. We need the help of a StyleSelector to accomplish this. I talked in my <a href="..\13-TemplatingItems">Jan 14</a> post about using a DataTemplateSelector to display some data items differently from others, based on custom logic. A StyleSelector does the same thing, but instead allows us to pick a different Style for each ListViewItem, which is what we want in this scenario. In case you are not familiar with the very important difference between styles and templates: styles allow you to set properties on any FrameworkElement; templates completely override the look of a particular Control (ControlTemplate) or its data portion (DataTemplate).
<Window.Resources>
(...)