Lists

I don't know why, but the left margin of ListItems rendered by Microsoft code depends on the value of the MarkerStyle property.

For example, the following XAML code renders as shown in the following image:

<FlowDocument xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" FontFamily="Arial" FontSize="16">
    <Paragraph>This document has some examples of lists:</Paragraph>
    <List MarkerStyle="Box">
        <ListItem><Paragraph>This list has its MarkerStyle set to Box.</Paragraph></ListItem>
    </List>
    <List MarkerStyle="Disc">
        <ListItem><Paragraph>This list has its MarkerStyle set to Disc.</Paragraph></ListItem>
    </List>
    <List MarkerStyle="LowerRoman">
        <ListItem><Paragraph>This list has its MarkerStyle set to LowerRoman.</Paragraph></ListItem>
    </List>
    <List MarkerStyle="None">
        <ListItem><Paragraph>This list has its MarkerStyle set to None.</Paragraph></ListItem>
    </List>
    <List MarkerStyle="UpperRoman">
        <ListItem><Paragraph>This list has its MarkerStyle set to UpperRoman.</Paragraph></ListItem>
    </List>
    <List MarkerStyle="Circle">
        <ListItem><Paragraph>This list has its MarkerStyle set to Circle.</Paragraph></ListItem>
    </List>
    <List MarkerStyle="Decimal">
        <ListItem><Paragraph>This list has its MarkerStyle set to Decimal.</Paragraph></ListItem>
    </List>
    <List MarkerStyle="LowerLatin">
        <ListItem><Paragraph>This list has its MarkerStyle set to LowerLatin.</Paragraph></ListItem>
    </List>
    <List MarkerStyle="Square">
        <ListItem><Paragraph>This list has its MarkerStyle set to Square.</Paragraph></ListItem>
    </List>
    <List MarkerStyle="UpperLatin">
        <ListItem><Paragraph>This list has its MarkerStyle set to UpperLatin.</Paragraph></ListItem>
    </List>
</FlowDocument>

Result as rendered by Microsoft:

MSLists.jpg

The SmartPaginator will render all list items with the same left margin. This value is furthermore configurable through the attached property ListExtensions.ItemOffset, whose default value is 77 (0.75 inches).

Result as rendered by SmartPaginator:

SmartLists.jpg

Last edited Jan 1, 2012 at 6:43 AM by fallinor, version 4

Comments

No comments yet.