2014-02-21 76 views
0

這裏是axml。當我滑動左側的網格寬度變化時,這有一個奇怪的行爲。但是,我似乎不能向左滑動。Silverlight gridsplitter不能向左滑動

<Grid x:Name="LayoutRoot" Background="White"> 
     <Grid.ColumnDefinitions> 
      <ColumnDefinition Width="0.35*" /> 
      <ColumnDefinition Width="auto"/> 
      <ColumnDefinition Width="*" /> 
     </Grid.ColumnDefinitions> 



     <Grid Width="auto" Grid.Row="0" Grid.Column="0"> 
      <ListBox Style="{StaticResource ListBoxStyle1}" ItemContainerStyle="{StaticResource ListBoxItemStyleWhite}" x:Name="listbox" Grid.Row="1" ItemsSource="{Binding Documents}" 
         HorizontalContentAlignment="Stretch" HorizontalAlignment="Stretch" VerticalContentAlignment="Stretch" VerticalAlignment="Stretch" ItemTemplate="{StaticResource ListboxTempalte}" > 
       <ListBox.ItemsPanel> 
        <ItemsPanelTemplate> 
         <StackPanel Orientation="Vertical" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> 
         </StackPanel> 
        </ItemsPanelTemplate> 
       </ListBox.ItemsPanel> 
      </ListBox> 
     </Grid> 

     <sdk:GridSplitter Grid.Row="0" Grid.Column="1" 
          HorizontalAlignment="Right" 
      VerticalAlignment="Stretch"       
          ></sdk:GridSplitter> 

      <Grid Grid.Row="0" x:Name="targetPanel" Grid.Column="2" Canvas.ZIndex="5" Background="White"> 
      <ig:DragDropManager.DropTarget> 
       <ig:DropTarget IsDropTarget="True" /> 
      </ig:DragDropManager.DropTarget> 
      <controls:BusyIndicator IsBusy="{Binding IsBusy, Mode=OneWay}" 
            BusyContent="{Binding ConverterParameter=BusyIndicator_Content, Converter={StaticResource Localization}, Source={StaticResource Localization}}"> 

       <divElement:HtmlHost x:Name="HtmlViewer" SourceUri="{Binding SourceUri,Mode=OneWay}" DocumentReady="HtmlViewer_DocumentReady"/> 
      </controls:BusyIndicator> 

     </Grid> 
    </Grid> 
+0

是不是因爲你給的寬度左手列?我似乎記得,除了*之外,他們沒有很好的表現。試着用*代替你的0.35 *,看看是否能解決你的問題。 – Mashton

回答

0

嘗試設置的Horizo​​ntalAlignment還能舒展:

<sdk:GridSplitter Grid.Row="0" Grid.Column="1" 
     HorizontalAlignment="Stretch" 
     VerticalAlignment="Stretch"> 
    </sdk:GridSplitter>