Ejemplo n.º 1
0
        protected override void OnThemeChangedEvent(object sender, StyleManager.ThemeChangeEventArgs e)
        {
            ProgressStyle tempStyle = StyleManager.Instance.GetViewStyle(StyleName) as ProgressStyle;

            if (null != tempStyle)
            {
                progressStyle.CopyFrom(tempStyle);
                RelayoutRequest();
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates a new instance of a ProgressStyle with style.
        /// </summary>
        /// <param name="style">Create ProgressStyle by style customized by user.</param>
        /// <since_tizen> 8 </since_tizen>
        public ProgressStyle(ProgressStyle style) : base(style)
        {
            if (null == style)
            {
                return;
            }

            InitSubStyle();

            this.CopyFrom(style);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Return default Progress style
        /// </summary>
        internal protected override ViewStyle GetViewStyle()
        {
            ProgressStyle style = new ProgressStyle
            {
                Size  = new Size(200, 5),
                Track = new ImageViewStyle
                {
                    BackgroundColor = new Color(0, 0, 0, 0.1f),
                },
                Buffer = new ImageViewStyle
                {
                    BackgroundColor = new Color(0.05f, 0.63f, 0.9f, 0.3f)
                },
                Progress = new ImageViewStyle
                {
                    BackgroundColor = new Color(0.05f, 0.63f, 0.9f, 1)
                },
            };

            return(style);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Style's clone function.
        /// </summary>
        /// <param name="bindableObject">The style that need to copy.</param>
        /// <since_tizen> 8 </since_tizen>
        public override void CopyFrom(BindableObject bindableObject)
        {
            base.CopyFrom(bindableObject);

            ProgressStyle progressStyle = bindableObject as ProgressStyle;

            if (null != progressStyle)
            {
                if (null != progressStyle.Track)
                {
                    Track?.CopyFrom(progressStyle.Track);
                }

                if (null != progressStyle.Progress)
                {
                    Progress?.CopyFrom(progressStyle.Progress);
                }

                if (null != progressStyle.Buffer)
                {
                    Buffer?.CopyFrom(progressStyle.Buffer);
                }
            }
        }
Ejemplo n.º 5
0
 /// <summary>
 /// The constructor of the Progress class with specific style.
 /// </summary>
 /// <param name="progressStyle">The style object to initialize the Progress.</param>
 /// <since_tizen> 8 </since_tizen>
 public Progress(ProgressStyle progressStyle) : base(progressStyle)
 {
     Initialize();
 }
Ejemplo n.º 6
0
 /// <summary>
 /// The constructor of the Progress class with specific style.
 /// </summary>
 /// <param name="progressStyle">The style object to initialize the Progress.</param>
 /// <since_tizen> 8 </since_tizen>
 public Progress(ProgressStyle progressStyle) : base(progressStyle)
 {
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Creates a new instance of a ProgressStyle with style.
 /// </summary>
 /// <param name="style">Create ProgressStyle by style customized by user.</param>
 /// <since_tizen> 8 </since_tizen>
 public ProgressStyle(ProgressStyle style) : base(style)
 {
 }