Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • I have successfully bound the Background color of the rows in my TreeListView to a property in the DataContext of that row. With a style...

                                    <dxg:TreeListView.RowStyle>
                                          <Style TargetType="{x:Type dxg:GridRowContent}">
                                                <Setter Property="Background" Value="{Binding Path=Row.RowHighlightColor}"/>
                                         </Style>
                                    </dxg:TreeListView.RowStyle>

                                    But now my problem is that the label cell for the row will change to white while the row is selected, masking the row color.
                                    How do I get the labels background to behave like the background color of the row?

                                    Thanks for your help!
                                    Derek

                                0

                                Hello Derek,

                                Thank you for your question. Please try to add the following trigger to your RowStyle:

                                <Style TargetType="{x:Type dxg:GridRowContent}">
                                    <Setter Property="Background" Value="{Binding Path=Row.RowHighlightColor}"/>
                                    <Style.Triggers>
                                        <Trigger Property="dxg:DataViewBase.IsFocusedRow" Value="True">
                                            <Setter Property="Background" Value="Gray" />
                                            <Setter Property="Foreground" Value="Red" />
                                        </Trigger>
                                    </Style.Triggers>
                                </Style>

                                This sample may be helpful: How to change the appearance of a focused data row and a focused cell. This sample is for GridControl, but it works for TreeListControl, too.

                                Thank you, Marina

                                0

                                Great thanks for your help!

                                To start a chat you should create a support ticket


                                If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2014 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners