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
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 /// BackgroundColorProperty
52 [EditorBrowsable(EditorBrowsableState.Never)]
53 public static readonly BindableProperty BackgroundColorProperty = BindableProperty.Create("BackgroundColor", typeof(Color), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
55 var view = (View)bindable;
59 if (view.backgroundExtraData == null)
61 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new PropertyValue((Color)newValue));
65 PropertyMap map = new PropertyMap();
67 map.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Color))
68 .Add(ColorVisualProperty.MixColor, new PropertyValue((Color)newValue))
69 .Add(Visual.Property.CornerRadius, new PropertyValue(view.backgroundExtraData.CornerRadius));
71 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new PropertyValue(map));
74 defaultValueCreator: (bindable) =>
76 var view = (View)bindable;
77 Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
79 Tizen.NUI.PropertyMap background = view.Background;
81 background.Find(Visual.Property.Type)?.Get(out visualType);
82 if (visualType == (int)Visual.Type.Color)
84 background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
87 return backgroundColor;
93 [EditorBrowsable(EditorBrowsableState.Never)]
94 public static readonly BindableProperty ColorProperty = BindableProperty.Create("Color", typeof(Color), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
96 var view = (View)bindable;
99 view.SetColor((Color)newValue);
102 defaultValueCreator: (bindable) =>
104 var view = (View)bindable;
105 Color color = new Color(0.0f, 0.0f, 0.0f, 0.0f);
106 view.GetProperty(Interop.ActorProperty.Actor_Property_COLOR_get()).Get(color);
110 /// <summary> BackgroundImageProperty </summary>
111 [EditorBrowsable(EditorBrowsableState.Never)]
112 public static readonly BindableProperty BackgroundImageProperty = BindableProperty.Create("BackgroundImage", typeof(string), typeof(View), default(string), propertyChanged: (bindable, oldValue, newValue) =>
114 var view = (View)bindable;
115 if (newValue != null)
117 string url = (string)newValue;
119 if (string.IsNullOrEmpty(url))
122 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new PropertyValue());
126 if (view.backgroundExtraData == null)
128 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new PropertyValue(url));
129 view.BackgroundImageSynchronosLoading = view._backgroundImageSynchronosLoading;
134 PropertyMap map = new PropertyMap();
136 map.Add(ImageVisualProperty.URL, new PropertyValue(url))
137 .Add(Visual.Property.CornerRadius, new PropertyValue(view.backgroundExtraData.CornerRadius))
138 .Add(ImageVisualProperty.SynchronousLoading, new PropertyValue(view._backgroundImageSynchronosLoading));
140 if (view.backgroundExtraData.BackgroundImageBorder != null)
142 map.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.NPatch))
143 .Add(NpatchImageVisualProperty.Border, new PropertyValue(view.backgroundExtraData.BackgroundImageBorder));
147 map.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Image));
150 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new PropertyValue(map));
153 defaultValueCreator: (bindable) =>
155 var view = (View)bindable;
156 string backgroundImage = "";
158 Tizen.NUI.PropertyMap background = view.Background;
160 background.Find(Visual.Property.Type)?.Get(out visualType);
161 if ((visualType == (int)Visual.Type.Image) || (visualType == (int)Visual.Type.NPatch))
163 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
166 return backgroundImage;
168 /// <summary>BackgroundImageBorderProperty</summary>
169 [EditorBrowsable(EditorBrowsableState.Never)]
170 public static readonly BindableProperty BackgroundImageBorderProperty = BindableProperty.Create(nameof(BackgroundImageBorder), typeof(Rectangle), typeof(View), default(Rectangle), propertyChanged: (bindable, oldValue, newValue) =>
172 var view = (View)bindable;
174 bool isEmptyValue = Rectangle.IsNullOrZero((Rectangle)newValue);
176 var backgroundImageBorder = isEmptyValue ? null : (Rectangle)newValue;
178 (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).BackgroundImageBorder = backgroundImageBorder;
185 PropertyMap map = view.Background;
192 map[NpatchImageVisualProperty.Border] = new PropertyValue(backgroundImageBorder);
196 map.Find(Visual.Property.Type)?.Get(out visualType);
198 if (visualType == (int)Visual.Type.Image)
200 map[Visual.Property.Type] = new PropertyValue((int)Visual.Type.NPatch);
203 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new PropertyValue(map));
206 defaultValueCreator: (bindable) =>
208 var view = (View)bindable;
210 return view.backgroundExtraData?.BackgroundImageBorder;
213 /// BackgroundProperty
215 [EditorBrowsable(EditorBrowsableState.Never)]
216 public static readonly BindableProperty BackgroundProperty = BindableProperty.Create("Background", typeof(PropertyMap), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
218 var view = (View)bindable;
219 if (newValue != null)
221 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
223 view.backgroundExtraData = null;
226 defaultValueCreator: (bindable) =>
228 var view = (View)bindable;
229 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
230 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.BACKGROUND).Get(temp);
237 [EditorBrowsable(EditorBrowsableState.Never)]
238 public static readonly BindableProperty StateProperty = BindableProperty.Create("State", typeof(States), typeof(View), States.Normal, propertyChanged: (bindable, oldValue, newValue) =>
240 var view = (View)bindable;
241 if (newValue != null)
243 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.STATE, new Tizen.NUI.PropertyValue((int)newValue));
246 defaultValueCreator: (bindable) =>
248 var view = (View)bindable;
250 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.STATE).Get(out temp) == false)
252 NUILog.Error("State get error!");
256 case 0: return States.Normal;
257 case 1: return States.Focused;
258 case 2: return States.Disabled;
259 default: return States.Normal;
266 [EditorBrowsable(EditorBrowsableState.Never)]
267 public static readonly BindableProperty SubStateProperty = BindableProperty.Create("SubState", typeof(States), typeof(View), States.Normal, propertyChanged: (bindable, oldValue, newValue) =>
269 var view = (View)bindable;
270 string valueToString = "";
271 if (newValue != null)
273 valueToString = ((States)newValue).GetDescription<States>();
274 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
277 defaultValueCreator: (bindable) =>
279 var view = (View)bindable;
281 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SUB_STATE).Get(out temp) == false)
283 NUILog.Error("subState get error!");
285 return temp.GetValueByDescription<States>();
291 [EditorBrowsable(EditorBrowsableState.Never)]
292 public static readonly BindableProperty TooltipProperty = BindableProperty.Create("Tooltip", typeof(PropertyMap), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
294 var view = (View)bindable;
295 if (newValue != null)
297 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.TOOLTIP, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
300 defaultValueCreator: (bindable) =>
302 var view = (View)bindable;
303 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
304 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.TOOLTIP).Get(temp);
311 [EditorBrowsable(EditorBrowsableState.Never)]
312 public static readonly BindableProperty FlexProperty = BindableProperty.Create("Flex", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
314 var view = (View)bindable;
315 if (newValue != null)
317 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue((float)newValue));
320 defaultValueCreator: (bindable) =>
322 var view = (View)bindable;
324 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX).Get(out temp);
329 /// AlignSelfProperty
331 [EditorBrowsable(EditorBrowsableState.Never)]
332 public static readonly BindableProperty AlignSelfProperty = BindableProperty.Create("AlignSelf", typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
334 var view = (View)bindable;
335 if (newValue != null)
337 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue((int)newValue));
340 defaultValueCreator: (bindable) =>
342 var view = (View)bindable;
344 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
349 /// FlexMarginProperty
351 [EditorBrowsable(EditorBrowsableState.Never)]
352 public static readonly BindableProperty FlexMarginProperty = BindableProperty.Create("FlexMargin", typeof(Vector4), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
354 var view = (View)bindable;
355 if (newValue != null)
357 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue((Vector4)newValue));
360 defaultValueCreator: (bindable) =>
362 var view = (View)bindable;
363 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
364 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
369 /// CellIndexProperty
371 [EditorBrowsable(EditorBrowsableState.Never)]
372 public static readonly BindableProperty CellIndexProperty = BindableProperty.Create("CellIndex", typeof(Vector2), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
374 var view = (View)bindable;
375 if (newValue != null)
377 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue((Vector2)newValue));
380 defaultValueCreator: (bindable) =>
382 var view = (View)bindable;
383 Vector2 temp = new Vector2(0.0f, 0.0f);
384 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_INDEX).Get(temp);
391 [EditorBrowsable(EditorBrowsableState.Never)]
392 public static readonly BindableProperty RowSpanProperty = BindableProperty.Create("RowSpan", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
394 var view = (View)bindable;
395 if (newValue != null)
397 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue((float)newValue));
400 defaultValueCreator: (bindable) =>
402 var view = (View)bindable;
404 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.ROW_SPAN).Get(out temp);
409 /// ColumnSpanProperty
411 [EditorBrowsable(EditorBrowsableState.Never)]
412 public static readonly BindableProperty ColumnSpanProperty = BindableProperty.Create("ColumnSpan", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
414 var view = (View)bindable;
415 if (newValue != null)
417 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue((float)newValue));
420 defaultValueCreator: (bindable) =>
422 var view = (View)bindable;
424 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
429 /// CellHorizontalAlignmentProperty
431 [EditorBrowsable(EditorBrowsableState.Never)]
432 public static readonly BindableProperty CellHorizontalAlignmentProperty = BindableProperty.Create("CellHorizontalAlignment", typeof(HorizontalAlignmentType), typeof(View), HorizontalAlignmentType.Left, propertyChanged: (bindable, oldValue, newValue) =>
434 var view = (View)bindable;
435 string valueToString = "";
437 if (newValue != null)
439 valueToString = ((HorizontalAlignmentType)newValue).GetDescription<HorizontalAlignmentType>();
440 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
443 defaultValueCreator: (bindable) =>
445 var view = (View)bindable;
447 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
449 NUILog.Error("CellHorizontalAlignment get error!");
452 return temp.GetValueByDescription<HorizontalAlignmentType>();
456 /// CellVerticalAlignmentProperty
458 [EditorBrowsable(EditorBrowsableState.Never)]
459 public static readonly BindableProperty CellVerticalAlignmentProperty = BindableProperty.Create("CellVerticalAlignment", typeof(VerticalAlignmentType), typeof(View), VerticalAlignmentType.Top, propertyChanged: (bindable, oldValue, newValue) =>
461 var view = (View)bindable;
462 string valueToString = "";
464 if (newValue != null)
466 valueToString = ((VerticalAlignmentType)newValue).GetDescription<VerticalAlignmentType>();
467 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
470 defaultValueCreator: (bindable) =>
472 var view = (View)bindable;
474 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
476 NUILog.Error("CellVerticalAlignment get error!");
479 return temp.GetValueByDescription<VerticalAlignmentType>();
483 /// "Please DO NOT use! This will be deprecated! Please use 'View Weight' instead of BindableProperty"
484 /// This needs to be hidden as inhouse API until all applications using it have been updated. Do not make public.
486 [EditorBrowsable(EditorBrowsableState.Never)]
487 public static readonly BindableProperty WeightProperty = BindableProperty.Create("Weight", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
489 var view = (View)bindable;
490 if (newValue != null)
492 view.Weight = (float)newValue;
496 defaultValueCreator: (bindable) =>
498 var view = (View)bindable;
503 /// LeftFocusableViewProperty
505 [EditorBrowsable(EditorBrowsableState.Never)]
506 public static readonly BindableProperty LeftFocusableViewProperty = BindableProperty.Create(nameof(View.LeftFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
508 var view = (View)bindable;
509 if (newValue != null) { view.LeftFocusableViewId = (int)(newValue as View)?.GetId(); }
510 else { view.LeftFocusableViewId = -1; }
512 defaultValueCreator: (bindable) =>
514 var view = (View)bindable;
515 if (view.LeftFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.LeftFocusableViewId); }
520 /// RightFocusableViewProperty
522 [EditorBrowsable(EditorBrowsableState.Never)]
523 public static readonly BindableProperty RightFocusableViewProperty = BindableProperty.Create(nameof(View.RightFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
525 var view = (View)bindable;
526 if (newValue != null) { view.RightFocusableViewId = (int)(newValue as View)?.GetId(); }
527 else { view.RightFocusableViewId = -1; }
529 defaultValueCreator: (bindable) =>
531 var view = (View)bindable;
532 if (view.RightFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.RightFocusableViewId); }
537 /// UpFocusableViewProperty
539 [EditorBrowsable(EditorBrowsableState.Never)]
540 public static readonly BindableProperty UpFocusableViewProperty = BindableProperty.Create(nameof(View.UpFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
542 var view = (View)bindable;
543 if (newValue != null) { view.UpFocusableViewId = (int)(newValue as View)?.GetId(); }
544 else { view.UpFocusableViewId = -1; }
546 defaultValueCreator: (bindable) =>
548 var view = (View)bindable;
549 if (view.UpFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.UpFocusableViewId); }
554 /// DownFocusableViewProperty
556 [EditorBrowsable(EditorBrowsableState.Never)]
557 public static readonly BindableProperty DownFocusableViewProperty = BindableProperty.Create(nameof(View.DownFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
559 var view = (View)bindable;
560 if (newValue != null) { view.DownFocusableViewId = (int)(newValue as View)?.GetId(); }
561 else { view.DownFocusableViewId = -1; }
563 defaultValueCreator: (bindable) =>
565 var view = (View)bindable;
566 if (view.DownFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.DownFocusableViewId); }
571 /// FocusableProperty
573 [EditorBrowsable(EditorBrowsableState.Never)]
574 public static readonly BindableProperty FocusableProperty = BindableProperty.Create("Focusable", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
576 var view = (View)bindable;
577 if (newValue != null) { view.SetKeyboardFocusable((bool)newValue); }
579 defaultValueCreator: (bindable) =>
581 var view = (View)bindable;
582 return view.IsKeyboardFocusable();
588 [EditorBrowsable(EditorBrowsableState.Never)]
589 public static readonly BindableProperty Size2DProperty = BindableProperty.Create("Size2D", typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
591 var view = (View)bindable;
592 if (newValue != null)
594 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size((Size2D)newValue)));
597 defaultValueCreator: (bindable) =>
599 var view = (View)bindable;
600 Size temp = new Size(0.0f, 0.0f, 0.0f);
601 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
602 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
609 [EditorBrowsable(EditorBrowsableState.Never)]
610 public static readonly BindableProperty OpacityProperty = BindableProperty.Create("Opacity", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
612 var view = (View)bindable;
613 if (newValue != null)
615 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.OPACITY, new Tizen.NUI.PropertyValue((float)newValue));
618 defaultValueCreator: (bindable) =>
620 var view = (View)bindable;
622 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.OPACITY).Get(out temp);
627 /// Position2DProperty
629 [EditorBrowsable(EditorBrowsableState.Never)]
630 public static readonly BindableProperty Position2DProperty = BindableProperty.Create("Position2D", typeof(Position2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
632 var view = (View)bindable;
633 if (newValue != null)
635 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position((Position2D)newValue)));
638 defaultValueCreator: (bindable) =>
640 var view = (View)bindable;
641 Position temp = new Position(0.0f, 0.0f, 0.0f);
642 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
643 return new Position2D(temp);
647 /// PositionUsesPivotPointProperty
649 [EditorBrowsable(EditorBrowsableState.Never)]
650 public static readonly BindableProperty PositionUsesPivotPointProperty = BindableProperty.Create("PositionUsesPivotPoint", typeof(bool), typeof(View), true, propertyChanged: (bindable, oldValue, newValue) =>
652 var view = (View)bindable;
653 if (newValue != null)
655 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue((bool)newValue));
658 defaultValueCreator: (bindable) =>
660 var view = (View)bindable;
662 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
667 /// SiblingOrderProperty
669 [EditorBrowsable(EditorBrowsableState.Never)]
670 public static readonly BindableProperty SiblingOrderProperty = BindableProperty.Create("SiblingOrder", typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
672 var view = (View)bindable;
674 if (newValue != null)
676 value = (int)newValue;
679 NUILog.Error("SiblingOrder should be bigger than 0 or equal to 0.");
682 var siblings = view.GetParent()?.Children;
683 if (siblings != null)
685 int currentOrder = siblings.IndexOf(view);
686 if (value != currentOrder)
688 if (value == 0) { view.LowerToBottom(); }
689 else if (value < siblings.Count - 1)
691 if (value > currentOrder) { view.RaiseAbove(siblings[value]); }
692 else { view.LowerBelow(siblings[value]); }
694 else { view.RaiseToTop(); }
699 defaultValueCreator: (bindable) =>
701 var view = (View)bindable;
702 var parentChildren = view.GetParent()?.Children;
703 int currentOrder = 0;
704 if (parentChildren != null)
706 currentOrder = parentChildren.IndexOf(view);
708 if (currentOrder < 0) { return 0; }
709 else if (currentOrder < parentChildren.Count) { return currentOrder; }
716 /// ParentOriginProperty
718 [EditorBrowsable(EditorBrowsableState.Never)]
719 public static readonly BindableProperty ParentOriginProperty = BindableProperty.Create("ParentOrigin", typeof(Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
721 var view = (View)bindable;
722 if (newValue != null)
724 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue((Position)newValue));
727 defaultValueCreator: (bindable) =>
729 var view = (View)bindable;
730 Position temp = new Position(0.0f, 0.0f, 0.0f);
731 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN).Get(temp);
737 /// PivotPointProperty
739 [EditorBrowsable(EditorBrowsableState.Never)]
740 public static readonly BindableProperty PivotPointProperty = BindableProperty.Create("PivotPoint", typeof(Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
742 var view = (View)bindable;
743 if (newValue != null)
745 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue((Position)newValue));
748 defaultValueCreator: (bindable) =>
750 var view = (View)bindable;
751 Position temp = new Position(0.0f, 0.0f, 0.0f);
752 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ANCHOR_POINT).Get(temp);
757 /// SizeWidthProperty
759 [EditorBrowsable(EditorBrowsableState.Never)]
760 public static readonly BindableProperty SizeWidthProperty = BindableProperty.Create("SizeWidth", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
762 var view = (View)bindable;
763 if (newValue != null)
765 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue((float)newValue));
768 defaultValueCreator: (bindable) =>
770 var view = (View)bindable;
772 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_WIDTH).Get(out temp);
777 /// SizeHeightProperty
779 [EditorBrowsable(EditorBrowsableState.Never)]
780 public static readonly BindableProperty SizeHeightProperty = BindableProperty.Create("SizeHeight", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
782 var view = (View)bindable;
783 if (newValue != null)
785 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue((float)newValue));
788 defaultValueCreator: (bindable) =>
790 var view = (View)bindable;
792 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT).Get(out temp);
799 [EditorBrowsable(EditorBrowsableState.Never)]
800 public static readonly BindableProperty PositionProperty = BindableProperty.Create("Position", typeof(Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
802 var view = (View)bindable;
803 if (newValue != null)
805 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue((Position)newValue));
808 defaultValueCreator: (bindable) =>
810 var view = (View)bindable;
811 Position temp = new Position(0.0f, 0.0f, 0.0f);
812 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
817 /// PositionXProperty
819 [EditorBrowsable(EditorBrowsableState.Never)]
820 public static readonly BindableProperty PositionXProperty = BindableProperty.Create("PositionX", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
822 var view = (View)bindable;
823 if (newValue != null)
825 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_X, new Tizen.NUI.PropertyValue((float)newValue));
828 defaultValueCreator: (bindable) =>
830 var view = (View)bindable;
832 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_X).Get(out temp);
837 /// PositionYProperty
839 [EditorBrowsable(EditorBrowsableState.Never)]
840 public static readonly BindableProperty PositionYProperty = BindableProperty.Create("PositionY", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
842 var view = (View)bindable;
843 if (newValue != null)
845 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_Y, new Tizen.NUI.PropertyValue((float)newValue));
848 defaultValueCreator: (bindable) =>
850 var view = (View)bindable;
852 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Y).Get(out temp);
857 /// PositionZProperty
859 [EditorBrowsable(EditorBrowsableState.Never)]
860 public static readonly BindableProperty PositionZProperty = BindableProperty.Create("PositionZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
862 var view = (View)bindable;
863 if (newValue != null)
865 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_Z, new Tizen.NUI.PropertyValue((float)newValue));
868 defaultValueCreator: (bindable) =>
870 var view = (View)bindable;
872 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Z).Get(out temp);
877 /// OrientationProperty
879 [EditorBrowsable(EditorBrowsableState.Never)]
880 public static readonly BindableProperty OrientationProperty = BindableProperty.Create("Orientation", typeof(Rotation), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
882 var view = (View)bindable;
883 if (newValue != null)
885 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ORIENTATION, new Tizen.NUI.PropertyValue((Rotation)newValue));
888 defaultValueCreator: (bindable) =>
890 var view = (View)bindable;
891 Rotation temp = new Rotation();
892 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ORIENTATION).Get(temp);
899 [EditorBrowsable(EditorBrowsableState.Never)]
900 public static readonly BindableProperty ScaleProperty = BindableProperty.Create("Scale", typeof(Vector3), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
902 var view = (View)bindable;
903 if (newValue != null)
905 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE, new Tizen.NUI.PropertyValue((Vector3)newValue));
908 defaultValueCreator: (bindable) =>
910 var view = (View)bindable;
911 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
912 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE).Get(temp);
919 [EditorBrowsable(EditorBrowsableState.Never)]
920 public static readonly BindableProperty ScaleXProperty = BindableProperty.Create("ScaleX", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
922 var view = (View)bindable;
923 if (newValue != null)
925 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_X, new Tizen.NUI.PropertyValue((float)newValue));
928 defaultValueCreator: (bindable) =>
930 var view = (View)bindable;
932 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_X).Get(out temp);
939 [EditorBrowsable(EditorBrowsableState.Never)]
940 public static readonly BindableProperty ScaleYProperty = BindableProperty.Create("ScaleY", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
942 var view = (View)bindable;
943 if (newValue != null)
945 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_Y, new Tizen.NUI.PropertyValue((float)newValue));
948 defaultValueCreator: (bindable) =>
950 var view = (View)bindable;
952 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Y).Get(out temp);
959 [EditorBrowsable(EditorBrowsableState.Never)]
960 public static readonly BindableProperty ScaleZProperty = BindableProperty.Create("ScaleZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
962 var view = (View)bindable;
963 if (newValue != null)
965 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_Z, new Tizen.NUI.PropertyValue((float)newValue));
968 defaultValueCreator: (bindable) =>
970 var view = (View)bindable;
972 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Z).Get(out temp);
979 [EditorBrowsable(EditorBrowsableState.Never)]
980 public static readonly BindableProperty NameProperty = BindableProperty.Create("Name", typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
982 var view = (View)bindable;
983 if (newValue != null)
985 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.NAME, new Tizen.NUI.PropertyValue((string)newValue));
988 defaultValueCreator: (bindable) =>
990 var view = (View)bindable;
992 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.NAME).Get(out temp);
997 /// SensitiveProperty
999 [EditorBrowsable(EditorBrowsableState.Never)]
1000 public static readonly BindableProperty SensitiveProperty = BindableProperty.Create("Sensitive", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1002 var view = (View)bindable;
1003 if (newValue != null)
1005 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SENSITIVE, new Tizen.NUI.PropertyValue((bool)newValue));
1008 defaultValueCreator: (bindable) =>
1010 var view = (View)bindable;
1012 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SENSITIVE).Get(out temp);
1017 /// LeaveRequiredProperty
1019 [EditorBrowsable(EditorBrowsableState.Never)]
1020 public static readonly BindableProperty LeaveRequiredProperty = BindableProperty.Create("LeaveRequired", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1022 var view = (View)bindable;
1023 if (newValue != null)
1025 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue((bool)newValue));
1028 defaultValueCreator: (bindable) =>
1030 var view = (View)bindable;
1032 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LEAVE_REQUIRED).Get(out temp);
1037 /// InheritOrientationProperty
1039 [EditorBrowsable(EditorBrowsableState.Never)]
1040 public static readonly BindableProperty InheritOrientationProperty = BindableProperty.Create("InheritOrientation", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1042 var view = (View)bindable;
1043 if (newValue != null)
1045 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue((bool)newValue));
1048 defaultValueCreator: (bindable) =>
1050 var view = (View)bindable;
1052 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_ORIENTATION).Get(out temp);
1057 /// InheritScaleProperty
1059 [EditorBrowsable(EditorBrowsableState.Never)]
1060 public static readonly BindableProperty InheritScaleProperty = BindableProperty.Create("InheritScale", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1062 var view = (View)bindable;
1063 if (newValue != null)
1065 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue((bool)newValue));
1068 defaultValueCreator: (bindable) =>
1070 var view = (View)bindable;
1072 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_SCALE).Get(out temp);
1077 /// DrawModeProperty
1079 [EditorBrowsable(EditorBrowsableState.Never)]
1080 public static readonly BindableProperty DrawModeProperty = BindableProperty.Create("DrawMode", typeof(DrawModeType), typeof(View), DrawModeType.Normal, propertyChanged: (bindable, oldValue, newValue) =>
1082 var view = (View)bindable;
1083 if (newValue != null)
1085 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)newValue));
1088 defaultValueCreator: (bindable) =>
1090 var view = (View)bindable;
1092 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.DRAW_MODE).Get(out temp) == false)
1094 NUILog.Error("DrawMode get error!");
1096 return temp.GetValueByDescription<DrawModeType>();
1100 /// SizeModeFactorProperty
1102 [EditorBrowsable(EditorBrowsableState.Never)]
1103 public static readonly BindableProperty SizeModeFactorProperty = BindableProperty.Create("SizeModeFactor", typeof(Vector3), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1105 var view = (View)bindable;
1106 if (newValue != null)
1108 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue((Vector3)newValue));
1111 defaultValueCreator: (bindable) =>
1113 var view = (View)bindable;
1114 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
1115 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR).Get(temp);
1120 /// WidthResizePolicyProperty
1122 [EditorBrowsable(EditorBrowsableState.Never)]
1123 public static readonly BindableProperty WidthResizePolicyProperty = BindableProperty.Create("WidthResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
1125 var view = (View)bindable;
1126 if (newValue != null)
1128 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
1131 defaultValueCreator: (bindable) =>
1133 var view = (View)bindable;
1135 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
1137 NUILog.Error("WidthResizePolicy get error!");
1139 return temp.GetValueByDescription<ResizePolicyType>();
1143 /// HeightResizePolicyProperty
1145 [EditorBrowsable(EditorBrowsableState.Never)]
1146 public static readonly BindableProperty HeightResizePolicyProperty = BindableProperty.Create("HeightResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
1148 var view = (View)bindable;
1149 if (newValue != null)
1151 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
1154 defaultValueCreator: (bindable) =>
1156 var view = (View)bindable;
1158 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
1160 NUILog.Error("HeightResizePolicy get error!");
1162 return temp.GetValueByDescription<ResizePolicyType>();
1166 /// SizeScalePolicyProperty
1168 [EditorBrowsable(EditorBrowsableState.Never)]
1169 public static readonly BindableProperty SizeScalePolicyProperty = BindableProperty.Create("SizeScalePolicy", typeof(SizeScalePolicyType), typeof(View), SizeScalePolicyType.UseSizeSet, propertyChanged: (bindable, oldValue, newValue) =>
1171 var view = (View)bindable;
1172 string valueToString = "";
1173 if (newValue != null)
1175 valueToString = ((SizeScalePolicyType)newValue).GetDescription<SizeScalePolicyType>();
1176 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
1179 defaultValueCreator: (bindable) =>
1181 var view = (View)bindable;
1183 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
1185 NUILog.Error("SizeScalePolicy get error!");
1187 return temp.GetValueByDescription<SizeScalePolicyType>();
1191 /// WidthForHeightProperty
1193 [EditorBrowsable(EditorBrowsableState.Never)]
1194 public static readonly BindableProperty WidthForHeightProperty = BindableProperty.Create("WidthForHeight", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1196 var view = (View)bindable;
1197 if (newValue != null)
1199 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue((bool)newValue));
1202 defaultValueCreator: (bindable) =>
1204 var view = (View)bindable;
1206 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
1211 /// HeightForWidthProperty
1213 [EditorBrowsable(EditorBrowsableState.Never)]
1214 public static readonly BindableProperty HeightForWidthProperty = BindableProperty.Create("HeightForWidth", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1216 var view = (View)bindable;
1217 if (newValue != null)
1219 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue((bool)newValue));
1222 defaultValueCreator: (bindable) =>
1224 var view = (View)bindable;
1226 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
1233 [EditorBrowsable(EditorBrowsableState.Never)]
1234 public static readonly BindableProperty PaddingProperty = BindableProperty.Create("Padding", typeof(Extents), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1236 var view = (View)bindable;
1237 if (newValue != null)
1239 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PADDING, new Tizen.NUI.PropertyValue((Extents)newValue));
1242 defaultValueCreator: (bindable) =>
1244 var view = (View)bindable;
1245 Extents temp = new Extents(0, 0, 0, 0);
1246 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PADDING).Get(temp);
1253 [EditorBrowsable(EditorBrowsableState.Never)]
1254 public static readonly BindableProperty SizeProperty = BindableProperty.Create("Size", typeof(Size), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1256 var view = (View)bindable;
1257 if (newValue != null)
1259 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue((Size)newValue));
1262 defaultValueCreator: (bindable) =>
1264 var view = (View)bindable;
1265 Size temp = new Size(0, 0, 0);
1266 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
1271 /// MinimumSizeProperty
1273 [EditorBrowsable(EditorBrowsableState.Never)]
1274 public static readonly BindableProperty MinimumSizeProperty = BindableProperty.Create("MinimumSize", typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1276 var view = (View)bindable;
1277 Size2D temp = newValue as Size2D;
1280 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue(temp));
1284 Tizen.Log.Fatal("NUI", $"[ERROR] can't set MinimumSizeProperty!");
1287 defaultValueCreator: (bindable) =>
1289 var view = (View)bindable;
1290 Size2D temp = new Size2D(0, 0);
1291 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE).Get(temp);
1296 /// MaximumSizeProperty
1298 [EditorBrowsable(EditorBrowsableState.Never)]
1299 public static readonly BindableProperty MaximumSizeProperty = BindableProperty.Create("MaximumSize", typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1301 var view = (View)bindable;
1302 Size2D temp = newValue as Size2D;
1305 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue(temp));
1309 Tizen.Log.Fatal("NUI", $"[ERROR] can't set MaximumSizeProperty!");
1312 defaultValueCreator: (bindable) =>
1314 var view = (View)bindable;
1315 Size2D temp = new Size2D(0, 0);
1316 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE).Get(temp);
1321 /// InheritPositionProperty
1323 [EditorBrowsable(EditorBrowsableState.Never)]
1324 public static readonly BindableProperty InheritPositionProperty = BindableProperty.Create("InheritPosition", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1326 var view = (View)bindable;
1327 if (newValue != null)
1329 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue((bool)newValue));
1332 defaultValueCreator: (bindable) =>
1334 var view = (View)bindable;
1336 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_POSITION).Get(out temp);
1341 /// ClippingModeProperty
1343 [EditorBrowsable(EditorBrowsableState.Never)]
1344 public static readonly BindableProperty ClippingModeProperty = BindableProperty.Create("ClippingMode", typeof(ClippingModeType), typeof(View), ClippingModeType.Disabled, propertyChanged: (bindable, oldValue, newValue) =>
1346 var view = (View)bindable;
1347 if (newValue != null)
1349 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)newValue));
1352 defaultValueCreator: (bindable) =>
1354 var view = (View)bindable;
1356 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.CLIPPING_MODE).Get(out temp) == false)
1358 NUILog.Error("ClippingMode get error!");
1360 return (ClippingModeType)temp;
1364 /// InheritLayoutDirectionProperty
1366 [EditorBrowsable(EditorBrowsableState.Never)]
1367 public static readonly BindableProperty InheritLayoutDirectionProperty = BindableProperty.Create("InheritLayoutDirection", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1369 var view = (View)bindable;
1370 if (newValue != null)
1372 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((bool)newValue));
1375 defaultValueCreator: (bindable) =>
1377 var view = (View)bindable;
1379 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION).Get(out temp);
1384 /// LayoutDirectionProperty
1386 [EditorBrowsable(EditorBrowsableState.Never)]
1387 public static readonly BindableProperty LayoutDirectionProperty = BindableProperty.Create("LayoutDirection", typeof(ViewLayoutDirectionType), typeof(View), ViewLayoutDirectionType.LTR, propertyChanged: (bindable, oldValue, newValue) =>
1389 var view = (View)bindable;
1390 if (newValue != null)
1392 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((int)newValue));
1395 defaultValueCreator: (bindable) =>
1397 var view = (View)bindable;
1399 if (false == Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION).Get(out temp))
1401 NUILog.Error("LAYOUT_DIRECTION get error!");
1403 return (ViewLayoutDirectionType)temp;
1409 [EditorBrowsable(EditorBrowsableState.Never)]
1410 public static readonly BindableProperty MarginProperty = BindableProperty.Create("Margin", typeof(Extents), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1412 var view = (View)bindable;
1413 if (newValue != null)
1415 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MARGIN, new Tizen.NUI.PropertyValue((Extents)newValue));
1418 defaultValueCreator: (bindable) =>
1420 var view = (View)bindable;
1421 Extents temp = new Extents(0, 0, 0, 0);
1422 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MARGIN).Get(temp);
1427 /// UpdateSizeHintProperty
1429 [EditorBrowsable(EditorBrowsableState.Never)]
1430 public static readonly BindableProperty UpdateSizeHintProperty = BindableProperty.Create("UpdateSizeHint", typeof(Vector2), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1432 var view = (View)bindable;
1433 if (newValue != null)
1435 Tizen.NUI.Object.SetProperty(view.swigCPtr, Interop.ViewProperty.View_Property_UPDATE_SIZE_HINT_get(), new Tizen.NUI.PropertyValue((Vector2)newValue));
1438 defaultValueCreator: (bindable) =>
1440 var view = (View)bindable;
1442 Vector2 temp = new Vector2(0.0f, 0.0f);
1443 Tizen.NUI.Object.GetProperty(view.swigCPtr, Interop.ViewProperty.View_Property_UPDATE_SIZE_HINT_get()).Get(temp);
1448 /// ImageShadow Property
1450 [EditorBrowsable(EditorBrowsableState.Never)]
1451 public static readonly BindableProperty ImageShadowProperty = BindableProperty.Create(nameof(ImageShadow), typeof(ImageShadow), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1453 var shadow = (ImageShadow)newValue;
1455 var view = (View)bindable;
1457 view.SetValue(View.ImageShadowSelectorProperty, shadow == null ? null : new Selector<ImageShadow>() { All = shadow, });
1459 defaultValueCreator: (bindable) =>
1461 var view = (View)bindable;
1463 if (view.viewStyle != null)
1465 return view.viewStyle.ImageShadow?.GetValue(view.ControlState);
1468 PropertyMap map = new PropertyMap();
1470 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SHADOW).Get(map);
1472 var shadow = new ImageShadow(map);
1474 return shadow.IsEmpty() ? null : shadow;
1478 /// ImageShadow Selector Property for binding to ViewStyle
1480 [EditorBrowsable(EditorBrowsableState.Never)]
1481 public static readonly BindableProperty ImageShadowSelectorProperty = BindableProperty.Create("ImageShadowSelector", typeof(Selector<ImageShadow>), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1483 var view = (View)bindable;
1485 var shadowSelector = (Selector<ImageShadow>)newValue;
1487 view.UpdateShadow(shadowSelector?.GetValue(view.ControlState), shadowSelector == null ? false : shadowSelector.HasMultiValue());
1489 defaultValueCreator: (bindable) =>
1491 var view = (View)bindable;
1493 return view.viewStyle?.ImageShadow;
1499 [EditorBrowsable(EditorBrowsableState.Never)]
1500 public static readonly BindableProperty BoxShadowProperty = BindableProperty.Create(nameof(BoxShadow), typeof(Shadow), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1502 var shadow = (Shadow)newValue;
1504 var view = (View)bindable;
1506 view.SetValue(View.BoxShadowSelectorProperty, shadow == null ? null : new Selector<Shadow>() { All = shadow, });
1508 defaultValueCreator: (bindable) =>
1510 var view = (View)bindable;
1512 if (view.viewStyle != null)
1514 return view.viewStyle.BoxShadow?.GetValue(view.ControlState);
1517 PropertyMap map = new PropertyMap();
1519 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SHADOW).Get(map);
1521 var shadow = new Shadow(map);
1523 return shadow.IsEmpty() ? null : shadow;
1527 /// BoxShadow Selector Property for binding to ViewStyle
1529 [EditorBrowsable(EditorBrowsableState.Never)]
1530 public static readonly BindableProperty BoxShadowSelectorProperty = BindableProperty.Create("BoxShadowSelector", typeof(Selector<Shadow>), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1532 var view = (View)bindable;
1534 var shadowSelector = (Selector<Shadow>)newValue;
1536 view.UpdateShadow(shadowSelector?.GetValue(view.ControlState), shadowSelector == null ? false : shadowSelector.HasMultiValue());
1538 defaultValueCreator: (bindable) =>
1540 var view = (View)bindable;
1542 return view.viewStyle?.BoxShadow;
1546 /// CornerRadius Property
1548 [EditorBrowsable(EditorBrowsableState.Never)]
1549 public static readonly BindableProperty CornerRadiusProperty = BindableProperty.Create(nameof(CornerRadius), typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
1551 var view = (View)bindable;
1553 view.SetValue(View.CornerRadiusSelectorProperty, new Selector<float?>() { All = (float)newValue, });
1555 defaultValueCreator: (bindable) =>
1557 var view = (View)bindable;
1559 return view.backgroundExtraData == null ? 0 : view.backgroundExtraData.CornerRadius;
1563 /// CornerRadius Selector Property
1565 [EditorBrowsable(EditorBrowsableState.Never)]
1566 public static readonly BindableProperty CornerRadiusSelectorProperty = BindableProperty.Create("CornerRadiusSelector", typeof(Selector<float?>), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1568 var view = (View)bindable;
1570 var cornerRadiusSelector = (Selector<float?>)newValue;
1572 view.UpdateCornerRadius(cornerRadiusSelector?.GetValue(view.ControlState) ?? 0, cornerRadiusSelector == null ? false : cornerRadiusSelector.HasMultiValue());
1574 defaultValueCreator: (bindable) =>
1576 var view = (View)bindable;
1578 return view.viewStyle?.CornerRadius;
1582 /// XamlStyleProperty
1584 [EditorBrowsable(EditorBrowsableState.Never)]
1585 public static readonly BindableProperty XamlStyleProperty = BindableProperty.Create("XamlStyle", typeof(Style), typeof(View), default(Style), propertyChanged: (bindable, oldvalue, newvalue) => ((View)bindable)._mergedStyle.Style = (Style)newvalue);