Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
339
Style and Dependency Property Question
posted

I have a problem where I'd like to override the "BackgroundSelected" DP of the DataRecordCellArea class with my own implementation. e.g.

            <Style x:Key="rowStyle" TargetType="{x:Type igDP:DataRecordCellArea}">
                    <Setter Property="BackgroundSelected" Value="{Binding ElementName=ucMyDataGrid, Path=SelectedRowBackgroundColor}" />
            </Style>

This works fine when the property "SelectedRowBackgroundColor" has been set, but when it's value is still null I would like to use the original value of DP "BackgroundSelected", that the underlying Theme applied. Shouldn't this be possible with a dependency property?

I've also tried referencing the theme's style for DataRecordCellArea, but the style's "setters" collection doesn't let you reference a setter by property name, only index.

Any ideas appreciated,

Jamie