wpf RelativeSource binding
Self
FindAncestor
TemplatedParent
b. Find Ancestor
FindAncestor
As the name implies, this option is used when the binding source is one of the ancestors (parents) of the binding target. With the FindAncestor extension, any level of ancestors can be found.
Now, let’s use the FindAncestor extension to bind the ancestor’s Name property to the Content property of the child element button.
The final rendering
My Series
A.Sql Server2005 Transact-SQL new weapon learning
B.MCAD learning
C.Code Reading Summary
D.ASP.NET State Management
E.DB (database)
F.WAP
G.WinForm
H.Flex
I hope the knowledge mentioned above can give you some hints, and welcome to exchange and correct.
Author: aierong
Source: http://www.cnblogs.com/aierong
The post is based on “the status quo “Provided without any guarantee, and at the same time, no rights are granted!
The copyright of this article belongs to the author, welcome to reprint!
Original technical articles and experiences, reprint and indicate the source! This is also respect for the original creator!