How to change UpdateSourceTrigger behavior in editors?

Grids for WPF Forum

Posted 10 years ago by Craig - Varigence, Inc.
Version: 10.1.0521
Avatar
Hello again,

In the property grid, I need to change the UpdateSourceTrigger behavior of the TextBox (and perhaps other controls) to PropertyChanged; it seems to currently be LostFocus.

Is the right/easiest way to do this still to copy the TextBox property editor's template and change the UpdateSourceTrigger values? (per this thread: http://www.actiprosoftware.com/Support/Forums/ViewForumTopic.aspx?ForumTopicID=4272) If so, where can I get a copy of the PropertyEditor templates? I don't see them in any of the XAML files from the installation.

I'm also wondering if there's a particular reason you chose LostFocus vs PropertyChanged.

Thanks very much,

-Craig

Comments (1)

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Craig,

If you own WPF Studio, you can download the default Styles from our web site. If you purchased PropertyGrid separately, then you can send a request to our support address and we can provide the appropriate files.

The default PropertyGrid property editors are located in the "PropertyGrid\Themes\PropertyGrid\PropertyEditors.xaml" file. I did notice that the property editors for the Editors for WPF product are not included in the XAML style download. So if you send a request, we can send these files also.

To answer your questions, yes the correct way would be to redefine the property editor DataTemplates and change the UpdateSourceTrigger manually. PropertyChanged generally produces too many updates to the underlying object. Typically, it's better to wait until the user has finished entering the "data" before pushing it back to the underlying object. But this really depends on your requirements.


Actipro Software Support

The latest build of this product (v2019.1 build 0683) 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.