Ejemplo n.º 1
0
        protected override void OnThemeChangedEvent(object sender, StyleManager.ThemeChangeEventArgs e)
        {
            ScrollBarAttributes tempAttributes = StyleManager.Instance.GetAttributes(style) as ScrollBarAttributes;

            if (tempAttributes != null)
            {
                attributes = scrollBarAttrs = tempAttributes;
                RelayoutRequest();
            }
        }
Ejemplo n.º 2
0
        public ScrollBarAttributes(ScrollBarAttributes attributes) : base(attributes)
        {
            if (attributes == null)
            {
                return;
            }

            if (attributes.TrackImageAttributes != null)
            {
                TrackImageAttributes = attributes.TrackImageAttributes.Clone() as ImageAttributes;
            }

            if (attributes.ThumbImageAttributes != null)
            {
                ThumbImageAttributes = attributes.ThumbImageAttributes.Clone() as ImageAttributes;
            }

            Direction = attributes.Direction;
            Duration  = attributes.Duration;
        }
Ejemplo n.º 3
0
        private void Initialize()
        {
            scrollBarAttrs = this.attributes as ScrollBarAttributes;
            if (scrollBarAttrs == null)
            {
                throw new Exception("ScrollBar attribute parse error.");
            }

            this.Focusable = false;

            trackImage = new ImageView
            {
                Focusable              = false,
                WidthResizePolicy      = ResizePolicyType.FillToParent,
                HeightResizePolicy     = ResizePolicyType.FillToParent,
                PositionUsesPivotPoint = true,
                ParentOrigin           = Tizen.NUI.ParentOrigin.TopLeft,
                PivotPoint             = Tizen.NUI.PivotPoint.TopLeft
            };
            thumbImage = new ImageView
            {
                Focusable              = false,
                WidthResizePolicy      = ResizePolicyType.Fixed,
                HeightResizePolicy     = ResizePolicyType.Fixed,
                PositionUsesPivotPoint = true,
                ParentOrigin           = Tizen.NUI.ParentOrigin.TopLeft,
                PivotPoint             = Tizen.NUI.PivotPoint.TopLeft
            };

            Add(trackImage);
            Add(thumbImage);

            scrollAniPlayer = new Animation(334);
            scrollAniPlayer.DefaultAlphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Linear);

            thumbImagePosX          = 0;
            thumbImagePosY          = 0;
            LayoutDirectionChanged += OnLayoutDirectionChanged;
        }
Ejemplo n.º 4
0
 public ScrollBar(ScrollBarAttributes attributes) : base(attributes)
 {
     Initialize();
 }