How to resolve the XAML generated code is throwing NotImplementedException when using x:Bind

General discussion

Recently, some developers face the issue when they use 'x:Bind' in their UserControl. In the UserControl, they use 'x:Bind' to bind to the property which is in the UserControl’s code-behind like the following:

At the same time, the UserControl’s DataContext will be changed. In UserControl’s code-behind, the ViewModel property value will be updated, but on XAML of UserControl, it didn’t get updated. To make the x:Bind work in this case,
we need to call the
Bindings.Update() method in the 'DataContextChanged' event handler of UserControl. It will force it to update the source.

Here, you might wonder where the 'Bindings.update ()' method comes from. If you check the document, it has explained:

>>Pages and user controls that include Compiled bindings will have a "Bindings" property in the generated code. This includes an Update() method.
This method will update the values of all compiled bindings. Any one-way/Two-Way bindings will have the listeners hooked up to detect changes.

Then, if your project’s target version is earlier than 17763, your code does work without problem. But if your project’s target version is 17763, you will get exception:

'System.NotImplementedException: The method or operation is not implemented.'

We are aware of the problem and considering a fix for a future version of the Visual Studio product in the XAML Compiler generated code. To workaround the issue, you need to
disable the x:Bind diagnostics feature by adding the following into your project (.csproj) file(under the first Propertygroup block).