Notification of ColorEditBox value changed in a PorpertyGrid

Grids for WPF Forum

Posted 9 years ago by Martin Kleiman - CEO, Meaningful Bytes
Version: 15.1.0620

I am a PowerShell user so I want to get notfication of a change to the value of a ColorEditBox.  The following is a subset of XAML code I am using which is loaded at runtime.

<propgrid:PropertyGridPropertyItem ValueName="Property6" DisplayName="Property 6" Value="Value3" DefaultValue="Value3"
Description="This is the third property." Category="Category2" />

<propgrid:PropertyGridPropertyItem x:Name="ColorItem" DisplayName="ColorEditBox" Description="A ColorEditBox used to modify a Color." ValueName="Property7">


<editors:ColorEditBox x:Name="editBox" Value="{x:Static Colors.Blue}">


My PowerShell app can detect the change to Property6 using the PropertyChanged Event but I cannot see any changes to the ColorEditBox.


The reason I am using PowerShell is based on my customer's requirements so I cannot use C# or VB.  Any thoughts?

Comments (3)

Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA

H Martin,

Your ColorEditBox is having its value set to an explicit value, so it's not interacting with the PropertyGrid's data accessor.  The data accessor is what provides access to the actual property data.  If you take a look at our CustomPropertyEditor QuickStart's MainControl.xaml, you can see examples of a couple ValueTemplates there.  Look at the HorizontalListBox.SelectedValue binding in that file since it shows how you properly bind the property Value.  You'd want to use a similar binding on the ColorEditBox.Value property.

Actipro Software Support

Posted 9 years ago by Martin Kleiman - CEO, Meaningful Bytes

I will try that and let you know how it works.  Thank you.

Posted 9 years ago by Martin Kleiman - CEO, Meaningful Bytes

That worked great.  Thank you.

The latest build of this product (v24.1.2) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.