I would suggest not using a ViewBox. If you don't set the width and height of the ellipse and border, they will size with the window automatically. Instead use a grid to set the relative size of the controls using row height and column width percentages (eg.
0.6*).
Up vote 0 down vote favorite share g+ share fb share tw.
I'm rather new at WPF and I need some help. I have a ViewBox on my for and inside the ViewBox an Ellipse and a Border. When I resize the form I want the Ellipse and the Border to scale automatically (what it does).
But I don't want the BorderThickness to scale. The thickness of the border should stay 3 pixels. Does anyone know how to accomplish this?
Here is my XAML: Thanks for any help! Wpf border scaling link|improve this question edited Nov 7 '10 at 9:06 asked Nov 5 '10 at 19:47Jackerd236.
I would suggest not using a ViewBox. If you don't set the width and height of the ellipse and border, they will size with the window automatically. Instead use a grid to set the relative size of the controls using row height and column width percentages (eg.
0.6*) Update - Example Update Hmmm, not seeing a easy way to do exactly what you need. Below is the closest I've been able to come. The only other options I can see: Put each ellipse in it's own view box Size the grid columns & rows in code on window resize.
Thanks for your suggestion Thomas. The problem is the Ellipse and the Border should stretch = uniform. Only the BorderThickness shouldn't.
If I place the Ellipse and Border in a grid cell how can I specify the grid should stretch = uniform? – Jackerd Nov 6 '10 at 20:38 I've added an example to my answer, hopefully it helps – Thomas Nov 7 '10 at 3:32 Thanks Thomas, I checked your example, but it's not exactly what I need. I managed to add my XAML in my question.
The behavior is exactly what I need, but only the BorderThickness should't Stretch. – Jackerd Nov 7 '10 at 9:10 See answer update – Thomas Nov 7 '10 at 20:26 1 I'll go with your second option to resize the Grid in code. This way the Border of the Ellipse doesn't stretch, but I can live with that.
Thanks a lot! – Jackerd Nov 7 '10 at 21:38.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.