I am new to XAML. I encountered this problem that I need to place a symbol icon or font icon into an Ellipse
shape (so it shows like an icon inside a circle). However, seems like the Ellipse's Fill
property only takes ImageBrush
and ColorBursh
. (MSDN)
How can I add an icon to the Ellipse?
try this (replace your own font symbol in TextBlock
Text)
<Grid>
<Ellipse Stroke="Red"
Fill="Red"
StrokeThickness="5">
</Ellipse>
<TextBlock Text=""
VerticalAlignment="Center"
HorizontalAlignment="Center">
</TextBlock>
</Grid>