views:

10

answers:

0

Why does this NOT correctly wrap the TextBlock and WrapPanel vertically?

<xcdg:DetailConfiguration.Headers>
    <DataTemplate>
        <WrapPanel Orientation="Vertical" Height="Auto">
            <TextBlock Name="ecrDocs" FontSize="16" Foreground="SteelBlue" Text="{Binding RelativeSource={RelativeSource Self},
             Path=(xcdg:DataGridControl.DataGridContext).SourceDetailConfiguration.Title}" 
             MouseLeftButtonDown="ecrDocs_MouseLeftButtonDown" ToolTip="Double Click to enter new Document."></TextBlock>
             <WrapPanel Orientation="Horizontal" Height="Auto">
                 <TextBlock Height="40" Name="insertECRDocButton" Width="40" Background="Transparent"                                                   
                  Foreground="Transparent" MouseLeftButtonDown="insertECRDocButton_MouseLeftButtonDown" 
                  ToolTip="Save Document" Margin="32,0,0,0">
                     <Image Source="/Vanguard;component/Images/Commit.png" Height="Auto" Width="Auto"></Image>
                 </TextBlock>
                 <TextBlock Height="40" Name="showECRDocButton" Width="40" Background="Transparent" 
                  Foreground="Transparent" MouseLeftButtonDown="showECRDocButton_MouseLeftButtonDown" ToolTip="Show Document">
                     <Image Source="/Vanguard;component/Images/Show.png" Height="Auto" Width="Auto"></Image>
                 </TextBlock>
             </WrapPanel>
         </WrapPanel>
     </DataTemplate>
     <DataTemplate>
         <xcdg:ColumnManagerRow />
     </DataTemplate>
</xcdg:DetailConfiguration.Headers>

This code is located in an Xceed DataGrid under the only DetailConfiguration.

When this XAML is displayed i see the following:

alt text

Any help with this would be greatly appreciated. Thanks,

Patrick