2 * Copyright(c) 2022 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;
19 using Tizen.NUI.BaseComponents;
20 using Tizen.NUI.Components;
22 namespace Tizen.NUI.StyleGuide
24 // IExample inehrited class will be automatically added in the main examples list.
25 internal class ProgressExample : ContentPage, IExample
27 private View rootContent;
28 private Progress bufferingProgress, disabledProgress, determinatedProgress, indeterminatedProgress;
30 public void Activate()
33 public void Deactivate()
37 /// Modify this method for adding other examples.
38 public ProgressExample() : base()
40 WidthSpecification = LayoutParamPolicies.MatchParent;
41 HeightSpecification = LayoutParamPolicies.MatchParent;
43 // Navigator bar title is added here.
46 Title = "Progress Default Style",
49 // Example root content view.
50 // you can decorate, add children on this view.
51 rootContent = new View()
53 WidthSpecification = LayoutParamPolicies.MatchParent,
54 HeightSpecification = LayoutParamPolicies.MatchParent,
56 Layout = new LinearLayout()
58 LinearOrientation = LinearLayout.Orientation.Vertical,
59 HorizontalAlignment = HorizontalAlignment.Center,
60 VerticalAlignment = VerticalAlignment.Center,
61 CellPadding = new Size2D(10, 20),
66 bufferingProgress = new Progress()
71 ProgressState = Progress.ProgressStatusType.Buffering,
73 rootContent.Add(bufferingProgress);
75 determinatedProgress = new Progress()
80 ProgressState = Progress.ProgressStatusType.Determinate,
82 rootContent.Add(determinatedProgress);
84 indeterminatedProgress = new Progress()
88 ProgressState = Progress.ProgressStatusType.Indeterminate,
90 rootContent.Add(indeterminatedProgress);
93 disabledProgress = new Progress()
98 ProgressState = Progress.ProgressStatusType.Indeterminate,
100 rootContent.Add(disabledProgress);
101 Content = rootContent;