[NUI] Fix text padding issue
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / AnimatedVectorImageViewBindableProperty.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 AnimatedVectorImageView
24     {
25         /// <summary>
26         /// ResourceURLProperty
27         /// </summary>
28         [EditorBrowsable(EditorBrowsableState.Never)]
29         public static readonly BindableProperty ResourceURLProperty = BindableProperty.Create(nameof(ResourceURL), typeof(string), typeof(AnimatedVectorImageView), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
30         {
31             var instance = (Tizen.NUI.BaseComponents.AnimatedVectorImageView)bindable;
32             instance.InternalResourceURL = (string)newValue;
33         },
34         defaultValueCreator: (bindable) =>
35         {
36             var instance = (Tizen.NUI.BaseComponents.AnimatedVectorImageView)bindable;
37             return instance.InternalResourceURL;
38         });
39
40         /// <summary>
41         /// ResourceUrlProperty
42         /// </summary>
43         [EditorBrowsable(EditorBrowsableState.Never)]
44         public static new readonly BindableProperty ResourceUrlProperty = BindableProperty.Create(nameof(ResourceUrl), typeof(string), typeof(AnimatedVectorImageView), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
45         {
46             var instance = (Tizen.NUI.BaseComponents.AnimatedVectorImageView)bindable;
47             instance.InternalResourceUrl = (string)newValue;
48         },
49         defaultValueCreator: (bindable) =>
50         {
51             var instance = (Tizen.NUI.BaseComponents.AnimatedVectorImageView)bindable;
52             return instance.InternalResourceUrl;
53         });
54
55         /// <summary>
56         /// RepeatCountProperty
57         /// </summary>
58         [EditorBrowsable(EditorBrowsableState.Never)]
59         public static readonly BindableProperty RepeatCountProperty = BindableProperty.Create(nameof(RepeatCount), typeof(int), typeof(AnimatedVectorImageView), 0, propertyChanged: (bindable, oldValue, newValue) =>
60         {
61             var instance = (Tizen.NUI.BaseComponents.AnimatedVectorImageView)bindable;
62             if (newValue != null)
63             {
64                 instance.InternalRepeatCount = (int)newValue;
65             }
66         },
67         defaultValueCreator: (bindable) =>
68         {
69             var instance = (Tizen.NUI.BaseComponents.AnimatedVectorImageView)bindable;
70             return instance.InternalRepeatCount;
71         });
72
73         /// <summary>
74         /// CurrentFrameProperty
75         /// </summary>
76         [EditorBrowsable(EditorBrowsableState.Never)]
77         public static new readonly BindableProperty CurrentFrameProperty = BindableProperty.Create(nameof(CurrentFrame), typeof(int), typeof(AnimatedVectorImageView), 0, propertyChanged: (bindable, oldValue, newValue) =>
78         {
79             var instance = (Tizen.NUI.BaseComponents.AnimatedVectorImageView)bindable;
80             if (newValue != null)
81             {
82                 instance.InternalCurrentFrame = (int)newValue;
83             }
84         },
85         defaultValueCreator: (bindable) =>
86         {
87             var instance = (Tizen.NUI.BaseComponents.AnimatedVectorImageView)bindable;
88             return instance.InternalCurrentFrame;
89         });
90
91         /// <summary>
92         /// RepeatModeProperty
93         /// </summary>
94         [EditorBrowsable(EditorBrowsableState.Never)]
95         public static readonly BindableProperty RepeatModeProperty = BindableProperty.Create(nameof(RepeatMode), typeof(RepeatModes), typeof(AnimatedVectorImageView), default(RepeatModes), propertyChanged: (bindable, oldValue, newValue) =>
96         {
97             var instance = (Tizen.NUI.BaseComponents.AnimatedVectorImageView)bindable;
98             if (newValue != null)
99             {
100                 instance.InternalRepeatMode = (Tizen.NUI.BaseComponents.AnimatedVectorImageView.RepeatModes)newValue;
101             }
102         },
103         defaultValueCreator: (bindable) =>
104         {
105             var instance = (Tizen.NUI.BaseComponents.AnimatedVectorImageView)bindable;
106             return instance.InternalRepeatMode;
107         });
108     }
109 }