Beispiel #1
0
        protected override void OnElementChanged(ElementChangedEventArgs <CircleStepper> e)
        {
            if (Control == null)
            {
                var surface = this.GetSurface();
                if (null != surface)
                {
                    var spinner = new ESpinner(XForms.NativeParent, surface);
                    spinner.Style = "circle";

                    SetNativeControl(spinner);
                    Control.ValueChanged += OnValueChanged;

                    if (Tizen.Common.DotnetUtil.TizenAPIVersion == 4)
                    {
                        _listShow = new ElmSharp.SmartEvent(Control, "genlist,show");
                        _listHide = new ElmSharp.SmartEvent(Control, "genlist,hide");
                    }
                    else
                    {
                        _listShow = new ElmSharp.SmartEvent(Control, "list,show");
                        _listHide = new ElmSharp.SmartEvent(Control, "list,hide");
                    }
                    _listShow.On += OnListShow;
                    _listHide.On += OnListHide;
                }
                else
                {
                    throw new CirclePageNotFoundException();
                }
            }

            base.OnElementChanged(e);
        }
Beispiel #2
0
 protected override void OnElementChanged(ElementChangedEventArgs <CarouselView> e)
 {
     base.OnElementChanged(e);
     if (e.NewElement != null)
     {
         Control.Scrolled         += OnScrolled;
         Control.Scroll.DragStart += OnDragStart;
         Control.Scroll.DragStop  += OnDragStop;
         _animationStart           = new ElmSharp.SmartEvent(Control.Scroll, Control.Scroll.RealHandle, "scroll,anim,start");
         _animationStart.On       += OnScrollStart;
         _animationStop            = new ElmSharp.SmartEvent(Control.Scroll, Control.Scroll.RealHandle, "scroll,anim,stop");
         _animationStop.On        += OnScrollStop;
     }
     UpdatePositionFromElement(false);
     UpdateCurrentItemFromElement(false);
 }