在WPF中将文本块添加到椭圆

时间:2022-08-07 19:35:04

How to add a TextBlock to an Ellipse in WPF/Silverlight?

如何在WPF / Silverlight中向Textipse添加TextBlock?

1 个解决方案

#1


9  

Use a Grid, place the Ellipse followed by the TextBlock in the Grid.

使用网格,在网格中放置椭圆,然后放置TextBlock。

<Grid>
   <Ellipse ...  />
   <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" />
</Grid>

#1


9  

Use a Grid, place the Ellipse followed by the TextBlock in the Grid.

使用网格,在网格中放置椭圆,然后放置TextBlock。

<Grid>
   <Ellipse ...  />
   <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" />
</Grid>