2014-11-24 30 views
0

我有一個Xceed數據網格,它使用ColumnStretchMode = ALL使列適合網格。GroupLevelIndicatorPane導致ColumnStretchMode = ALL不適合列

它一直在完美工作,直到我添加了GroupLevelIndicatorPane。一旦我補充說,網格不再合適(它的寬度爲GroupLevelIndicatorWidth數量)。

我一直在尋找一種方法來引起這種計算,把這個窗格考慮在內,沒有任何運氣。

有沒有人見過這個Xceed控件?(我沒有當前的Xceed支持,所以他們不會幫助我。)

更新: 我發現了這是爲什麼發生。我有一些東西需要這種效果在我的網格設置:

<Style TargetType="{x:Type xcdg:GroupLevelIndicatorPane}"> 
    <Setter Property="Visibility" Value="{Binding RelativeSource= 
      {RelativeSource FindAncestor, AncestorType={x:Type xcdg:DataRow}}, 
      Path=DataContext.ShouldIndent, Converter= 
      {StaticResource BooleanToVisibilityConverter}, FallbackValue=Collapsed}" />  
</Style> 

我造成坍塌某些類型羣體的GroupLevelIndicatorPane。我把它拿出來,計算再次開始。

猜猜我需要找到另一種方式讓一些組不縮進。

回答

0

原來我不得不在實際的GroupLevelIndicatorPane(不在樣式上)應用可見性。一旦我這樣做了ColumnStretchMode = ALL計算正確。

不知道它爲什麼重要,但它確實如此。