Description
The description of two way function binding doesn't seem to clarify how the functions should work, and there's no example for the implementation of a BindBack
function.
Since x:Bind Functions are used for converting data, I'd expect that a BindBack
function would require a return
statement of the source type and set it to the source property. However, it seems like this is not the intended functionality, as the set
of a property is never called on a two-way x:Bind with BindBack
.
According to this unofficial sample it seems as if the BindBack
function should directly set the source property, so rather than working as a performant substitute for a classic converter, it works like a "ValueChanged" callback, which is counter-intuitive to the way that bindings work.
Is this how BindBack
functions are supposed to work? If so, what's the difference between them and "ValueChanged" callbacks?
I'd like to get some clarification on this topic, since there doesn't seem to be much info about it around the internet.
Also, it would be nice if the documentation page contained an example for an implemented BindBack
function.
Thanks
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 9fdf7014-70bd-f562-046a-432f5f5caf11
- Version Independent ID: f45e3d08-66e0-1b74-2c0d-595345e7f3b1
- Content: Functions in x:Bind - UWP applications
- Content Source: windows-apps-src/data-binding/function-bindings.md
- Product: uwp
- Technology: data-and-files
- GitHub Login: @lastnameholiu
- Microsoft Alias: alholiu