2 * Copyright(c) 2019 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 /// Get or set track image.
51 /// <since_tizen> 8 </since_tizen>
52 public ImageViewStyle Track { get; set; } = new ImageViewStyle();
55 /// Get or set progress image.
57 /// <since_tizen> 8 </since_tizen>
58 public ImageViewStyle Progress { get; set; } = new ImageViewStyle();
61 /// Get or set buffer image.
63 /// <since_tizen> 8 </since_tizen>
64 public ImageViewStyle Buffer { get; set; } = new ImageViewStyle();
67 /// Style's clone function.
69 /// <param name="bindableObject">The style that need to copy.</param>
70 /// <since_tizen> 8 </since_tizen>
71 public override void CopyFrom(BindableObject bindableObject)
73 base.CopyFrom(bindableObject);
75 if (bindableObject is ProgressStyle progressStyle)
77 Track.CopyFrom(progressStyle.Track);
78 Progress.CopyFrom(progressStyle.Progress);
79 Buffer.CopyFrom(progressStyle.Buffer);