Back to results for “Data Binding & MVVM”
.NET MAUI › Data Binding & MVVM

What is data binding in MAUI?

Beginner

Answer

Data binding connects a target property on a UI element to a source property on another object (usually a view model), so changes propagate automatically. You set BindingContext and use {Binding Path}. Bindings can be OneWay, TwoWay, or OneTime, reducing manual UI-update code.
<Entry Text="{Binding Username, Mode=TwoWay}" />
<Label Text="{Binding Greeting}" />
Real-world example Typing into an Entry updates the view model's Username, and the view model computes a Greeting that the Label shows—no event handlers needed.

Common follow-ups: What binding modes exist? | What is BindingContext?