protected override void OnThemeChangedEvent(object sender, StyleManager.ThemeChangeEventArgs e) { ScrollBarAttributes tempAttributes = StyleManager.Instance.GetAttributes(style) as ScrollBarAttributes; if (tempAttributes != null) { attributes = scrollBarAttrs = tempAttributes; RelayoutRequest(); } }
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; }
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; }
public ScrollBar(ScrollBarAttributes attributes) : base(attributes) { Initialize(); }