2 * Copyright(c) 2019 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 using System.ComponentModel;
19 using Tizen.NUI.Binding;
21 namespace Tizen.NUI.BaseComponents
24 /// View is the base class for all views.
26 /// <since_tizen> 3 </since_tizen>
27 public partial class View
30 /// StyleNameProperty (DALi json)
32 [EditorBrowsable(EditorBrowsableState.Never)]
33 public static readonly BindableProperty StyleNameProperty = BindableProperty.Create(nameof(StyleName), typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
35 var view = (View)bindable;
38 string styleName = (string)newValue;
39 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.StyleName, new Tizen.NUI.PropertyValue(styleName));
41 view.styleName = styleName;
43 view.ThemeChangeSensitive = true;
46 defaultValueCreator: (bindable) =>
48 var view = (View)bindable;
50 if (!string.IsNullOrEmpty(view.styleName)) return view.styleName;
53 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.StyleName).Get(out temp);
58 /// KeyInputFocusProperty
60 [EditorBrowsable(EditorBrowsableState.Never)]
61 public static readonly BindableProperty KeyInputFocusProperty = BindableProperty.Create(nameof(KeyInputFocus), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
63 var view = (View)bindable;
66 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.KeyInputFocus, new Tizen.NUI.PropertyValue((bool)newValue));
69 defaultValueCreator: (bindable) =>
71 var view = (View)bindable;
73 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.KeyInputFocus).Get(out temp);
78 /// BackgroundColorProperty
80 [EditorBrowsable(EditorBrowsableState.Never)]
81 public static readonly BindableProperty BackgroundColorProperty = BindableProperty.Create(nameof(BackgroundColor), typeof(Color), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
83 var view = (View)bindable;
86 if (view.backgroundExtraData == null)
88 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new PropertyValue((Color)newValue));
92 PropertyMap map = new PropertyMap();
94 map.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Color))
95 .Add(ColorVisualProperty.MixColor, new PropertyValue((Color)newValue))
96 .Add(Visual.Property.CornerRadius, new PropertyValue(view.backgroundExtraData.CornerRadius));
98 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new PropertyValue(map));
101 defaultValueCreator: (bindable) =>
103 var view = (View)bindable;
104 Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
106 Tizen.NUI.PropertyMap background = view.Background;
108 background.Find(Visual.Property.Type)?.Get(out visualType);
109 if (visualType == (int)Visual.Type.Color)
111 background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
114 return backgroundColor;
120 [EditorBrowsable(EditorBrowsableState.Never)]
121 public static readonly BindableProperty ColorProperty = BindableProperty.Create(nameof(Color), typeof(Color), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
123 var view = (View)bindable;
124 if (newValue != null)
126 view.SetColor((Color)newValue);
129 defaultValueCreator: (bindable) =>
131 var view = (View)bindable;
132 Color color = new Color(0.0f, 0.0f, 0.0f, 0.0f);
133 view.GetProperty(Interop.ActorProperty.ColorGet()).Get(color);
137 /// <summary> BackgroundImageProperty </summary>
138 [EditorBrowsable(EditorBrowsableState.Never)]
139 public static readonly BindableProperty BackgroundImageProperty = BindableProperty.Create(nameof(BackgroundImage), typeof(string), typeof(View), default(string), propertyChanged: (bindable, oldValue, newValue) =>
141 var view = (View)bindable;
142 if (newValue != null)
144 string url = (string)newValue;
146 if (string.IsNullOrEmpty(url))
149 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new PropertyValue());
153 if (view.backgroundExtraData == null)
155 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new PropertyValue(url));
156 view.BackgroundImageSynchronosLoading = view._backgroundImageSynchronosLoading;
161 PropertyMap map = new PropertyMap();
163 map.Add(ImageVisualProperty.URL, new PropertyValue(url))
164 .Add(Visual.Property.CornerRadius, new PropertyValue(view.backgroundExtraData.CornerRadius))
165 .Add(ImageVisualProperty.SynchronousLoading, new PropertyValue(view._backgroundImageSynchronosLoading));
167 if (view.backgroundExtraData.BackgroundImageBorder != null)
169 map.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.NPatch))
170 .Add(NpatchImageVisualProperty.Border, new PropertyValue(view.backgroundExtraData.BackgroundImageBorder));
174 map.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Image));
177 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new PropertyValue(map));
180 defaultValueCreator: (bindable) =>
182 var view = (View)bindable;
183 string backgroundImage = "";
185 Tizen.NUI.PropertyMap background = view.Background;
186 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
188 return backgroundImage;
190 /// <summary>BackgroundImageBorderProperty</summary>
191 [EditorBrowsable(EditorBrowsableState.Never)]
192 public static readonly BindableProperty BackgroundImageBorderProperty = BindableProperty.Create(nameof(BackgroundImageBorder), typeof(Rectangle), typeof(View), default(Rectangle), propertyChanged: (bindable, oldValue, newValue) =>
194 var view = (View)bindable;
196 bool isEmptyValue = Rectangle.IsNullOrZero((Rectangle)newValue);
198 var backgroundImageBorder = isEmptyValue ? null : (Rectangle)newValue;
200 (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).BackgroundImageBorder = backgroundImageBorder;
207 PropertyMap map = view.Background;
214 map[NpatchImageVisualProperty.Border] = new PropertyValue(backgroundImageBorder);
218 map.Find(Visual.Property.Type)?.Get(out visualType);
220 if (visualType == (int)Visual.Type.Image)
222 map[Visual.Property.Type] = new PropertyValue((int)Visual.Type.NPatch);
225 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new PropertyValue(map));
228 defaultValueCreator: (bindable) =>
230 var view = (View)bindable;
232 return view.backgroundExtraData?.BackgroundImageBorder;
235 /// BackgroundProperty
237 [EditorBrowsable(EditorBrowsableState.Never)]
238 public static readonly BindableProperty BackgroundProperty = BindableProperty.Create(nameof(Background), typeof(PropertyMap), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
240 var view = (View)bindable;
241 if (newValue != null)
243 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
245 view.backgroundExtraData = null;
248 defaultValueCreator: (bindable) =>
250 var view = (View)bindable;
251 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
252 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.BACKGROUND).Get(temp);
259 [EditorBrowsable(EditorBrowsableState.Never)]
260 public static readonly BindableProperty StateProperty = BindableProperty.Create(nameof(State), typeof(States), typeof(View), States.Normal, propertyChanged: (bindable, oldValue, newValue) =>
262 var view = (View)bindable;
263 if (newValue != null)
265 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.STATE, new Tizen.NUI.PropertyValue((int)newValue));
268 defaultValueCreator: (bindable) =>
270 var view = (View)bindable;
272 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.STATE).Get(out temp) == false)
274 NUILog.Error("State get error!");
278 case 0: return States.Normal;
279 case 1: return States.Focused;
280 case 2: return States.Disabled;
281 default: return States.Normal;
288 [EditorBrowsable(EditorBrowsableState.Never)]
289 public static readonly BindableProperty SubStateProperty = BindableProperty.Create(nameof(SubState), typeof(States), typeof(View), States.Normal, propertyChanged: (bindable, oldValue, newValue) =>
291 var view = (View)bindable;
292 string valueToString = "";
293 if (newValue != null)
295 valueToString = ((States)newValue).GetDescription<States>();
296 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SubState, new Tizen.NUI.PropertyValue(valueToString));
299 defaultValueCreator: (bindable) =>
301 var view = (View)bindable;
303 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SubState).Get(out temp) == false)
305 NUILog.Error("subState get error!");
307 return temp.GetValueByDescription<States>();
313 [EditorBrowsable(EditorBrowsableState.Never)]
314 public static readonly BindableProperty TooltipProperty = BindableProperty.Create(nameof(Tooltip), typeof(PropertyMap), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
316 var view = (View)bindable;
317 if (newValue != null)
319 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.TOOLTIP, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
322 defaultValueCreator: (bindable) =>
324 var view = (View)bindable;
325 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
326 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.TOOLTIP).Get(temp);
333 [EditorBrowsable(EditorBrowsableState.Never)]
334 public static readonly BindableProperty FlexProperty = BindableProperty.Create(nameof(Flex), typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
336 var view = (View)bindable;
337 if (newValue != null)
339 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue((float)newValue));
342 defaultValueCreator: (bindable) =>
344 var view = (View)bindable;
346 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX).Get(out temp);
351 /// AlignSelfProperty
353 [EditorBrowsable(EditorBrowsableState.Never)]
354 public static readonly BindableProperty AlignSelfProperty = BindableProperty.Create(nameof(AlignSelf), typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
356 var view = (View)bindable;
357 if (newValue != null)
359 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.AlignSelf, new Tizen.NUI.PropertyValue((int)newValue));
362 defaultValueCreator: (bindable) =>
364 var view = (View)bindable;
366 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.AlignSelf).Get(out temp);
371 /// FlexMarginProperty
373 [EditorBrowsable(EditorBrowsableState.Never)]
374 public static readonly BindableProperty FlexMarginProperty = BindableProperty.Create(nameof(FlexMargin), typeof(Vector4), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
376 var view = (View)bindable;
377 if (newValue != null)
379 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.FlexMargin, new Tizen.NUI.PropertyValue((Vector4)newValue));
382 defaultValueCreator: (bindable) =>
384 var view = (View)bindable;
385 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
386 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.FlexMargin).Get(temp);
391 /// CellIndexProperty
393 [EditorBrowsable(EditorBrowsableState.Never)]
394 public static readonly BindableProperty CellIndexProperty = BindableProperty.Create(nameof(CellIndex), typeof(Vector2), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
396 var view = (View)bindable;
397 if (newValue != null)
399 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CellIndex, new Tizen.NUI.PropertyValue((Vector2)newValue));
402 defaultValueCreator: (bindable) =>
404 var view = (View)bindable;
405 Vector2 temp = new Vector2(0.0f, 0.0f);
406 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CellIndex).Get(temp);
413 [EditorBrowsable(EditorBrowsableState.Never)]
414 public static readonly BindableProperty RowSpanProperty = BindableProperty.Create(nameof(RowSpan), typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
416 var view = (View)bindable;
417 if (newValue != null)
419 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.RowSpan, new Tizen.NUI.PropertyValue((float)newValue));
422 defaultValueCreator: (bindable) =>
424 var view = (View)bindable;
426 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.RowSpan).Get(out temp);
431 /// ColumnSpanProperty
433 [EditorBrowsable(EditorBrowsableState.Never)]
434 public static readonly BindableProperty ColumnSpanProperty = BindableProperty.Create(nameof(ColumnSpan), typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
436 var view = (View)bindable;
437 if (newValue != null)
439 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.ColumnSpan, new Tizen.NUI.PropertyValue((float)newValue));
442 defaultValueCreator: (bindable) =>
444 var view = (View)bindable;
446 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.ColumnSpan).Get(out temp);
451 /// CellHorizontalAlignmentProperty
453 [EditorBrowsable(EditorBrowsableState.Never)]
454 public static readonly BindableProperty CellHorizontalAlignmentProperty = BindableProperty.Create(nameof(CellHorizontalAlignment), typeof(HorizontalAlignmentType), typeof(View), HorizontalAlignmentType.Left, propertyChanged: (bindable, oldValue, newValue) =>
456 var view = (View)bindable;
457 string valueToString = "";
459 if (newValue != null)
461 valueToString = ((HorizontalAlignmentType)newValue).GetDescription<HorizontalAlignmentType>();
462 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CellHorizontalAlignment, new Tizen.NUI.PropertyValue(valueToString));
465 defaultValueCreator: (bindable) =>
467 var view = (View)bindable;
469 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CellHorizontalAlignment).Get(out temp) == false)
471 NUILog.Error("CellHorizontalAlignment get error!");
474 return temp.GetValueByDescription<HorizontalAlignmentType>();
478 /// CellVerticalAlignmentProperty
480 [EditorBrowsable(EditorBrowsableState.Never)]
481 public static readonly BindableProperty CellVerticalAlignmentProperty = BindableProperty.Create(nameof(CellVerticalAlignment), typeof(VerticalAlignmentType), typeof(View), VerticalAlignmentType.Top, propertyChanged: (bindable, oldValue, newValue) =>
483 var view = (View)bindable;
484 string valueToString = "";
486 if (newValue != null)
488 valueToString = ((VerticalAlignmentType)newValue).GetDescription<VerticalAlignmentType>();
489 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CellVerticalAlignment, new Tizen.NUI.PropertyValue(valueToString));
492 defaultValueCreator: (bindable) =>
494 var view = (View)bindable;
496 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CellVerticalAlignment).Get(out temp);
498 NUILog.Error("CellVerticalAlignment get error!");
501 return temp.GetValueByDescription<VerticalAlignmentType>();
505 /// "Please DO NOT use! This will be deprecated! Please use 'View Weight' instead of BindableProperty"
506 /// This needs to be hidden as inhouse API until all applications using it have been updated. Do not make public.
508 [EditorBrowsable(EditorBrowsableState.Never)]
509 public static readonly BindableProperty WeightProperty = BindableProperty.Create(nameof(Weight), typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
511 var view = (View)bindable;
512 if (newValue != null)
514 view.Weight = (float)newValue;
518 defaultValueCreator: (bindable) =>
520 var view = (View)bindable;
525 /// LeftFocusableViewProperty
527 [EditorBrowsable(EditorBrowsableState.Never)]
528 public static readonly BindableProperty LeftFocusableViewProperty = BindableProperty.Create(nameof(View.LeftFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
530 var view = (View)bindable;
531 if (newValue != null) { view.LeftFocusableViewId = (int)(newValue as View)?.GetId(); }
532 else { view.LeftFocusableViewId = -1; }
534 defaultValueCreator: (bindable) =>
536 var view = (View)bindable;
537 if (view.LeftFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.LeftFocusableViewId); }
542 /// RightFocusableViewProperty
544 [EditorBrowsable(EditorBrowsableState.Never)]
545 public static readonly BindableProperty RightFocusableViewProperty = BindableProperty.Create(nameof(View.RightFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
547 var view = (View)bindable;
548 if (newValue != null) { view.RightFocusableViewId = (int)(newValue as View)?.GetId(); }
549 else { view.RightFocusableViewId = -1; }
551 defaultValueCreator: (bindable) =>
553 var view = (View)bindable;
554 if (view.RightFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.RightFocusableViewId); }
559 /// UpFocusableViewProperty
561 [EditorBrowsable(EditorBrowsableState.Never)]
562 public static readonly BindableProperty UpFocusableViewProperty = BindableProperty.Create(nameof(View.UpFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
564 var view = (View)bindable;
565 if (newValue != null) { view.UpFocusableViewId = (int)(newValue as View)?.GetId(); }
566 else { view.UpFocusableViewId = -1; }
568 defaultValueCreator: (bindable) =>
570 var view = (View)bindable;
571 if (view.UpFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.UpFocusableViewId); }
576 /// DownFocusableViewProperty
578 [EditorBrowsable(EditorBrowsableState.Never)]
579 public static readonly BindableProperty DownFocusableViewProperty = BindableProperty.Create(nameof(View.DownFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
581 var view = (View)bindable;
582 if (newValue != null) { view.DownFocusableViewId = (int)(newValue as View)?.GetId(); }
583 else { view.DownFocusableViewId = -1; }
585 defaultValueCreator: (bindable) =>
587 var view = (View)bindable;
588 if (view.DownFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.DownFocusableViewId); }
593 /// FocusableProperty
595 [EditorBrowsable(EditorBrowsableState.Never)]
596 public static readonly BindableProperty FocusableProperty = BindableProperty.Create(nameof(Focusable), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
598 var view = (View)bindable;
599 if (newValue != null) { view.SetKeyboardFocusable((bool)newValue); }
601 defaultValueCreator: (bindable) =>
603 var view = (View)bindable;
604 return view.IsKeyboardFocusable();
610 [EditorBrowsable(EditorBrowsableState.Never)]
611 public static readonly BindableProperty Size2DProperty = BindableProperty.Create(nameof(Size2D), typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
613 var view = (View)bindable;
614 if (newValue != null)
616 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size((Size2D)newValue)));
619 defaultValueCreator: (bindable) =>
621 var view = (View)bindable;
622 Size temp = new Size(0.0f, 0.0f, 0.0f);
623 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
624 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
631 [EditorBrowsable(EditorBrowsableState.Never)]
632 public static readonly BindableProperty OpacityProperty = BindableProperty.Create(nameof(Opacity), typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
634 var view = (View)bindable;
636 if (newValue != null)
638 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.OPACITY, new Tizen.NUI.PropertyValue((float)newValue));
641 defaultValueCreator: (bindable) =>
643 var view = (View)bindable;
645 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.OPACITY).Get(out temp);
650 /// Position2DProperty
652 [EditorBrowsable(EditorBrowsableState.Never)]
653 public static readonly BindableProperty Position2DProperty = BindableProperty.Create(nameof(Position2D), typeof(Position2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
655 var view = (View)bindable;
656 if (newValue != null)
658 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position((Position2D)newValue)));
661 defaultValueCreator: (bindable) =>
663 var view = (View)bindable;
664 Position temp = new Position(0.0f, 0.0f, 0.0f);
665 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
666 return new Position2D(temp);
670 /// PositionUsesPivotPointProperty
672 [EditorBrowsable(EditorBrowsableState.Never)]
673 public static readonly BindableProperty PositionUsesPivotPointProperty = BindableProperty.Create(nameof(PositionUsesPivotPoint), typeof(bool), typeof(View), true, propertyChanged: (bindable, oldValue, newValue) =>
675 var view = (View)bindable;
676 if (newValue != null)
678 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PositionUsesAnchorPoint, new Tizen.NUI.PropertyValue((bool)newValue));
681 defaultValueCreator: (bindable) =>
683 var view = (View)bindable;
685 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PositionUsesAnchorPoint).Get(out temp);
690 /// SiblingOrderProperty
692 [EditorBrowsable(EditorBrowsableState.Never)]
693 public static readonly BindableProperty SiblingOrderProperty = BindableProperty.Create(nameof(SiblingOrder), typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
695 var view = (View)bindable;
697 if (newValue != null)
699 value = (int)newValue;
702 NUILog.Error("SiblingOrder should be bigger than 0 or equal to 0.");
705 var siblings = view.GetParent()?.Children;
706 if (siblings != null)
708 int currentOrder = siblings.IndexOf(view);
709 if (value != currentOrder)
711 if (value == 0) { view.LowerToBottom(); }
712 else if (value < siblings.Count - 1)
714 if (value > currentOrder) { view.RaiseAbove(siblings[value]); }
715 else { view.LowerBelow(siblings[value]); }
717 else { view.RaiseToTop(); }
722 defaultValueCreator: (bindable) =>
724 var view = (View)bindable;
725 var parentChildren = view.GetParent()?.Children;
726 int currentOrder = 0;
727 if (parentChildren != null)
729 currentOrder = parentChildren.IndexOf(view);
731 if (currentOrder < 0) { return 0; }
732 else if (currentOrder < parentChildren.Count) { return currentOrder; }
739 /// ParentOriginProperty
741 [EditorBrowsable(EditorBrowsableState.Never)]
742 public static readonly BindableProperty ParentOriginProperty = BindableProperty.Create(nameof(ParentOrigin), typeof(Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
744 var view = (View)bindable;
745 if (newValue != null)
747 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ParentOrigin, new Tizen.NUI.PropertyValue((Position)newValue));
750 defaultValueCreator: (bindable) =>
752 var view = (View)bindable;
753 Position temp = new Position(0.0f, 0.0f, 0.0f);
754 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ParentOrigin).Get(temp);
760 /// PivotPointProperty
762 [EditorBrowsable(EditorBrowsableState.Never)]
763 public static readonly BindableProperty PivotPointProperty = BindableProperty.Create(nameof(PivotPoint), typeof(Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
765 var view = (View)bindable;
766 if (newValue != null)
768 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.AnchorPoint, new Tizen.NUI.PropertyValue((Position)newValue));
771 defaultValueCreator: (bindable) =>
773 var view = (View)bindable;
774 Position temp = new Position(0.0f, 0.0f, 0.0f);
775 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.AnchorPoint).Get(temp);
780 /// SizeWidthProperty
782 [EditorBrowsable(EditorBrowsableState.Never)]
783 public static readonly BindableProperty SizeWidthProperty = BindableProperty.Create(nameof(SizeWidth), typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
785 var view = (View)bindable;
786 if (newValue != null)
788 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SizeWidth, new Tizen.NUI.PropertyValue((float)newValue));
789 view.WidthSpecification = (int)System.Math.Ceiling((float)newValue);
792 defaultValueCreator: (bindable) =>
794 var view = (View)bindable;
796 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SizeWidth).Get(out temp);
801 /// SizeHeightProperty
803 [EditorBrowsable(EditorBrowsableState.Never)]
804 public static readonly BindableProperty SizeHeightProperty = BindableProperty.Create(nameof(SizeHeight), typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
806 var view = (View)bindable;
807 if (newValue != null)
809 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SizeHeight, new Tizen.NUI.PropertyValue((float)newValue));
810 view.HeightSpecification = (int)System.Math.Ceiling((float)newValue);
813 defaultValueCreator: (bindable) =>
815 var view = (View)bindable;
817 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SizeHeight).Get(out temp);
824 [EditorBrowsable(EditorBrowsableState.Never)]
825 public static readonly BindableProperty PositionProperty = BindableProperty.Create(nameof(Position), typeof(Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
827 var view = (View)bindable;
828 if (newValue != null)
830 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue((Position)newValue));
833 defaultValueCreator: (bindable) =>
835 var view = (View)bindable;
836 Position temp = new Position(0.0f, 0.0f, 0.0f);
837 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
842 /// PositionXProperty
844 [EditorBrowsable(EditorBrowsableState.Never)]
845 public static readonly BindableProperty PositionXProperty = BindableProperty.Create(nameof(PositionX), typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
847 var view = (View)bindable;
848 if (newValue != null)
850 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PositionX, new Tizen.NUI.PropertyValue((float)newValue));
853 defaultValueCreator: (bindable) =>
855 var view = (View)bindable;
857 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PositionX).Get(out temp);
862 /// PositionYProperty
864 [EditorBrowsable(EditorBrowsableState.Never)]
865 public static readonly BindableProperty PositionYProperty = BindableProperty.Create(nameof(PositionY), typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
867 var view = (View)bindable;
868 if (newValue != null)
870 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PositionY, new Tizen.NUI.PropertyValue((float)newValue));
873 defaultValueCreator: (bindable) =>
875 var view = (View)bindable;
877 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PositionY).Get(out temp);
882 /// PositionZProperty
884 [EditorBrowsable(EditorBrowsableState.Never)]
885 public static readonly BindableProperty PositionZProperty = BindableProperty.Create(nameof(PositionZ), typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
887 var view = (View)bindable;
888 if (newValue != null)
890 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PositionZ, new Tizen.NUI.PropertyValue((float)newValue));
893 defaultValueCreator: (bindable) =>
895 var view = (View)bindable;
897 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PositionZ).Get(out temp);
902 /// OrientationProperty
904 [EditorBrowsable(EditorBrowsableState.Never)]
905 public static readonly BindableProperty OrientationProperty = BindableProperty.Create(nameof(Orientation), typeof(Rotation), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
907 var view = (View)bindable;
908 if (newValue != null)
910 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ORIENTATION, new Tizen.NUI.PropertyValue((Rotation)newValue));
913 defaultValueCreator: (bindable) =>
915 var view = (View)bindable;
916 Rotation temp = new Rotation();
917 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ORIENTATION).Get(temp);
924 [EditorBrowsable(EditorBrowsableState.Never)]
925 public static readonly BindableProperty ScaleProperty = BindableProperty.Create(nameof(Scale), typeof(Vector3), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
927 var view = (View)bindable;
928 if (newValue != null)
930 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE, new Tizen.NUI.PropertyValue((Vector3)newValue));
933 defaultValueCreator: (bindable) =>
935 var view = (View)bindable;
936 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
937 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE).Get(temp);
944 [EditorBrowsable(EditorBrowsableState.Never)]
945 public static readonly BindableProperty ScaleXProperty = BindableProperty.Create(nameof(ScaleX), typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
947 var view = (View)bindable;
948 if (newValue != null)
950 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ScaleX, new Tizen.NUI.PropertyValue((float)newValue));
953 defaultValueCreator: (bindable) =>
955 var view = (View)bindable;
957 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ScaleX).Get(out temp);
964 [EditorBrowsable(EditorBrowsableState.Never)]
965 public static readonly BindableProperty ScaleYProperty = BindableProperty.Create(nameof(ScaleY), typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
967 var view = (View)bindable;
968 if (newValue != null)
970 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ScaleY, new Tizen.NUI.PropertyValue((float)newValue));
973 defaultValueCreator: (bindable) =>
975 var view = (View)bindable;
977 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ScaleY).Get(out temp);
984 [EditorBrowsable(EditorBrowsableState.Never)]
985 public static readonly BindableProperty ScaleZProperty = BindableProperty.Create(nameof(ScaleZ), typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
987 var view = (View)bindable;
988 if (newValue != null)
990 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ScaleZ, new Tizen.NUI.PropertyValue((float)newValue));
993 defaultValueCreator: (bindable) =>
995 var view = (View)bindable;
997 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ScaleZ).Get(out temp);
1004 [EditorBrowsable(EditorBrowsableState.Never)]
1005 public static readonly BindableProperty NameProperty = BindableProperty.Create(nameof(Name), typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
1007 var view = (View)bindable;
1008 if (newValue != null)
1010 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.NAME, new Tizen.NUI.PropertyValue((string)newValue));
1013 defaultValueCreator: (bindable) =>
1015 var view = (View)bindable;
1017 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.NAME).Get(out temp);
1022 /// SensitiveProperty
1024 [EditorBrowsable(EditorBrowsableState.Never)]
1025 public static readonly BindableProperty SensitiveProperty = BindableProperty.Create(nameof(Sensitive), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1027 var view = (View)bindable;
1028 if (newValue != null)
1030 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SENSITIVE, new Tizen.NUI.PropertyValue((bool)newValue));
1033 defaultValueCreator: (bindable) =>
1035 var view = (View)bindable;
1037 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SENSITIVE).Get(out temp);
1042 /// LeaveRequiredProperty
1044 [EditorBrowsable(EditorBrowsableState.Never)]
1045 public static readonly BindableProperty LeaveRequiredProperty = BindableProperty.Create(nameof(LeaveRequired), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1047 var view = (View)bindable;
1048 if (newValue != null)
1050 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LeaveRequired, new Tizen.NUI.PropertyValue((bool)newValue));
1053 defaultValueCreator: (bindable) =>
1055 var view = (View)bindable;
1057 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LeaveRequired).Get(out temp);
1062 /// InheritOrientationProperty
1064 [EditorBrowsable(EditorBrowsableState.Never)]
1065 public static readonly BindableProperty InheritOrientationProperty = BindableProperty.Create(nameof(InheritOrientation), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1067 var view = (View)bindable;
1068 if (newValue != null)
1070 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.InheritOrientation, new Tizen.NUI.PropertyValue((bool)newValue));
1073 defaultValueCreator: (bindable) =>
1075 var view = (View)bindable;
1077 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.InheritOrientation).Get(out temp);
1082 /// InheritScaleProperty
1084 [EditorBrowsable(EditorBrowsableState.Never)]
1085 public static readonly BindableProperty InheritScaleProperty = BindableProperty.Create(nameof(InheritScale), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1087 var view = (View)bindable;
1088 if (newValue != null)
1090 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.InheritScale, new Tizen.NUI.PropertyValue((bool)newValue));
1093 defaultValueCreator: (bindable) =>
1095 var view = (View)bindable;
1097 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.InheritScale).Get(out temp);
1102 /// DrawModeProperty
1104 [EditorBrowsable(EditorBrowsableState.Never)]
1105 public static readonly BindableProperty DrawModeProperty = BindableProperty.Create(nameof(DrawMode), typeof(DrawModeType), typeof(View), DrawModeType.Normal, propertyChanged: (bindable, oldValue, newValue) =>
1107 var view = (View)bindable;
1108 if (newValue != null)
1110 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.DrawMode, new Tizen.NUI.PropertyValue((int)newValue));
1113 defaultValueCreator: (bindable) =>
1115 var view = (View)bindable;
1117 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.DrawMode).Get(out temp) == false)
1119 NUILog.Error("DrawMode get error!");
1121 return (DrawModeType)temp;
1125 /// SizeModeFactorProperty
1127 [EditorBrowsable(EditorBrowsableState.Never)]
1128 public static readonly BindableProperty SizeModeFactorProperty = BindableProperty.Create(nameof(SizeModeFactor), typeof(Vector3), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1130 var view = (View)bindable;
1131 if (newValue != null)
1133 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SizeModeFactor, new Tizen.NUI.PropertyValue((Vector3)newValue));
1136 defaultValueCreator: (bindable) =>
1138 var view = (View)bindable;
1139 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
1140 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SizeModeFactor).Get(temp);
1145 /// WidthResizePolicyProperty
1147 [EditorBrowsable(EditorBrowsableState.Never)]
1148 public static readonly BindableProperty WidthResizePolicyProperty = BindableProperty.Create(nameof(WidthResizePolicy), typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
1150 var view = (View)bindable;
1151 if (newValue != null)
1153 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WidthResizePolicy, new Tizen.NUI.PropertyValue((int)newValue));
1154 // Match ResizePolicy to new Layouting.
1155 // Parent relative policies can not be mapped at this point as parent size unknown.
1156 switch ((ResizePolicyType)newValue)
1158 case ResizePolicyType.UseNaturalSize:
1160 view.WidthSpecification = LayoutParamPolicies.WrapContent;
1163 case ResizePolicyType.FillToParent:
1165 view.WidthSpecification = LayoutParamPolicies.MatchParent;
1168 case ResizePolicyType.FitToChildren:
1170 view.WidthSpecification = LayoutParamPolicies.WrapContent;
1178 defaultValueCreator: (bindable) =>
1180 var view = (View)bindable;
1182 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WidthResizePolicy).Get(out temp) == false)
1184 NUILog.Error("WidthResizePolicy get error!");
1186 return temp.GetValueByDescription<ResizePolicyType>();
1190 /// HeightResizePolicyProperty
1192 [EditorBrowsable(EditorBrowsableState.Never)]
1193 public static readonly BindableProperty HeightResizePolicyProperty = BindableProperty.Create(nameof(HeightResizePolicy), typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
1195 var view = (View)bindable;
1196 if (newValue != null)
1198 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HeightResizePolicy, new Tizen.NUI.PropertyValue((int)newValue));
1199 // Match ResizePolicy to new Layouting.
1200 // Parent relative policies can not be mapped at this point as parent size unknown.
1201 switch ((ResizePolicyType)newValue)
1203 case ResizePolicyType.UseNaturalSize:
1205 view.HeightSpecification = LayoutParamPolicies.WrapContent;
1208 case ResizePolicyType.FillToParent:
1210 view.HeightSpecification = LayoutParamPolicies.MatchParent;
1213 case ResizePolicyType.FitToChildren:
1215 view.HeightSpecification = LayoutParamPolicies.WrapContent;
1223 defaultValueCreator: (bindable) =>
1225 var view = (View)bindable;
1227 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HeightResizePolicy).Get(out temp) == false)
1229 NUILog.Error("HeightResizePolicy get error!");
1231 return temp.GetValueByDescription<ResizePolicyType>();
1235 /// SizeScalePolicyProperty
1237 [EditorBrowsable(EditorBrowsableState.Never)]
1238 public static readonly BindableProperty SizeScalePolicyProperty = BindableProperty.Create(nameof(SizeScalePolicy), typeof(SizeScalePolicyType), typeof(View), SizeScalePolicyType.UseSizeSet, propertyChanged: (bindable, oldValue, newValue) =>
1240 var view = (View)bindable;
1241 string valueToString = "";
1242 if (newValue != null)
1244 valueToString = ((SizeScalePolicyType)newValue).GetDescription<SizeScalePolicyType>();
1245 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SizeScalePolicy, new Tizen.NUI.PropertyValue(valueToString));
1248 defaultValueCreator: (bindable) =>
1250 var view = (View)bindable;
1252 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SizeScalePolicy).Get(out temp) == false)
1254 NUILog.Error("SizeScalePolicy get error!");
1256 return (SizeScalePolicyType)temp;
1260 /// WidthForHeightProperty
1262 [EditorBrowsable(EditorBrowsableState.Never)]
1263 public static readonly BindableProperty WidthForHeightProperty = BindableProperty.Create(nameof(WidthForHeight), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1265 var view = (View)bindable;
1266 if (newValue != null)
1268 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WidthForHeight, new Tizen.NUI.PropertyValue((bool)newValue));
1271 defaultValueCreator: (bindable) =>
1273 var view = (View)bindable;
1275 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WidthForHeight).Get(out temp);
1280 /// HeightForWidthProperty
1282 [EditorBrowsable(EditorBrowsableState.Never)]
1283 public static readonly BindableProperty HeightForWidthProperty = BindableProperty.Create(nameof(HeightForWidth), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1285 var view = (View)bindable;
1286 if (newValue != null)
1288 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HeightForWidth, new Tizen.NUI.PropertyValue((bool)newValue));
1291 defaultValueCreator: (bindable) =>
1293 var view = (View)bindable;
1295 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HeightForWidth).Get(out temp);
1302 [EditorBrowsable(EditorBrowsableState.Never)]
1303 public static readonly BindableProperty PaddingProperty = BindableProperty.Create(nameof(Padding), typeof(Extents), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1305 var view = (View)bindable;
1306 if (newValue != null)
1308 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PADDING, new Tizen.NUI.PropertyValue((Extents)newValue));
1311 defaultValueCreator: (bindable) =>
1313 var view = (View)bindable;
1314 Extents temp = new Extents(0, 0, 0, 0);
1315 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PADDING).Get(temp);
1322 [EditorBrowsable(EditorBrowsableState.Never)]
1323 public static readonly BindableProperty SizeProperty = BindableProperty.Create(nameof(Size), typeof(Size), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1325 var view = (View)bindable;
1326 if (newValue != null)
1328 Size size = (Size)newValue;
1329 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue(size));
1330 // Set Specification so when layouts measure this View it matches the value set here.
1331 // All Views are currently Layouts.
1332 view.WidthSpecification = (int)System.Math.Ceiling(size.Width);
1333 view.HeightSpecification = (int)System.Math.Ceiling(size.Height);
1336 defaultValueCreator: (bindable) =>
1338 var view = (View)bindable;
1339 Size temp = new Size(0, 0, 0);
1340 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
1345 /// MinimumSizeProperty
1347 [EditorBrowsable(EditorBrowsableState.Never)]
1348 public static readonly BindableProperty MinimumSizeProperty = BindableProperty.Create(nameof(MinimumSize), typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1350 var view = (View)bindable;
1351 Size2D temp = newValue as Size2D;
1354 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MinimumSize, new Tizen.NUI.PropertyValue(temp));
1358 Tizen.Log.Fatal("NUI", $"[ERROR] can't set MinimumSizeProperty!");
1361 defaultValueCreator: (bindable) =>
1363 var view = (View)bindable;
1364 Size2D temp = new Size2D(0, 0);
1365 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MinimumSize).Get(temp);
1370 /// MaximumSizeProperty
1372 [EditorBrowsable(EditorBrowsableState.Never)]
1373 public static readonly BindableProperty MaximumSizeProperty = BindableProperty.Create(nameof(MaximumSize), typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1375 var view = (View)bindable;
1376 Size2D temp = newValue as Size2D;
1379 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MaximumSize, new Tizen.NUI.PropertyValue(temp));
1383 Tizen.Log.Fatal("NUI", $"[ERROR] can't set MaximumSizeProperty!");
1386 defaultValueCreator: (bindable) =>
1388 var view = (View)bindable;
1389 Size2D temp = new Size2D(0, 0);
1390 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MaximumSize).Get(temp);
1395 /// InheritPositionProperty
1397 [EditorBrowsable(EditorBrowsableState.Never)]
1398 public static readonly BindableProperty InheritPositionProperty = BindableProperty.Create(nameof(InheritPosition), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1400 var view = (View)bindable;
1401 if (newValue != null)
1403 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.InheritPosition, new Tizen.NUI.PropertyValue((bool)newValue));
1406 defaultValueCreator: (bindable) =>
1408 var view = (View)bindable;
1410 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.InheritPosition).Get(out temp);
1415 /// ClippingModeProperty
1417 [EditorBrowsable(EditorBrowsableState.Never)]
1418 public static readonly BindableProperty ClippingModeProperty = BindableProperty.Create(nameof(ClippingMode), typeof(ClippingModeType), typeof(View), ClippingModeType.Disabled, propertyChanged: (bindable, oldValue, newValue) =>
1420 var view = (View)bindable;
1421 if (newValue != null)
1423 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ClippingMode, new Tizen.NUI.PropertyValue((int)newValue));
1426 defaultValueCreator: (bindable) =>
1428 var view = (View)bindable;
1430 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ClippingMode).Get(out temp) == false)
1432 NUILog.Error("ClippingMode get error!");
1434 return (ClippingModeType)temp;
1438 /// InheritLayoutDirectionProperty
1440 [EditorBrowsable(EditorBrowsableState.Never)]
1441 public static readonly BindableProperty InheritLayoutDirectionProperty = BindableProperty.Create(nameof(InheritLayoutDirection), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1443 var view = (View)bindable;
1444 if (newValue != null)
1446 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.InheritLayoutDirection, new Tizen.NUI.PropertyValue((bool)newValue));
1449 defaultValueCreator: (bindable) =>
1451 var view = (View)bindable;
1453 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.InheritLayoutDirection).Get(out temp);
1458 /// LayoutDirectionProperty
1460 [EditorBrowsable(EditorBrowsableState.Never)]
1461 public static readonly BindableProperty LayoutDirectionProperty = BindableProperty.Create(nameof(LayoutDirection), typeof(ViewLayoutDirectionType), typeof(View), ViewLayoutDirectionType.LTR, propertyChanged: (bindable, oldValue, newValue) =>
1463 var view = (View)bindable;
1464 if (newValue != null)
1466 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LayoutDirection, new Tizen.NUI.PropertyValue((int)newValue));
1469 defaultValueCreator: (bindable) =>
1471 var view = (View)bindable;
1473 if (false == Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LayoutDirection).Get(out temp))
1475 NUILog.Error("LAYOUT_DIRECTION get error!");
1477 return (ViewLayoutDirectionType)temp;
1483 [EditorBrowsable(EditorBrowsableState.Never)]
1484 public static readonly BindableProperty MarginProperty = BindableProperty.Create(nameof(Margin), typeof(Extents), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1486 var view = (View)bindable;
1487 if (newValue != null)
1489 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MARGIN, new Tizen.NUI.PropertyValue((Extents)newValue));
1492 defaultValueCreator: (bindable) =>
1494 var view = (View)bindable;
1495 Extents temp = new Extents(0, 0, 0, 0);
1496 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MARGIN).Get(temp);
1501 /// UpdateSizeHintProperty
1503 [EditorBrowsable(EditorBrowsableState.Never)]
1504 public static readonly BindableProperty UpdateSizeHintProperty = BindableProperty.Create(nameof(UpdateSizeHint), typeof(Vector2), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1506 var view = (View)bindable;
1507 if (newValue != null)
1509 Tizen.NUI.Object.SetProperty(view.swigCPtr, Interop.ViewProperty.UpdateSizeHintGet(), new Tizen.NUI.PropertyValue((Vector2)newValue));
1512 defaultValueCreator: (bindable) =>
1514 var view = (View)bindable;
1516 Vector2 temp = new Vector2(0.0f, 0.0f);
1517 Tizen.NUI.Object.GetProperty(view.swigCPtr, Interop.ViewProperty.UpdateSizeHintGet()).Get(temp);
1522 /// ImageShadow Property
1524 [EditorBrowsable(EditorBrowsableState.Never)]
1525 public static readonly BindableProperty ImageShadowProperty = BindableProperty.Create(nameof(ImageShadow), typeof(ImageShadow), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1527 var shadow = (ImageShadow)newValue;
1528 var view = (View)bindable;
1529 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SHADOW, shadow == null ? new PropertyValue() : shadow.ToPropertyValue(view));
1531 defaultValueCreator: (bindable) =>
1533 var view = (View)bindable;
1535 PropertyMap map = new PropertyMap();
1536 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SHADOW).Get(map);
1538 var shadow = new ImageShadow(map);
1539 return shadow.IsEmpty() ? null : shadow;
1545 [EditorBrowsable(EditorBrowsableState.Never)]
1546 public static readonly BindableProperty BoxShadowProperty = BindableProperty.Create(nameof(BoxShadow), typeof(Shadow), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1548 var shadow = (Shadow)newValue;
1549 var view = (View)bindable;
1550 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SHADOW, shadow == null ? new PropertyValue() : shadow.ToPropertyValue(view));
1552 defaultValueCreator: (bindable) =>
1554 var view = (View)bindable;
1556 PropertyMap map = new PropertyMap();
1557 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SHADOW).Get(map);
1559 var shadow = new Shadow(map);
1560 return shadow.IsEmpty() ? null : shadow;
1564 /// CornerRadius Property
1566 [EditorBrowsable(EditorBrowsableState.Never)]
1567 public static readonly BindableProperty CornerRadiusProperty = BindableProperty.Create(nameof(CornerRadius), typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
1569 var view = (View)bindable;
1570 (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).CornerRadius = (float)newValue;
1571 view.ApplyCornerRadius();
1573 defaultValueCreator: (bindable) =>
1575 var view = (View)bindable;
1576 return view.backgroundExtraData == null ? 0 : view.backgroundExtraData.CornerRadius;
1580 /// CornerRadiusPolicy Property
1582 [EditorBrowsable(EditorBrowsableState.Never)]
1583 public static readonly BindableProperty CornerRadiusPolicyProperty = BindableProperty.Create(nameof(CornerRadiusPolicy), typeof(VisualTransformPolicyType), typeof(View), VisualTransformPolicyType.Absolute, propertyChanged: (bindable, oldValue, newValue) =>
1585 var view = (View)bindable;
1586 (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).CornerRadiusPolicy = (VisualTransformPolicyType)newValue;
1587 if (view.backgroundExtraData.CornerRadius != 0)
1589 view.ApplyCornerRadius();
1592 defaultValueCreator: (bindable) =>
1594 var view = (View)bindable;
1595 return view.backgroundExtraData == null ? VisualTransformPolicyType.Absolute : view.backgroundExtraData.CornerRadiusPolicy;
1599 /// EnableControlState property
1601 [EditorBrowsable(EditorBrowsableState.Never)]
1602 public static readonly BindableProperty EnableControlStateProperty = BindableProperty.Create(nameof(EnableControlState), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1604 var view = (View)bindable;
1605 bool prev = view.enableControlState;
1606 view.enableControlState = (bool)newValue;
1608 if (prev != view.enableControlState)
1612 view.TouchEvent -= view.EmptyOnTouch;
1616 view.TouchEvent += view.EmptyOnTouch;
1620 defaultValueCreator: (bindable) =>
1622 return ((View)bindable).enableControlState;
1626 /// ThemeChangeSensitive property
1628 [EditorBrowsable(EditorBrowsableState.Never)]
1629 public static readonly BindableProperty ThemeChangeSensitiveProperty = BindableProperty.Create(nameof(ThemeChangeSensitive), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1631 var view = (View)bindable;
1633 if (view.themeChangeSensitive == (bool)newValue) return;
1635 view.themeChangeSensitive = (bool)newValue;
1637 if (view.themeChangeSensitive)
1639 ThemeManager.ThemeChangedInternal.Add(view.OnThemeChanged);
1643 ThemeManager.ThemeChangedInternal.Remove(view.OnThemeChanged);
1646 defaultValueCreator: (bindable) =>
1648 return ((View)bindable).themeChangeSensitive;
1652 internal static readonly BindableProperty BackgroundImageSelectorProperty = BindableProperty.Create("BackgroundImageSelector", typeof(Selector<string>), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1654 var view = (View)bindable;
1655 view.SelectorData.BackgroundImage.Update(view, (Selector<string>)newValue, true);
1656 if (newValue != null) view.SelectorData.BackgroundColor.Reset(view);
1658 defaultValueCreator: (bindable) =>
1660 var view = (View)bindable;
1661 return view.SelectorData.BackgroundImage.Get(view);
1664 internal static readonly BindableProperty BackgroundColorSelectorProperty = BindableProperty.Create("BackgroundColorSelector", typeof(Selector<Color>), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1666 var view = (View)bindable;
1667 view.SelectorData.BackgroundColor.Update(view, (Selector<Color>)newValue, true);
1668 if (newValue != null) view.SelectorData.BackgroundImage.Reset(view);
1670 defaultValueCreator: (bindable) =>
1672 var view = (View)bindable;
1673 return view.SelectorData.BackgroundColor.Get(view);
1676 internal static readonly BindableProperty BackgroundImageBorderSelectorProperty = BindableProperty.Create("BackgroundImageBorderSelector", typeof(Selector<Rectangle>), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1678 var view = (View)bindable;
1679 view.SelectorData.BackgroundImageBorder.Update(view, (Selector<Rectangle>)newValue, true);
1681 defaultValueCreator: (bindable) =>
1683 var view = (View)bindable;
1684 return view.SelectorData.BackgroundImageBorder.Get(view);
1687 internal static readonly BindableProperty ColorSelectorProperty = BindableProperty.Create("ColorSelector", typeof(Selector<Color>), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1689 var view = (View)bindable;
1690 view.SelectorData.Color.Update(view, (Selector<Color>)newValue, true);
1692 defaultValueCreator: (bindable) =>
1694 var view = (View)bindable;
1695 return view.SelectorData.Color.Get(view);
1698 internal static readonly BindableProperty OpacitySelectorProperty = BindableProperty.Create("OpacitySelector", typeof(Selector<float?>), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1700 var view = (View)bindable;
1701 view.SelectorData.Opacity.Update(view, (Selector<float?>)newValue, true);
1703 defaultValueCreator: (bindable) =>
1705 var view = (View)bindable;
1706 return view.SelectorData.Opacity.Get(view);
1710 /// ImageShadow Selector Property for binding to ViewStyle
1712 [EditorBrowsable(EditorBrowsableState.Never)]
1713 public static readonly BindableProperty ImageShadowSelectorProperty = BindableProperty.Create("ImageShadowSelector", typeof(Selector<ImageShadow>), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1715 var view = (View)bindable;
1716 view.SelectorData.ImageShadow.Update(view, (Selector<ImageShadow>)newValue, true);
1717 if (newValue != null) view.SelectorData.BoxShadow.Reset(view);
1719 defaultValueCreator: (bindable) =>
1721 var view = (View)bindable;
1722 return view.SelectorData.ImageShadow.Get(view);
1726 /// BoxShadow Selector Property for binding to ViewStyle
1728 [EditorBrowsable(EditorBrowsableState.Never)]
1729 public static readonly BindableProperty BoxShadowSelectorProperty = BindableProperty.Create("BoxShadowSelector", typeof(Selector<Shadow>), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1731 var view = (View)bindable;
1732 view.SelectorData.BoxShadow.Update(view, (Selector<Shadow>)newValue, true);
1733 if (newValue != null) view.SelectorData.ImageShadow.Reset(view);
1735 defaultValueCreator: (bindable) =>
1737 var view = (View)bindable;
1738 return view.SelectorData.BoxShadow.Get(view);
1742 /// CornerRadius Selector Property
1744 [EditorBrowsable(EditorBrowsableState.Never)]
1745 public static readonly BindableProperty CornerRadiusSelectorProperty = BindableProperty.Create("CornerRadiusSelector", typeof(Selector<float?>), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1747 var view = (View)bindable;
1748 view.SelectorData.CornerRadius.Update(view, (Selector<float?>)newValue, true);
1750 defaultValueCreator: (bindable) =>
1752 var view = (View)bindable;
1753 return view.SelectorData.CornerRadius.Get(view);