added SSCLI 1.0
[windows-sources.git] / sdk / samples / WPFSamples / AlternationIndexSample / readme.htm
blobde0b23928ac6fa0069bcbaa6c8e81df0d6460d15
1 <html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8" /><META NAME="save" CONTENT="history" /><title xmlns:mshelp="http://msdn.microsoft.com/mshelp" xmlns:msxsl="urn:schemas-microsoft-com:xslt">Alternating the Appearance of Items</title><META NAME="Description" CONTENT="&#xD;&#xA; This example demonstrates how to alternate the appearance of items in a T:System.Windows.Controls.ListBox and a T:System.Windows.Controls.Treeview by using the T:System.Windows.Controls.AlternationConverter and the P:System.Wind ..."></META><META NAME="MS.LOCALE" CONTENT="en-us" /><style>
2 body
3 {font-family:Verdana;font-size:medium;}
4 div#mainSection, div#header
5 {font-size:70%;width: 100%;}
6 div#mainBody
7 {font-size:90%;}
8 div#mainSection div table
9 {font-size: 100%;text-align: left;}
10 span#nsrTitle
11 {color:#003399;font-size:90%;font-weight:600;}
12 div#header
13 {background-color:#D4DFFF;}
14 .heading
15 {font-size:120%;color:#003399;}
16 .subHeading
17 {font-size:100%;margin-bottom:4;}
19 {margin-top:-2;margin-bottom:3;}
21 {margin-top:10;margin-bottom:5;}
22 div.tableSection p
23 {margin-top:1;margin-bottom:4;}
24 div#mainSection table th
25 {background-color:#EFEFF7;color:#000066;text-align:left;}
26 div#mainSection table td
27 {background-color:#F7F7FF;}
28 div#mainSection table
29 {margin-top:5px;margin-bottom: px;}
30 </style></head><body><div id="header"><table width="100%" id="topTable"></table></div><div id="mainSection"><div id="mainBody"><br /><font color="DarkGray">[This readme is a partial copy of the sample's topic in the SDK documentation.]</font><br /><font color="DarkGray" xmlns:mshelp="http://msdn.microsoft.com/mshelp" xmlns:msxsl="urn:schemas-microsoft-com:xslt"></font><p xmlns:mshelp="http://msdn.microsoft.com/mshelp" xmlns:msxsl="urn:schemas-microsoft-com:xslt"></p><p xmlns:mshelp="http://msdn.microsoft.com/mshelp" xmlns:msxsl="urn:schemas-microsoft-com:xslt"><font color="DarkGray">Updated: July 2008</font></p><div class="introduction"><p xmlns:mshelp="http://msdn.microsoft.com/mshelp" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
31 This example demonstrates how to alternate the appearance of items in a <span sdata="cer" target="T:System.Windows.Controls.ListBox">ListBox</span> and a <span sdata="cer" target="T:System.Windows.Controls.Treeview"><span class="nolink">Treeview</span></span> by using the <span sdata="cer" target="T:System.Windows.Controls.AlternationConverter">AlternationConverter</span> and the <span sdata="cer" target="P:System.Windows.Controls.ItemsControl.AlternationIndex">ItemsControl..::.AlternationIndex</span> attached property. The <span sdata="cer" target="T:System.Windows.Controls.ListBox">ListBox</span> groups its items, and both the <span sdata="cer" target="T:System.Windows.Controls.GroupItem">GroupItem</span> headings and the items in the <span sdata="cer" target="T:System.Windows.Controls.ListBox">ListBox</span> have alternating appearances. You can alternate the appearance of the <span sdata="cer" target="T:System.Windows.Controls.GroupItem">GroupItem</span> heading and items in the <span sdata="cer" target="T:System.Windows.Controls.ListBox">ListBox</span> independently of each other.
32 </p><p xmlns:mshelp="http://msdn.microsoft.com/mshelp" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
33 The items in the <span sdata="cer" target="T:System.Windows.Controls.TreeView">TreeView</span> have a different appearance in each level of the <span sdata="cer" target="T:System.Windows.Controls.TreeView">TreeView</span>. In the first level, all items are bold. In the second level, the items alternate between italicized text and normal text. In the third level, the backgrounds of the items alternate among three colors.
34 </p></div><h1 class="heading" xmlns:mshelp="http://msdn.microsoft.com/mshelp" xmlns:msxsl="urn:schemas-microsoft-com:xslt"><span onclick="ExpandCollapse(sectionToggle0)" style="cursor:default;" onkeypress="ExpandCollapse_CheckKey(sectionToggle0, event)" tabindex="0">Building the Sample</span></h1><div id="sectionSection0" class="section"><ul xmlns:mshelp="http://msdn.microsoft.com/mshelp" xmlns:msxsl="urn:schemas-microsoft-com:xslt"><li><p>
35 Install the Windows Software Development Kit (SDK) and open its build environment command window. On the Start menu, point to All Programs, Microsoft Windows SDK, and then click CMD Shell.
36 </p></li><li><p>
37 Download the sample, usually from the software development kit (SDK) documentation, to your hard disk drive.
38 </p></li><li><p>
39 To build the sample from the build environment command window, go to the source directory of the sample. At the command prompt, type MSBUILD.
40 </p></li><li><p>
41 To build the sample in Microsoft Visual Studio, load the sample solution or project file and then press CTRL+SHIFT+B.
42 </p></li></ul></div><h1 class="heading" xmlns:mshelp="http://msdn.microsoft.com/mshelp" xmlns:msxsl="urn:schemas-microsoft-com:xslt"><span onclick="ExpandCollapse(sectionToggle1)" style="cursor:default;" onkeypress="ExpandCollapse_CheckKey(sectionToggle1, event)" tabindex="0">Running the Sample</span></h1><div id="sectionSection1" class="section"><ul xmlns:mshelp="http://msdn.microsoft.com/mshelp" xmlns:msxsl="urn:schemas-microsoft-com:xslt"><li><p>
43 To run the compiled sample from the build environment command window, execute the .exe file in the Bin\Debug or Bin\Release folder contained under the sample source code folder.
44 </p></li><li><p>
45 To run the compiled sample with debugging in Visual Studio, press F5.
46 </p></li></ul></div><h1 class="heading" xmlns:mshelp="http://msdn.microsoft.com/mshelp" xmlns:msxsl="urn:schemas-microsoft-com:xslt"><span onclick="ExpandCollapse(changeHistoryToggle)" style="cursor:default;" onkeypress="ExpandCollapse_CheckKey(changeHistoryToggle, event)" tabindex="0">Change History</span></h1><div id="changeHistorySection" class="section"><div class="caption"></div><div class="tableSection"><table width="50%" cellspacing="2" cellpadding="5" frame="lhs" xmlns:mshelp="http://msdn.microsoft.com/mshelp" xmlns:msxsl="urn:schemas-microsoft-com:xslt"><tr><th><p>
47 Date
48 </p></th><th><p>
49 History
50 </p></th><th><p>
51 Reason
52 </p></th></tr><tr><td><p><p>July 2008</p></p></td><td><p>
53 Added a sample to demonstrate the new alternation feature.
54 </p></td><td><p><p>SP1 feature change.</p></p></td></tr></table></div></div></div></div></body></html>