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.
18 using System.ComponentModel;
19 using Tizen.NUI.Binding;
21 namespace Tizen.NUI.BaseComponents
23 public partial class LottieAnimationView
28 [EditorBrowsable(EditorBrowsableState.Never)]
29 public static readonly BindableProperty URLProperty = BindableProperty.Create(nameof(URL), typeof(string), typeof(Tizen.NUI.BaseComponents.LottieAnimationView), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
31 var instance = (Tizen.NUI.BaseComponents.LottieAnimationView)bindable;
34 instance.InternalURL = (string)newValue;
37 defaultValueCreator: (bindable) =>
39 var instance = (Tizen.NUI.BaseComponents.LottieAnimationView)bindable;
40 return instance.InternalURL;
44 /// CurrentFrameProperty
46 [EditorBrowsable(EditorBrowsableState.Never)]
47 public static readonly BindableProperty CurrentFrameProperty = BindableProperty.Create(nameof(CurrentFrame), typeof(int), typeof(Tizen.NUI.BaseComponents.LottieAnimationView), 0, propertyChanged: (bindable, oldValue, newValue) =>
49 var instance = (Tizen.NUI.BaseComponents.LottieAnimationView)bindable;
52 instance.InternalCurrentFrame = (int)newValue;
55 defaultValueCreator: (bindable) =>
57 var instance = (Tizen.NUI.BaseComponents.LottieAnimationView)bindable;
58 return instance.InternalCurrentFrame;
62 /// LoopingModeProperty
64 [EditorBrowsable(EditorBrowsableState.Never)]
65 public static readonly BindableProperty LoopingModeProperty = BindableProperty.Create(nameof(LoopingMode), typeof(LoopingModeType), typeof(LottieAnimationView), default(LoopingModeType), propertyChanged: (bindable, oldValue, newValue) =>
67 var instance = (Tizen.NUI.BaseComponents.LottieAnimationView)bindable;
70 instance.InternalLoopingMode = (Tizen.NUI.BaseComponents.LottieAnimationView.LoopingModeType)newValue;
73 defaultValueCreator: (bindable) =>
75 var instance = (Tizen.NUI.BaseComponents.LottieAnimationView)bindable;
76 return instance.InternalLoopingMode;
82 [EditorBrowsable(EditorBrowsableState.Never)]
83 public static readonly BindableProperty LoopCountProperty = BindableProperty.Create(nameof(LoopCount), typeof(int), typeof(Tizen.NUI.BaseComponents.LottieAnimationView), 0, propertyChanged: (bindable, oldValue, newValue) =>
85 var instance = (Tizen.NUI.BaseComponents.LottieAnimationView)bindable;
88 instance.InternalLoopCount = (int)newValue;
91 defaultValueCreator: (bindable) =>
93 var instance = (Tizen.NUI.BaseComponents.LottieAnimationView)bindable;
94 return instance.InternalLoopCount;
98 /// StopBehaviorProperty
100 [EditorBrowsable(EditorBrowsableState.Never)]
101 public static readonly BindableProperty StopBehaviorProperty = BindableProperty.Create(nameof(StopBehavior), typeof(StopBehaviorType), typeof(LottieAnimationView), default(StopBehaviorType), propertyChanged: (bindable, oldValue, newValue) =>
103 var instance = (Tizen.NUI.BaseComponents.LottieAnimationView)bindable;
104 if (newValue != null)
106 instance.InternalStopBehavior = (Tizen.NUI.BaseComponents.LottieAnimationView.StopBehaviorType)newValue;
109 defaultValueCreator: (bindable) =>
111 var instance = (Tizen.NUI.BaseComponents.LottieAnimationView)bindable;
112 return instance.InternalStopBehavior;
116 /// RedrawInScalingDownProperty
118 [EditorBrowsable(EditorBrowsableState.Never)]
119 public static readonly BindableProperty RedrawInScalingDownProperty = BindableProperty.Create(nameof(RedrawInScalingDown), typeof(bool), typeof(Tizen.NUI.BaseComponents.LottieAnimationView), false, propertyChanged: (bindable, oldValue, newValue) =>
121 var instance = (Tizen.NUI.BaseComponents.LottieAnimationView)bindable;
122 if (newValue != null)
124 instance.InternalRedrawInScalingDown = (bool)newValue;
127 defaultValueCreator: (bindable) =>
129 var instance = (Tizen.NUI.BaseComponents.LottieAnimationView)bindable;
130 return instance.InternalRedrawInScalingDown;
134 /// EnableFrameCacheProperty
136 [EditorBrowsable(EditorBrowsableState.Never)]
137 public static readonly BindableProperty EnableFrameCacheProperty = BindableProperty.Create(nameof(EnableFrameCache), typeof(bool), typeof(Tizen.NUI.BaseComponents.LottieAnimationView), false, propertyChanged: (bindable, oldValue, newValue) =>
139 var instance = (Tizen.NUI.BaseComponents.LottieAnimationView)bindable;
140 if (newValue != null)
142 instance.InternalEnableFrameCache = (bool)newValue;
145 defaultValueCreator: (bindable) =>
147 var instance = (Tizen.NUI.BaseComponents.LottieAnimationView)bindable;
148 return instance.InternalEnableFrameCache;