In this task you will understand the properties of the <ColStyle element, that designs a single column in a table-like listing. In this example we choose the <BaseQuery Name="Fred4Pages" in the FRED4_Config.xml configuration file. |
You will be able to perform this task only if you already performed the TASK: Understand the DirectoryStyleList element, and your screen is as it was on the end of that task. |
1.Expand the <DirectoryStyle Name="List" element, and then expand the <ColStyle Name="Section" element to review its parts: it contains several properties elements: ColStyle properties and elements The <ColStyle element has a several elements and properties. •Name: the sort name to display in the column header on a listing (mandatory). Note: the column names must be unique within the parent <DirectoryStyle> but may be the same in different <DirectoryStyle> elements. You can change this name at any time. •Width: the default column width. If omitted, the factory default is used. You can change the width at any time. •Height: the default column height. Typically is "0" in the table-like listings. •SortName: the name of the <Sort element in the <SortList. This property is optional. If you omit it, the column won't be sortable. •CellTemplate: the element that encloses the column definition, and allows various additional effects. •TextBlock: the element that renders the column content. •Height (TextBlock property): "Auto" means "as much as needed". •HorizontalAlignment (TextBlock property): "Left", "Right", "Center" etc. •Text (TextBlock property): the content to display, typically enclosed between curly brackets {...}. The mandatory part is the Binding Path=, followed by the square brackets enclosing the name of the attribute, in this example the page.sectionRef.name. Not all the attributes can be displayed with this statement, especially not the multireference attributes. |