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 AnimatedImageView
28 [EditorBrowsable(EditorBrowsableState.Never)]
29 public static readonly BindableProperty BatchSizeProperty = BindableProperty.Create(nameof(BatchSize), typeof(int), typeof(AnimatedImageView), 0, propertyChanged: (bindable, oldValue, newValue) =>
31 var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
34 instance.InternalBatchSize = (int)newValue;
37 defaultValueCreator: (bindable) =>
39 var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
40 return instance.InternalBatchSize;
46 [EditorBrowsable(EditorBrowsableState.Never)]
47 public static readonly BindableProperty CacheSizeProperty = BindableProperty.Create(nameof(CacheSize), typeof(int), typeof(AnimatedImageView), 0, propertyChanged: (bindable, oldValue, newValue) =>
49 var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
52 instance.InternalCacheSize = (int)newValue;
55 defaultValueCreator: (bindable) =>
57 var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
58 return instance.InternalCacheSize;
62 /// FrameDelayProperty
64 [EditorBrowsable(EditorBrowsableState.Never)]
65 public static readonly BindableProperty FrameDelayProperty = BindableProperty.Create(nameof(FrameDelay), typeof(int), typeof(AnimatedImageView), 0, propertyChanged: (bindable, oldValue, newValue) =>
67 var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
70 instance.InternalFrameDelay = (int)newValue;
73 defaultValueCreator: (bindable) =>
75 var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
76 return instance.InternalFrameDelay;
82 [EditorBrowsable(EditorBrowsableState.Never)]
83 public static readonly BindableProperty LoopCountProperty = BindableProperty.Create(nameof(LoopCount), typeof(int), typeof(AnimatedImageView), 0, propertyChanged: (bindable, oldValue, newValue) =>
85 var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
88 instance.InternalLoopCount = (int)newValue;
91 defaultValueCreator: (bindable) =>
93 var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
94 return instance.InternalLoopCount;
98 /// StopBehaviorProperty
100 [EditorBrowsable(EditorBrowsableState.Never)]
101 public static readonly BindableProperty StopBehaviorProperty = BindableProperty.Create(nameof(StopBehavior), typeof(StopBehaviorType), typeof(AnimatedImageView), default(StopBehaviorType), propertyChanged: (bindable, oldValue, newValue) =>
103 var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
104 if (newValue != null)
106 instance.InternalStopBehavior = (Tizen.NUI.BaseComponents.AnimatedImageView.StopBehaviorType)newValue;
109 defaultValueCreator: (bindable) =>
111 var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
112 return instance.InternalStopBehavior;
116 /// CurrentFrameProperty
118 [EditorBrowsable(EditorBrowsableState.Never)]
119 public static readonly BindableProperty CurrentFrameProperty = BindableProperty.Create(nameof(CurrentFrame), typeof(int), typeof(AnimatedImageView), 0, propertyChanged: (bindable, oldValue, newValue) =>
121 var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
122 if (newValue != null)
124 instance.InternalCurrentFrame = (int)newValue;
127 defaultValueCreator: (bindable) =>
129 var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
130 return instance.InternalCurrentFrame;