How can I have a property grid update automatically when the object in its Selected Object property changes?I've tried implementing INotify Property Changed in my class but the property grid does not actually show the new propertyies of the object in the background until I click on it.As you are a new user, if this works out for you, you may accept an answer by clicking on the check mark to the left of a provided answer. Property Grid is now only refreshed when not focused.
I know this answer is two years old, but I had the same question as the OP and I want to add to this answer that Timer has an Auto Reset property.
Meaning you don't have to stop the timer manually.
Problem: If a refresh took place while user was entering/editing data on propertygrid (such as entering a new shutter time value), focus was suddenly lost and entered value would be replaced by new value from camera. Question: How to prevent Property Grid from performing refresh when user was doing editing? Utilizing the following method from this SO question and answer you should be able to wrap whatever code does the updating in an If conditional to check to see what control is being focused/used.
If the control in use is the propertygrid, don't do anything.
However, it seems that while it sets my object's properties back, the property grid doesn't change.
If, after the reset, I do a property grid "Refresh", it has the reset colour.That could easily be resolved via some sort of inactivity timer in which the focus is set to another control, perhaps a label or the form itself, after a set amount of time. How can I get the Property Grid to automatically refresh when the Collection Editor has been closed? It will automatically refresh the property grid when the collection form is closed.Your code shows the getter/setter boilerplate, but nothing about the backing fields.Also, since Public Class Animal ' auto implement props available since VS2010: Public Property Name As String Public Property Species As String Public Property Weight As Double Public Property Coloring As Color ' backing field for the List: Private m Foods As List(Of String) ' this of course would be the same as your code...I have a Winform application which uses colour to highlight certain things.