Skip to content

x:Bind Functions - usage of BindBack is unclear #2779

Open
@Polarts

Description

@Polarts

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.

Metadata

Metadata

Assignees

Labels

Pri2data-and-files/techdoc-bugfeedback is about something that is out of date, unclear, confusing, or broken in the articleuwp/prod

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions