zoukankan      html  css  js  c++  java
  • Xamarin.Forms之Frame布局

    1.HasShadow属性

    可能很多人都不会注意到这个属性,知道在iOS看到Frame默认的那个样子(自带阴影)

    通过反编译,找到该属性的定义

    /// <summary>Identifies the HasShadow bindable property.</summary>
            /// <remarks />
            public static readonly BindableProperty HasShadowProperty = BindableProperty.Create("HasShadow", typeof(bool), typeof(Frame), true, BindingMode.OneWay, null, null, null, null, null);
    HasShadow - true or false, to indicate whether to show a shadow effect where the platform supports it.

    实际的结果就是:

    iOS:支持该属性,且默认是有阴影的(看上面的定义,HasShadow的默认值为true)

    Android:不支持

    2.Frame中使用Style

    其实跟普通其他控件一样,但是今天遇到一个问题,当在Style中设置Padding的时候,无效,最终发现这是Forms的一个BUG

    https://bugzilla.xamarin.com/show_bug.cgi?id=30765

    也就是说在Style中设置Frame的Padding是无效的

  • 相关阅读:
    基于XMPP协议的Android即时通信系
    codeforces 830 B Cards Sorting
    [SCOI2007]修车
    spoj GSS4
    hdu 3652 B-number
    【模版】多项式乘法 FFT
    hdu 3642 Get The Treasury
    hdu 1255 覆盖的面积
    hdu 4553 约会安排
    UVA-11992 Fast Matrix Operations
  • 原文地址:https://www.cnblogs.com/yz1311/p/5554230.html
Copyright © 2011-2022 走看看