-
Notifications
You must be signed in to change notification settings - Fork 0
/
Window1.xaml
37 lines (37 loc) · 1.96 KB
/
Window1.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<Window x:Class="DXGrid_ConditionalFormatting.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:DXGrid_ConditionalFormatting"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
Title="Window1" Height="300" Width="470">
<Grid>
<dxg:GridControl x:Name="grid">
<dxg:GridControl.Resources>
<Style x:Key="customCellStyle" BasedOn="{StaticResource {dxgt:GridRowThemeKey ResourceKey=LightweightCellStyle}}" TargetType="{x:Type dxg:LightweightCellEditor}">
<Setter Property="Background">
<Setter.Value>
<MultiBinding>
<MultiBinding.Converter>
<local:ColumnRowIndexesCellValueConverter />
</MultiBinding.Converter>
<Binding Path="Column" RelativeSource="{RelativeSource Self}" />
<Binding Path="Data.RowHandle.Value" />
</MultiBinding>
</Setter.Value>
</Setter>
</Style>
</dxg:GridControl.Resources>
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="ProductName">
Product
</dxg:GridColumn>
<dxg:GridColumn FieldName="UnitPrice">Unit Price</dxg:GridColumn>
<dxg:GridColumn FieldName="UnitsOnOrder">Units On Order</dxg:GridColumn>
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView AutoWidth="True" CellStyle="{StaticResource customCellStyle}" />
</dxg:GridControl.View>
</dxg:GridControl>
</Grid>
</Window>