Select to view content in your preferred language

Problem with ColumnSpan

571
0
04-28-2010 02:37 PM
DonFreeman
Emerging Contributor
Given this code sequence:

<StackPanel Grid.Column="0"
       Grid.Row="1"
       Orientation="Vertical"
       Margin="10"
       HorizontalAlignment="Left"
       VerticalAlignment="Top"
       Grid.ColumnSpan="2">

     <controlsToolkit:Expander ExpandDirection="Down" Header="Identify Results">
      <Grid x:Name="IdentifyGrid" 
         HorizontalAlignment="Center"
         VerticalAlignment="Top"
         Margin="0,0,0,0">
       <Rectangle Style="{StaticResource PanelRectangle}" Grid.ColumnSpan="2"/>
       <StackPanel x:Name="IdentifyResultsPanel" 
          Orientation="Vertical"
          HorizontalAlignment="Center"
          Margin="20,20,20,30">
        <TextBlock Width="200"
             TextWrapping="Wrap"
             Text="Click a feature on the map."
             FontWeight="Bold"
             HorizontalAlignment="Center" />
        <ComboBox x:Name="IdentifyComboBox"
            MinWidth="150"
            SelectionChanged="cb_SelectionChanged"
            Margin="0,10,0,5" />

        <ScrollViewer x:Name="DataGridScrollViewer"
             HorizontalScrollBarVisibility="Auto"
             VerticalScrollBarVisibility="Auto"
             Width="220"
             MaxHeight="340">
         <slData:DataGrid x:Name="IdentifyDetailsDataGrid"
              AutoGenerateColumns="False"
              HeadersVisibility="None"
              Background="White">
          <slData:DataGrid.Columns>
           <slData:DataGridTextColumn Width="95"
                    Binding="{Binding Path=Key}"
                    FontWeight="Bold" />
           <slData:DataGridTextColumn Width="215"
                    Binding="{Binding Path=Value}" />
          </slData:DataGrid.Columns>
         </slData:DataGrid>
        </ScrollViewer>
       </StackPanel>
      </Grid>
     </controlsToolkit:Expander>

    </StackPanel>
Where do I place the ColumnSpan="2" property to allow the rectangle and its contents to expand over the column boundary? I have tried several and none of them seem to work. btw - the second column contains a map.
Thanks
0 Kudos
0 Replies