How to bind Height of element in parent Page to Height of ChildWindow
WPF
1
Posts
1
Posters
1
Views
1
Watching
-
I want to bind the
Height
of aChildWindow
to theHeight
of an element in thePage
that shows theChildWindow
. The only descriptions I've seen are bindings between elements in the sameControl
. Is what I want to do even possible, and if so, what is the syntax of theBinding
expression that would be in theChildWindow
? I first tried to set theHeight
of theChildWindow
to theHeight
of the element in the Page immediately after constructing theChildWindow
and before callingChildWindow.Show
, but for some mysterious reason, this positions the top of theChildWindow
above the top of thePage
, which is unacceptable. Naturally I want to keep theChildWindow
centered on the page, or at least centered on a specific element within thePage
.