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("StyleName", typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
35 var view = (View)bindable;
38 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue((string)newValue));
41 defaultValueCreator: (bindable) =>
43 var view = (View)bindable;
45 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.STYLE_NAME).Get(out temp);
50 /// KeyInputFocusProperty
52 [EditorBrowsable(EditorBrowsableState.Never)]
53 public static readonly BindableProperty KeyInputFocusProperty = BindableProperty.Create("KeyInputFocus", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
55 var view = (View)bindable;
58 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.KEY_INPUT_FOCUS, new Tizen.NUI.PropertyValue((bool)newValue));
61 defaultValueCreator: (bindable) =>
63 var view = (View)bindable;
65 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.KEY_INPUT_FOCUS).Get(out temp);
70 /// BackgroundColorProperty
72 [EditorBrowsable(EditorBrowsableState.Never)]
73 public static readonly BindableProperty BackgroundColorProperty = BindableProperty.Create("BackgroundColor", typeof(Color), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
75 var view = (View)bindable;
78 if (view.backgroundExtraData == null)
80 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new PropertyValue((Color)newValue));
84 PropertyMap map = new PropertyMap();
86 map.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Color))
87 .Add(ColorVisualProperty.MixColor, new PropertyValue((Color)newValue))
88 .Add(Visual.Property.CornerRadius, new PropertyValue(view.backgroundExtraData.CornerRadius));
90 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new PropertyValue(map));
93 defaultValueCreator: (bindable) =>
95 var view = (View)bindable;
96 Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
98 Tizen.NUI.PropertyMap background = view.Background;
100 background.Find(Visual.Property.Type)?.Get(out visualType);
101 if (visualType == (int)Visual.Type.Color)
103 background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
106 return backgroundColor;
112 [EditorBrowsable(EditorBrowsableState.Never)]
113 public static readonly BindableProperty ColorProperty = BindableProperty.Create("Color", typeof(Color), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
115 var view = (View)bindable;
116 if (newValue != null)
118 view.SetColor((Color)newValue);
121 defaultValueCreator: (bindable) =>
123 var view = (View)bindable;
124 Color color = new Color(0.0f, 0.0f, 0.0f, 0.0f);
125 view.GetProperty(Interop.ActorProperty.Actor_Property_COLOR_get()).Get(color);
129 /// <summary> BackgroundImageProperty </summary>
130 [EditorBrowsable(EditorBrowsableState.Never)]
131 public static readonly BindableProperty BackgroundImageProperty = BindableProperty.Create("BackgroundImage", typeof(string), typeof(View), default(string), propertyChanged: (bindable, oldValue, newValue) =>
133 var view = (View)bindable;
134 if (newValue != null)
136 string url = (string)newValue;
138 if (string.IsNullOrEmpty(url))
141 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new PropertyValue());
145 if (view.backgroundExtraData == null)
147 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new PropertyValue(url));
148 view.BackgroundImageSynchronosLoading = view._backgroundImageSynchronosLoading;
153 PropertyMap map = new PropertyMap();
155 map.Add(ImageVisualProperty.URL, new PropertyValue(url))
156 .Add(Visual.Property.CornerRadius, new PropertyValue(view.backgroundExtraData.CornerRadius))
157 .Add(ImageVisualProperty.SynchronousLoading, new PropertyValue(view._backgroundImageSynchronosLoading));
159 if (view.backgroundExtraData.BackgroundImageBorder != null)
161 map.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.NPatch))
162 .Add(NpatchImageVisualProperty.Border, new PropertyValue(view.backgroundExtraData.BackgroundImageBorder));
166 map.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Image));
169 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new PropertyValue(map));
172 defaultValueCreator: (bindable) =>
174 var view = (View)bindable;
175 string backgroundImage = "";
177 Tizen.NUI.PropertyMap background = view.Background;
178 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
180 return backgroundImage;
182 /// <summary>BackgroundImageBorderProperty</summary>
183 [EditorBrowsable(EditorBrowsableState.Never)]
184 public static readonly BindableProperty BackgroundImageBorderProperty = BindableProperty.Create(nameof(BackgroundImageBorder), typeof(Rectangle), typeof(View), default(Rectangle), propertyChanged: (bindable, oldValue, newValue) =>
186 var view = (View)bindable;
188 bool isEmptyValue = Rectangle.IsNullOrZero((Rectangle)newValue);
190 var backgroundImageBorder = isEmptyValue ? null : (Rectangle)newValue;
192 (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).BackgroundImageBorder = backgroundImageBorder;
199 PropertyMap map = view.Background;
206 map[NpatchImageVisualProperty.Border] = new PropertyValue(backgroundImageBorder);
210 map.Find(Visual.Property.Type)?.Get(out visualType);
212 if (visualType == (int)Visual.Type.Image)
214 map[Visual.Property.Type] = new PropertyValue((int)Visual.Type.NPatch);
217 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new PropertyValue(map));
220 defaultValueCreator: (bindable) =>
222 var view = (View)bindable;
224 return view.backgroundExtraData?.BackgroundImageBorder;
227 /// BackgroundProperty
229 [EditorBrowsable(EditorBrowsableState.Never)]
230 public static readonly BindableProperty BackgroundProperty = BindableProperty.Create("Background", typeof(PropertyMap), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
232 var view = (View)bindable;
233 if (newValue != null)
235 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
237 view.backgroundExtraData = null;
240 defaultValueCreator: (bindable) =>
242 var view = (View)bindable;
243 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
244 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.BACKGROUND).Get(temp);
251 [EditorBrowsable(EditorBrowsableState.Never)]
252 public static readonly BindableProperty StateProperty = BindableProperty.Create("State", typeof(States), typeof(View), States.Normal, propertyChanged: (bindable, oldValue, newValue) =>
254 var view = (View)bindable;
255 if (newValue != null)
257 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.STATE, new Tizen.NUI.PropertyValue((int)newValue));
260 defaultValueCreator: (bindable) =>
262 var view = (View)bindable;
264 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.STATE).Get(out temp) == false)
266 NUILog.Error("State get error!");
270 case 0: return States.Normal;
271 case 1: return States.Focused;
272 case 2: return States.Disabled;
273 default: return States.Normal;
280 [EditorBrowsable(EditorBrowsableState.Never)]
281 public static readonly BindableProperty SubStateProperty = BindableProperty.Create("SubState", typeof(States), typeof(View), States.Normal, propertyChanged: (bindable, oldValue, newValue) =>
283 var view = (View)bindable;
284 string valueToString = "";
285 if (newValue != null)
287 valueToString = ((States)newValue).GetDescription<States>();
288 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
291 defaultValueCreator: (bindable) =>
293 var view = (View)bindable;
295 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SUB_STATE).Get(out temp) == false)
297 NUILog.Error("subState get error!");
299 return temp.GetValueByDescription<States>();
305 [EditorBrowsable(EditorBrowsableState.Never)]
306 public static readonly BindableProperty TooltipProperty = BindableProperty.Create("Tooltip", typeof(PropertyMap), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
308 var view = (View)bindable;
309 if (newValue != null)
311 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.TOOLTIP, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
314 defaultValueCreator: (bindable) =>
316 var view = (View)bindable;
317 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
318 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.TOOLTIP).Get(temp);
325 [EditorBrowsable(EditorBrowsableState.Never)]
326 public static readonly BindableProperty FlexProperty = BindableProperty.Create("Flex", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
328 var view = (View)bindable;
329 if (newValue != null)
331 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue((float)newValue));
334 defaultValueCreator: (bindable) =>
336 var view = (View)bindable;
338 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX).Get(out temp);
343 /// AlignSelfProperty
345 [EditorBrowsable(EditorBrowsableState.Never)]
346 public static readonly BindableProperty AlignSelfProperty = BindableProperty.Create("AlignSelf", typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
348 var view = (View)bindable;
349 if (newValue != null)
351 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue((int)newValue));
354 defaultValueCreator: (bindable) =>
356 var view = (View)bindable;
358 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
363 /// FlexMarginProperty
365 [EditorBrowsable(EditorBrowsableState.Never)]
366 public static readonly BindableProperty FlexMarginProperty = BindableProperty.Create("FlexMargin", typeof(Vector4), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
368 var view = (View)bindable;
369 if (newValue != null)
371 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue((Vector4)newValue));
374 defaultValueCreator: (bindable) =>
376 var view = (View)bindable;
377 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
378 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
383 /// CellIndexProperty
385 [EditorBrowsable(EditorBrowsableState.Never)]
386 public static readonly BindableProperty CellIndexProperty = BindableProperty.Create("CellIndex", typeof(Vector2), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
388 var view = (View)bindable;
389 if (newValue != null)
391 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue((Vector2)newValue));
394 defaultValueCreator: (bindable) =>
396 var view = (View)bindable;
397 Vector2 temp = new Vector2(0.0f, 0.0f);
398 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_INDEX).Get(temp);
405 [EditorBrowsable(EditorBrowsableState.Never)]
406 public static readonly BindableProperty RowSpanProperty = BindableProperty.Create("RowSpan", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
408 var view = (View)bindable;
409 if (newValue != null)
411 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue((float)newValue));
414 defaultValueCreator: (bindable) =>
416 var view = (View)bindable;
418 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.ROW_SPAN).Get(out temp);
423 /// ColumnSpanProperty
425 [EditorBrowsable(EditorBrowsableState.Never)]
426 public static readonly BindableProperty ColumnSpanProperty = BindableProperty.Create("ColumnSpan", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
428 var view = (View)bindable;
429 if (newValue != null)
431 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue((float)newValue));
434 defaultValueCreator: (bindable) =>
436 var view = (View)bindable;
438 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
443 /// CellHorizontalAlignmentProperty
445 [EditorBrowsable(EditorBrowsableState.Never)]
446 public static readonly BindableProperty CellHorizontalAlignmentProperty = BindableProperty.Create("CellHorizontalAlignment", typeof(HorizontalAlignmentType), typeof(View), HorizontalAlignmentType.Left, propertyChanged: (bindable, oldValue, newValue) =>
448 var view = (View)bindable;
449 string valueToString = "";
451 if (newValue != null)
453 valueToString = ((HorizontalAlignmentType)newValue).GetDescription<HorizontalAlignmentType>();
454 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
457 defaultValueCreator: (bindable) =>
459 var view = (View)bindable;
461 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
463 NUILog.Error("CellHorizontalAlignment get error!");
466 return temp.GetValueByDescription<HorizontalAlignmentType>();
470 /// CellVerticalAlignmentProperty
472 [EditorBrowsable(EditorBrowsableState.Never)]
473 public static readonly BindableProperty CellVerticalAlignmentProperty = BindableProperty.Create("CellVerticalAlignment", typeof(VerticalAlignmentType), typeof(View), VerticalAlignmentType.Top, propertyChanged: (bindable, oldValue, newValue) =>
475 var view = (View)bindable;
476 string valueToString = "";
478 if (newValue != null)
480 valueToString = ((VerticalAlignmentType)newValue).GetDescription<VerticalAlignmentType>();
481 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
484 defaultValueCreator: (bindable) =>
486 var view = (View)bindable;
488 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
490 NUILog.Error("CellVerticalAlignment get error!");
493 return temp.GetValueByDescription<VerticalAlignmentType>();
497 /// "Please DO NOT use! This will be deprecated! Please use 'View Weight' instead of BindableProperty"
498 /// This needs to be hidden as inhouse API until all applications using it have been updated. Do not make public.
500 [EditorBrowsable(EditorBrowsableState.Never)]
501 public static readonly BindableProperty WeightProperty = BindableProperty.Create("Weight", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
503 var view = (View)bindable;
504 if (newValue != null)
506 view.Weight = (float)newValue;
510 defaultValueCreator: (bindable) =>
512 var view = (View)bindable;
517 /// LeftFocusableViewProperty
519 [EditorBrowsable(EditorBrowsableState.Never)]
520 public static readonly BindableProperty LeftFocusableViewProperty = BindableProperty.Create(nameof(View.LeftFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
522 var view = (View)bindable;
523 if (newValue != null) { view.LeftFocusableViewId = (int)(newValue as View)?.GetId(); }
524 else { view.LeftFocusableViewId = -1; }
526 defaultValueCreator: (bindable) =>
528 var view = (View)bindable;
529 if (view.LeftFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.LeftFocusableViewId); }
534 /// RightFocusableViewProperty
536 [EditorBrowsable(EditorBrowsableState.Never)]
537 public static readonly BindableProperty RightFocusableViewProperty = BindableProperty.Create(nameof(View.RightFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
539 var view = (View)bindable;
540 if (newValue != null) { view.RightFocusableViewId = (int)(newValue as View)?.GetId(); }
541 else { view.RightFocusableViewId = -1; }
543 defaultValueCreator: (bindable) =>
545 var view = (View)bindable;
546 if (view.RightFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.RightFocusableViewId); }
551 /// UpFocusableViewProperty
553 [EditorBrowsable(EditorBrowsableState.Never)]
554 public static readonly BindableProperty UpFocusableViewProperty = BindableProperty.Create(nameof(View.UpFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
556 var view = (View)bindable;
557 if (newValue != null) { view.UpFocusableViewId = (int)(newValue as View)?.GetId(); }
558 else { view.UpFocusableViewId = -1; }
560 defaultValueCreator: (bindable) =>
562 var view = (View)bindable;
563 if (view.UpFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.UpFocusableViewId); }
568 /// DownFocusableViewProperty
570 [EditorBrowsable(EditorBrowsableState.Never)]
571 public static readonly BindableProperty DownFocusableViewProperty = BindableProperty.Create(nameof(View.DownFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
573 var view = (View)bindable;
574 if (newValue != null) { view.DownFocusableViewId = (int)(newValue as View)?.GetId(); }
575 else { view.DownFocusableViewId = -1; }
577 defaultValueCreator: (bindable) =>
579 var view = (View)bindable;
580 if (view.DownFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.DownFocusableViewId); }
585 /// FocusableProperty
587 [EditorBrowsable(EditorBrowsableState.Never)]
588 public static readonly BindableProperty FocusableProperty = BindableProperty.Create("Focusable", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
590 var view = (View)bindable;
591 if (newValue != null) { view.SetKeyboardFocusable((bool)newValue); }
593 defaultValueCreator: (bindable) =>
595 var view = (View)bindable;
596 return view.IsKeyboardFocusable();
602 [EditorBrowsable(EditorBrowsableState.Never)]
603 public static readonly BindableProperty Size2DProperty = BindableProperty.Create("Size2D", typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
605 var view = (View)bindable;
606 if (newValue != null)
608 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size((Size2D)newValue)));
611 defaultValueCreator: (bindable) =>
613 var view = (View)bindable;
614 Size temp = new Size(0.0f, 0.0f, 0.0f);
615 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
616 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
623 [EditorBrowsable(EditorBrowsableState.Never)]
624 public static readonly BindableProperty OpacityProperty = BindableProperty.Create("Opacity", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
626 var view = (View)bindable;
628 if (newValue != null)
630 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.OPACITY, new Tizen.NUI.PropertyValue((float)newValue));
633 defaultValueCreator: (bindable) =>
635 var view = (View)bindable;
637 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.OPACITY).Get(out temp);
642 /// Position2DProperty
644 [EditorBrowsable(EditorBrowsableState.Never)]
645 public static readonly BindableProperty Position2DProperty = BindableProperty.Create("Position2D", typeof(Position2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
647 var view = (View)bindable;
648 if (newValue != null)
650 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position((Position2D)newValue)));
653 defaultValueCreator: (bindable) =>
655 var view = (View)bindable;
656 Position temp = new Position(0.0f, 0.0f, 0.0f);
657 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
658 return new Position2D(temp);
662 /// PositionUsesPivotPointProperty
664 [EditorBrowsable(EditorBrowsableState.Never)]
665 public static readonly BindableProperty PositionUsesPivotPointProperty = BindableProperty.Create("PositionUsesPivotPoint", typeof(bool), typeof(View), true, propertyChanged: (bindable, oldValue, newValue) =>
667 var view = (View)bindable;
668 if (newValue != null)
670 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue((bool)newValue));
673 defaultValueCreator: (bindable) =>
675 var view = (View)bindable;
677 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
682 /// SiblingOrderProperty
684 [EditorBrowsable(EditorBrowsableState.Never)]
685 public static readonly BindableProperty SiblingOrderProperty = BindableProperty.Create("SiblingOrder", typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
687 var view = (View)bindable;
689 if (newValue != null)
691 value = (int)newValue;
694 NUILog.Error("SiblingOrder should be bigger than 0 or equal to 0.");
697 var siblings = view.GetParent()?.Children;
698 if (siblings != null)
700 int currentOrder = siblings.IndexOf(view);
701 if (value != currentOrder)
703 if (value == 0) { view.LowerToBottom(); }
704 else if (value < siblings.Count - 1)
706 if (value > currentOrder) { view.RaiseAbove(siblings[value]); }
707 else { view.LowerBelow(siblings[value]); }
709 else { view.RaiseToTop(); }
714 defaultValueCreator: (bindable) =>
716 var view = (View)bindable;
717 var parentChildren = view.GetParent()?.Children;
718 int currentOrder = 0;
719 if (parentChildren != null)
721 currentOrder = parentChildren.IndexOf(view);
723 if (currentOrder < 0) { return 0; }
724 else if (currentOrder < parentChildren.Count) { return currentOrder; }
731 /// ParentOriginProperty
733 [EditorBrowsable(EditorBrowsableState.Never)]
734 public static readonly BindableProperty ParentOriginProperty = BindableProperty.Create("ParentOrigin", typeof(Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
736 var view = (View)bindable;
737 if (newValue != null)
739 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue((Position)newValue));
742 defaultValueCreator: (bindable) =>
744 var view = (View)bindable;
745 Position temp = new Position(0.0f, 0.0f, 0.0f);
746 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN).Get(temp);
752 /// PivotPointProperty
754 [EditorBrowsable(EditorBrowsableState.Never)]
755 public static readonly BindableProperty PivotPointProperty = BindableProperty.Create("PivotPoint", typeof(Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
757 var view = (View)bindable;
758 if (newValue != null)
760 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue((Position)newValue));
763 defaultValueCreator: (bindable) =>
765 var view = (View)bindable;
766 Position temp = new Position(0.0f, 0.0f, 0.0f);
767 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ANCHOR_POINT).Get(temp);
772 /// SizeWidthProperty
774 [EditorBrowsable(EditorBrowsableState.Never)]
775 public static readonly BindableProperty SizeWidthProperty = BindableProperty.Create("SizeWidth", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
777 var view = (View)bindable;
778 if (newValue != null)
780 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue((float)newValue));
781 view.WidthSpecification = (int)System.Math.Ceiling((float)newValue);
784 defaultValueCreator: (bindable) =>
786 var view = (View)bindable;
788 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_WIDTH).Get(out temp);
793 /// SizeHeightProperty
795 [EditorBrowsable(EditorBrowsableState.Never)]
796 public static readonly BindableProperty SizeHeightProperty = BindableProperty.Create("SizeHeight", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
798 var view = (View)bindable;
799 if (newValue != null)
801 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue((float)newValue));
802 view.HeightSpecification = (int)System.Math.Ceiling((float)newValue);
805 defaultValueCreator: (bindable) =>
807 var view = (View)bindable;
809 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT).Get(out temp);
816 [EditorBrowsable(EditorBrowsableState.Never)]
817 public static readonly BindableProperty PositionProperty = BindableProperty.Create("Position", typeof(Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
819 var view = (View)bindable;
820 if (newValue != null)
822 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue((Position)newValue));
825 defaultValueCreator: (bindable) =>
827 var view = (View)bindable;
828 Position temp = new Position(0.0f, 0.0f, 0.0f);
829 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
834 /// PositionXProperty
836 [EditorBrowsable(EditorBrowsableState.Never)]
837 public static readonly BindableProperty PositionXProperty = BindableProperty.Create("PositionX", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
839 var view = (View)bindable;
840 if (newValue != null)
842 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_X, new Tizen.NUI.PropertyValue((float)newValue));
845 defaultValueCreator: (bindable) =>
847 var view = (View)bindable;
849 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_X).Get(out temp);
854 /// PositionYProperty
856 [EditorBrowsable(EditorBrowsableState.Never)]
857 public static readonly BindableProperty PositionYProperty = BindableProperty.Create("PositionY", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
859 var view = (View)bindable;
860 if (newValue != null)
862 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_Y, new Tizen.NUI.PropertyValue((float)newValue));
865 defaultValueCreator: (bindable) =>
867 var view = (View)bindable;
869 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Y).Get(out temp);
874 /// PositionZProperty
876 [EditorBrowsable(EditorBrowsableState.Never)]
877 public static readonly BindableProperty PositionZProperty = BindableProperty.Create("PositionZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
879 var view = (View)bindable;
880 if (newValue != null)
882 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_Z, new Tizen.NUI.PropertyValue((float)newValue));
885 defaultValueCreator: (bindable) =>
887 var view = (View)bindable;
889 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Z).Get(out temp);
894 /// OrientationProperty
896 [EditorBrowsable(EditorBrowsableState.Never)]
897 public static readonly BindableProperty OrientationProperty = BindableProperty.Create("Orientation", typeof(Rotation), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
899 var view = (View)bindable;
900 if (newValue != null)
902 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ORIENTATION, new Tizen.NUI.PropertyValue((Rotation)newValue));
905 defaultValueCreator: (bindable) =>
907 var view = (View)bindable;
908 Rotation temp = new Rotation();
909 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ORIENTATION).Get(temp);
916 [EditorBrowsable(EditorBrowsableState.Never)]
917 public static readonly BindableProperty ScaleProperty = BindableProperty.Create("Scale", typeof(Vector3), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
919 var view = (View)bindable;
920 if (newValue != null)
922 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE, new Tizen.NUI.PropertyValue((Vector3)newValue));
925 defaultValueCreator: (bindable) =>
927 var view = (View)bindable;
928 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
929 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE).Get(temp);
936 [EditorBrowsable(EditorBrowsableState.Never)]
937 public static readonly BindableProperty ScaleXProperty = BindableProperty.Create("ScaleX", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
939 var view = (View)bindable;
940 if (newValue != null)
942 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_X, new Tizen.NUI.PropertyValue((float)newValue));
945 defaultValueCreator: (bindable) =>
947 var view = (View)bindable;
949 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_X).Get(out temp);
956 [EditorBrowsable(EditorBrowsableState.Never)]
957 public static readonly BindableProperty ScaleYProperty = BindableProperty.Create("ScaleY", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
959 var view = (View)bindable;
960 if (newValue != null)
962 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_Y, new Tizen.NUI.PropertyValue((float)newValue));
965 defaultValueCreator: (bindable) =>
967 var view = (View)bindable;
969 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Y).Get(out temp);
976 [EditorBrowsable(EditorBrowsableState.Never)]
977 public static readonly BindableProperty ScaleZProperty = BindableProperty.Create("ScaleZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
979 var view = (View)bindable;
980 if (newValue != null)
982 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_Z, new Tizen.NUI.PropertyValue((float)newValue));
985 defaultValueCreator: (bindable) =>
987 var view = (View)bindable;
989 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Z).Get(out temp);
996 [EditorBrowsable(EditorBrowsableState.Never)]
997 public static readonly BindableProperty NameProperty = BindableProperty.Create("Name", typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
999 var view = (View)bindable;
1000 if (newValue != null)
1002 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.NAME, new Tizen.NUI.PropertyValue((string)newValue));
1005 defaultValueCreator: (bindable) =>
1007 var view = (View)bindable;
1009 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.NAME).Get(out temp);
1014 /// SensitiveProperty
1016 [EditorBrowsable(EditorBrowsableState.Never)]
1017 public static readonly BindableProperty SensitiveProperty = BindableProperty.Create("Sensitive", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1019 var view = (View)bindable;
1020 if (newValue != null)
1022 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SENSITIVE, new Tizen.NUI.PropertyValue((bool)newValue));
1025 defaultValueCreator: (bindable) =>
1027 var view = (View)bindable;
1029 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SENSITIVE).Get(out temp);
1034 /// LeaveRequiredProperty
1036 [EditorBrowsable(EditorBrowsableState.Never)]
1037 public static readonly BindableProperty LeaveRequiredProperty = BindableProperty.Create("LeaveRequired", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1039 var view = (View)bindable;
1040 if (newValue != null)
1042 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue((bool)newValue));
1045 defaultValueCreator: (bindable) =>
1047 var view = (View)bindable;
1049 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LEAVE_REQUIRED).Get(out temp);
1054 /// InheritOrientationProperty
1056 [EditorBrowsable(EditorBrowsableState.Never)]
1057 public static readonly BindableProperty InheritOrientationProperty = BindableProperty.Create("InheritOrientation", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1059 var view = (View)bindable;
1060 if (newValue != null)
1062 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue((bool)newValue));
1065 defaultValueCreator: (bindable) =>
1067 var view = (View)bindable;
1069 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_ORIENTATION).Get(out temp);
1074 /// InheritScaleProperty
1076 [EditorBrowsable(EditorBrowsableState.Never)]
1077 public static readonly BindableProperty InheritScaleProperty = BindableProperty.Create("InheritScale", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1079 var view = (View)bindable;
1080 if (newValue != null)
1082 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue((bool)newValue));
1085 defaultValueCreator: (bindable) =>
1087 var view = (View)bindable;
1089 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_SCALE).Get(out temp);
1094 /// DrawModeProperty
1096 [EditorBrowsable(EditorBrowsableState.Never)]
1097 public static readonly BindableProperty DrawModeProperty = BindableProperty.Create("DrawMode", typeof(DrawModeType), typeof(View), DrawModeType.Normal, propertyChanged: (bindable, oldValue, newValue) =>
1099 var view = (View)bindable;
1100 if (newValue != null)
1102 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)newValue));
1105 defaultValueCreator: (bindable) =>
1107 var view = (View)bindable;
1109 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.DRAW_MODE).Get(out temp) == false)
1111 NUILog.Error("DrawMode get error!");
1113 return (DrawModeType)temp;
1117 /// SizeModeFactorProperty
1119 [EditorBrowsable(EditorBrowsableState.Never)]
1120 public static readonly BindableProperty SizeModeFactorProperty = BindableProperty.Create("SizeModeFactor", typeof(Vector3), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1122 var view = (View)bindable;
1123 if (newValue != null)
1125 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue((Vector3)newValue));
1128 defaultValueCreator: (bindable) =>
1130 var view = (View)bindable;
1131 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
1132 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR).Get(temp);
1137 /// WidthResizePolicyProperty
1139 [EditorBrowsable(EditorBrowsableState.Never)]
1140 public static readonly BindableProperty WidthResizePolicyProperty = BindableProperty.Create("WidthResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
1142 var view = (View)bindable;
1143 if (newValue != null)
1145 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
1146 // Match ResizePolicy to new Layouting.
1147 // Parent relative policies can not be mapped at this point as parent size unknown.
1148 switch ((ResizePolicyType)newValue)
1150 case ResizePolicyType.UseNaturalSize:
1152 view.WidthSpecification = LayoutParamPolicies.WrapContent;
1155 case ResizePolicyType.FillToParent:
1157 view.WidthSpecification = LayoutParamPolicies.MatchParent;
1160 case ResizePolicyType.FitToChildren:
1162 view.WidthSpecification = LayoutParamPolicies.WrapContent;
1170 defaultValueCreator: (bindable) =>
1172 var view = (View)bindable;
1174 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
1176 NUILog.Error("WidthResizePolicy get error!");
1178 return temp.GetValueByDescription<ResizePolicyType>();
1182 /// HeightResizePolicyProperty
1184 [EditorBrowsable(EditorBrowsableState.Never)]
1185 public static readonly BindableProperty HeightResizePolicyProperty = BindableProperty.Create("HeightResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
1187 var view = (View)bindable;
1188 if (newValue != null)
1190 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
1191 // Match ResizePolicy to new Layouting.
1192 // Parent relative policies can not be mapped at this point as parent size unknown.
1193 switch ((ResizePolicyType)newValue)
1195 case ResizePolicyType.UseNaturalSize:
1197 view.HeightSpecification = LayoutParamPolicies.WrapContent;
1200 case ResizePolicyType.FillToParent:
1202 view.HeightSpecification = LayoutParamPolicies.MatchParent;
1205 case ResizePolicyType.FitToChildren:
1207 view.HeightSpecification = LayoutParamPolicies.WrapContent;
1215 defaultValueCreator: (bindable) =>
1217 var view = (View)bindable;
1219 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
1221 NUILog.Error("HeightResizePolicy get error!");
1223 return temp.GetValueByDescription<ResizePolicyType>();
1227 /// SizeScalePolicyProperty
1229 [EditorBrowsable(EditorBrowsableState.Never)]
1230 public static readonly BindableProperty SizeScalePolicyProperty = BindableProperty.Create("SizeScalePolicy", typeof(SizeScalePolicyType), typeof(View), SizeScalePolicyType.UseSizeSet, propertyChanged: (bindable, oldValue, newValue) =>
1232 var view = (View)bindable;
1233 string valueToString = "";
1234 if (newValue != null)
1236 valueToString = ((SizeScalePolicyType)newValue).GetDescription<SizeScalePolicyType>();
1237 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
1240 defaultValueCreator: (bindable) =>
1242 var view = (View)bindable;
1244 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
1246 NUILog.Error("SizeScalePolicy get error!");
1248 return (SizeScalePolicyType)temp;
1252 /// WidthForHeightProperty
1254 [EditorBrowsable(EditorBrowsableState.Never)]
1255 public static readonly BindableProperty WidthForHeightProperty = BindableProperty.Create("WidthForHeight", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1257 var view = (View)bindable;
1258 if (newValue != null)
1260 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue((bool)newValue));
1263 defaultValueCreator: (bindable) =>
1265 var view = (View)bindable;
1267 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
1272 /// HeightForWidthProperty
1274 [EditorBrowsable(EditorBrowsableState.Never)]
1275 public static readonly BindableProperty HeightForWidthProperty = BindableProperty.Create("HeightForWidth", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1277 var view = (View)bindable;
1278 if (newValue != null)
1280 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue((bool)newValue));
1283 defaultValueCreator: (bindable) =>
1285 var view = (View)bindable;
1287 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
1294 [EditorBrowsable(EditorBrowsableState.Never)]
1295 public static readonly BindableProperty PaddingProperty = BindableProperty.Create("Padding", typeof(Extents), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1297 var view = (View)bindable;
1298 if (newValue != null)
1300 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PADDING, new Tizen.NUI.PropertyValue((Extents)newValue));
1303 defaultValueCreator: (bindable) =>
1305 var view = (View)bindable;
1306 Extents temp = new Extents(0, 0, 0, 0);
1307 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PADDING).Get(temp);
1314 [EditorBrowsable(EditorBrowsableState.Never)]
1315 public static readonly BindableProperty SizeProperty = BindableProperty.Create("Size", typeof(Size), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1317 var view = (View)bindable;
1318 if (newValue != null)
1320 Size size = (Size)newValue;
1321 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue(size));
1322 // Set Specification so when layouts measure this View it matches the value set here.
1323 // All Views are currently Layouts.
1324 view.WidthSpecification = (int)System.Math.Ceiling(size.Width);
1325 view.HeightSpecification = (int)System.Math.Ceiling(size.Height);
1328 defaultValueCreator: (bindable) =>
1330 var view = (View)bindable;
1331 Size temp = new Size(0, 0, 0);
1332 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
1337 /// MinimumSizeProperty
1339 [EditorBrowsable(EditorBrowsableState.Never)]
1340 public static readonly BindableProperty MinimumSizeProperty = BindableProperty.Create("MinimumSize", typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1342 var view = (View)bindable;
1343 Size2D temp = newValue as Size2D;
1346 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue(temp));
1350 Tizen.Log.Fatal("NUI", $"[ERROR] can't set MinimumSizeProperty!");
1353 defaultValueCreator: (bindable) =>
1355 var view = (View)bindable;
1356 Size2D temp = new Size2D(0, 0);
1357 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE).Get(temp);
1362 /// MaximumSizeProperty
1364 [EditorBrowsable(EditorBrowsableState.Never)]
1365 public static readonly BindableProperty MaximumSizeProperty = BindableProperty.Create("MaximumSize", typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1367 var view = (View)bindable;
1368 Size2D temp = newValue as Size2D;
1371 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue(temp));
1375 Tizen.Log.Fatal("NUI", $"[ERROR] can't set MaximumSizeProperty!");
1378 defaultValueCreator: (bindable) =>
1380 var view = (View)bindable;
1381 Size2D temp = new Size2D(0, 0);
1382 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE).Get(temp);
1387 /// InheritPositionProperty
1389 [EditorBrowsable(EditorBrowsableState.Never)]
1390 public static readonly BindableProperty InheritPositionProperty = BindableProperty.Create("InheritPosition", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1392 var view = (View)bindable;
1393 if (newValue != null)
1395 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue((bool)newValue));
1398 defaultValueCreator: (bindable) =>
1400 var view = (View)bindable;
1402 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_POSITION).Get(out temp);
1407 /// ClippingModeProperty
1409 [EditorBrowsable(EditorBrowsableState.Never)]
1410 public static readonly BindableProperty ClippingModeProperty = BindableProperty.Create("ClippingMode", typeof(ClippingModeType), typeof(View), ClippingModeType.Disabled, propertyChanged: (bindable, oldValue, newValue) =>
1412 var view = (View)bindable;
1413 if (newValue != null)
1415 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)newValue));
1418 defaultValueCreator: (bindable) =>
1420 var view = (View)bindable;
1422 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.CLIPPING_MODE).Get(out temp) == false)
1424 NUILog.Error("ClippingMode get error!");
1426 return (ClippingModeType)temp;
1430 /// InheritLayoutDirectionProperty
1432 [EditorBrowsable(EditorBrowsableState.Never)]
1433 public static readonly BindableProperty InheritLayoutDirectionProperty = BindableProperty.Create("InheritLayoutDirection", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1435 var view = (View)bindable;
1436 if (newValue != null)
1438 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((bool)newValue));
1441 defaultValueCreator: (bindable) =>
1443 var view = (View)bindable;
1445 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION).Get(out temp);
1450 /// LayoutDirectionProperty
1452 [EditorBrowsable(EditorBrowsableState.Never)]
1453 public static readonly BindableProperty LayoutDirectionProperty = BindableProperty.Create("LayoutDirection", typeof(ViewLayoutDirectionType), typeof(View), ViewLayoutDirectionType.LTR, propertyChanged: (bindable, oldValue, newValue) =>
1455 var view = (View)bindable;
1456 if (newValue != null)
1458 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((int)newValue));
1461 defaultValueCreator: (bindable) =>
1463 var view = (View)bindable;
1465 if (false == Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION).Get(out temp))
1467 NUILog.Error("LAYOUT_DIRECTION get error!");
1469 return (ViewLayoutDirectionType)temp;
1475 [EditorBrowsable(EditorBrowsableState.Never)]
1476 public static readonly BindableProperty MarginProperty = BindableProperty.Create("Margin", typeof(Extents), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1478 var view = (View)bindable;
1479 if (newValue != null)
1481 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MARGIN, new Tizen.NUI.PropertyValue((Extents)newValue));
1484 defaultValueCreator: (bindable) =>
1486 var view = (View)bindable;
1487 Extents temp = new Extents(0, 0, 0, 0);
1488 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MARGIN).Get(temp);
1493 /// UpdateSizeHintProperty
1495 [EditorBrowsable(EditorBrowsableState.Never)]
1496 public static readonly BindableProperty UpdateSizeHintProperty = BindableProperty.Create("UpdateSizeHint", typeof(Vector2), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1498 var view = (View)bindable;
1499 if (newValue != null)
1501 Tizen.NUI.Object.SetProperty(view.swigCPtr, Interop.ViewProperty.View_Property_UPDATE_SIZE_HINT_get(), new Tizen.NUI.PropertyValue((Vector2)newValue));
1504 defaultValueCreator: (bindable) =>
1506 var view = (View)bindable;
1508 Vector2 temp = new Vector2(0.0f, 0.0f);
1509 Tizen.NUI.Object.GetProperty(view.swigCPtr, Interop.ViewProperty.View_Property_UPDATE_SIZE_HINT_get()).Get(temp);
1514 /// ImageShadow Property
1516 [EditorBrowsable(EditorBrowsableState.Never)]
1517 public static readonly BindableProperty ImageShadowProperty = BindableProperty.Create(nameof(ImageShadow), typeof(ImageShadow), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1519 var shadow = (ImageShadow)newValue;
1520 var view = (View)bindable;
1521 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SHADOW, shadow == null ? new PropertyValue() : shadow.ToPropertyValue(view));
1523 defaultValueCreator: (bindable) =>
1525 var view = (View)bindable;
1527 PropertyMap map = new PropertyMap();
1528 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SHADOW).Get(map);
1530 var shadow = new ImageShadow(map);
1531 return shadow.IsEmpty() ? null : shadow;
1537 [EditorBrowsable(EditorBrowsableState.Never)]
1538 public static readonly BindableProperty BoxShadowProperty = BindableProperty.Create(nameof(BoxShadow), typeof(Shadow), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1540 var shadow = (Shadow)newValue;
1541 var view = (View)bindable;
1542 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SHADOW, shadow == null ? new PropertyValue() : shadow.ToPropertyValue(view));
1544 defaultValueCreator: (bindable) =>
1546 var view = (View)bindable;
1548 PropertyMap map = new PropertyMap();
1549 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SHADOW).Get(map);
1551 var shadow = new Shadow(map);
1552 return shadow.IsEmpty() ? null : shadow;
1556 /// CornerRadius Property
1558 [EditorBrowsable(EditorBrowsableState.Never)]
1559 public static readonly BindableProperty CornerRadiusProperty = BindableProperty.Create(nameof(CornerRadius), typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
1561 var view = (View)bindable;
1562 view.UpdateCornerRadius((float)newValue);
1564 defaultValueCreator: (bindable) =>
1566 var view = (View)bindable;
1567 return view.backgroundExtraData == null ? 0 : view.backgroundExtraData.CornerRadius;
1571 /// XamlStyleProperty
1573 [EditorBrowsable(EditorBrowsableState.Never)]
1574 public static readonly BindableProperty XamlStyleProperty = BindableProperty.Create("XamlStyle", typeof(Style), typeof(View), default(Style), propertyChanged: (bindable, oldvalue, newvalue) => ((View)bindable)._mergedStyle.Style = (Style)newvalue);
1577 /// EnableControlState property
1579 [EditorBrowsable(EditorBrowsableState.Never)]
1580 public static readonly BindableProperty EnableControlStateProperty = BindableProperty.Create(nameof(EnableControlState), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1582 var view = (View)bindable;
1583 bool prev = view.enableControlState;
1584 view.enableControlState = (bool)newValue;
1586 if (prev != view.enableControlState)
1590 view.TouchEvent -= view.EmptyOnTouch;
1594 view.TouchEvent += view.EmptyOnTouch;
1598 defaultValueCreator: (bindable) =>
1600 return ((View)bindable).enableControlState;
1604 internal static readonly BindableProperty BackgroundImageSelectorProperty = BindableProperty.Create("BackgroundImageSelector", typeof(Selector<string>), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1606 var view = (View)bindable;
1607 view.SelectorData.BackgroundImage.Update(view, (Selector<string>)newValue, true);
1609 defaultValueCreator: (bindable) =>
1611 var view = (View)bindable;
1612 return view.SelectorData.BackgroundImage.Get(view);
1615 internal static readonly BindableProperty BackgroundColorSelectorProperty = BindableProperty.Create("BackgroundColorSelector", typeof(Selector<Color>), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1617 var view = (View)bindable;
1618 view.SelectorData.BackgroundColor.Update(view, (Selector<Color>)newValue, true);
1620 defaultValueCreator: (bindable) =>
1622 var view = (View)bindable;
1623 return view.SelectorData.BackgroundColor.Get(view);
1626 internal static readonly BindableProperty BackgroundImageBorderSelectorProperty = BindableProperty.Create("BackgroundImageBorderSelector", typeof(Selector<Rectangle>), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1628 var view = (View)bindable;
1629 view.SelectorData.BackgroundImageBorder.Update(view, (Selector<Rectangle>)newValue, true);
1631 defaultValueCreator: (bindable) =>
1633 var view = (View)bindable;
1634 return view.SelectorData.BackgroundImageBorder.Get(view);
1637 internal static readonly BindableProperty ColorSelectorProperty = BindableProperty.Create("ColorSelector", typeof(Selector<Color>), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1639 var view = (View)bindable;
1640 view.SelectorData.Color.Update(view, (Selector<Color>)newValue, true);
1642 defaultValueCreator: (bindable) =>
1644 var view = (View)bindable;
1645 return view.SelectorData.Color.Get(view);
1648 internal static readonly BindableProperty OpacitySelectorProperty = BindableProperty.Create("OpacitySelector", typeof(Selector<float?>), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1650 var view = (View)bindable;
1651 view.SelectorData.Opacity.Update(view, (Selector<float?>)newValue, true);
1653 defaultValueCreator: (bindable) =>
1655 var view = (View)bindable;
1656 return view.SelectorData.Opacity.Get(view);
1660 /// ImageShadow Selector Property for binding to ViewStyle
1662 [EditorBrowsable(EditorBrowsableState.Never)]
1663 public static readonly BindableProperty ImageShadowSelectorProperty = BindableProperty.Create("ImageShadowSelector", typeof(Selector<ImageShadow>), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1665 var view = (View)bindable;
1666 view.SelectorData.ImageShadow.Update(view, (Selector<ImageShadow>)newValue, true);
1668 defaultValueCreator: (bindable) =>
1670 var view = (View)bindable;
1671 return view.SelectorData.ImageShadow.Get(view);
1675 /// BoxShadow Selector Property for binding to ViewStyle
1677 [EditorBrowsable(EditorBrowsableState.Never)]
1678 public static readonly BindableProperty BoxShadowSelectorProperty = BindableProperty.Create("BoxShadowSelector", typeof(Selector<Shadow>), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1680 var view = (View)bindable;
1681 view.SelectorData.BoxShadow.Update(view, (Selector<Shadow>)newValue, true);
1683 defaultValueCreator: (bindable) =>
1685 var view = (View)bindable;
1686 return view.SelectorData.BoxShadow.Get(view);
1690 /// CornerRadius Selector Property
1692 [EditorBrowsable(EditorBrowsableState.Never)]
1693 public static readonly BindableProperty CornerRadiusSelectorProperty = BindableProperty.Create("CornerRadiusSelector", typeof(Selector<float?>), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1695 var view = (View)bindable;
1696 view.SelectorData.CornerRadius.Update(view, (Selector<float?>)newValue, true);
1698 defaultValueCreator: (bindable) =>
1700 var view = (View)bindable;
1701 return view.SelectorData.CornerRadius.Get(view);