235
CellValuePresenter Background binding
posted

Hi All,

Can someone please help me. I need to change my Cell Background color, The user can select a color with a color picker that gets stored in configuration.

public SolidColorBrush SolidColorBrushValue
{
get { return MatrixView.SolidColorBrushValue; }
set
{
if (MatrixView.SolidColorBrushValue!= value)
{
MatrixView.SolidColorBrushValue= value;
RaisePropertyChanged("SolidColorBrushValue");
}
}
}

<Style x:Key="CellLockedStyle" TargetType="{x:Type igWPF:CellValuePresenter}">
<Setter Property="Background" Value="{Binding SolidColorBrushValue}"></Setter>
<Setter Property="IsEnabled" Value="True"></Setter>
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
</Style>

The color does not change when the property is triggered.

Thanks in advance,

Roelof