Ticket Q332901
Visible to All Users

How can change background color for WPF Grid?

created 14 years ago

Hi
I am trying to customize look and feel of latest version of Grid control. So far I was able to change every color I needed except the background color of grid where there is no row. This area is always appear as white (see attachement). What is the style property for background color of grid?
Thanks
Ron

Comments (2)
Stan (DevExpress Support) 14 years ago

    Hi Ron,
    Thank you for your question. The easiest way to accomplish this goal is to override the following template:

    XAML
    <ControlTemplate x:Key="{dxgt:TableViewThemeKey IsThemeIndependent=true, ResourceKey=DataPresenterTemplate}" TargetType="{x:Type dxg:DataPresenter}"> <Border Background="Red"> <ContentPresenter /> </Border> </ControlTemplate>

    Please try this solution, and let me know your results.
    Thanks,
    Stan

      Thanks Stan
      The solution works perfectly

      Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

      Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.