Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 82625
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T21:38:46+00:00 2026-05-10T21:38:46+00:00

I want to set the backgroun color for a GridViewColumn that is databound inside

  • 0

I want to set the backgroun color for a GridViewColumn that is databound inside of a listview in WPF. I’m not sure how to ask this question being fairly new to WPF, otherwise I wouldn’t have bothered all of you.

I want to change the background color of the whole row, based on a bool flag in my databound object.

In this case, I have, well, a ‘CaseDetail’ object, that when there are internal notes ‘IsInternalNote’ I want the color of the row to change.

How can I pull this off in WPF?

What I have now, ( very simple ), which does NOT change the color.

<ListView ItemsSource='{Binding}' IsSynchronizedWithCurrentItem='True'  >             <ListView.View>                 <GridView>                     <GridViewColumn DisplayMemberBinding='{Binding Date, StringFormat=MMM dd\, yyyy h:mm tt}' Header='Date' Width='Auto' />                     <GridViewColumn DisplayMemberBinding='{Binding SubmittedBy}' Header='Submitted By' Width='Auto' />                     <GridViewColumn Width='Auto' Header='Description' x:Name='colDesc'>                         <GridViewColumn.CellTemplate>                             <DataTemplate>                                                               <ScrollViewer MaxHeight='80' Width='300'>                                     <StackPanel Orientation='Vertical'>                                         <TextBlock Text='{Binding Description}'  TextWrapping='Wrap'   />                                         <TextBlock Text='{Binding File.FileName}' TextWrapping='Wrap'  />                                     </StackPanel>                                 </ScrollViewer>                                                          </DataTemplate>                         </GridViewColumn.CellTemplate>                     </GridViewColumn>                                     </GridView>             </ListView.View>         </ListView> 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T21:38:47+00:00Added an answer on May 10, 2026 at 9:38 pm

    I ran into a few troubles trying to do this, ended up like so

    <ListBox ...>   <ListBox.ItemTemplate>     <DataTemplate>       <Border x:Name='BGBorder'>          <!-- -->        </Border>       <DataTemplate.Triggers>         <DataTrigger            Binding='{Binding Path=DataContext.IsAborted, RelativeSource={RelativeSource TemplatedParent}}'            Value='True'>           <Setter Property='Background' TargetName='BGBorder' Value='Red'>           </Setter>         </DataTrigger>       </DataTemplate.Triggers>     </DataTemplate>   </ListBox.ItemTemplate> </ListBox> 

    There may be alternatives, but once I had it working, I stopped looking 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to develop UINavigationBar and also set background color for that. I have
I want to set the background color of JButton. For that I use setBackground()
I want to set background color for labels inside tableViewCell to opaque but I
I want to set this style for an SVG <path> : background-color: red; background-image:
I want to set different background color in each row of listview ? I
I bind List of items to WPF ListView and want to set row background/foreground
I have a DataGridCheckBoxColumn that I want to set the background color of the
I have a layout and i want to set your background color with this
I want to set the background color separately for each item in a WPF
This problem appeared after my last question here . I want to set each

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.