Explain WPF relative binding / relative resource? (.NET WPF Interview questions with answers)
In case you are new to WPF bindings you read basics from http://questpond.blog.com/2013/11/11/explain-wpf-bindings-net-wpf-binding-interview-questions/
When we define bindings we need at least two elements target and source. But many times rather than defining binding between two elements we would like to define binding with reference to the current element i.e. RELATIVELY.
For instance let's say we have a WPF rectangle and we would like height and width of the rectangle to be same. So for this scenario the target and source are the same, the rectangle.So we can define the binding using "RelativeSource" as shown in the below code. You can see it uses "Self" biding mode to bind the element to itself.
WPF Questions and Answers
Lab 1: - What is WPF and how it is better than Winforms?
Theory: - Explain WPF object hierarchy?
Lab 2 : - How to implement threading in WPF?
Lab 3: - Explain one way, two way, one time & one way to source bindings?
Lab 4 : - Explain UpdateSourceTrigger in WPF ?
Lab 5 : - Explain WPF Resources ?
Lab 6 : - What are WPF Value Converters ?
Lab 7 : - Explain WPF multibindings and multivalueconverters ?
Lab 8: - Explain logical tree, visual tree,routed events( Direct , Tunneling and Bubbling)?
Lab 9 : - Explain WPF relative bindings ?
Lab 10 : - WPF MVVM
Below video explain what is WPF and how they differ from Windows form