WPF Tutorial
Welcome to this free online Windows Presentation Foundation tutorial.
Search This Blog
Showing posts with label
DataContext
.
Show all posts
Showing posts with label
DataContext
.
Show all posts
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}"
Older Posts
Home
Subscribe to:
Posts (Atom)