WPF TextBlock Overlaps Ellipse

You can put things like this in a viewbox to make scaling easier, something like this. You'll need to remove the stack panel, it's going to stack items one on top of the other which isn't what you're after here. I used a grid in this case.

<Viewbox Width="100" Height="100">
    <Grid Width="20" Height="20">
        <Ellipse Stroke="Black"/>
        <TextBlock HorizontalAlignment="Center" Text="i" TextAlignment="Center" VerticalAlignment="Center"/>
    </Grid>
</Viewbox>

enter image description here


So a stackpanel will place the first item at the top, the second just below it, third below the second, and so forth. What you could do is use a Canvas or a Grid. Like the stackpanel, they are "Content Controls" and support placing multiple objects inside of them like you have done with the stackpanel.

So a really quick way to do what you're trying to accomplish would be:

<Grid >
        <Ellipse HorizontalAlignment="Left" Height="52"  Stroke="Black" VerticalAlignment="Top" Width="52"/>
        <TextBlock  Text="i" FontSize="52" Margin="18,-13,-6,13" />
</Grid>

Or you can use the unicode character:

code 0x24D8

 <TextBlock Text="ⓘ" FontSize="52" />