Presentation is loading. Please wait.

Presentation is loading. Please wait.

New for dependency properties register for property changes.

Similar presentations


Presentation on theme: "New for dependency properties register for property changes."— Presentation transcript:

1

2

3

4

5

6

7 New for dependency properties register for property changes

8

9

10

11 Data bind to models or data bind to elements

12

13

14

15 What problem are we solving?

16 Classic Binding Compiled Binding

17

18

19 The data context of x:Bind is the code-behind class

20 <TextBox Text="{Binding Converter ConverterLanguage ConverterParameter ElementName FallbackValue Mode Path RelativeSource Source TargetNullValue UpdateSourceTrigger} <TextBox Text="{x:Bind Converter ConverterLanguage ConverterParameter ElementName FallbackValue Mode Path RelativeSource Source TargetNullValue UpdateSourceTrigger}

21

22

23 <ListView ItemsSource="{x:Bind ViewModel.Items}" xmlns:m="using:Blank3.Models" Header="Compiled" Grid.Column="1">

24 Improve performance by simplifying your templates

25 <ResourceDictionary x:Class="MyNamespace.MyTemplates" xmlns:model="using:xBindSampleModel"> <DataTemplate x:Key="MyTemplate" x:DataType="model:Employee"> namespace MyNamespace { public class MyTemplates { public MyTemplates() { InitializeComponent(); }

26

27 Use Bindings.Update() for async data (incl. OneTime)

28

29 Bindings.StopTracking() pauses compiled bindings

30

31 public sealed partial class MainPage : Page { public MainPage() { InitializeComponent(); this.DataContextChanged += (s, e) => { ViewModel = DataContext as ViewModels.MainPageViewModel; }; } // strongly-typed view models enable x:bind public ViewModels.MainPageViewModel ViewModel { get; set; } }

32 {x:Bind} is not for every situation (yet)

33

34 x:Bind can meet your binding needs most of the time.

35

36


Download ppt "New for dependency properties register for property changes."

Similar presentations


Ads by Google