Mot*_*taz 1 c# xamarin.forms ngraphics
我是xamarin表单的新手,必须绘制一个圆,其标签位于圆的中心,标签的内容是动态的,因此它必须支持数据绑定,并且圆应适应于包含文本。
注意:文字主要是数字,我不必支持两位以上的文字。
在以下问题中,带 圆圈标签的Xamarin形式
他们解释了如何使用“自定义”渲染器实现这一目标,但是,只要有我认为可以满足要求的NControl和NGraphics库,我认为这样的任务不需要客户渲染器的复杂性。
您能否指导我如何使用NGraphics和NControl库来完成这样的任务?
小智 9
如果您不想使用按钮,也可以使用框架。
<Frame HeightRequest="40" WidthRequest="40" CornerRadius="20" HorizontalOptions="Start" VerticalOptions="Start" Margin="0" Padding="0" BackgroundColor="Maroon">
<Label Text="7" TextColor="White" HorizontalOptions="Center" VerticalOptions="Center" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" />
</Frame>
Run Code Online (Sandbox Code Playgroud)
值得关注的是这个论坛https://forums.xamarin.com/discussion/99509/how-make-a-circle-label#Comment_322491
| 归档时间: |
|
| 查看次数: |
6826 次 |
| 最近记录: |