TemplateBinding Height To owner height WPF -


I want to set the height of the window's template at the height of the owner if I have 1280 and 1024 resolutions in my main window It seems to get 1024 height and set it to the border in the template. How can I get the main window height?

It's a little hard to understand what you want here. Maybe your code will help

I'm assuming, because you're talking about a template, you're making a control, what exactly does the height need? I would think that the easiest thing to do is to set the default vertical alignment in Stretch, and do not worry about the actual height. If you need the height, you can subscribe to the size of your control changed event and get the value of the actual high property.

If you use FindAncestor in the relative source bond, you can also get the height of a container window.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -