I
I
iki900092018-02-19 17:37:10
WPF
iki90009, 2018-02-19 17:37:10

How to determine the height from the origin of the Grid to the end of the window?

This determines the height of the entire window, but since the Grid does not start from the origin, it climbs out of the window.

<Grid Height="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}}, Path=ActualHeight}">

From it you need to somehow subtract the coordinate of the beginning of the Grid

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Bashinsky, 2018-02-19
@BashkaMen

This is not an answer, but advice.
Use a Grid so that it takes up all the free space and just restrict it to other elements. In this way, you will achieve responsive design and everything will be easier.
It's even better not to set fixed dimensions, it's better to only limit (MinHeight MaxHeight)
https://www.youtube.com/watch?v=D2IrpRkd11g

A
Alexander Yudakov, 2018-02-19
@AlexanderYudakov

MultiBinding + MultiValueConverter
https://www.codeproject.com/Articles/328978/Introd...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question