【问题标题】:How can I make a frame as a border that just shows as a plain 1px line?如何将框架作为仅显示为普通 1px 线的边框?
【发布时间】:2018-01-30 22:23:41
【问题描述】:

我正在使用这样的框架在标签周围放置轮廓。

但我对它的外观有两个问题

    <Frame Grid.Column="0" CornerRadius="5" OutlineColor="Black">
      <Label  x:Name="faveIconLabel" Style="{StaticResource mediumIcon}" Margin="0,2,0,0" HorizontalOptions="Fill" FontFamily="FontAwesome" VerticalOptions="Center" VerticalTextAlignment="Center" />
    </Frame>
  • 边框很宽,我真正想要的只是1px的边框
  • 标签文本被隐藏,我看不到它。

谁能给我关于如何解决这两个问题的建议。

【问题讨论】:

    标签: xamarin xamarin.forms


    【解决方案1】:

    Xamarin Form 的 Frame 类将默认填充设置为 20,因此您必须将其设置为 0 左右才能解决额外空间问题。不幸的是,如果不使用自定义渲染器,您将无法编辑边框宽度。

    【讨论】:

    • 哦,边框宽度对我来说非常重要。除了可以获取边框半径的框架之外,还有其他方法可以做到这一点吗?
    猜你喜欢
    • 1970-01-01
    • 2014-02-28
    • 1970-01-01
    • 2017-07-31
    • 1970-01-01
    • 1970-01-01
    • 2013-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多