| | |
| | | /// 右边的视图列表 |
| | | /// </summary> |
| | | internal System.Collections.Generic.List<Button> rigthView = new System.Collections.Generic.List<Button>(); |
| | | /// <summary> |
| | | /// 下面那边张 |
| | | /// </summary> |
| | | UIView lineUIView = new UIView(); |
| | | |
| | | /// <summary> |
| | | /// 重新刷新控件 |
| | |
| | | public override void Refresh() |
| | | { |
| | | base.Refresh(); |
| | | LineColor = lineColor; |
| | | } |
| | | /// <summary> |
| | | /// 控件宽度 |
| | |
| | | { |
| | | return base.Width; |
| | | } |
| | | set |
| | | { |
| | | base.Width = value; |
| | | if (!IsCanRefresh) |
| | | return; |
| | | |
| | | var frame4 = lineUIView.Frame; |
| | | frame4.Width = base.Width; |
| | | lineUIView.Frame = frame4; |
| | | } |
| | | set |
| | | { |
| | | base.Width = value; |
| | | if (!IsCanRefresh) |
| | | return; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | frame.Height = Height; |
| | | realViewGroup.Frame = frame; |
| | | } |
| | | |
| | | var frame4 = lineUIView.Frame; |
| | | frame4.Y = base.Height - frame4.Height; |
| | | lineUIView.Frame = frame4; |
| | | } |
| | | } |
| | | |
| | | uint lineColor = 0x80818181; |
| | | /// <summary> |
| | | /// 背景颜色 |
| | | /// </summary> |
| | | /// <value>The color of the background.</value> |
| | | public virtual uint LineColor |
| | | { |
| | | get |
| | | { |
| | | return lineColor; |
| | | } |
| | | set |
| | | { |
| | | lineColor = value; |
| | | if (!IsCanRefresh) |
| | | { |
| | | return; |
| | | } |
| | | byte r, g, b, a; |
| | | r = (byte)(lineColor / 256 / 256 % 256); |
| | | g = (byte)(lineColor / 256 % 256); |
| | | b = (byte)(lineColor % 256); |
| | | a = (byte)(lineColor / 256 / 256 / 256 % 256); |
| | | lineUIView.BackgroundColor = UIKit.UIColor.FromRGBA(r, g, b, a); |
| | | } |
| | | } |
| | | |
| | |
| | | viewGroup.AddSubview(realViewGroup); |
| | | viewGroup.Layer.MasksToBounds = true; |
| | | |
| | | lineUIView.BackgroundColor = new UIColor(0x81 / 255.0f, 0x81 / 255.0f, 0x81 / 255.0f, 0.8f); |
| | | var lineUIViewFrame = lineUIView.Frame; |
| | | lineUIViewFrame.Height = 1.0f; |
| | | lineUIView.Frame = lineUIViewFrame; |
| | | viewGroup.AddSubview(lineUIView); |
| | | |
| | | (viewGroup as UIScrollView).ShowsHorizontalScrollIndicator = false;//隐藏水平滚动条 |
| | | |
| | | } |
| | | |
| | | |