If the width and height are fixed, the simplest solution would be to set the Ellipse's RenderTransform
to a TranslateTransform
with X
and Y
set to negative offsets equal to half the ellipse's width and height, respectively:
<Ellipse Width="100" Height="100" Fill="Red">
<Ellipse.RenderTransform>
<TranslateTransform X="-50" Y="-50" />
</Ellipse.RenderTransform>
</Ellipse>
Note that a caveat of using RenderTransform
is that the transform is not applied to layout (and you cannot use a TranslateTransform
for the LayoutTransform
). That shouldn't be an issue with a Canvas
because of how it handles layout, though it might be problematic with other panels.