Quantcast
Channel: wpftoolkit Discussions Rss Feed
Viewing all articles
Browse latest Browse all 2157

New Post: PropertyGrid and UpdateSourceTrigger=PropertyChanged not working

$
0
0
Hi,

I got a grid with the following binding:
<tk:PropertyGrid  SelectedObject="{Binding Blubber, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True, ValidatesOnExceptions=True}" >
</tk:PropertyGrid>
in the "Blubber" class I have a public property that throws an exception:

private string validationTest = "hello";
    public string ValidationTest
    {
        get
        {
            return validationTest; 

        }
        set
        {

            if (value != "hello") throw new MyValidiationException("Must be hello");
            else validationTest = value; 
            RaiseEvent("ValidationTest");
        }
    }
Now when I enter some text in the PropertyGrid, the UpdateSourceTrigger=PropertyChanged should update the binding immediately while typeing. So the exception should be thrown immediately. Yet it doesn't!

Is this a bug or does anyone have an explanation for it?

Viewing all articles
Browse latest Browse all 2157

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>