C# UITextView-设置边框颜色

C# UITextView-设置边框颜色,c#,iphone,ios,mono,xamarin.ios,C#,Iphone,Ios,Mono,Xamarin.ios,在MonoTouch中,我试图设置边框颜色,但由于其保护级别,无法访问边框颜色,因此无法更改 public class BorderedUITextView:UITextView { public BorderedUITextView (RectangleF Frame):base(Frame) { this.Layer.BorderColor (UIColor.Black); ???????????? this.Layer.BorderWidt

在MonoTouch中,我试图设置边框颜色,但由于其保护级别,无法访问边框颜色,因此无法更改

public class BorderedUITextView:UITextView
{
    public BorderedUITextView (RectangleF Frame):base(Frame)
    {
        this.Layer.BorderColor (UIColor.Black);  ????????????
        this.Layer.BorderWidth = 1.3f;
        this.Layer.CornerRadius = 15f;
        this.ClipsToBounds = true;
    }
}
LayerF如果CoreAnimation.CALayer BorderColor是一个属性,而不是一个方法,那么应该像这样指定它:

this.Layer.BorderColor = x;
而且它是CGColor而不是UIColor

LayerF如果CoreAnimation.CALayer BorderColor是一个属性,而不是一个方法,那么应该像这样指定它:

this.Layer.BorderColor = x;
而且它是CGColor而不是UIColor


您还可以从UiColor获取CGColor

this.Layer.BorderColor  = UIColor.Black.CGColor;

您还可以从UiColor获取CGColor

this.Layer.BorderColor  = UIColor.Black.CGColor;

边框颜色集如何-回答如下谁是边框颜色集-回答如下