2010-03-26 3 views
3

Je veux aligner le marqueur de liste vers le haut, l'alignement par défaut est le bas du premier bloc .Est-il possible d'aligner verticalement le marqueur listitem dans un flowdocument?

Mon défectueux Code:

<Grid> 
    <FlowDocumentScrollViewer> 
     <FlowDocument> 
      <List MarkerStyle="Decimal"> 
       <ListItem> 
        <BlockUIContainer> 
         <Grid> 
          <Rectangle Height="100" Fill="HotPink" /> 
          <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Picture</TextBlock> 
         </Grid> 
        </BlockUIContainer> 
        <Paragraph>TextTextTextTextTextTextText</Paragraph> 
       </ListItem> 
      </List> 
     </FlowDocument> 
    </FlowDocumentScrollViewer> 
</Grid> 

Répondre

0
<FlowDocumentScrollViewer> 
    <FlowDocument> 
     <List MarkerStyle="Decimal"> 
      <ListItem> 
       <BlockUIContainer/>  
        <BlockUIContainer> 
         <Grid Margin="0,-10,0,0"> 
          <Rectangle Height="100" Fill="HotPink" /> 
          <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Picture</TextBlock> 
         </Grid> 
        </BlockUIContainer> 
        <Paragraph>TextTextTextTextTextTextText</Paragraph> 
      </ListItem> 
     </List> 
    </FlowDocument> 
</FlowDocumentScrollViewer> 
+0

Il fonctionne, mais je pense que Microsoft aurait fait plus simple :) – Oggy

+0

hey, assure :) je pense que ces emplois pour les développeurs –

+0

ils ont juste n » ai pas Je pense à un cas dont vous aviez besoin ici .. –