protected override void OnElementChanged(ElementChangedEventArgs <Stepper> e) { base.OnElementChanged(e); if (e.OldElement == null) { if (Control == null) { var layout = CreateNativeControl(); StepperRendererManager.CreateStepperButtons(this, out _downButton, out _upButton); layout.AddView(_downButton, new LinearLayout.LayoutParams(LayoutParams.WrapContent, LayoutParams.MatchParent) { Weight = 1, RightMargin = (int)(Context.ToPixels(DefaultButtonSpacing) / 2), }); layout.AddView(_upButton, new LinearLayout.LayoutParams(LayoutParams.WrapContent, LayoutParams.MatchParent) { Weight = 1, LeftMargin = (int)(Context.ToPixels(DefaultButtonSpacing) / 2), }); SetNativeControl(layout); } } StepperRendererManager.UpdateButtons(this, _downButton, _upButton); UpdateInputTransparent(); }
protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e) { base.OnElementPropertyChanged(sender, e); StepperRendererManager.UpdateButtons(this, _downButton, _upButton, e); if (e.PropertyName == VisualElement.InputTransparentProperty.PropertyName) { UpdateInputTransparent(); } }
protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e) { base.OnElementPropertyChanged(sender, e); StepperRendererManager.UpdateButtons(this, _downButton, _upButton, e); }