In XAML, how can I keep an ellipse being a circle?

Bart Roozendaal picture Bart Roozendaal · May 25, 2009 · Viewed 18.9k times · Source

I'm getting XAML-blind I'm afraid. I'm developing a MS Surface application and I have an ellipse inside a ScatterViewItem (a container an end user can resize). I would like to keep the ellipse a circle (width == height) and keep it as big as possible (the lowest value of width/height of the SVI should be taken for both width/height properties of the ellipse).

A XAML only solution (using property triggers or similar) is prefered.

Your help is much appreciated as always.

Answer

Steffen Winkler picture Steffen Winkler · Oct 2, 2012

I stumbled over this question a few minutes ago and found a much better solution than @Paul Betts (I'd comment on his answer if I could, but I can't)

You can simply use <Ellipse Stretch="Uniform" /> to get a circle.

Source: http://forums.silverlight.net/t/160615.aspx