728x90
반응형
728x170
<Window.Resources>
<Style x:Key="CellStyleKey" TargetType="dxg:CellContentPresenter">
<Style.Triggers>
<Trigger
Property="SelectionState"
Value="Selected">
<Setter Property="Background" Value="Red" />
</Trigger>
<Trigger
Property="SelectionState"
Value="Focused">
<Setter Property="Background" Value="Green" />
<Setter Property="TextBlock.Foreground" Value="Pink" />
</Trigger>
<Trigger
Property="SelectionState"
Value="FocusedAndSelected">
<Setter Property="Background" Value="Gray" />
<Setter Property="TextBlock.Foreground" Value="Black" />
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="FocusedRowStyle" TargetType="dxg:GridRowContent">
<Style.Triggers>
<Trigger
Property="dxg:GridViewBase.IsFocusedRow"
Value="True">
<Setter Property="Background" Value="Gray" />
<Setter Property="Foreground" Value="White" />
</Trigger>
</Style.Triggers>
</Style>
</Window.Resources>
<Grid>
<dxg:GridControl x:Name="gridControl"
AutoGenerateColumns="AddNew"
SelectionMode="Cell">
<dxg:GridControl.View>
<dxg:TableView
ShowGroupPanel="False"
AllowGrouping="False"
CellStyle="{StaticResource CellStyleKey}">
</dxg:TableView>
</dxg:GridControl.View>
</dxg:GridControl>
</Grid>
728x90
반응형
그리드형(광고전용)
댓글을 달아 주세요