B"H
I would like to control the height and width of one of my windows through my ViewModel.
This seems simple enough.
<Window ... Width="{Binding Path=Width}" Height="{Binding Path=Height}" />
but nope. it doesn't work.
It checks the ViewModel's Width
but not the Height
.
Strangely enough, if I switch the order of Width
and Height
in the XAML it checks the Height
and not the Width
. i.e. It only checks the first of the two properties and totally ignores the second one.
Binding the MaxHeight
and MinHeight
do work, even after the Width
. But then the user can not re-size the window.