Right, what I have is a window I'd like to resize, however I'd also like it to keep its aspect ratio. I've read some questions (such as this and this), however, the solutions either don't work or are really jittery and fail very often. Can anyone help me with this issue?
Asked
Active
Viewed 2,614 times
2
-
please upvote the questions or place a bounty. – mathieu Apr 10 '13 at 08:02
-
1. your question is the same as those you linked -> duplicate. 2. then please state what you mean by "not working" or "jittery". 3. please don't be rude, as you're the one needing assistance – mathieu Apr 10 '13 at 09:06
-
@mathieu 1. It is, but look atthe next answer. 2. Jittery: on resize, it keeps going back and forth between the old size and the new one, and then when I let go it may work or it may not, usually the former. Not working: The same as jittery, except that at the end it never works. 3. Sorry, I was angry that I looked up the questions, posted them to avoid this, and then it just happened anyways. – It'sNotALie. Apr 10 '13 at 09:20
1 Answers
0
Hmm. I would use Viewbox with Uniform stretching as window's top content container.

Zéiksz
- 688
- 1
- 11
- 25
-
That kind of works, it does keep the inner content uniform, but it has letterboxing if you stretch it in another direction, and also it makes it fill everything. I normally keep padding around the grid, so the content isn't touching the edge. The viewbox makes the content touch the edge, which I don't really like. – It'sNotALie. Apr 10 '13 at 11:26
-
Without the code to look at, I guess noone really will be able to help you. My suggestion is, that you provide details in your question post. – Zéiksz Apr 10 '13 at 12:19
-
1It should be applicable to most WPF windows, and a Viewbox with uniform stretching won't do that. – It'sNotALie. Apr 10 '13 at 12:57