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 /// LoadingStyle is a class which saves Loading's ux data.
26 /// <since_tizen> 8 </since_tizen>
27 public class LoadingStyle : ControlStyle
29 static LoadingStyle() { }
32 /// Creates a new instance of a LoadingStyle.
34 /// <since_tizen> 8 </since_tizen>
35 public LoadingStyle() : base() { }
38 /// Creates a new instance of a LoadingStyle with style.
40 /// <param name="style">Create LoadingStyle by style customized by user.</param>
41 /// <since_tizen> 8 </since_tizen>
42 public LoadingStyle(LoadingStyle style) : base(style)
52 /// Gets or sets loading image resources.
54 /// <since_tizen> 8 </since_tizen>
55 public string[] Images { get; set; }
58 /// Gets or sets loading image size.
60 /// <since_tizen> 8 </since_tizen>
61 public Size LoadingSize { get; set; }
64 /// Gets or sets loading frame per second.
66 /// <since_tizen> 8 </since_tizen>
67 public Selector<int?> FrameRate { get; set; } = new Selector<int?>();
70 /// Style's clone function.
72 /// <param name="bindableObject">The style that need to copy.</param>
73 /// <since_tizen> 8 </since_tizen>
74 public override void CopyFrom(BindableObject bindableObject)
76 base.CopyFrom(bindableObject);
78 LoadingStyle loadingStyle = bindableObject as LoadingStyle;
80 if (null != loadingStyle)
82 if (null != loadingStyle.FrameRate)
84 FrameRate?.Clone(loadingStyle.FrameRate);
86 if (null != loadingStyle.LoadingSize)
88 LoadingSize = loadingStyle.LoadingSize;
90 if (null != loadingStyle.Images)
92 Images = loadingStyle.Images;