2012-10-12 55 views
2

我有一些列表視圖,這些列表視圖已經訂購了。我把每個listview之間的網格分隔符。但網格分離器不起作用。我找不到他們爲什麼不工作。WPF Grid Grid Splitter沒有拆分

我的代碼如下。

<ScrollViewer VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Disabled" CanContentScroll="True"> 
        <ListView Margin="1" Background="Snow" > 

         <Grid> 
          <Grid.ColumnDefinitions> 
           <ColumnDefinition Width="200"/> 
          </Grid.ColumnDefinitions> 

          <Grid.RowDefinitions> 
           <RowDefinition Height="*" /> 
           <RowDefinition Height="*" /> 
           <RowDefinition Height="*" /> 
           <RowDefinition Height="*" /> 
           <RowDefinition Height="*" /> 
           <RowDefinition Height="*" /> 
           <RowDefinition Height="*" /> 
           <RowDefinition Height="*" /> 
           <RowDefinition Height="*" /> 
           <RowDefinition Height="*" /> 
           <RowDefinition Height="*" /> 
          </Grid.RowDefinitions> 

          <TextBlock Text="Attributes" Grid.Column="0" Grid.Row="0" Width="55" /> 
          <local:ListViewExt Grid.Column="0" Grid.Row="1" Height="300" MinHeight="200"/> 
          <GridSplitter Grid.Row="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ResizeBehavior="PreviousAndNext" Height="4" Margin="0,0,0,35" /> 
          <TextBlock Text="Aktivitäten" Grid.Row="3" Width="50"/> 
          <local:ListViewExt Grid.Column="0" Grid.Row="4" Height="300" MinHeight="200"/> 
          <GridSplitter Grid.Row="5" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Height="4" Margin="0,0,0,38" /> 
          <TextBlock Text="Projekte" Grid.Column="0" Grid.Row="6" Width="50" /> 
          <local:ListViewExt Grid.Column="0" Grid.Row="7" Height="300" MinHeight="200"/> 
          <GridSplitter Grid.Row="8" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Height="4" Margin="0,0,0,38" /> 
          <TextBlock Text="Akcademy" Grid.Column="0" Grid.Row="9" Width="55" /> 
          <local:ListViewExt Grid.Column="0" Grid.Row="10" Height="300" MinHeight="200"/> 
         </Grid> 

       </ListView> 
       </ScrollViewer> 

回答

1

嘗試給電網分離器垂直方向

+0

感謝名單,我都做到了。 – Isi

+0

你的問題解決了嗎? – Sisyphe

+0

@Sisyphe是的,它已被解決。 thnx – Isi