Skip to content

Binding Source: data binding source and target are mixed up #2715

Open
@SetTrend

Description

@SetTrend

The following paragraph mistakenly mixes up data binding source and target

One way of doing that is to derive the class that represents your binding source from DependencyObject, and expose a data value through a DependencyProperty. That's how a FrameworkElement becomes observable. FrameworkElements are good binding sources right out of the box.

Rationale

According to Every binding involves these pieces (five paragraphs ahead):

  • A binding target: This is a DependencyProperty of the FrameworkElement in your UI that displays the data.

If it's correct, however, then ...

... I propose to elaborate ony why and when a control becomes a binding source. At this stage, the context on this page implies that binding sources may be plain view model objects only. I also propose to add a micro example, demonstrating on how to utilize DependencyObject/DependencyProperty on the HostViewModel sample view model class.


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