WPF Tutorial
Welcome to this free online Windows Presentation Foundation tutorial.
Search This Blog
Wednesday, July 22, 2015
How to bind to a parent DataContext property in WPF
WPF
>
RelativeSource >
FindAncestor
Bind to a parent DataContext property example
IsEnabled
="{
Binding
RelativeSource
={
RelativeSource
FindAncestor
,
AncestorType
={
x
:
Type
Window
}},
Path
=DataContext.YourParentProperty}"
Newer Post
Older Post
Home