Пример #1
0
        protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            if (this.IsDisposed())
            {
                return;
            }

            base.OnElementPropertyChanged(sender, e);
            StepperRendererManager.UpdateButtons(this, _downButton, _upButton, e);
        }
Пример #2
0
        protected override void OnElementChanged(ElementChangedEventArgs <Stepper> e)
        {
            base.OnElementChanged(e);

            if (e.OldElement == null)
            {
                var layout = CreateNativeControl();
                StepperRendererManager.CreateStepperButtons(this, out _downButton, out _upButton);
                layout.AddView(_downButton, new LinearLayout.LayoutParams(LayoutParams.WrapContent, LayoutParams.MatchParent));
                layout.AddView(_upButton, new LinearLayout.LayoutParams(LayoutParams.WrapContent, LayoutParams.MatchParent));
                SetNativeControl(layout);
            }

            StepperRendererManager.UpdateButtons(this, _downButton, _upButton);
        }