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 5843051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:06:01+00:00 2026-05-22T12:06:01+00:00

Ok, here is my situation: I have a DataGridView containing Message s, to which

  • 0

Ok, here is my situation:
I have a DataGridView containing Messages, to which the following style is applied.

<Style x:Key="ChangeSetRowStyle" TargetType="{x:Type DataGridRow}">
    <Setter Property="FontWeight" Value="Normal" />
    <Style.Triggers>
        <DataTrigger Binding="{Binding IsRead}" Value="False">
            <Setter Property="FontWeight" Value="Bold" />
        </DataTrigger>
        <DataTrigger Binding="{Binding IsRead}" Value="True">
            <Setter Property="FontWeight" Value="Normal" />
        </DataTrigger>
    </Style.Triggers>
</Style>

My intention is to make unread messages bold, while read messages stay with normal font weight. Even though the style is applied correctly when the collection is loaded, nothing changes when an item’s IsRead property is changed. It seems like the style just does’t update.

Can someone please shed some light on this? Thanks!

  • 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. Editorial Team
    Editorial Team
    2026-05-22T12:06:02+00:00Added an answer on May 22, 2026 at 12:06 pm

    Your Message class needs to inherit from INotifyPropertyChanged and the IsRead property needs to raise the PropertyChanged event when modified. Here’s an example:

    public class Message: INotifyPropertyChanged
    {
        private bool _isRead;
    
        public bool IsRead
        {
            get { return _isRead; }
            set
            {
                _isRead = value;
                RaisePropertyChanged("IsRead");
            }
        }
    
    
        #region INotifyPropertyChanged Members
    
        /// <summary>
        /// Raised when a property on this object has a new value.
        /// </summary>
        public event PropertyChangedEventHandler PropertyChanged;
    
        #endregion
    
        /// <summary>
        /// Raises this object's PropertyChanged event.
        /// </summary>
        /// <param name="propertyName">The property that has a new value.</param>
        public virtual void RaisePropertyChanged(string propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null)
            {
                var e = new PropertyChangedEventArgs(propertyName);
                handler(this, e);
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's the situation I have a webpage which has one drop down called prefer.
Here is my situation: I have program A which looks like this: Fmfile IF
Here's the situation: I have a web application which response to a request for
Here is the situation: I have a class MainView (which is a UIViewController) and
Here is my situation: I have a controller action called OrderFromCategory which fills a
Here's my situation I have numerous SQL rows like the following. SET IDENTITY_INSERT blah
Here's the situation: I have a texture containing some depth values. I want to
Here’s my situation: I have a free app which I plan to provide access
Here's my situation: I have 2 person objects, person1 and person2, which were created
Here's my situation: I have a Data Template set up which contains a ToggleButton

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.