2 * Copyright(c) 2021 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 using System.ComponentModel;
18 using Tizen.NUI.BaseComponents;
19 using Tizen.NUI.Binding;
21 namespace Tizen.NUI.Components
24 /// ProgressStyle is a class which saves Progress's ux data.
26 /// <since_tizen> 8 </since_tizen>
27 public class ProgressStyle : ControlStyle
29 static ProgressStyle() { }
32 /// Creates a new instance of a ProgressStyle.
34 /// <since_tizen> 8 </since_tizen>
35 public ProgressStyle() : base()
40 /// Creates a new instance of a ProgressStyle with style.
42 /// <param name="style">Create ProgressStyle by style customized by user.</param>
43 /// <since_tizen> 8 </since_tizen>
44 public ProgressStyle(ProgressStyle style) : base(style)
49 /// Gets or sets track image.
51 /// <since_tizen> 8 </since_tizen>
52 public ImageViewStyle Track { get; set; } = new ImageViewStyle();
55 /// Gets or sets progress image.
57 /// <since_tizen> 8 </since_tizen>
58 public ImageViewStyle Progress { get; set; } = new ImageViewStyle();
61 /// Gets or sets buffer image.
63 /// <since_tizen> 8 </since_tizen>
64 public ImageViewStyle Buffer { get; set; } = new ImageViewStyle();
67 /// Gets or sets indeterminate progress resource.
69 /// <since_tizen> 9 </since_tizen>
70 public string IndeterminateImageUrl { get; set; }
73 /// <since_tizen> 8 </since_tizen>
74 public override void CopyFrom(BindableObject bindableObject)
76 base.CopyFrom(bindableObject);
78 if (bindableObject is ProgressStyle progressStyle)
80 Track.CopyFrom(progressStyle.Track);
81 Progress.CopyFrom(progressStyle.Progress);
82 Buffer.CopyFrom(progressStyle.Buffer);
83 IndeterminateImageUrl = progressStyle.IndeterminateImageUrl;