private void Initialize() { scrollView = new HMScrollView { ScrollsToTop = false, ShowsVerticalScrollIndicator = false, ShowsHorizontalScrollIndicator = false }; AddSubview(scrollView); Opaque = false; SelectionIndicatorColor = UIColor.FromRGBA(52.0f / 255.0f, 181.0f / 255.0f, 229.0f / 255.0f, 1.0f); SelectedIndex = 0; SegmentEdgeInset = new UIEdgeInsets(0, 5, 0, 5); SelectionIndicatorHeight = 5.0f; selectionIndicatorEdgeInsets = new UIEdgeInsets(0, 0, 0, 0); SelectionStyle = HMSegmentedControlSelectionStyle.TextWidthStripe; SelectionIndicatorLocation = HMSegmentedControlIndicatorLocation.Up; segmentWidthStyle = HMSegmentedControlWidthStyle.Fixed; UserDraggable = true; TouchEnabled = true; VerticalDividerEnabled = false; VerticalDividerColor = UIColor.Black; BorderColor = UIColor.Black; borderWidth = 1.0f; ShouldAnimateUserSelection = true; selectionIndicatorBoxOpacity = 0.2f; SelectionIndicatorArrowLayer = new DisposableCALayer(); SelectionIndicatorStripLayer = new DisposableCALayer(); SelectionIndicatorBoxLayer = new DisposableCALayer { Opacity = selectionIndicatorBoxOpacity, BorderWidth = 1.0f }; ContentMode = UIViewContentMode.Redraw; }