protected override void OnThemeChangedEvent(object sender, StyleManager.ThemeChangeEventArgs e) { ProgressStyle tempStyle = StyleManager.Instance.GetViewStyle(StyleName) as ProgressStyle; if (null != tempStyle) { progressStyle.CopyFrom(tempStyle); RelayoutRequest(); } }
/// <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); }
/// <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); }
/// <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); } } }
/// <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(); }
/// <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) { }
/// <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) { }