WPF - Data Binding Examples

I am trying to wrap my arms around a WPF binding. I feel that if I can really understand how this works, I can make full use of WPF. I recently came across StackOverflow, which really helped me understand one aspect of binding. It looks like this:

<ListView ItemsSource="{Binding AllRoles, RelativeSource={RelativeSource FindAncestor, AncestorType=Window}}" Name="Hello"> 

This means: “Look at my family tree until you find the Window, and then find the public property in the window called AllRoles.” Link it to the list.

Does anyone know where I can find simpler examples with explanations like this? I found this extremely useful.

+4
source share
2 answers

WPF Data Binding Cheat Sheet

It did it for me. It has examples for most aspects of data binding in WPF. I saved a hard copy with me when I started with WPF, and it really helped.

Although 90% of the bindings I use are simple {Binding Something} or {Binding ElementName=someElement} , it's nice to know all the possibilities.

+3
source

I found Bea Stollnitz's blog to have a lot of really useful things.

http://bea.stollnitz.com/blog/

+1
source

Source: https://habr.com/ru/post/1340681/


All Articles