【问题标题】:How to add square border in xaml如何在xaml中添加方形边框
【发布时间】:2018-10-16 00:59:24
【问题描述】:

我正在处理 xamarin 表单并使用 xaml 制作 UI。

请看上面的图片,让我知道如何在 xaml 中绘制它,并且图片编号是动态的

【问题讨论】:

    标签: .net xaml xamarin.forms


    【解决方案1】:

    你可以使用Frame,这是一个简单的例子:

    <Frame OutlineColor="White" BackgroundColor="Black">
        <Label Text="{Binding MyNumber}" TextColor="White" />
    </Frame>
    

    结果:

    【讨论】:

      【解决方案2】:

      使用 AbsoluteLayout 并仅使用图像(或更好的 svg),在其上添加绑定到 int 值的 Label

      【讨论】:

        猜你喜欢
        • 2021-12-17
        • 1970-01-01
        • 2012-04-10
        • 1970-01-01
        • 2011-05-19
        • 1970-01-01
        • 1970-01-01
        • 2016-09-23
        • 1970-01-01
        相关资源
        最近更新 更多