[NUI] Fix text padding issue
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / AnimatedImageViewBindableProperty.cs
1 /*
2  * Copyright(c) 2021 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  *
16  */
17
18 using System.ComponentModel;
19 using Tizen.NUI.Binding;
20
21 namespace Tizen.NUI.BaseComponents
22 {
23     public partial class AnimatedImageView
24     {
25         /// <summary>
26         /// BatchSizeProperty
27         /// </summary>
28         [EditorBrowsable(EditorBrowsableState.Never)]
29         public static readonly BindableProperty BatchSizeProperty = BindableProperty.Create(nameof(BatchSize), typeof(int), typeof(AnimatedImageView), 0, propertyChanged: (bindable, oldValue, newValue) =>
30         {
31             var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
32             if (newValue != null)
33             {
34                 instance.InternalBatchSize = (int)newValue;
35             }
36         },
37         defaultValueCreator: (bindable) =>
38         {
39             var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
40             return instance.InternalBatchSize;
41         });
42
43         /// <summary>
44         /// CacheSizeProperty
45         /// </summary>
46         [EditorBrowsable(EditorBrowsableState.Never)]
47         public static readonly BindableProperty CacheSizeProperty = BindableProperty.Create(nameof(CacheSize), typeof(int), typeof(AnimatedImageView), 0, propertyChanged: (bindable, oldValue, newValue) =>
48         {
49             var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
50             if (newValue != null)
51             {
52                 instance.InternalCacheSize = (int)newValue;
53             }
54         },
55         defaultValueCreator: (bindable) =>
56         {
57             var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
58             return instance.InternalCacheSize;
59         });
60
61         /// <summary>
62         /// FrameDelayProperty
63         /// </summary>
64         [EditorBrowsable(EditorBrowsableState.Never)]
65         public static readonly BindableProperty FrameDelayProperty = BindableProperty.Create(nameof(FrameDelay), typeof(int), typeof(AnimatedImageView), 0, propertyChanged: (bindable, oldValue, newValue) =>
66         {
67             var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
68             if (newValue != null)
69             {
70                 instance.InternalFrameDelay = (int)newValue;
71             }
72         },
73         defaultValueCreator: (bindable) =>
74         {
75             var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
76             return instance.InternalFrameDelay;
77         });
78
79         /// <summary>
80         /// LoopCountProperty
81         /// </summary>
82         [EditorBrowsable(EditorBrowsableState.Never)]
83         public static readonly BindableProperty LoopCountProperty = BindableProperty.Create(nameof(LoopCount), typeof(int), typeof(AnimatedImageView), 0, propertyChanged: (bindable, oldValue, newValue) =>
84         {
85             var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
86             if (newValue != null)
87             {
88                 instance.InternalLoopCount = (int)newValue;
89             }
90         },
91         defaultValueCreator: (bindable) =>
92         {
93             var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
94             return instance.InternalLoopCount;
95         });
96
97         /// <summary>
98         /// StopBehaviorProperty
99         /// </summary>
100         [EditorBrowsable(EditorBrowsableState.Never)]
101         public static readonly BindableProperty StopBehaviorProperty = BindableProperty.Create(nameof(StopBehavior), typeof(StopBehaviorType), typeof(AnimatedImageView), default(StopBehaviorType), propertyChanged: (bindable, oldValue, newValue) =>
102         {
103             var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
104             if (newValue != null)
105             {
106                 instance.InternalStopBehavior = (Tizen.NUI.BaseComponents.AnimatedImageView.StopBehaviorType)newValue;
107             }
108         },
109         defaultValueCreator: (bindable) =>
110         {
111             var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
112             return instance.InternalStopBehavior;
113         });
114
115         /// <summary>
116         /// CurrentFrameProperty
117         /// </summary>
118         [EditorBrowsable(EditorBrowsableState.Never)]
119         public static readonly BindableProperty CurrentFrameProperty = BindableProperty.Create(nameof(CurrentFrame), typeof(int), typeof(AnimatedImageView), 0, propertyChanged: (bindable, oldValue, newValue) =>
120         {
121             var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
122             if (newValue != null)
123             {
124                 instance.InternalCurrentFrame = (int)newValue;
125             }
126         },
127         defaultValueCreator: (bindable) =>
128         {
129             var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
130             return instance.InternalCurrentFrame;
131         });
132     }
133 }