ListView in usercontrol not update

Leon NG 101 Reputation points
2023-02-20T09:22:25.4+00:00

Hi there,

The ListView Visibility="Collapsed" at the beginning. When I press the button, the color will go red. But if I open the ListView first, there is nothing change.

https://github.com/LeonNg963/WpfApp5.git

Screenshot 2023-02-20 165759

Best Regards,

Leon

Developer technologies | Windows Presentation Foundation
Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
0 comments No comments
{count} votes

Answer accepted by question author
  1. Hui Liu-MSFT 48,711 Reputation points Microsoft External Staff
    2023-02-20T09:58:02.9733333+00:00

    You could update the code below and it will work fine.

    public SolidColorBrush Status
            {
                get { return color; }
                set { color = value; OnPropertyChanged("Status"); }
            }
    

    If the response is helpful, please click "Accept Answer" and upvote it. Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.