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