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> 6 </since_tizen>
27 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
28 [EditorBrowsable(EditorBrowsableState.Never)]
29 public class ProgressStyle : ControlStyle
31 static ProgressStyle() { }
34 /// Creates a new instance of a ProgressStyle.
36 /// <since_tizen> 6 </since_tizen>
37 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
38 [EditorBrowsable(EditorBrowsableState.Never)]
39 public ProgressStyle() : base()
45 /// Creates a new instance of a ProgressStyle with style.
47 /// <param name="style">Create ProgressStyle by style customized by user.</param>
48 /// <since_tizen> 6 </since_tizen>
49 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
50 [EditorBrowsable(EditorBrowsableState.Never)]
51 public ProgressStyle(ProgressStyle style) : base(style)
53 if (null == style) return;
61 /// Get or set track image.
63 /// <since_tizen> 6 </since_tizen>
64 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
65 [EditorBrowsable(EditorBrowsableState.Never)]
66 public ImageViewStyle Track { get; set; }
69 /// Get or set progress image.
71 /// <since_tizen> 6 </since_tizen>
72 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
73 [EditorBrowsable(EditorBrowsableState.Never)]
74 public ImageViewStyle Progress { get; set; }
77 /// Get or set buffer image.
79 /// <since_tizen> 6 </since_tizen>
80 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
81 [EditorBrowsable(EditorBrowsableState.Never)]
82 public ImageViewStyle Buffer { get; set; }
87 /// <since_tizen> 6 </since_tizen>
88 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
89 [EditorBrowsable(EditorBrowsableState.Never)]
90 public override void CopyFrom(BindableObject bindableObject)
92 base.CopyFrom(bindableObject);
94 ProgressStyle progressStyle = bindableObject as ProgressStyle;
96 if (null != progressStyle)
98 if (null != progressStyle.Track)
100 Track.CopyFrom(progressStyle.Track);
103 if (null != progressStyle.Progress)
105 Progress.CopyFrom(progressStyle.Progress);
108 if (null != progressStyle.Buffer)
110 Buffer.CopyFrom(progressStyle.Buffer);
115 private void InitSubStyle()
117 Track = new ImageViewStyle()
119 WidthResizePolicy = ResizePolicyType.FillToParent,
120 HeightResizePolicy = ResizePolicyType.FillToParent,
121 PositionUsesPivotPoint = true,
122 ParentOrigin = NUI.ParentOrigin.TopLeft,
123 PivotPoint = NUI.PivotPoint.TopLeft
126 Progress = new ImageViewStyle()
128 WidthResizePolicy = ResizePolicyType.FillToParent,
129 HeightResizePolicy = ResizePolicyType.FillToParent,
130 PositionUsesPivotPoint = true,
131 ParentOrigin = Tizen.NUI.ParentOrigin.TopLeft,
132 PivotPoint = Tizen.NUI.PivotPoint.TopLeft
135 Buffer = new ImageViewStyle()
137 WidthResizePolicy = ResizePolicyType.FillToParent,
138 HeightResizePolicy = ResizePolicyType.FillToParent,
139 PositionUsesPivotPoint = true,
140 ParentOrigin = Tizen.NUI.ParentOrigin.TopLeft,
141 PivotPoint = Tizen.NUI.PivotPoint.TopLeft