Prevent Service Reference from automatically implementing INotifyPropertyChanged

If for whatever reason you don't want the objects generated by your service reference to implement INotifyPropertyChanged you can stop it being generated by using <EnableDataBinding>false</EnableDataBinding> in the *.svcmap file. You have to edit the XML inside the file, its not exposed in the properties window.

<?xml version="1.0" encoding="utf-8"?>
<ReferenceGroup xmlns:xsi="" xmlns:xsd="" ID="08464769-909d-433e-ab54-b362d155f986" xmlns="urn:schemas-microsoft-com:xml-wcfservicemap">
   < ClientOptions>
   < /ClientOptions>

This makes a lot of sense if you are never going to use these events. You can also achieve this by using the svcutil.exe and not specifing the /enableDataBinding (/edb) command-line argument.

No comments:

Post a Comment