Release 10.0.0.17660
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI.Components / Controls / RecyclerView / Item / DefaultGridItemBindableProperty.cs
1 using System.ComponentModel;
2 using Tizen.NUI.BaseComponents;
3 using Tizen.NUI.Binding;
4
5 namespace Tizen.NUI.Components
6 {
7     public partial class DefaultGridItem
8     {
9         /// <summary>
10         /// BadgeProperty
11         /// </summary>
12         [EditorBrowsable(EditorBrowsableState.Never)]
13         public static readonly BindableProperty BadgeProperty = BindableProperty.Create(nameof(Badge), typeof(View), typeof(DefaultGridItem), null, propertyChanged: (bindable, oldValue, newValue) =>
14         {
15             var instance = (DefaultGridItem)bindable;
16             if (newValue != null)
17             {
18                 instance.InternalBadge = newValue as View;
19             }
20         },
21         defaultValueCreator: (bindable) =>
22         {
23             var instance = (DefaultGridItem)bindable;
24             return instance.InternalBadge;
25         });
26
27         /// <summary>
28         /// TextProperty
29         /// </summary>
30         [EditorBrowsable(EditorBrowsableState.Never)]
31         public static readonly BindableProperty TextProperty = BindableProperty.Create(nameof(Text), typeof(string), typeof(DefaultGridItem), default(string), propertyChanged: (bindable, oldValue, newValue) =>
32         {
33             var instance = (DefaultGridItem)bindable;
34             if (newValue != null)
35             {
36                 instance.InternalText = newValue as string;
37             }
38         },
39         defaultValueCreator: (bindable) =>
40         {
41             var instance = (DefaultGridItem)bindable;
42             return instance.InternalText;
43         });
44
45         /// <summary>
46         /// LabelOrientationTypeProperty
47         /// </summary>
48         [EditorBrowsable(EditorBrowsableState.Never)]
49         public static readonly BindableProperty LabelOrientationTypeProperty = BindableProperty.Create(nameof(LabelOrientationType), typeof(Tizen.NUI.Components.DefaultGridItem.LabelOrientation), typeof(DefaultGridItem), default(LabelOrientation), propertyChanged: (bindable, oldValue, newValue) =>
50         {
51             var instance = (DefaultGridItem)bindable;
52             if (newValue != null)
53             {
54                 instance.InternalLabelOrientationType = (Tizen.NUI.Components.DefaultGridItem.LabelOrientation)newValue;
55             }
56         },
57         defaultValueCreator: (bindable) =>
58         {
59             var instance = (DefaultGridItem)bindable;
60             return instance.InternalLabelOrientationType;
61         });
62     }
63 }