Skip to content

Latest commit

 

History

History
12 lines (7 loc) · 992 Bytes

data_binding.md

File metadata and controls

12 lines (7 loc) · 992 Bytes

Data Binding

Data Binding is an incredibly useful tool for helping simplify seperation of concerns, and there is a huge amount of functionality available for XAML applications in both UWP and WPF applications. But if you're just getting started, it can be a very complicated affair.

{x:Bind} vs {Binding}

For the most part x:Bind and Binding behave the same, but be implementation is a little different. Binding's are evaluated at runtime, whereas x:Bind is evaluated at compile time.

MSDN has a very thorough overview of the differences between {x:Bind} and {Binding}, but the most important one (in my opinion) is the default value for Mode.

  • {x:Bind} defaults to OneTime. Bindings will be evaluated once when the page is loaded.
  • {Binding} defaults to OneWay. Bindings are evaluated and updated every time the source property changes.