1 using System.ComponentModel;
2 using System.Windows.Input;
3 using Tizen.NUI.Binding;
5 namespace Tizen.NUI.Components
7 public partial class CollectionView
11 /// ItemsLayouterProperty
13 [EditorBrowsable(EditorBrowsableState.Never)]
14 public static readonly BindableProperty ItemsLayouterProperty = BindableProperty.Create(nameof(ItemsLayouter), typeof(ItemsLayouter), typeof(CollectionView), null, propertyChanged: (bindable, oldValue, newValue) =>
16 var instance = (CollectionView)bindable;
19 instance.InternalItemsLayouter = newValue as ItemsLayouter;
22 defaultValueCreator: (bindable) =>
24 var instance = (CollectionView)bindable;
25 return instance.InternalItemsLayouter;
29 /// ScrollingDirectionProperty
31 [EditorBrowsable(EditorBrowsableState.Never)]
32 public static readonly new BindableProperty ScrollingDirectionProperty = BindableProperty.Create(nameof(ScrollingDirection), typeof(Tizen.NUI.Components.ScrollableBase.Direction), typeof(CollectionView), default(Direction), propertyChanged: (bindable, oldValue, newValue) =>
34 var instance = (CollectionView)bindable;
37 instance.InternalScrollingDirection = (Direction)newValue;
40 defaultValueCreator: (bindable) =>
42 var instance = (CollectionView)bindable;
43 return instance.InternalScrollingDirection;
47 /// SelectionChangedCommandProperty
49 [EditorBrowsable(EditorBrowsableState.Never)]
50 public static readonly BindableProperty SelectionChangedCommandProperty = BindableProperty.Create(nameof(SelectionChangedCommand), typeof(ICommand), typeof(CollectionView), null, propertyChanged: (bindable, oldValue, newValue) =>
52 var instance = (CollectionView)bindable;
55 instance.InternalSelectionChangedCommand = newValue as ICommand;
58 defaultValueCreator: (bindable) =>
60 var instance = (CollectionView)bindable;
61 return instance.InternalSelectionChangedCommand;
65 /// SelectionChangedCommandParameterProperty
67 [EditorBrowsable(EditorBrowsableState.Never)]
68 public static readonly BindableProperty SelectionChangedCommandParameterProperty = BindableProperty.Create(nameof(SelectionChangedCommandParameter), typeof(object), typeof(CollectionView), null, propertyChanged: (bindable, oldValue, newValue) =>
70 var instance = (CollectionView)bindable;
73 instance.InternalSelectionChangedCommandParameter = newValue;
76 defaultValueCreator: (bindable) =>
78 var instance = (CollectionView)bindable;
79 return instance.InternalSelectionChangedCommandParameter;
85 [EditorBrowsable(EditorBrowsableState.Never)]
86 public static readonly BindableProperty HeaderProperty = BindableProperty.Create(nameof(Header), typeof(RecyclerViewItem), typeof(CollectionView), null, propertyChanged: (bindable, oldValue, newValue) =>
88 var instance = (CollectionView)bindable;
91 instance.InternalHeader = newValue as RecyclerViewItem;
94 defaultValueCreator: (bindable) =>
96 var instance = (CollectionView)bindable;
97 return instance.InternalHeader;
103 [EditorBrowsable(EditorBrowsableState.Never)]
104 public static readonly BindableProperty FooterProperty = BindableProperty.Create(nameof(Footer), typeof(RecyclerViewItem), typeof(CollectionView), null, propertyChanged: (bindable, oldValue, newValue) =>
106 var instance = (CollectionView)bindable;
107 if (newValue != null)
109 instance.InternalFooter = newValue as RecyclerViewItem;
112 defaultValueCreator: (bindable) =>
114 var instance = (CollectionView)bindable;
115 return instance.InternalFooter;
119 /// IsGroupedProperty
121 [EditorBrowsable(EditorBrowsableState.Never)]
122 public static readonly BindableProperty IsGroupedProperty = BindableProperty.Create(nameof(IsGrouped), typeof(bool), typeof(CollectionView), default(bool), propertyChanged: (bindable, oldValue, newValue) =>
124 var instance = (CollectionView)bindable;
125 if (newValue != null)
127 instance.InternalIsGrouped = (bool)newValue;
130 defaultValueCreator: (bindable) =>
132 var instance = (CollectionView)bindable;
133 return instance.InternalIsGrouped;
137 /// GroupHeaderTemplateProperty
139 [EditorBrowsable(EditorBrowsableState.Never)]
140 public static readonly BindableProperty GroupHeaderTemplateProperty = BindableProperty.Create(nameof(GroupHeaderTemplate), typeof(DataTemplate), typeof(CollectionView), null, propertyChanged: (bindable, oldValue, newValue) =>
142 var instance = (CollectionView)bindable;
143 if (newValue != null)
145 instance.InternalGroupHeaderTemplate = newValue as DataTemplate;
148 defaultValueCreator: (bindable) =>
150 var instance = (CollectionView)bindable;
151 return instance.InternalGroupHeaderTemplate;
155 /// GroupFooterTemplateProperty
157 [EditorBrowsable(EditorBrowsableState.Never)]
158 public static readonly BindableProperty GroupFooterTemplateProperty = BindableProperty.Create(nameof(GroupFooterTemplate), typeof(DataTemplate), typeof(CollectionView), null, propertyChanged: (bindable, oldValue, newValue) =>
160 var instance = (CollectionView)bindable;
161 if (newValue != null)
163 instance.InternalGroupFooterTemplate = newValue as DataTemplate;
166 defaultValueCreator: (bindable) =>
168 var instance = (CollectionView)bindable;
169 return instance.InternalGroupFooterTemplate;