첨부 소스 코드는 나눔고딕코딩 폰트를 사용합니다.
728x90
반응형
728x170
<Grid
    xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
    xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
    xmlns:local="clr-namespace:HowToConditionallyApplyStyles">
    <Grid.Resources>
        <local:IntegerToLinearGradientBrushValueConverter x:Key="IntegerToLinearGradientBrushValueConverterKey" />
        <Style x:Key="CellStyleKey"
            BasedOn="{StaticResource {dxgt:GridRowThemeKey ResourceKey=CellStyle}}"
            TargetType="dxg:CellContentPresenter">
            <Setter
                Property="Background"
                Value="{Binding Path=RowData.Row.OrderUnit,
                    Converter={StaticResource IntegerToLinearGradientBrushValueConverterKey}}" />
        </Style>
    </Grid.Resources>
    <dxg:GridControl x:Name="gridControl">
        <dxg:GridControl.Columns>
            <dxg:GridColumn
                FieldName="ProductName"
                Header="Product"
                CellStyle="{StaticResource CellStyleKey}" />
            <dxg:GridColumn
                FieldName="UnitPrice"
                Header="Unit Price" />
            <dxg:GridColumn
                FieldName="OrderUnit"
                Header="Units On Order" />
        </dxg:GridControl.Columns>
        <dxg:GridControl.View>
            <dxg:TableView />
        </dxg:GridControl.View>
    </dxg:GridControl>
</Grid>
728x90
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요