Welcome to the Xceed Community Sign in | Join | Help
Community Search  

CellErrorStyle - can't change border color

Sort Posts: Previous Next
  •  05-16-2008, 12:56 PM Post no. 12340

    CellErrorStyle - can't change border color

    I want to change the border of a cell to red when there's an error. This sounds pretty basic.

    My style is:

            <Style x:Key="cell_error" TargetType="{x:Type xcdg:DataCell}">
                <Setter Property="BorderBrush">
                    <Setter.Value>
                        <SolidColorBrush Color="Red"/>
                    </Setter.Value>
                </Setter>
                <Setter Property="BorderThickness" Value="1,1,1,1" />
            </Style>


    I have a CellValidationRules applied to a data column so that the ValidationMode property is effective.

    Problem:
    If ValidationMode="CellEndingEdit", the cell border's color does not change to red on input error when the cell loses focus.


    However, if my error style is set to change the background color to red, then background color DOES red on error when the cell loses focus.

    Why am I able to change the background color, but not the border color?

View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2008 Xceed Software Inc.