GridControl CardView ShowCardExpandButton or GridCardExpandButton

关于DevExpress.XtraGrid.v13.1.dll和DevExpress.XtraGrid.v12.2.dll中ShowCardExpandButton  或者 GridCardExpandButton隐藏针对不同版本有如下不同处理方式。

关于13.1版本处理方式

DevExpress.XtraGrid.v13.1.dll

设置属性 ShowCardExpandButton = false;

关于12.2版本中处理方式

DevExpress.XtraGrid.v12.2.dll

 1 <!-- Hide expand button -->
 2         <Style x:Key="{dxgt:GridCardThemeKey ResourceKey=ContentExpandButtonStyle, IsThemeIndependent=True}"
 3                        TargetType="{x:Type dxg:GridCardExpandButton}">
 4             <Setter Property="Visibility" Value="Collapsed"/>
 5             <Setter Property="VerticalAlignment" Value="Center"/>
 6             <Setter Property="HorizontalAlignment" Value="Center"/>
 7         </Style>
 8         
 9         <!-- Hide header AND expand button -->
10         <ControlTemplate x:Key="{dxgt:GridCardThemeKey ResourceKey=HeaderPanelTemplate, IsThemeIndependent=True}" TargetType="{x:Type ContentControl}" />
Hide expand button

下载源代码地址

http://files.cnblogs.com/-ShiL/WpfApplication1.rar

原文地址:https://www.cnblogs.com/-ShiL/p/Star201310300104.html