2 * Copyright(c) 2019-2022 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.
19 using System.ComponentModel;
20 using Tizen.NUI.Binding;
22 namespace Tizen.NUI.BaseComponents
25 /// View is the base class for all views.
27 /// <since_tizen> 3 </since_tizen>
28 public partial class View
30 private float userSizeWidth = 0.0f;
31 private float userSizeHeight = 0.0f;
34 /// StyleNameProperty (DALi json)
36 [EditorBrowsable(EditorBrowsableState.Never)]
37 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
38 public static BindableProperty StyleNameProperty = null;
40 public static readonly BindableProperty StyleNameProperty = null;
42 internal static void SetInternalStyleNameProperty(BindableObject bindable, object oldValue, object newValue)
44 var view = (View)bindable;
47 string styleName = (string)newValue;
49 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.StyleName, styleName);
51 view.styleName = styleName;
53 if (string.IsNullOrEmpty(styleName)) return;
55 var style = ThemeManager.GetUpdateStyleWithoutClone(styleName);
57 if (style == null) return;
59 view.ApplyStyle(style);
60 view.SetThemeApplied();
63 internal static object GetInternalStyleNameProperty(BindableObject bindable)
65 var view = (View)bindable;
67 if (!string.IsNullOrEmpty(view.styleName)) return view.styleName;
69 return Object.InternalGetPropertyString(view.SwigCPtr, View.Property.StyleName);
73 /// KeyInputFocusProperty
75 [EditorBrowsable(EditorBrowsableState.Never)]
76 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
77 public static BindableProperty KeyInputFocusProperty = null;
79 public static readonly BindableProperty KeyInputFocusProperty = null;
81 internal static void SetInternalKeyInputFocusProperty(BindableObject bindable, object oldValue, object newValue)
83 var view = (View)bindable;
86 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.KeyInputFocus, (bool)newValue);
89 internal static object GetInternalKeyInputFocusProperty(BindableObject bindable)
91 var view = (View)bindable;
92 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.KeyInputFocus);
96 /// BackgroundColorProperty
98 [EditorBrowsable(EditorBrowsableState.Never)]
99 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
100 public static BindableProperty BackgroundColorProperty = null;
102 public static readonly BindableProperty BackgroundColorProperty = null;
104 internal static void SetInternalBackgroundColorProperty(BindableObject bindable, object oldValue, object newValue)
106 var view = (View)bindable;
108 if (NUIApplication.IsUsingXaml)
110 view.themeData?.selectorData?.ClearBackground(view);
112 if (newValue is Selector<Color> selector)
114 if (selector.HasAll()) view.SetBackgroundColor(selector.All);
115 else view.EnsureSelectorData().BackgroundColor = new TriggerableSelector<Color>(view, selector, view.SetBackgroundColor, true);
119 view.SetBackgroundColor((Color)newValue);
125 view.SetBackgroundColor((Color)newValue);
128 internal static object GetInternalBackgroundColorProperty(BindableObject bindable)
130 var view = (View)bindable;
132 if (view.internalBackgroundColor == null)
134 view.internalBackgroundColor = new Color(view.OnBackgroundColorChanged, 0, 0, 0, 0);
137 int visualType = (int)Visual.Type.Invalid;
138 Interop.View.InternalRetrievingVisualPropertyInt(view.SwigCPtr, Property.BACKGROUND, Visual.Property.Type, out visualType);
139 if (visualType == (int)Visual.Type.Color)
141 Interop.View.InternalRetrievingVisualPropertyVector4(view.SwigCPtr, Property.BACKGROUND, ColorVisualProperty.MixColor, Color.getCPtr(view.internalBackgroundColor));
143 return view.internalBackgroundColor;
149 [EditorBrowsable(EditorBrowsableState.Never)]
150 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
151 public static BindableProperty ColorProperty = null;
153 public static readonly BindableProperty ColorProperty = null;
155 internal static void SetInternalColorProperty(BindableObject bindable, object oldValue, object newValue)
157 var view = (View)bindable;
159 view.themeData?.selectorData?.Color?.Reset(view);
161 if (newValue is Selector<Color> selector)
163 if (selector.HasAll()) view.SetColor(selector.All);
164 else view.EnsureSelectorData().Color = new TriggerableSelector<Color>(view, selector, view.SetColor, true);
168 view.SetColor((Color)newValue);
171 internal static object GetInternalColorProperty(BindableObject bindable)
173 var view = (View)bindable;
175 if (view.internalColor == null)
177 view.internalColor = new Color(view.OnColorChanged, 0, 0, 0, 0);
179 Object.InternalRetrievingPropertyVector4(view.SwigCPtr, View.Property.COLOR, view.internalColor.SwigCPtr);
180 return view.internalColor;
186 [EditorBrowsable(EditorBrowsableState.Never)]
187 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
188 public static BindableProperty ColorRedProperty = null;
190 public static readonly BindableProperty ColorRedProperty = null;
192 internal static void SetInternalColorRedProperty(BindableObject bindable, object oldValue, object newValue)
194 var view = (View)bindable;
195 view.SetColorRed((float?)newValue);
197 internal static object GetInternalColorRedProperty(BindableObject bindable)
199 var view = (View)bindable;
200 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.ColorRed);
204 /// ColorGreenProperty
206 [EditorBrowsable(EditorBrowsableState.Never)]
207 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
208 public static BindableProperty ColorGreenProperty = null;
210 public static readonly BindableProperty ColorGreenProperty = null;
212 internal static void SetInternalColorGreenProperty(BindableObject bindable, object oldValue, object newValue)
214 var view = (View)bindable;
215 view.SetColorGreen((float?)newValue);
218 internal static object GetInternalColorGreenProperty(BindableObject bindable)
220 var view = (View)bindable;
221 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.ColorGreen);
226 /// ColorBlueProperty
228 [EditorBrowsable(EditorBrowsableState.Never)]
229 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
230 public static BindableProperty ColorBlueProperty = null;
232 public static readonly BindableProperty ColorBlueProperty = null;
234 internal static void SetInternalColorBlueProperty(BindableObject bindable, object oldValue, object newValue)
236 var view = (View)bindable;
237 view.SetColorBlue((float?)newValue);
240 internal static object GetInternalColorBlueProperty(BindableObject bindable)
242 var view = (View)bindable;
243 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.ColorBlue);
248 /// BackgroundImageProperty
250 [EditorBrowsable(EditorBrowsableState.Never)]
251 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
252 public static BindableProperty BackgroundImageProperty = null;
254 public static readonly BindableProperty BackgroundImageProperty = null;
256 internal static void SetInternalBackgroundImageProperty(BindableObject bindable, object oldValue, object newValue)
258 if (String.Equals(oldValue, newValue))
260 NUILog.Debug($"oldValue={oldValue} newValue={newValue} are same. just return here");
264 var view = (View)bindable;
266 if (view.themeData?.selectorData != null)
268 view.themeData.selectorData.BackgroundColor?.Reset(view);
269 view.themeData.selectorData.BackgroundImage?.Reset(view);
272 if (newValue is Selector<string> selector)
274 if (selector.HasAll()) view.SetBackgroundImage(selector.All);
275 else view.EnsureSelectorData().BackgroundImage = new TriggerableSelector<string>(view, selector, view.SetBackgroundImage, true);
279 view.SetBackgroundImage((string)newValue);
282 internal static object GetInternalBackgroundImageProperty(BindableObject bindable)
284 var view = (View)bindable;
285 string backgroundImage = "";
287 Interop.View.InternalRetrievingVisualPropertyString(view.SwigCPtr, Property.BACKGROUND, ImageVisualProperty.URL, out backgroundImage);
289 return backgroundImage;
294 /// BackgroundImageBorderProperty
296 [EditorBrowsable(EditorBrowsableState.Never)]
297 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
298 public static BindableProperty BackgroundImageBorderProperty = null;
300 public static readonly BindableProperty BackgroundImageBorderProperty = null;
302 internal static void SetInternalBackgroundImageBorderProperty(BindableObject bindable, object oldValue, object newValue)
304 var view = (View)bindable;
306 view.themeData?.selectorData?.BackgroundImageBorder?.Reset(view);
308 if (newValue is Selector<Rectangle> selector)
310 if (selector.HasAll()) view.SetBackgroundImageBorder(selector.All);
311 else view.EnsureSelectorData().BackgroundImageBorder = new TriggerableSelector<Rectangle>(view, selector, view.SetBackgroundImageBorder, true);
315 view.SetBackgroundImageBorder((Rectangle)newValue);
318 internal static object GetInternalBackgroundImageBorderProperty(BindableObject bindable)
320 var view = (View)bindable;
322 return view.backgroundExtraData?.BackgroundImageBorder;
326 /// BackgroundProperty
328 [EditorBrowsable(EditorBrowsableState.Never)]
329 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
330 public static BindableProperty BackgroundProperty = null;
332 public static readonly BindableProperty BackgroundProperty = null;
334 internal static void SetInternalBackgroundProperty(BindableObject bindable, object oldValue, object newValue)
336 var view = (View)bindable;
337 if (newValue != null)
339 var propertyValue = new PropertyValue((PropertyMap)newValue);
340 Object.SetProperty(view.SwigCPtr, Property.BACKGROUND, propertyValue);
342 view.backgroundExtraData = null;
344 // Background extra data is not valid anymore. We should ignore lazy UpdateBackgroundExtraData
345 view.backgroundExtraDataUpdatedFlag = BackgroundExtraDataUpdatedFlag.None;
346 if (view.backgroundExtraDataUpdateProcessAttachedFlag)
348 ProcessorController.Instance.ProcessorOnceEvent -= view.UpdateBackgroundExtraData;
349 view.backgroundExtraDataUpdateProcessAttachedFlag = false;
352 propertyValue.Dispose();
353 propertyValue = null;
356 internal static object GetInternalBackgroundProperty(BindableObject bindable)
358 var view = (View)bindable;
360 // Sync as current properties
361 view.UpdateBackgroundExtraData();
363 PropertyMap tmp = new PropertyMap();
364 var propertyValue = Object.GetProperty(view.SwigCPtr, Property.BACKGROUND);
365 propertyValue.Get(tmp);
366 propertyValue.Dispose();
367 propertyValue = null;
374 [EditorBrowsable(EditorBrowsableState.Never)]
375 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
376 public static BindableProperty StateProperty = null;
378 public static readonly BindableProperty StateProperty = null;
380 internal static void SetInternalStateProperty(BindableObject bindable, object oldValue, object newValue)
382 var view = (View)bindable;
383 if (newValue != null)
385 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.STATE, (int)newValue);
388 internal static object GetInternalStateProperty(BindableObject bindable)
390 var view = (View)bindable;
392 temp = Object.InternalGetPropertyInt(view.SwigCPtr, View.Property.STATE);
395 case 0: return States.Normal;
396 case 1: return States.Focused;
397 case 2: return States.Disabled;
398 default: return States.Normal;
405 [EditorBrowsable(EditorBrowsableState.Never)]
406 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
407 public static BindableProperty SubStateProperty = null;
409 public static readonly BindableProperty SubStateProperty = null;
411 internal static void SetInternalSubStateProperty(BindableObject bindable, object oldValue, object newValue)
413 var view = (View)bindable;
414 string valueToString = "";
415 if (newValue != null)
417 valueToString = ((States)newValue).GetDescription();
418 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.SubState, valueToString);
421 internal static object GetInternalSubStateProperty(BindableObject bindable)
423 var view = (View)bindable;
425 temp = Object.InternalGetPropertyString(view.SwigCPtr, View.Property.SubState);
426 return temp.GetValueByDescription<States>();
432 [EditorBrowsable(EditorBrowsableState.Never)]
433 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
434 public static BindableProperty TooltipProperty = null;
436 public static readonly BindableProperty TooltipProperty = null;
438 internal static void SetInternalTooltipProperty(BindableObject bindable, object oldValue, object newValue)
440 var view = (View)bindable;
441 if (newValue != null)
443 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.TOOLTIP, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
446 internal static object GetInternalTooltipProperty(BindableObject bindable)
448 var view = (View)bindable;
449 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
450 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.TOOLTIP).Get(temp);
457 [EditorBrowsable(EditorBrowsableState.Never)]
458 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
459 public static BindableProperty FlexProperty = null;
461 public static readonly BindableProperty FlexProperty = null;
463 internal static void SetInternalFlexProperty(BindableObject bindable, object oldValue, object newValue)
465 var view = (View)bindable;
466 if (newValue != null)
468 Object.InternalSetPropertyFloat(view.SwigCPtr, FlexContainer.ChildProperty.FLEX, (float)newValue);
471 internal static object GetInternalFlexProperty(BindableObject bindable)
473 var view = (View)bindable;
474 return Object.InternalGetPropertyFloat(view.SwigCPtr, FlexContainer.ChildProperty.FLEX);
478 /// AlignSelfProperty
480 [EditorBrowsable(EditorBrowsableState.Never)]
481 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
482 public static BindableProperty AlignSelfProperty = null;
484 public static readonly BindableProperty AlignSelfProperty = null;
486 internal static void SetInternalAlignSelfProperty(BindableObject bindable, object oldValue, object newValue)
488 var view = (View)bindable;
489 if (newValue != null)
491 Object.InternalSetPropertyInt(view.SwigCPtr, FlexContainer.ChildProperty.AlignSelf, (int)newValue);
494 internal static object GetInternalAlignSelfProperty(BindableObject bindable)
496 var view = (View)bindable;
497 return Object.InternalGetPropertyInt(view.SwigCPtr, FlexContainer.ChildProperty.AlignSelf);
501 /// FlexMarginProperty
503 [EditorBrowsable(EditorBrowsableState.Never)]
504 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
505 public static BindableProperty FlexMarginProperty = null;
507 public static readonly BindableProperty FlexMarginProperty = null;
509 internal static void SetInternalFlexMarginProperty(BindableObject bindable, object oldValue, object newValue)
511 var view = (View)bindable;
512 if (newValue != null)
514 Object.InternalSetPropertyVector4(view.SwigCPtr, FlexContainer.ChildProperty.FlexMargin, ((Vector4)newValue).SwigCPtr);
517 internal static object GetInternalFlexMarginProperty(BindableObject bindable)
519 var view = (View)bindable;
520 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
521 Object.InternalRetrievingPropertyVector4(view.SwigCPtr, FlexContainer.ChildProperty.FlexMargin, temp.SwigCPtr);
526 /// CellIndexProperty
528 [EditorBrowsable(EditorBrowsableState.Never)]
529 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
530 public static BindableProperty CellIndexProperty = null;
532 public static readonly BindableProperty CellIndexProperty = null;
534 internal static void SetInternalCellIndexProperty(BindableObject bindable, object oldValue, object newValue)
536 var view = (View)bindable;
537 if (newValue != null)
539 Object.InternalSetPropertyVector2(view.SwigCPtr, TableView.ChildProperty.CellIndex, ((Vector2)newValue).SwigCPtr);
543 internal static object GetInternalCellIndexProperty(BindableObject bindable)
545 var view = (View)bindable;
546 if (view.internalCellIndex == null)
548 view.internalCellIndex = new Vector2(view.OnCellIndexChanged, 0, 0);
550 Object.InternalRetrievingPropertyVector2(view.SwigCPtr, TableView.ChildProperty.CellIndex, view.internalCellIndex.SwigCPtr);
551 return view.internalCellIndex;
558 [EditorBrowsable(EditorBrowsableState.Never)]
559 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
560 public static BindableProperty RowSpanProperty = null;
562 public static readonly BindableProperty RowSpanProperty = null;
564 internal static void SetInternalRowSpanProperty(BindableObject bindable, object oldValue, object newValue)
566 var view = (View)bindable;
567 if (newValue != null)
569 Object.InternalSetPropertyFloat(view.SwigCPtr, TableView.ChildProperty.RowSpan, (float)newValue);
572 internal static object GetInternalRowSpanProperty(BindableObject bindable)
574 var view = (View)bindable;
575 return Object.InternalGetPropertyFloat(view.SwigCPtr, TableView.ChildProperty.RowSpan);
579 /// ColumnSpanProperty
581 [EditorBrowsable(EditorBrowsableState.Never)]
582 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
583 public static BindableProperty ColumnSpanProperty = null;
585 public static readonly BindableProperty ColumnSpanProperty = null;
587 internal static void SetInternalColumnSpanProperty(BindableObject bindable, object oldValue, object newValue)
589 var view = (View)bindable;
590 if (newValue != null)
592 Object.InternalSetPropertyFloat(view.SwigCPtr, TableView.ChildProperty.ColumnSpan, (float)newValue);
595 internal static object GetInternalColumnSpanProperty(BindableObject bindable)
597 var view = (View)bindable;
598 return Object.InternalGetPropertyFloat(view.SwigCPtr, TableView.ChildProperty.ColumnSpan);
602 /// CellHorizontalAlignmentProperty
604 [EditorBrowsable(EditorBrowsableState.Never)]
605 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
606 public static BindableProperty CellHorizontalAlignmentProperty = null;
608 public static readonly BindableProperty CellHorizontalAlignmentProperty = null;
610 internal static void SetInternalCellHorizontalAlignmentProperty(BindableObject bindable, object oldValue, object newValue)
612 var view = (View)bindable;
613 string valueToString = "";
615 if (newValue != null)
617 valueToString = ((HorizontalAlignmentType)newValue).GetDescription();
618 Object.InternalSetPropertyString(view.SwigCPtr, TableView.ChildProperty.CellHorizontalAlignment, valueToString);
621 internal static object GetInternalCellHorizontalAlignmentProperty(BindableObject bindable)
623 var view = (View)bindable;
625 temp = Object.InternalGetPropertyString(view.SwigCPtr, TableView.ChildProperty.CellHorizontalAlignment);
626 return temp.GetValueByDescription<HorizontalAlignmentType>();
630 /// CellVerticalAlignmentProperty
632 [EditorBrowsable(EditorBrowsableState.Never)]
633 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
634 public static BindableProperty CellVerticalAlignmentProperty = null;
636 public static readonly BindableProperty CellVerticalAlignmentProperty = null;
638 internal static void SetInternalCellVerticalAlignmentProperty(BindableObject bindable, object oldValue, object newValue)
640 var view = (View)bindable;
641 string valueToString = "";
643 if (newValue != null)
645 valueToString = ((VerticalAlignmentType)newValue).GetDescription();
646 Object.InternalSetPropertyString(view.SwigCPtr, TableView.ChildProperty.CellVerticalAlignment, valueToString);
649 internal static object GetInternalCellVerticalAlignmentProperty(BindableObject bindable)
651 var view = (View)bindable;
653 temp = Object.InternalGetPropertyString(view.SwigCPtr, TableView.ChildProperty.CellVerticalAlignment);
654 return temp.GetValueByDescription<VerticalAlignmentType>();
658 /// "DO not use this, that will be deprecated. Use 'View Weight' instead of BindableProperty"
659 /// This needs to be hidden as inhouse API until all applications using it have been updated. Do not make public.
661 [EditorBrowsable(EditorBrowsableState.Never)]
662 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
663 public static BindableProperty WeightProperty = null;
665 public static readonly BindableProperty WeightProperty = null;
667 internal static void SetInternalWeightProperty(BindableObject bindable, object oldValue, object newValue)
669 var view = (View)bindable;
670 if (newValue != null)
672 view.Weight = (float)newValue;
675 internal static object GetInternalWeightProperty(BindableObject bindable)
677 var view = (View)bindable;
682 /// LeftFocusableViewProperty
684 [EditorBrowsable(EditorBrowsableState.Never)]
685 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
686 public static BindableProperty LeftFocusableViewProperty = null;
688 public static readonly BindableProperty LeftFocusableViewProperty = null;
690 internal static void SetInternalLeftFocusableViewProperty(BindableObject bindable, object oldValue, object newValue)
692 var view = (View)bindable;
693 if (newValue != null) { view.LeftFocusableViewId = (int)(newValue as View)?.GetId(); }
694 else { view.LeftFocusableViewId = -1; }
696 internal static object GetInternalLeftFocusableViewProperty(BindableObject bindable)
698 var view = (View)bindable;
699 if (view.LeftFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.LeftFocusableViewId); }
704 /// RightFocusableViewProperty
706 [EditorBrowsable(EditorBrowsableState.Never)]
707 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
708 public static BindableProperty RightFocusableViewProperty = null;
710 public static readonly BindableProperty RightFocusableViewProperty = null;
712 internal static void SetInternalRightFocusableViewProperty(BindableObject bindable, object oldValue, object newValue)
714 var view = (View)bindable;
715 if (newValue != null) { view.RightFocusableViewId = (int)(newValue as View)?.GetId(); }
716 else { view.RightFocusableViewId = -1; }
718 internal static object GetInternalRightFocusableViewProperty(BindableObject bindable)
720 var view = (View)bindable;
721 if (view.RightFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.RightFocusableViewId); }
726 /// UpFocusableViewProperty
728 [EditorBrowsable(EditorBrowsableState.Never)]
729 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
730 public static BindableProperty UpFocusableViewProperty = null;
732 public static readonly BindableProperty UpFocusableViewProperty = null;
734 internal static void SetInternalUpFocusableViewProperty(BindableObject bindable, object oldValue, object newValue)
736 var view = (View)bindable;
737 if (newValue != null) { view.UpFocusableViewId = (int)(newValue as View)?.GetId(); }
738 else { view.UpFocusableViewId = -1; }
740 internal static object GetInternalUpFocusableViewProperty(BindableObject bindable)
742 var view = (View)bindable;
743 if (view.UpFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.UpFocusableViewId); }
748 /// DownFocusableViewProperty
750 [EditorBrowsable(EditorBrowsableState.Never)]
751 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
752 public static BindableProperty DownFocusableViewProperty = null;
754 public static readonly BindableProperty DownFocusableViewProperty = null;
756 internal static void SetInternalDownFocusableViewProperty(BindableObject bindable, object oldValue, object newValue)
758 var view = (View)bindable;
759 if (newValue != null) { view.DownFocusableViewId = (int)(newValue as View)?.GetId(); }
760 else { view.DownFocusableViewId = -1; }
762 internal static object GetInternalDownFocusableViewProperty(BindableObject bindable)
764 var view = (View)bindable;
765 if (view.DownFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.DownFocusableViewId); }
770 /// ClockwiseFocusableViewProperty
772 [EditorBrowsable(EditorBrowsableState.Never)]
773 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
774 public static BindableProperty ClockwiseFocusableViewProperty = null;
776 public static readonly BindableProperty ClockwiseFocusableViewProperty = null;
778 internal static void SetInternalClockwiseFocusableViewProperty(BindableObject bindable, object oldValue, object newValue)
780 var view = (View)bindable;
781 if (newValue != null && (newValue is View)) { view.ClockwiseFocusableViewId = (int)(newValue as View)?.GetId(); }
782 else { view.ClockwiseFocusableViewId = -1; }
784 internal static object GetInternalClockwiseFocusableViewProperty(BindableObject bindable)
786 var view = (View)bindable;
787 if (view.ClockwiseFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.ClockwiseFocusableViewId); }
792 /// CounterClockwiseFocusableViewProperty
794 [EditorBrowsable(EditorBrowsableState.Never)]
795 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
796 public static BindableProperty CounterClockwiseFocusableViewProperty = null;
798 public static readonly BindableProperty CounterClockwiseFocusableViewProperty = null;
800 internal static void SetInternalCounterClockwiseFocusableViewProperty(BindableObject bindable, object oldValue, object newValue)
802 var view = (View)bindable;
803 if (newValue != null && (newValue is View)) { view.CounterClockwiseFocusableViewId = (int)(newValue as View)?.GetId(); }
804 else { view.CounterClockwiseFocusableViewId = -1; }
806 internal static object GetInternalCounterClockwiseFocusableViewProperty(BindableObject bindable)
808 var view = (View)bindable;
809 if (view.CounterClockwiseFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.CounterClockwiseFocusableViewId); }
814 /// FocusableProperty
816 [EditorBrowsable(EditorBrowsableState.Never)]
817 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
818 public static BindableProperty FocusableProperty = null;
820 public static readonly BindableProperty FocusableProperty = null;
822 internal static void SetInternalFocusableProperty(BindableObject bindable, object oldValue, object newValue)
824 var view = (View)bindable;
825 if (newValue != null) { view.SetKeyboardFocusable((bool)newValue); }
827 internal static object GetInternalFocusableProperty(BindableObject bindable)
829 var view = (View)bindable;
830 return view.IsKeyboardFocusable();
834 /// FocusableChildrenProperty
836 [EditorBrowsable(EditorBrowsableState.Never)]
837 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
838 public static BindableProperty FocusableChildrenProperty = null;
840 public static readonly BindableProperty FocusableChildrenProperty = null;
842 internal static void SetInternalFocusableChildrenProperty(BindableObject bindable, object oldValue, object newValue)
844 var view = (View)bindable;
845 if (newValue != null) { view.SetKeyboardFocusableChildren((bool)newValue); }
847 internal static object GetInternalFocusableChildrenProperty(BindableObject bindable)
849 var view = (View)bindable;
850 return view.AreChildrenKeyBoardFocusable();
854 /// FocusableInTouchProperty
856 [EditorBrowsable(EditorBrowsableState.Never)]
857 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
858 public static BindableProperty FocusableInTouchProperty = null;
860 public static readonly BindableProperty FocusableInTouchProperty = null;
862 internal static void SetInternalFocusableInTouchProperty(BindableObject bindable, object oldValue, object newValue)
864 var view = (View)bindable;
865 if (newValue != null) { view.SetFocusableInTouch((bool)newValue); }
867 internal static object GetInternalFocusableInTouchProperty(BindableObject bindable)
869 var view = (View)bindable;
870 return view.IsFocusableInTouch();
876 [EditorBrowsable(EditorBrowsableState.Never)]
877 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
878 public static BindableProperty Size2DProperty = null;
880 public static readonly BindableProperty Size2DProperty = null;
882 internal static void SetInternalSize2DProperty(BindableObject bindable, object oldValue, object newValue)
884 var view = (View)bindable;
885 if (newValue != null)
887 // Size property setter is only used by user.
888 // Framework code uses SetSize() instead of Size property setter.
889 // Size set by user is returned by GetUserSize2D() for SuggestedMinimumWidth/Height.
890 // SuggestedMinimumWidth/Height is used by Layout calculation.
891 int width = ((Size2D)newValue).Width;
892 int height = ((Size2D)newValue).Height;
893 view.userSizeWidth = (float)width;
894 view.userSizeHeight = (float)height;
896 bool relayoutRequired = false;
897 // To avoid duplicated size setup, change internal policy directly.
898 if (view.widthPolicy != width)
900 view.widthPolicy = width;
901 relayoutRequired = true;
903 if (view.heightPolicy != height)
905 view.heightPolicy = height;
906 relayoutRequired = true;
908 if (relayoutRequired)
910 view.layout?.RequestLayout();
913 Object.InternalSetPropertyVector2ActualVector3(view.SwigCPtr, View.Property.SIZE, ((Size2D)newValue).SwigCPtr);
916 internal static object GetInternalSize2DProperty(BindableObject bindable)
918 var view = (View)bindable;
919 if (view.internalSize2D == null)
921 view.internalSize2D = new Size2D(view.OnSize2DChanged, 0, 0);
923 Object.InternalRetrievingPropertyVector2ActualVector3(view.SwigCPtr, View.Property.SIZE, view.internalSize2D.SwigCPtr);
925 return view.internalSize2D;
931 [EditorBrowsable(EditorBrowsableState.Never)]
932 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
933 public static BindableProperty OpacityProperty = null;
935 public static readonly BindableProperty OpacityProperty = null;
937 internal static void SetInternalOpacityProperty(BindableObject bindable, object oldValue, object newValue)
939 var view = (View)bindable;
941 view.themeData?.selectorData?.Opacity?.Reset(view);
943 if (newValue is Selector<float?> selector)
945 if (selector.HasAll()) view.SetOpacity(selector.All);
946 else view.EnsureSelectorData().Opacity = new TriggerableSelector<float?>(view, selector, view.SetOpacity, true);
950 view.SetOpacity((float?)newValue);
953 internal static object GetInternalOpacityProperty(BindableObject bindable)
955 var view = (View)bindable;
956 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.OPACITY);
960 /// Position2DProperty
962 [EditorBrowsable(EditorBrowsableState.Never)]
963 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
964 public static BindableProperty Position2DProperty = null;
966 public static readonly BindableProperty Position2DProperty = null;
968 internal static void SetInternalPosition2DProperty(BindableObject bindable, object oldValue, object newValue)
970 var view = (View)bindable;
971 if (newValue != null)
973 Object.InternalSetPropertyVector2ActualVector3(view.SwigCPtr, View.Property.POSITION, ((Position2D)newValue).SwigCPtr);
976 internal static object GetInternalPosition2DProperty(BindableObject bindable)
978 var view = (View)bindable;
979 if (view.internalPosition2D == null)
981 view.internalPosition2D = new Position2D(view.OnPosition2DChanged, 0, 0);
983 Object.InternalRetrievingPropertyVector2ActualVector3(view.SwigCPtr, View.Property.POSITION, view.internalPosition2D.SwigCPtr);
984 return view.internalPosition2D;
988 /// PositionUsesPivotPointProperty
990 [EditorBrowsable(EditorBrowsableState.Never)]
991 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
992 public static BindableProperty PositionUsesPivotPointProperty = null;
994 public static readonly BindableProperty PositionUsesPivotPointProperty = null;
996 internal static void SetInternalPositionUsesPivotPointProperty(BindableObject bindable, object oldValue, object newValue)
998 var view = (View)bindable;
999 if (newValue != null)
1001 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.PositionUsesAnchorPoint, (bool)newValue);
1004 internal static object GetInternalPositionUsesPivotPointProperty(BindableObject bindable)
1006 var view = (View)bindable;
1007 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.PositionUsesAnchorPoint);
1011 /// SiblingOrderProperty
1013 [EditorBrowsable(EditorBrowsableState.Never)]
1014 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1015 public static BindableProperty SiblingOrderProperty = null;
1017 public static readonly BindableProperty SiblingOrderProperty = null;
1019 internal static void SetInternalSiblingOrderProperty(BindableObject bindable, object oldValue, object newValue)
1021 var view = (View)bindable;
1023 if (newValue != null)
1025 value = (int)newValue;
1028 NUILog.Error("SiblingOrder should be bigger than 0 or equal to 0.");
1031 var siblings = view.GetParent()?.Children;
1032 if (siblings != null)
1034 int currentOrder = siblings.IndexOf(view);
1035 if (value != currentOrder)
1037 if (value == 0) { view.LowerToBottom(); }
1038 else if (value < siblings.Count - 1)
1040 if (value > currentOrder) { view.RaiseAbove(siblings[value]); }
1041 else { view.LowerBelow(siblings[value]); }
1043 else { view.RaiseToTop(); }
1048 internal static object GetInternalSiblingOrderProperty(BindableObject bindable)
1050 var view = (View)bindable;
1051 var parentChildren = view.GetParent()?.Children;
1052 int currentOrder = 0;
1053 if (parentChildren != null)
1055 currentOrder = parentChildren.IndexOf(view);
1057 if (currentOrder < 0) { return 0; }
1058 else if (currentOrder < parentChildren.Count) { return currentOrder; }
1065 /// ParentOriginProperty
1067 [EditorBrowsable(EditorBrowsableState.Never)]
1068 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1069 public static BindableProperty ParentOriginProperty = null;
1071 public static readonly BindableProperty ParentOriginProperty = null;
1073 internal static void SetInternalParentOriginProperty(BindableObject bindable, object oldValue, object newValue)
1075 var view = (View)bindable;
1076 if (newValue != null)
1078 Object.InternalSetPropertyVector3(view.SwigCPtr, View.Property.ParentOrigin, ((Position)newValue).SwigCPtr);
1081 internal static object GetInternalParentOriginProperty(BindableObject bindable)
1083 var view = (View)bindable;
1084 Position temp = new Position(0.0f, 0.0f, 0.0f);
1085 Object.InternalRetrievingPropertyVector3(view.SwigCPtr, View.Property.ParentOrigin, temp.SwigCPtr);
1091 /// PivotPointProperty
1093 [EditorBrowsable(EditorBrowsableState.Never)]
1094 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1095 public static BindableProperty PivotPointProperty = null;
1097 public static readonly BindableProperty PivotPointProperty = null;
1099 internal static void SetInternalPivotPointProperty(BindableObject bindable, object oldValue, object newValue)
1101 var view = (View)bindable;
1102 if (newValue != null)
1104 view.SetAnchorPoint((Position)newValue);
1107 internal static object GetInternalPivotPointProperty(BindableObject bindable)
1109 var view = (View)bindable;
1110 if (view.internalPivotPoint == null)
1112 view.internalPivotPoint = new Position(view.OnPivotPointChanged, 0, 0, 0);
1114 Object.InternalRetrievingPropertyVector3(view.SwigCPtr, View.Property.AnchorPoint, view.internalPivotPoint.SwigCPtr);
1115 return view.internalPivotPoint;
1119 /// SizeWidthProperty
1121 [EditorBrowsable(EditorBrowsableState.Never)]
1122 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1123 public static BindableProperty SizeWidthProperty = null;
1125 public static readonly BindableProperty SizeWidthProperty = null;
1127 internal static void SetInternalSizeWidthProperty(BindableObject bindable, object oldValue, object newValue)
1129 var view = (View)bindable;
1130 if (newValue != null)
1132 // Size property setter is only used by user.
1133 // Framework code uses SetSize() instead of Size property setter.
1134 // Size set by user is returned by GetUserSize2D() for SuggestedMinimumWidth/Height.
1135 // SuggestedMinimumWidth/Height is used by Layout calculation.
1136 float width = (float)newValue;
1137 view.userSizeWidth = width;
1139 // To avoid duplicated size setup, change internal policy directly.
1140 int widthPolicy = (int)System.Math.Ceiling(width);
1141 if (view.widthPolicy != widthPolicy)
1143 view.widthPolicy = widthPolicy;
1144 view.layout?.RequestLayout();
1147 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.SizeWidth, width);
1150 internal static object GetInternalSizeWidthProperty(BindableObject bindable)
1152 var view = (View)bindable;
1153 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.SizeWidth);
1157 /// SizeHeightProperty
1159 [EditorBrowsable(EditorBrowsableState.Never)]
1160 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1161 public static BindableProperty SizeHeightProperty = null;
1163 public static readonly BindableProperty SizeHeightProperty = null;
1165 internal static void SetInternalSizeHeightProperty(BindableObject bindable, object oldValue, object newValue)
1167 var view = (View)bindable;
1168 if (newValue != null)
1170 // Size property setter is only used by user.
1171 // Framework code uses SetSize() instead of Size property setter.
1172 // Size set by user is returned by GetUserSize2D() for SuggestedMinimumWidth/Height.
1173 // SuggestedMinimumWidth/Height is used by Layout calculation.
1174 float height = (float)newValue;
1175 view.userSizeHeight = height;
1177 // To avoid duplicated size setup, change internal policy directly.
1178 int heightPolicy = (int)System.Math.Ceiling(height);
1179 if (view.heightPolicy != heightPolicy)
1181 view.heightPolicy = heightPolicy;
1182 view.layout?.RequestLayout();
1185 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.SizeHeight, height);
1188 internal static object GetInternalSizeHeightProperty(BindableObject bindable)
1190 var view = (View)bindable;
1191 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.SizeHeight);
1195 /// PositionProperty
1197 [EditorBrowsable(EditorBrowsableState.Never)]
1198 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1199 public static BindableProperty PositionProperty = null;
1201 public static readonly BindableProperty PositionProperty = null;
1203 internal static void SetInternalPositionProperty(BindableObject bindable, object oldValue, object newValue)
1205 var view = (View)bindable;
1206 if (newValue != null)
1208 Object.InternalSetPropertyVector3(view.SwigCPtr, View.Property.POSITION, ((Position)newValue).SwigCPtr);
1211 internal static object GetInternalPositionProperty(BindableObject bindable)
1213 var view = (View)bindable;
1214 if (view.internalPosition == null)
1216 view.internalPosition = new Position(view.OnPositionChanged, 0, 0, 0);
1218 Object.InternalRetrievingPropertyVector3(view.SwigCPtr, View.Property.POSITION, view.internalPosition.SwigCPtr);
1219 return view.internalPosition;
1223 /// PositionXProperty
1225 [EditorBrowsable(EditorBrowsableState.Never)]
1226 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1227 public static BindableProperty PositionXProperty = null;
1229 public static readonly BindableProperty PositionXProperty = null;
1231 internal static void SetInternalPositionXProperty(BindableObject bindable, object oldValue, object newValue)
1233 var view = (View)bindable;
1234 if (newValue != null)
1236 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.PositionX, (float)newValue);
1239 internal static object GetInternalPositionXProperty(BindableObject bindable)
1241 var view = (View)bindable;
1242 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.PositionX);
1246 /// PositionYProperty
1248 [EditorBrowsable(EditorBrowsableState.Never)]
1249 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1250 public static BindableProperty PositionYProperty = null;
1252 public static readonly BindableProperty PositionYProperty = null;
1254 internal static void SetInternalPositionYProperty(BindableObject bindable, object oldValue, object newValue)
1256 var view = (View)bindable;
1257 if (newValue != null)
1259 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.PositionY, (float)newValue);
1262 internal static object GetInternalPositionYProperty(BindableObject bindable)
1264 var view = (View)bindable;
1265 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.PositionY);
1269 /// PositionZProperty
1271 [EditorBrowsable(EditorBrowsableState.Never)]
1272 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1273 public static BindableProperty PositionZProperty = null;
1275 public static readonly BindableProperty PositionZProperty = null;
1277 internal static void SetInternalPositionZProperty(BindableObject bindable, object oldValue, object newValue)
1279 var view = (View)bindable;
1280 if (newValue != null)
1282 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.PositionZ, (float)newValue);
1286 internal static object GetInternalPositionZProperty(BindableObject bindable)
1288 var view = (View)bindable;
1289 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.PositionZ);
1293 /// OrientationProperty
1295 [EditorBrowsable(EditorBrowsableState.Never)]
1296 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1297 public static BindableProperty OrientationProperty = null;
1299 public static readonly BindableProperty OrientationProperty = null;
1301 internal static void SetInternalOrientationProperty(BindableObject bindable, object oldValue, object newValue)
1303 var view = (View)bindable;
1304 if (newValue != null)
1306 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ORIENTATION, new Tizen.NUI.PropertyValue((Rotation)newValue));
1309 internal static object GetInternalOrientationProperty(BindableObject bindable)
1311 var view = (View)bindable;
1312 Rotation temp = new Rotation();
1313 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ORIENTATION).Get(temp);
1320 [EditorBrowsable(EditorBrowsableState.Never)]
1321 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1322 public static BindableProperty ScaleProperty = null;
1324 public static readonly BindableProperty ScaleProperty = null;
1326 internal static void SetInternalScaleProperty(BindableObject bindable, object oldValue, object newValue)
1328 var view = (View)bindable;
1329 if (newValue != null)
1331 view.SetScale((Vector3)newValue);
1335 internal static object GetInternalScaleProperty(BindableObject bindable)
1337 var view = (View)bindable;
1338 if (view.internalScale == null)
1340 view.internalScale = new Vector3(view.OnScaleChanged, 0, 0, 0);
1342 Object.InternalRetrievingPropertyVector3(view.SwigCPtr, View.Property.SCALE, view.internalScale.SwigCPtr);
1343 return view.internalScale;
1349 [EditorBrowsable(EditorBrowsableState.Never)]
1350 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1351 public static BindableProperty ScaleXProperty = null;
1353 public static readonly BindableProperty ScaleXProperty = null;
1355 internal static void SetInternalScaleXProperty(BindableObject bindable, object oldValue, object newValue)
1357 var view = (View)bindable;
1358 if (newValue != null)
1360 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.ScaleX, (float)newValue);
1363 internal static object GetInternalScaleXProperty(BindableObject bindable)
1365 var view = (View)bindable;
1366 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.ScaleX);
1372 [EditorBrowsable(EditorBrowsableState.Never)]
1373 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1374 public static BindableProperty ScaleYProperty = null;
1376 public static readonly BindableProperty ScaleYProperty = null;
1378 internal static void SetInternalScaleYProperty(BindableObject bindable, object oldValue, object newValue)
1380 var view = (View)bindable;
1381 if (newValue != null)
1383 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.ScaleY, (float)newValue);
1386 internal static object GetInternalScaleYProperty(BindableObject bindable)
1388 var view = (View)bindable;
1389 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.ScaleY);
1395 [EditorBrowsable(EditorBrowsableState.Never)]
1396 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1397 public static BindableProperty ScaleZProperty = null;
1399 public static readonly BindableProperty ScaleZProperty = null;
1401 internal static void SetInternalScaleZProperty(BindableObject bindable, object oldValue, object newValue)
1403 var view = (View)bindable;
1404 if (newValue != null)
1406 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.ScaleZ, (float)newValue);
1409 internal static object GetInternalScaleZProperty(BindableObject bindable)
1411 var view = (View)bindable;
1412 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.ScaleZ);
1418 [EditorBrowsable(EditorBrowsableState.Never)]
1419 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1420 public static BindableProperty NameProperty = null;
1422 public static readonly BindableProperty NameProperty = null;
1424 internal static void SetInternalNameProperty(BindableObject bindable, object oldValue, object newValue)
1426 var view = (View)bindable;
1427 if (newValue != null)
1429 view.internalName = (string)newValue;
1430 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.NAME, (string)newValue);
1433 internal static object GetInternalNameProperty(BindableObject bindable)
1435 var view = (View)bindable;
1436 return view.internalName;
1440 /// SensitiveProperty
1442 [EditorBrowsable(EditorBrowsableState.Never)]
1443 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1444 public static BindableProperty SensitiveProperty = null;
1446 public static readonly BindableProperty SensitiveProperty = null;
1448 internal static void SetInternalSensitiveProperty(BindableObject bindable, object oldValue, object newValue)
1450 var view = (View)bindable;
1451 if (newValue != null)
1453 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.SENSITIVE, (bool)newValue);
1456 internal static object GetInternalSensitiveProperty(BindableObject bindable)
1458 var view = (View)bindable;
1459 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.SENSITIVE);
1463 /// IsEnabledProperty
1465 [EditorBrowsable(EditorBrowsableState.Never)]
1466 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1467 public static BindableProperty IsEnabledProperty = null;
1469 public static readonly BindableProperty IsEnabledProperty = null;
1471 internal static void SetInternalIsEnabledProperty(BindableObject bindable, object oldValue, object newValue)
1473 var view = (View)bindable;
1474 if (newValue != null)
1476 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.UserInteractionEnabled, (bool)newValue);
1477 view.OnEnabled((bool)newValue);
1480 internal static object GetInternalIsEnabledProperty(BindableObject bindable)
1482 var view = (View)bindable;
1483 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.UserInteractionEnabled);
1487 /// DispatchKeyEventsProperty
1489 [EditorBrowsable(EditorBrowsableState.Never)]
1490 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1491 public static BindableProperty DispatchKeyEventsProperty = null;
1493 public static readonly BindableProperty DispatchKeyEventsProperty = null;
1495 internal static void SetInternalDispatchKeyEventsProperty(BindableObject bindable, object oldValue, object newValue)
1497 var view = (View)bindable;
1498 if (newValue != null)
1500 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.DispatchKeyEvents, (bool)newValue);
1503 internal static object GetInternalDispatchKeyEventsProperty(BindableObject bindable)
1505 var view = (View)bindable;
1506 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.DispatchKeyEvents);
1510 /// LeaveRequiredProperty
1512 [EditorBrowsable(EditorBrowsableState.Never)]
1513 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1514 public static BindableProperty LeaveRequiredProperty = null;
1516 public static readonly BindableProperty LeaveRequiredProperty = null;
1518 internal static void SetInternalLeaveRequiredProperty(BindableObject bindable, object oldValue, object newValue)
1520 var view = (View)bindable;
1521 if (newValue != null)
1523 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.LeaveRequired, (bool)newValue);
1526 internal static object GetInternalLeaveRequiredProperty(BindableObject bindable)
1528 var view = (View)bindable;
1529 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.LeaveRequired);
1533 /// InheritOrientationProperty
1535 [EditorBrowsable(EditorBrowsableState.Never)]
1536 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1537 public static BindableProperty InheritOrientationProperty = null;
1539 public static readonly BindableProperty InheritOrientationProperty = null;
1541 internal static void SetInternalInheritOrientationProperty(BindableObject bindable, object oldValue, object newValue)
1543 var view = (View)bindable;
1544 if (newValue != null)
1546 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.InheritOrientation, (bool)newValue);
1549 internal static object GetInternalInheritOrientationProperty(BindableObject bindable)
1551 var view = (View)bindable;
1552 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.InheritOrientation);
1556 /// InheritScaleProperty
1558 [EditorBrowsable(EditorBrowsableState.Never)]
1559 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1560 public static BindableProperty InheritScaleProperty = null;
1562 public static readonly BindableProperty InheritScaleProperty = null;
1564 internal static void SetInternalInheritScaleProperty(BindableObject bindable, object oldValue, object newValue)
1566 var view = (View)bindable;
1567 if (newValue != null)
1569 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.InheritScale, (bool)newValue);
1572 internal static object GetInternalInheritScaleProperty(BindableObject bindable)
1574 var view = (View)bindable;
1575 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.InheritScale);
1579 /// DrawModeProperty
1581 [EditorBrowsable(EditorBrowsableState.Never)]
1582 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1583 public static BindableProperty DrawModeProperty = null;
1585 public static readonly BindableProperty DrawModeProperty = null;
1587 internal static void SetInternalDrawModeProperty(BindableObject bindable, object oldValue, object newValue)
1589 var view = (View)bindable;
1590 if (newValue != null)
1592 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.DrawMode, (int)newValue);
1595 internal static object GetInternalDrawModeProperty(BindableObject bindable)
1597 var view = (View)bindable;
1598 return (DrawModeType)Object.InternalGetPropertyInt(view.SwigCPtr, View.Property.DrawMode);
1602 /// SizeModeFactorProperty
1604 [EditorBrowsable(EditorBrowsableState.Never)]
1605 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1606 public static BindableProperty SizeModeFactorProperty = null;
1608 public static readonly BindableProperty SizeModeFactorProperty = null;
1610 internal static void SetInternalSizeModeFactorProperty(BindableObject bindable, object oldValue, object newValue)
1612 var view = (View)bindable;
1613 if (newValue != null)
1615 Object.InternalSetPropertyVector3(view.SwigCPtr, View.Property.SizeModeFactor, ((Vector3)newValue).SwigCPtr);
1619 internal static object GetInternalSizeModeFactorProperty(BindableObject bindable)
1621 var view = (View)bindable;
1622 if (view.internalSizeModeFactor == null)
1624 view.internalSizeModeFactor = new Vector3(view.OnSizeModeFactorChanged, 0, 0, 0);
1626 Object.InternalRetrievingPropertyVector3(view.SwigCPtr, View.Property.SizeModeFactor, view.internalSizeModeFactor.SwigCPtr);
1627 return view.internalSizeModeFactor;
1631 /// WidthResizePolicyProperty
1633 [EditorBrowsable(EditorBrowsableState.Never)]
1634 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1635 public static BindableProperty WidthResizePolicyProperty = null;
1637 public static readonly BindableProperty WidthResizePolicyProperty = null;
1639 internal static void SetInternalWidthResizePolicyProperty(BindableObject bindable, object oldValue, object newValue)
1641 var view = (View)bindable;
1642 if (newValue != null)
1644 if ((ResizePolicyType)newValue == ResizePolicyType.KeepSizeFollowingParent)
1646 if (view.widthConstraint == null)
1648 view.widthConstraint = new EqualConstraintWithParentFloat((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeWidth, View.Property.SizeWidth);
1649 view.widthConstraint.Apply();
1651 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.WidthResizePolicy, (int)ResizePolicyType.FillToParent);
1655 view.widthConstraint?.Remove();
1656 view.widthConstraint?.Dispose();
1657 view.widthConstraint = null;
1659 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.WidthResizePolicy, (int)newValue);
1661 // Match ResizePolicy to new Layouting.
1662 // Parent relative policies can not be mapped at this point as parent size unknown.
1663 switch ((ResizePolicyType)newValue)
1665 case ResizePolicyType.UseNaturalSize:
1667 view.WidthSpecification = LayoutParamPolicies.WrapContent;
1670 case ResizePolicyType.FillToParent:
1672 view.WidthSpecification = LayoutParamPolicies.MatchParent;
1675 case ResizePolicyType.FitToChildren:
1677 view.WidthSpecification = LayoutParamPolicies.WrapContent;
1685 internal static object GetInternalWidthResizePolicyProperty(BindableObject bindable)
1687 var view = (View)bindable;
1690 temp = Object.InternalGetPropertyString(view.SwigCPtr, View.Property.WidthResizePolicy);
1691 return temp.GetValueByDescription<ResizePolicyType>();
1695 /// HeightResizePolicyProperty
1697 [EditorBrowsable(EditorBrowsableState.Never)]
1698 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1699 public static BindableProperty HeightResizePolicyProperty = null;
1701 public static readonly BindableProperty HeightResizePolicyProperty = null;
1703 internal static void SetInternalHeightResizePolicyProperty(BindableObject bindable, object oldValue, object newValue)
1705 var view = (View)bindable;
1706 if (newValue != null)
1708 if ((ResizePolicyType)newValue == ResizePolicyType.KeepSizeFollowingParent)
1710 if (view.heightConstraint == null)
1712 view.heightConstraint = new EqualConstraintWithParentFloat((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeHeight, View.Property.SizeHeight);
1713 view.heightConstraint.Apply();
1716 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.HeightResizePolicy, (int)ResizePolicyType.FillToParent);
1720 view.heightConstraint?.Remove();
1721 view.heightConstraint?.Dispose();
1722 view.heightConstraint = null;
1724 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.HeightResizePolicy, (int)newValue);
1726 // Match ResizePolicy to new Layouting.
1727 // Parent relative policies can not be mapped at this point as parent size unknown.
1728 switch ((ResizePolicyType)newValue)
1730 case ResizePolicyType.UseNaturalSize:
1732 view.HeightSpecification = LayoutParamPolicies.WrapContent;
1735 case ResizePolicyType.FillToParent:
1737 view.HeightSpecification = LayoutParamPolicies.MatchParent;
1740 case ResizePolicyType.FitToChildren:
1742 view.HeightSpecification = LayoutParamPolicies.WrapContent;
1750 internal static object GetInternalHeightResizePolicyProperty(BindableObject bindable)
1752 var view = (View)bindable;
1755 temp = Object.InternalGetPropertyString(view.SwigCPtr, View.Property.HeightResizePolicy);
1756 return temp.GetValueByDescription<ResizePolicyType>();
1760 /// SizeScalePolicyProperty
1762 [EditorBrowsable(EditorBrowsableState.Never)]
1763 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1764 public static BindableProperty SizeScalePolicyProperty = null;
1766 public static readonly BindableProperty SizeScalePolicyProperty = null;
1768 internal static void SetInternalSizeScalePolicyProperty(BindableObject bindable, object oldValue, object newValue)
1770 var view = (View)bindable;
1771 string valueToString = "";
1772 if (newValue != null)
1774 valueToString = ((SizeScalePolicyType)newValue).GetDescription();
1776 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.SizeScalePolicy, valueToString);
1779 internal static object GetInternalSizeScalePolicyProperty(BindableObject bindable)
1781 var view = (View)bindable;
1783 return (SizeScalePolicyType)Object.InternalGetPropertyInt(view.SwigCPtr, View.Property.SizeScalePolicy);
1787 /// WidthForHeightProperty
1789 [EditorBrowsable(EditorBrowsableState.Never)]
1790 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1791 public static BindableProperty WidthForHeightProperty = null;
1793 public static readonly BindableProperty WidthForHeightProperty = null;
1795 internal static void SetInternalWidthForHeightProperty(BindableObject bindable, object oldValue, object newValue)
1797 var view = (View)bindable;
1798 if (newValue != null)
1800 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.WidthForHeight, (bool)newValue);
1803 internal static object GetInternalWidthForHeightProperty(BindableObject bindable)
1805 var view = (View)bindable;
1807 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.WidthForHeight);
1811 /// HeightForWidthProperty
1813 [EditorBrowsable(EditorBrowsableState.Never)]
1814 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1815 public static BindableProperty HeightForWidthProperty = null;
1817 public static readonly BindableProperty HeightForWidthProperty = null;
1819 internal static void SetInternalHeightForWidthProperty(BindableObject bindable, object oldValue, object newValue)
1821 var view = (View)bindable;
1822 if (newValue != null)
1825 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.HeightForWidth, (bool)newValue);
1828 internal static object GetInternalHeightForWidthProperty(BindableObject bindable)
1830 var view = (View)bindable;
1832 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.HeightForWidth);
1838 [EditorBrowsable(EditorBrowsableState.Never)]
1839 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1840 public static BindableProperty PaddingProperty = null;
1842 public static readonly BindableProperty PaddingProperty = null;
1844 internal static void SetInternalPaddingProperty(BindableObject bindable, object oldValue, object newValue)
1846 var view = (View)bindable;
1847 if (newValue != null)
1849 if (view.Layout != null)
1851 view.Layout.Padding = new Extents((Extents)newValue);
1852 if ((view.Padding.Start != 0) || (view.Padding.End != 0) || (view.Padding.Top != 0) || (view.Padding.Bottom != 0))
1854 var tmp = new PropertyValue(new Extents(0, 0, 0, 0));
1855 Object.SetProperty(view.SwigCPtr, Property.PADDING, tmp);
1858 view.Layout.RequestLayout();
1862 var tmp = new PropertyValue((Extents)newValue);
1863 Object.SetProperty(view.SwigCPtr, Property.PADDING, tmp);
1868 internal static object GetInternalPaddingProperty(BindableObject bindable)
1870 var view = (View)bindable;
1871 if ((view.internalPadding == null) || (view.Layout != null))
1873 ushort start = 0, end = 0, top = 0, bottom = 0;
1874 if (view.Layout != null)
1876 if (view.Layout.Padding != null)
1878 start = view.Layout.Padding.Start;
1879 end = view.Layout.Padding.End;
1880 top = view.Layout.Padding.Top;
1881 bottom = view.Layout.Padding.Bottom;
1884 view.internalPadding = new Extents(view.OnPaddingChanged, start, end, top, bottom);
1887 if (view.Layout == null)
1889 var tmp = Object.GetProperty(view.SwigCPtr, Property.PADDING);
1890 tmp?.Get(view.internalPadding);
1894 return view.internalPadding;
1900 [EditorBrowsable(EditorBrowsableState.Never)]
1901 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1902 public static BindableProperty SizeProperty = null;
1904 public static readonly BindableProperty SizeProperty = null;
1906 internal static void SetInternalSizeProperty(BindableObject bindable, object oldValue, object newValue)
1908 var view = (View)bindable;
1909 if (newValue != null)
1911 // Size property setter is only used by user.
1912 // Framework code uses SetSize() instead of Size property setter.
1913 // Size set by user is returned by GetUserSize2D() for SuggestedMinimumWidth/Height.
1914 // SuggestedMinimumWidth/Height is used by Layout calculation.
1915 float width = ((Size)newValue).Width;
1916 float height = ((Size)newValue).Height;
1917 float depth = ((Size)newValue).Depth;
1919 view.userSizeWidth = width;
1920 view.userSizeHeight = height;
1922 // Set Specification so when layouts measure this View it matches the value set here.
1923 // All Views are currently Layouts.
1924 int widthPolicy = (int)System.Math.Ceiling(width);
1925 int heightPolicy = (int)System.Math.Ceiling(height);
1927 bool relayoutRequired = false;
1928 // To avoid duplicated size setup, change internal policy directly.
1929 if (view.widthPolicy != widthPolicy)
1931 view.widthPolicy = widthPolicy;
1932 relayoutRequired = true;
1934 if (view.heightPolicy != heightPolicy)
1936 view.heightPolicy = heightPolicy;
1937 relayoutRequired = true;
1939 if (relayoutRequired)
1941 view.layout?.RequestLayout();
1944 view.SetSize(width, height, depth);
1947 internal static object GetInternalSizeProperty(BindableObject bindable)
1949 var view = (View)bindable;
1951 if (view.internalSize == null)
1953 view.internalSize = new Size(view.OnSizeChanged, 0, 0, 0);
1955 Object.InternalRetrievingPropertyVector3(view.SwigCPtr, View.Property.SIZE, view.internalSize.SwigCPtr);
1957 return view.internalSize;
1961 /// MinimumSizeProperty
1963 [EditorBrowsable(EditorBrowsableState.Never)]
1964 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1965 public static BindableProperty MinimumSizeProperty = null;
1967 public static readonly BindableProperty MinimumSizeProperty = null;
1969 internal static void SetInternalMinimumSizeProperty(BindableObject bindable, object oldValue, object newValue)
1971 var view = (View)bindable;
1972 if (newValue != null)
1975 Object.InternalSetPropertyVector2(view.SwigCPtr, View.Property.MinimumSize, ((Size2D)newValue).SwigCPtr);
1978 internal static object GetInternalMinimumSizeProperty(BindableObject bindable)
1981 var view = (View)bindable;
1982 if (view.internalMinimumSize == null)
1984 view.internalMinimumSize = new Size2D(view.OnMinimumSizeChanged, 0, 0);
1986 Object.InternalRetrievingPropertyVector2(view.SwigCPtr, View.Property.MinimumSize, view.internalMinimumSize.SwigCPtr);
1987 return view.internalMinimumSize;
1991 /// MaximumSizeProperty
1993 [EditorBrowsable(EditorBrowsableState.Never)]
1994 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1995 public static BindableProperty MaximumSizeProperty = null;
1997 public static readonly BindableProperty MaximumSizeProperty = null;
1999 internal static void SetInternalMaximumSizeProperty(BindableObject bindable, object oldValue, object newValue)
2001 var view = (View)bindable;
2002 if (newValue != null)
2005 Object.InternalSetPropertyVector2(view.SwigCPtr, View.Property.MaximumSize, ((Size2D)newValue).SwigCPtr);
2008 internal static object GetInternalMaximumSizeProperty(BindableObject bindable)
2010 var view = (View)bindable;
2012 if (view.internalMaximumSize == null)
2014 view.internalMaximumSize = new Size2D(view.OnMaximumSizeChanged, 0, 0);
2016 Object.InternalRetrievingPropertyVector2(view.SwigCPtr, View.Property.MaximumSize, view.internalMaximumSize.SwigCPtr);
2017 return view.internalMaximumSize;
2021 /// InheritPositionProperty
2023 [EditorBrowsable(EditorBrowsableState.Never)]
2024 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2025 public static BindableProperty InheritPositionProperty = null;
2027 public static readonly BindableProperty InheritPositionProperty = null;
2029 internal static void SetInternalInheritPositionProperty(BindableObject bindable, object oldValue, object newValue)
2031 var view = (View)bindable;
2032 if (newValue != null)
2034 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.InheritPosition, (bool)newValue);
2037 internal static object GetInternalInheritPositionProperty(BindableObject bindable)
2039 var view = (View)bindable;
2041 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.InheritPosition);
2045 /// ClippingModeProperty
2047 [EditorBrowsable(EditorBrowsableState.Never)]
2048 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2049 public static BindableProperty ClippingModeProperty = null;
2051 public static readonly BindableProperty ClippingModeProperty = null;
2053 internal static void SetInternalClippingModeProperty(BindableObject bindable, object oldValue, object newValue)
2055 var view = (View)bindable;
2056 if (newValue != null)
2059 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.ClippingMode, (int)newValue);
2062 internal static object GetInternalClippingModeProperty(BindableObject bindable)
2064 var view = (View)bindable;
2066 return (ClippingModeType)Object.InternalGetPropertyInt(view.SwigCPtr, View.Property.ClippingMode);
2070 /// InheritLayoutDirectionProperty
2072 [EditorBrowsable(EditorBrowsableState.Never)]
2073 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2074 public static BindableProperty InheritLayoutDirectionProperty = null;
2076 public static readonly BindableProperty InheritLayoutDirectionProperty = null;
2078 internal static void SetInternalInheritLayoutDirectionProperty(BindableObject bindable, object oldValue, object newValue)
2080 var view = (View)bindable;
2081 if (newValue != null)
2084 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.InheritLayoutDirection, (bool)newValue);
2087 internal static object GetInternalInheritLayoutDirectionProperty(BindableObject bindable)
2089 var view = (View)bindable;
2091 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.InheritLayoutDirection);
2095 /// LayoutDirectionProperty
2097 [EditorBrowsable(EditorBrowsableState.Never)]
2098 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2099 public static BindableProperty LayoutDirectionProperty = null;
2101 public static readonly BindableProperty LayoutDirectionProperty = null;
2103 internal static void SetInternalLayoutDirectionProperty(BindableObject bindable, object oldValue, object newValue)
2105 var view = (View)bindable;
2106 if (newValue != null)
2109 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.LayoutDirection, (int)newValue);
2112 internal static object GetInternalLayoutDirectionProperty(BindableObject bindable)
2114 var view = (View)bindable;
2116 return (ViewLayoutDirectionType)Object.InternalGetPropertyInt(view.SwigCPtr, View.Property.LayoutDirection);
2122 [EditorBrowsable(EditorBrowsableState.Never)]
2123 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2124 public static BindableProperty MarginProperty = null;
2126 public static readonly BindableProperty MarginProperty = null;
2128 internal static void SetInternalMarginProperty(BindableObject bindable, object oldValue, object newValue)
2130 var view = (View)bindable;
2131 if (newValue != null)
2133 if (view.Layout != null)
2135 view.Layout.Margin = new Extents((Extents)newValue);
2136 if ((view.Margin.Start != 0) || (view.Margin.End != 0) || (view.Margin.Top != 0) || (view.Margin.Bottom != 0))
2138 var tmp = new PropertyValue(new Extents(0, 0, 0, 0));
2139 Object.SetProperty(view.SwigCPtr, Property.MARGIN, tmp);
2142 view.Layout.RequestLayout();
2146 var tmp = new PropertyValue((Extents)newValue);
2147 Object.SetProperty(view.SwigCPtr, Property.MARGIN, tmp);
2152 internal static object GetInternalMarginProperty(BindableObject bindable)
2154 var view = (View)bindable;
2155 if ((view.internalMargin == null) || (view.Layout != null))
2157 ushort start = 0, end = 0, top = 0, bottom = 0;
2158 if (view.Layout != null)
2160 if (view.Layout.Margin != null)
2162 start = view.Layout.Margin.Start;
2163 end = view.Layout.Margin.End;
2164 top = view.Layout.Margin.Top;
2165 bottom = view.Layout.Margin.Bottom;
2168 view.internalMargin = new Extents(view.OnMarginChanged, start, end, top, bottom);
2171 if (view.Layout == null)
2174 var tmp = Object.GetProperty(view.SwigCPtr, Property.MARGIN);
2175 tmp?.Get(view.internalMargin);
2179 return view.internalMargin;
2183 /// UpdateAreaHintProperty
2185 [EditorBrowsable(EditorBrowsableState.Never)]
2186 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2187 public static BindableProperty UpdateAreaHintProperty = null;
2189 public static readonly BindableProperty UpdateAreaHintProperty = null;
2191 internal static void SetInternalUpdateAreaHintProperty(BindableObject bindable, object oldValue, object newValue)
2193 var view = (View)bindable;
2194 if (newValue != null)
2197 Object.InternalSetPropertyVector4(view.SwigCPtr, Interop.ActorProperty.UpdateAreaHintGet(), ((Vector4)newValue).SwigCPtr);
2200 internal static object GetInternalUpdateAreaHintProperty(BindableObject bindable)
2202 var view = (View)bindable;
2203 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
2205 Object.InternalRetrievingPropertyVector4(view.SwigCPtr, Interop.ActorProperty.UpdateAreaHintGet(), temp.SwigCPtr);
2210 /// ImageShadow Property
2212 [EditorBrowsable(EditorBrowsableState.Never)]
2213 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2214 public static BindableProperty ImageShadowProperty = null;
2216 public static readonly BindableProperty ImageShadowProperty = null;
2218 internal static void SetInternalImageShadowProperty(BindableObject bindable, object oldValue, object newValue)
2220 var view = (View)bindable;
2222 view.themeData?.selectorData?.ClearShadow(view);
2224 if (newValue is Selector<ImageShadow> selector)
2226 if (selector.HasAll()) view.SetShadow(selector.All);
2227 else view.EnsureSelectorData().ImageShadow = new TriggerableSelector<ImageShadow>(view, selector, view.SetShadow, true);
2231 view.SetShadow((ImageShadow)newValue);
2234 internal static object GetInternalImageShadowProperty(BindableObject bindable)
2236 var view = (View)bindable;
2238 // Sync as current properties
2239 view.UpdateBackgroundExtraData();
2241 PropertyMap map = new PropertyMap();
2242 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SHADOW).Get(map);
2244 var shadow = new ImageShadow(map);
2245 return shadow.IsEmpty() ? null : shadow;
2251 [EditorBrowsable(EditorBrowsableState.Never)]
2252 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2253 public static BindableProperty BoxShadowProperty = null;
2255 public static readonly BindableProperty BoxShadowProperty = null;
2257 internal static void SetInternalBoxShadowProperty(BindableObject bindable, object oldValue, object newValue)
2259 var view = (View)bindable;
2261 view.themeData?.selectorData?.ClearShadow(view);
2263 if (newValue is Selector<Shadow> selector)
2265 if (selector.HasAll()) view.SetShadow(selector.All);
2266 else view.EnsureSelectorData().BoxShadow = new TriggerableSelector<Shadow>(view, selector, view.SetShadow, true);
2270 view.SetShadow((Shadow)newValue);
2273 internal static object GetInternalBoxShadowProperty(BindableObject bindable)
2275 var view = (View)bindable;
2277 // Sync as current properties
2278 view.UpdateBackgroundExtraData();
2280 PropertyMap map = new PropertyMap();
2281 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SHADOW).Get(map);
2283 var shadow = new Shadow(map);
2284 return shadow.IsEmpty() ? null : shadow;
2288 /// CornerRadius Property
2290 [EditorBrowsable(EditorBrowsableState.Never)]
2291 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2292 public static BindableProperty CornerRadiusProperty = null;
2294 public static readonly BindableProperty CornerRadiusProperty = null;
2296 internal static void SetInternalCornerRadiusProperty(BindableObject bindable, object oldValue, object newValue)
2298 var view = (View)bindable;
2299 (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).CornerRadius = (Vector4)newValue;
2300 view.UpdateBackgroundExtraData(BackgroundExtraDataUpdatedFlag.CornerRadius);
2302 internal static object GetInternalCornerRadiusProperty(BindableObject bindable)
2304 var view = (View)bindable;
2305 return view.backgroundExtraData == null ? 0.0f : view.backgroundExtraData.CornerRadius;
2309 /// CornerRadiusPolicy Property
2311 [EditorBrowsable(EditorBrowsableState.Never)]
2312 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2313 public static BindableProperty CornerRadiusPolicyProperty = null;
2315 public static readonly BindableProperty CornerRadiusPolicyProperty = null;
2317 internal static void SetInternalCornerRadiusPolicyProperty(BindableObject bindable, object oldValue, object newValue)
2319 var view = (View)bindable;
2320 (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).CornerRadiusPolicy = (VisualTransformPolicyType)newValue;
2322 if (view.backgroundExtraData.CornerRadius != null)
2324 view.UpdateBackgroundExtraData(BackgroundExtraDataUpdatedFlag.CornerRadius);
2327 internal static object GetInternalCornerRadiusPolicyProperty(BindableObject bindable)
2329 var view = (View)bindable;
2330 return view.backgroundExtraData == null ? VisualTransformPolicyType.Absolute : view.backgroundExtraData.CornerRadiusPolicy;
2334 /// BorderlineWidth Property
2336 [EditorBrowsable(EditorBrowsableState.Never)]
2337 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2338 public static BindableProperty BorderlineWidthProperty = null;
2340 public static readonly BindableProperty BorderlineWidthProperty = null;
2342 internal static void SetInternalBorderlineWidthProperty(BindableObject bindable, object oldValue, object newValue)
2344 var view = (View)bindable;
2345 (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).BorderlineWidth = (float)newValue;
2346 view.UpdateBackgroundExtraData(BackgroundExtraDataUpdatedFlag.Borderline);
2348 internal static object GetInternalBorderlineWidthProperty(BindableObject bindable)
2350 var view = (View)bindable;
2351 return view.backgroundExtraData == null ? 0.0f : view.backgroundExtraData.BorderlineWidth;
2355 /// BorderlineColor Property
2357 [EditorBrowsable(EditorBrowsableState.Never)]
2358 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2359 public static BindableProperty BorderlineColorProperty = null;
2361 public static readonly BindableProperty BorderlineColorProperty = null;
2363 internal static void SetInternalBorderlineColorProperty(BindableObject bindable, object oldValue, object newValue)
2365 var view = (View)bindable;
2367 view.themeData?.selectorData?.BorderlineColor?.Reset(view);
2369 if (newValue is Selector<Color> selector)
2371 if (selector.HasAll()) view.SetBorderlineColor(selector.All);
2372 else view.EnsureSelectorData().BorderlineColor = new TriggerableSelector<Color>(view, selector, view.SetBorderlineColor, true);
2376 view.SetBorderlineColor((Color)newValue);
2379 internal static object GetInternalBorderlineColorProperty(BindableObject bindable)
2381 var view = (View)bindable;
2382 return view.backgroundExtraData == null ? Color.Black : view.backgroundExtraData.BorderlineColor;
2386 /// BorderlineColorSelector Property
2387 /// Like BackgroundColor, color selector typed BorderlineColor should be used in ViewStyle only.
2388 /// So this API is internally used only.
2390 [EditorBrowsable(EditorBrowsableState.Never)]
2391 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2392 public static BindableProperty BorderlineColorSelectorProperty = null;
2394 public static readonly BindableProperty BorderlineColorSelectorProperty = null;
2396 internal static void SetInternalBorderlineColorSelectorProperty(BindableObject bindable, object oldValue, object newValue)
2398 var view = (View)bindable;
2400 view.themeData?.selectorData?.BorderlineColor?.Reset(view);
2402 if (newValue is Selector<Color> selector)
2404 if (selector.HasAll()) view.SetBorderlineColor(selector.All);
2405 else view.EnsureSelectorData().BorderlineColor = new TriggerableSelector<Color>(view, selector, view.SetBorderlineColor, true);
2409 view.SetBorderlineColor((Color)newValue);
2412 internal static object GetInternalBorderlineColorSelectorProperty(BindableObject bindable)
2414 var view = (View)bindable;
2415 var selector = view.themeData?.selectorData?.BorderlineColor?.Get();
2416 return (null != selector) ? selector : new Selector<Color>();
2420 /// BorderlineOffset Property
2422 [EditorBrowsable(EditorBrowsableState.Never)]
2423 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2424 public static BindableProperty BorderlineOffsetProperty = null;
2426 public static readonly BindableProperty BorderlineOffsetProperty = null;
2428 internal static void SetInternalBorderlineOffsetProperty(BindableObject bindable, object oldValue, object newValue)
2430 var view = (View)bindable;
2431 (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).BorderlineOffset = (float)newValue;
2432 view.UpdateBackgroundExtraData(BackgroundExtraDataUpdatedFlag.Borderline);
2434 internal static object GetInternalBorderlineOffsetProperty(BindableObject bindable)
2436 var view = (View)bindable;
2437 return view.backgroundExtraData == null ? 0.0f : view.backgroundExtraData.BorderlineOffset;
2441 /// EnableControlState property
2443 [EditorBrowsable(EditorBrowsableState.Never)]
2444 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2445 public static BindableProperty EnableControlStateProperty = null;
2447 public static readonly BindableProperty EnableControlStateProperty = null;
2449 internal static void SetInternalEnableControlStateProperty(BindableObject bindable, object oldValue, object newValue)
2451 var view = (View)bindable;
2452 bool prev = view.enableControlState;
2453 view.enableControlState = (bool)newValue;
2455 if (prev != view.enableControlState)
2459 view.TouchEvent -= view.EmptyOnTouch;
2463 view.TouchEvent += view.EmptyOnTouch;
2467 internal static object GetInternalEnableControlStateProperty(BindableObject bindable)
2469 return ((View)bindable).enableControlState;
2473 /// ThemeChangeSensitive property
2475 [EditorBrowsable(EditorBrowsableState.Never)]
2476 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2477 public static BindableProperty ThemeChangeSensitiveProperty = null;
2479 public static readonly BindableProperty ThemeChangeSensitiveProperty = null;
2481 internal static void SetInternalThemeChangeSensitiveProperty(BindableObject bindable, object oldValue, object newValue)
2483 var view = (View)bindable;
2485 if (view.ThemeChangeSensitive == (bool)newValue) return;
2487 if (view.themeData == null) view.themeData = new ThemeData();
2489 view.themeData.ThemeChangeSensitive = (bool)newValue;
2491 if (view.themeData.ThemeChangeSensitive && !view.themeData.ListeningThemeChangeEvent)
2493 view.themeData.ListeningThemeChangeEvent = true;
2494 ThemeManager.ThemeChangedInternal.Add(view.OnThemeChanged);
2496 else if (!view.themeData.ThemeChangeSensitive && view.themeData.ListeningThemeChangeEvent)
2498 view.themeData.ListeningThemeChangeEvent = false;
2499 ThemeManager.ThemeChangedInternal.Remove(view.OnThemeChanged);
2502 internal static object GetInternalThemeChangeSensitiveProperty(BindableObject bindable)
2504 return ((View)bindable).themeData?.ThemeChangeSensitive ?? ThemeManager.ApplicationThemeChangeSensitive;
2508 /// AccessibilityNameProperty
2510 [EditorBrowsable(EditorBrowsableState.Never)]
2511 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2512 public static BindableProperty AccessibilityNameProperty = null;
2514 public static readonly BindableProperty AccessibilityNameProperty = null;
2516 internal static void SetInternalAccessibilityNameProperty(BindableObject bindable, object oldValue, object newValue)
2518 var view = (View)bindable;
2519 if (newValue != null)
2521 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.AccessibilityName, (string)newValue);
2524 internal static object GetInternalAccessibilityNameProperty(BindableObject bindable)
2526 var view = (View)bindable;
2527 return Object.InternalGetPropertyString(view.SwigCPtr, View.Property.AccessibilityName);
2531 /// AccessibilityDescriptionProperty
2533 [EditorBrowsable(EditorBrowsableState.Never)]
2534 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2535 public static BindableProperty AccessibilityDescriptionProperty = null;
2537 public static readonly BindableProperty AccessibilityDescriptionProperty = null;
2539 internal static void SetInternalAccessibilityDescriptionProperty(BindableObject bindable, object oldValue, object newValue)
2541 var view = (View)bindable;
2542 if (newValue != null)
2545 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.AccessibilityDescription, (string)newValue);
2548 internal static object GetInternalAccessibilityDescriptionProperty(BindableObject bindable)
2550 var view = (View)bindable;
2552 return Object.InternalGetPropertyString(view.SwigCPtr, View.Property.AccessibilityDescription);
2556 /// AccessibilityTranslationDomainProperty
2558 [EditorBrowsable(EditorBrowsableState.Never)]
2559 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2560 public static BindableProperty AccessibilityTranslationDomainProperty = null;
2562 public static readonly BindableProperty AccessibilityTranslationDomainProperty = null;
2564 internal static void SetInternalAccessibilityTranslationDomainProperty(BindableObject bindable, object oldValue, object newValue)
2566 var view = (View)bindable;
2567 if (newValue != null)
2570 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.AccessibilityTranslationDomain, (string)newValue);
2573 internal static object GetInternalAccessibilityTranslationDomainProperty(BindableObject bindable)
2575 var view = (View)bindable;
2577 return Object.InternalGetPropertyString(view.SwigCPtr, View.Property.AccessibilityTranslationDomain);
2581 /// AccessibilityRoleProperty
2583 [EditorBrowsable(EditorBrowsableState.Never)]
2584 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2585 public static BindableProperty AccessibilityRoleProperty = null;
2587 public static readonly BindableProperty AccessibilityRoleProperty = null;
2589 internal static void SetInternalAccessibilityRoleProperty(BindableObject bindable, object oldValue, object newValue)
2591 var view = (View)bindable;
2592 if (newValue != null)
2595 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.AccessibilityRole, (int)newValue);
2598 internal static object GetInternalAccessibilityRoleProperty(BindableObject bindable)
2600 var view = (View)bindable;
2602 return (Role)Object.InternalGetPropertyInt(view.SwigCPtr, View.Property.AccessibilityRole);
2606 /// AccessibilityHighlightableProperty
2608 [EditorBrowsable(EditorBrowsableState.Never)]
2609 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2610 public static BindableProperty AccessibilityHighlightableProperty = null;
2612 public static readonly BindableProperty AccessibilityHighlightableProperty = null;
2614 internal static void SetInternalAccessibilityHighlightableProperty(BindableObject bindable, object oldValue, object newValue)
2616 var view = (View)bindable;
2617 if (newValue != null)
2620 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.AccessibilityHighlightable, (bool)newValue);
2623 internal static object GetInternalAccessibilityHighlightableProperty(BindableObject bindable)
2625 var view = (View)bindable;
2627 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.AccessibilityHighlightable);
2631 /// AccessibilityHiddenProperty
2633 [EditorBrowsable(EditorBrowsableState.Never)]
2634 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2635 public static BindableProperty AccessibilityHiddenProperty = null;
2637 public static readonly BindableProperty AccessibilityHiddenProperty = null;
2639 internal static void SetInternalAccessibilityHiddenProperty(BindableObject bindable, object oldValue, object newValue)
2641 var view = (View)bindable;
2642 if (newValue != null)
2645 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.AccessibilityHidden, (bool)newValue);
2648 internal static object GetInternalAccessibilityHiddenProperty(BindableObject bindable)
2650 var view = (View)bindable;
2652 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.AccessibilityHidden);
2656 /// ExcludeLayoutingProperty
2658 [EditorBrowsable(EditorBrowsableState.Never)]
2659 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2660 public static BindableProperty ExcludeLayoutingProperty = null;
2662 public static readonly BindableProperty ExcludeLayoutingProperty = null;
2664 internal static void SetInternalExcludeLayoutingProperty(BindableObject bindable, object oldValue, object newValue)
2666 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2667 if (newValue != null)
2669 instance.InternalExcludeLayouting = (bool)newValue;
2672 internal static object GetInternalExcludeLayoutingProperty(BindableObject bindable)
2674 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2675 return instance.InternalExcludeLayouting;
2679 /// TooltipTextProperty
2681 [EditorBrowsable(EditorBrowsableState.Never)]
2682 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2683 public static BindableProperty TooltipTextProperty = null;
2685 public static readonly BindableProperty TooltipTextProperty = null;
2687 internal static void SetInternalTooltipTextProperty(BindableObject bindable, object oldValue, object newValue)
2689 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2690 if (newValue != null)
2692 instance.InternalTooltipText = (string)newValue;
2695 internal static object GetInternalTooltipTextProperty(BindableObject bindable)
2697 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2698 return instance.InternalTooltipText;
2702 /// PositionUsesAnchorPointProperty
2704 [EditorBrowsable(EditorBrowsableState.Never)]
2705 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2706 public static BindableProperty PositionUsesAnchorPointProperty = null;
2708 public static readonly BindableProperty PositionUsesAnchorPointProperty = null;
2710 internal static void SetInternalPositionUsesAnchorPointProperty(BindableObject bindable, object oldValue, object newValue)
2712 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2713 if (newValue != null)
2715 instance.InternalPositionUsesAnchorPoint = (bool)newValue;
2718 internal static object GetInternalPositionUsesAnchorPointProperty(BindableObject bindable)
2720 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2721 return instance.InternalPositionUsesAnchorPoint;
2725 /// AnchorPointProperty
2727 [EditorBrowsable(EditorBrowsableState.Never)]
2728 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2729 public static BindableProperty AnchorPointProperty = null;
2731 public static readonly BindableProperty AnchorPointProperty = null;
2733 internal static void SetInternalAnchorPointProperty(BindableObject bindable, object oldValue, object newValue)
2735 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2736 if (newValue != null)
2738 instance.InternalAnchorPoint = (Tizen.NUI.Position)newValue;
2741 internal static object GetInternalAnchorPointProperty(BindableObject bindable)
2743 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2744 return instance.InternalAnchorPoint;
2748 /// WidthSpecificationProperty
2750 [EditorBrowsable(EditorBrowsableState.Never)]
2751 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2752 public static BindableProperty WidthSpecificationProperty = null;
2754 public static readonly BindableProperty WidthSpecificationProperty = null;
2756 internal static void SetInternalWidthSpecificationProperty(BindableObject bindable, object oldValue, object newValue)
2758 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2759 if (newValue != null)
2761 instance.InternalWidthSpecification = (int)newValue;
2764 internal static object GetInternalWidthSpecificationProperty(BindableObject bindable)
2766 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2767 return instance.InternalWidthSpecification;
2771 /// HeightSpecificationProperty
2773 [EditorBrowsable(EditorBrowsableState.Never)]
2774 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2775 public static BindableProperty HeightSpecificationProperty = null;
2777 public static readonly BindableProperty HeightSpecificationProperty = null;
2779 internal static void SetInternalHeightSpecificationProperty(BindableObject bindable, object oldValue, object newValue)
2781 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2782 if (newValue != null)
2784 instance.InternalHeightSpecification = (int)newValue;
2787 internal static object GetInternalHeightSpecificationProperty(BindableObject bindable)
2789 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2790 return instance.InternalHeightSpecification;
2794 /// LayoutTransitionProperty
2796 [EditorBrowsable(EditorBrowsableState.Never)]
2797 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2798 public static BindableProperty LayoutTransitionProperty = null;
2800 public static readonly BindableProperty LayoutTransitionProperty = null;
2802 internal static void SetInternalLayoutTransitionProperty(BindableObject bindable, object oldValue, object newValue)
2804 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2805 if (newValue != null)
2807 instance.InternalLayoutTransition = (Tizen.NUI.LayoutTransition)newValue;
2810 internal static object GetInternalLayoutTransitionProperty(BindableObject bindable)
2812 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2813 return instance.InternalLayoutTransition;
2817 /// PaddingEXProperty
2819 [EditorBrowsable(EditorBrowsableState.Never)]
2820 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2821 public static BindableProperty PaddingEXProperty = null;
2823 public static readonly BindableProperty PaddingEXProperty = null;
2825 internal static void SetInternalPaddingEXProperty(BindableObject bindable, object oldValue, object newValue)
2827 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2828 if (newValue != null)
2830 instance.InternalPaddingEX = (Tizen.NUI.Extents)newValue;
2833 internal static object GetInternalPaddingEXProperty(BindableObject bindable)
2835 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2836 return instance.InternalPaddingEX;
2842 [EditorBrowsable(EditorBrowsableState.Never)]
2843 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2844 public static BindableProperty LayoutProperty = null;
2846 public static readonly BindableProperty LayoutProperty = null;
2848 internal static void SetInternalLayoutProperty(BindableObject bindable, object oldValue, object newValue)
2850 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2851 if (newValue != null)
2853 instance.InternalLayout = (Tizen.NUI.LayoutItem)newValue;
2856 internal static object GetInternalLayoutProperty(BindableObject bindable)
2858 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2859 return instance.InternalLayout;
2863 /// BackgroundImageSynchronosLoadingProperty
2865 [EditorBrowsable(EditorBrowsableState.Never)]
2866 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2867 public static BindableProperty BackgroundImageSynchronosLoadingProperty = null;
2869 public static readonly BindableProperty BackgroundImageSynchronosLoadingProperty = null;
2871 internal static void SetInternalBackgroundImageSynchronosLoadingProperty(BindableObject bindable, object oldValue, object newValue)
2873 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2874 if (newValue != null)
2876 instance.InternalBackgroundImageSynchronosLoading = (bool)newValue;
2879 internal static object GetInternalBackgroundImageSynchronosLoadingProperty(BindableObject bindable)
2881 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2882 return instance.InternalBackgroundImageSynchronosLoading;
2886 /// BackgroundImageSynchronousLoadingProperty
2888 [EditorBrowsable(EditorBrowsableState.Never)]
2889 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2890 public static BindableProperty BackgroundImageSynchronousLoadingProperty = null;
2892 public static readonly BindableProperty BackgroundImageSynchronousLoadingProperty = null;
2894 internal static void SetInternalBackgroundImageSynchronousLoadingProperty(BindableObject bindable, object oldValue, object newValue)
2896 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2897 if (newValue != null)
2899 instance.InternalBackgroundImageSynchronousLoading = (bool)newValue;
2902 internal static object GetInternalBackgroundImageSynchronousLoadingProperty(BindableObject bindable)
2904 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2905 return instance.InternalBackgroundImageSynchronousLoading;
2909 /// EnableControlStatePropagationProperty
2911 [EditorBrowsable(EditorBrowsableState.Never)]
2912 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2913 public static BindableProperty EnableControlStatePropagationProperty = null;
2915 public static readonly BindableProperty EnableControlStatePropagationProperty = null;
2917 internal static void SetInternalEnableControlStatePropagationProperty(BindableObject bindable, object oldValue, object newValue)
2919 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2920 if (newValue != null)
2922 instance.InternalEnableControlStatePropagation = (bool)newValue;
2925 internal static object GetInternalEnableControlStatePropagationProperty(BindableObject bindable)
2927 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2928 return instance.InternalEnableControlStatePropagation;
2932 /// PropagatableControlStatesProperty
2934 [EditorBrowsable(EditorBrowsableState.Never)]
2935 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2936 public static BindableProperty PropagatableControlStatesProperty = null;
2938 public static readonly BindableProperty PropagatableControlStatesProperty = null;
2940 internal static void SetInternalPropagatableControlStatesProperty(BindableObject bindable, object oldValue, object newValue)
2942 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2943 if (newValue != null)
2945 instance.InternalPropagatableControlStates = (ControlState)newValue;
2948 internal static object GetInternalPropagatableControlStatesProperty(BindableObject bindable)
2950 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2951 return instance.InternalPropagatableControlStates;
2955 /// GrabTouchAfterLeaveProperty
2957 [EditorBrowsable(EditorBrowsableState.Never)]
2958 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2959 public static BindableProperty GrabTouchAfterLeaveProperty = null;
2961 public static readonly BindableProperty GrabTouchAfterLeaveProperty = null;
2963 internal static void SetInternalGrabTouchAfterLeaveProperty(BindableObject bindable, object oldValue, object newValue)
2965 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2966 if (newValue != null)
2968 instance.InternalGrabTouchAfterLeave = (bool)newValue;
2971 internal static object GetInternalGrabTouchAfterLeaveProperty(BindableObject bindable)
2973 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2974 return instance.InternalGrabTouchAfterLeave;
2978 /// AllowOnlyOwnTouchProperty
2980 [EditorBrowsable(EditorBrowsableState.Never)]
2981 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2982 public static BindableProperty AllowOnlyOwnTouchProperty = null;
2984 public static readonly BindableProperty AllowOnlyOwnTouchProperty = null;
2986 internal static void SetInternalAllowOnlyOwnTouchProperty(BindableObject bindable, object oldValue, object newValue)
2988 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2989 if (newValue != null)
2991 instance.InternalAllowOnlyOwnTouch = (bool)newValue;
2994 internal static object GetInternalAllowOnlyOwnTouchProperty(BindableObject bindable)
2996 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2997 return instance.InternalAllowOnlyOwnTouch;
3001 /// BlendEquationProperty
3003 [EditorBrowsable(EditorBrowsableState.Never)]
3004 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
3005 public static BindableProperty BlendEquationProperty = null;
3007 public static readonly BindableProperty BlendEquationProperty = null;
3009 internal static void SetInternalBlendEquationProperty(BindableObject bindable, object oldValue, object newValue)
3011 var instance = (Tizen.NUI.BaseComponents.View)bindable;
3012 if (newValue != null)
3014 instance.InternalBlendEquation = (Tizen.NUI.BlendEquationType)newValue;
3017 internal static object GetInternalBlendEquationProperty(BindableObject bindable)
3019 var instance = (Tizen.NUI.BaseComponents.View)bindable;
3020 return instance.InternalBlendEquation;
3024 /// TransitionOptionsProperty
3026 [EditorBrowsable(EditorBrowsableState.Never)]
3027 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
3028 public static BindableProperty TransitionOptionsProperty = null;
3030 public static readonly BindableProperty TransitionOptionsProperty = null;
3032 internal static void SetInternalTransitionOptionsProperty(BindableObject bindable, object oldValue, object newValue)
3034 var instance = (Tizen.NUI.BaseComponents.View)bindable;
3035 if (newValue != null)
3037 instance.InternalTransitionOptions = (Tizen.NUI.TransitionOptions)newValue;
3040 internal static object GetInternalTransitionOptionsProperty(BindableObject bindable)
3042 var instance = (Tizen.NUI.BaseComponents.View)bindable;
3043 return instance.InternalTransitionOptions;
3047 /// AutomationIdProperty
3049 [EditorBrowsable(EditorBrowsableState.Never)]
3050 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
3051 public static BindableProperty AutomationIdProperty = null;
3053 public static readonly BindableProperty AutomationIdProperty = null;
3055 internal static void SetInternalAutomationIdProperty(BindableObject bindable, object oldValue, object newValue)
3057 var instance = (Tizen.NUI.BaseComponents.View)bindable;
3058 if (newValue != null)
3061 Object.InternalSetPropertyString(instance.SwigCPtr, View.Property.AutomationId, (string)newValue);
3064 internal static object GetInternalAutomationIdProperty(BindableObject bindable)
3066 var instance = (Tizen.NUI.BaseComponents.View)bindable;
3068 return Object.InternalGetPropertyString(instance.SwigCPtr, View.Property.AutomationId);
3072 /// TouchAreaOffsetProperty
3074 [EditorBrowsable(EditorBrowsableState.Never)]
3075 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
3076 public static BindableProperty TouchAreaOffsetProperty = null;
3078 public static readonly BindableProperty TouchAreaOffsetProperty = null;
3080 internal static void SetInternalTouchAreaOffsetProperty(BindableObject bindable, object oldValue, object newValue)
3082 var instance = (Tizen.NUI.BaseComponents.View)bindable;
3083 if (newValue != null)
3085 instance.InternalTouchAreaOffset = (Tizen.NUI.Offset)newValue;
3088 internal static object GetInternalTouchAreaOffsetProperty(BindableObject bindable)
3090 var instance = (Tizen.NUI.BaseComponents.View)bindable;
3091 return instance.InternalTouchAreaOffset;
3095 /// DispatchTouchMotionProperty
3097 [EditorBrowsable(EditorBrowsableState.Never)]
3098 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
3099 public static BindableProperty DispatchTouchMotionProperty = null;
3101 public static readonly BindableProperty DispatchTouchMotionProperty = null;
3103 internal static void SetInternalDispatchTouchMotionProperty(BindableObject bindable, object oldValue, object newValue)
3105 var instance = (Tizen.NUI.BaseComponents.View)bindable;
3106 if (newValue != null)
3108 instance.InternalDispatchTouchMotion = (bool)newValue;
3111 internal static object GetInternalDispatchTouchMotionProperty(BindableObject bindable)
3113 var instance = (Tizen.NUI.BaseComponents.View)bindable;
3114 return instance.InternalDispatchTouchMotion;
3118 /// DispatchHoverMotionProperty
3120 [EditorBrowsable(EditorBrowsableState.Never)]
3121 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
3122 public static BindableProperty DispatchHoverMotionProperty = null;
3124 public static readonly BindableProperty DispatchHoverMotionProperty = null;
3126 internal static void SetInternalDispatchHoverMotionProperty(BindableObject bindable, object oldValue, object newValue)
3128 var instance = (Tizen.NUI.BaseComponents.View)bindable;
3129 if (newValue != null)
3131 instance.InternalDispatchHoverMotion = (bool)newValue;
3135 internal static object GetInternalDispatchHoverMotionProperty(BindableObject bindable)
3137 var instance = (Tizen.NUI.BaseComponents.View)bindable;
3138 return instance.InternalDispatchHoverMotion;
3141 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
3142 internal static void CreateBindableProperties()
3144 StyleNameProperty = BindableProperty.Create(nameof(StyleName), typeof(string), typeof(View), string.Empty,
3145 propertyChanged: SetInternalStyleNameProperty, defaultValueCreator: GetInternalStyleNameProperty);
3147 KeyInputFocusProperty = BindableProperty.Create(nameof(KeyInputFocus), typeof(bool), typeof(View), false,
3148 propertyChanged: SetInternalKeyInputFocusProperty, defaultValueCreator: GetInternalKeyInputFocusProperty);
3150 BackgroundColorProperty = BindableProperty.Create(nameof(BackgroundColor), typeof(Color), typeof(View), null,
3151 propertyChanged: SetInternalBackgroundColorProperty, defaultValueCreator: GetInternalBackgroundColorProperty);
3153 ColorProperty = BindableProperty.Create(nameof(Color), typeof(Color), typeof(View), null,
3154 propertyChanged: SetInternalColorProperty, defaultValueCreator: GetInternalColorProperty);
3156 ColorRedProperty = BindableProperty.Create(nameof(ColorRed), typeof(float), typeof(View), default(float),
3157 propertyChanged: SetInternalColorRedProperty, defaultValueCreator: GetInternalColorRedProperty);
3159 ColorGreenProperty = BindableProperty.Create(nameof(ColorGreen), typeof(float), typeof(View), default(float),
3160 propertyChanged: SetInternalColorGreenProperty, defaultValueCreator: GetInternalColorGreenProperty);
3162 ColorBlueProperty = BindableProperty.Create(nameof(ColorBlue), typeof(float), typeof(View), default(float),
3163 propertyChanged: SetInternalColorBlueProperty, defaultValueCreator: GetInternalColorBlueProperty);
3165 BackgroundImageProperty = BindableProperty.Create(nameof(BackgroundImage), typeof(string), typeof(View), default(string),
3166 propertyChanged: SetInternalBackgroundImageProperty, defaultValueCreator: GetInternalBackgroundImageProperty);
3168 BackgroundImageBorderProperty = BindableProperty.Create(nameof(BackgroundImageBorder), typeof(Rectangle), typeof(View), default(Rectangle),
3169 propertyChanged: SetInternalBackgroundImageBorderProperty, defaultValueCreator: GetInternalBackgroundImageBorderProperty);
3171 BackgroundProperty = BindableProperty.Create(nameof(Background), typeof(PropertyMap), typeof(View), null,
3172 propertyChanged: SetInternalBackgroundProperty, defaultValueCreator: GetInternalBackgroundProperty);
3174 StateProperty = BindableProperty.Create(nameof(State), typeof(States), typeof(View), States.Normal,
3175 propertyChanged: SetInternalStateProperty, defaultValueCreator: GetInternalStateProperty);
3177 SubStateProperty = BindableProperty.Create(nameof(SubState), typeof(States), typeof(View), States.Normal,
3178 propertyChanged: SetInternalSubStateProperty, defaultValueCreator: GetInternalSubStateProperty);
3180 TooltipProperty = BindableProperty.Create(nameof(Tooltip), typeof(PropertyMap), typeof(View), null,
3181 propertyChanged: SetInternalTooltipProperty, defaultValueCreator: GetInternalTooltipProperty);
3183 FlexProperty = BindableProperty.Create(nameof(Flex), typeof(float), typeof(View), default(float),
3184 propertyChanged: SetInternalFlexProperty, defaultValueCreator: GetInternalFlexProperty);
3186 AlignSelfProperty = BindableProperty.Create(nameof(AlignSelf), typeof(int), typeof(View), default(int),
3187 propertyChanged: SetInternalAlignSelfProperty, defaultValueCreator: GetInternalAlignSelfProperty);
3189 FlexMarginProperty = BindableProperty.Create(nameof(FlexMargin), typeof(Vector4), typeof(View), null,
3190 propertyChanged: SetInternalFlexMarginProperty, defaultValueCreator: GetInternalFlexMarginProperty);
3192 CellIndexProperty = BindableProperty.Create(nameof(CellIndex), typeof(Vector2), typeof(View), null,
3193 propertyChanged: SetInternalCellIndexProperty, defaultValueCreator: GetInternalCellIndexProperty);
3195 RowSpanProperty = BindableProperty.Create(nameof(RowSpan), typeof(float), typeof(View), default(float),
3196 propertyChanged: SetInternalRowSpanProperty, defaultValueCreator: GetInternalRowSpanProperty);
3198 ColumnSpanProperty = BindableProperty.Create(nameof(ColumnSpan), typeof(float), typeof(View), default(float),
3199 propertyChanged: SetInternalColumnSpanProperty, defaultValueCreator: GetInternalColumnSpanProperty);
3201 CellHorizontalAlignmentProperty = BindableProperty.Create(nameof(CellHorizontalAlignment), typeof(HorizontalAlignmentType), typeof(View), HorizontalAlignmentType.Left,
3202 propertyChanged: SetInternalCellHorizontalAlignmentProperty, defaultValueCreator: GetInternalCellHorizontalAlignmentProperty);
3204 CellVerticalAlignmentProperty = BindableProperty.Create(nameof(CellVerticalAlignment), typeof(VerticalAlignmentType), typeof(View), VerticalAlignmentType.Top,
3205 propertyChanged: SetInternalCellVerticalAlignmentProperty, defaultValueCreator: GetInternalCellVerticalAlignmentProperty);
3207 WeightProperty = BindableProperty.Create(nameof(Weight), typeof(float), typeof(View), default(float),
3208 propertyChanged: SetInternalWeightProperty, defaultValueCreator: GetInternalWeightProperty);
3210 LeftFocusableViewProperty = BindableProperty.Create(nameof(View.LeftFocusableView), typeof(View), typeof(View), null,
3211 propertyChanged: SetInternalLeftFocusableViewProperty, defaultValueCreator: GetInternalLeftFocusableViewProperty);
3213 RightFocusableViewProperty = BindableProperty.Create(nameof(View.RightFocusableView), typeof(View), typeof(View), null,
3214 propertyChanged: SetInternalRightFocusableViewProperty, defaultValueCreator: GetInternalRightFocusableViewProperty);
3216 UpFocusableViewProperty = BindableProperty.Create(nameof(View.UpFocusableView), typeof(View), typeof(View), null,
3217 propertyChanged: SetInternalUpFocusableViewProperty, defaultValueCreator: GetInternalUpFocusableViewProperty);
3219 DownFocusableViewProperty = BindableProperty.Create(nameof(View.DownFocusableView), typeof(View), typeof(View), null,
3220 propertyChanged: SetInternalDownFocusableViewProperty, defaultValueCreator: GetInternalDownFocusableViewProperty);
3222 ClockwiseFocusableViewProperty = BindableProperty.Create(nameof(View.ClockwiseFocusableView), typeof(View), typeof(View), null,
3223 propertyChanged: SetInternalClockwiseFocusableViewProperty, defaultValueCreator: GetInternalClockwiseFocusableViewProperty);
3225 CounterClockwiseFocusableViewProperty = BindableProperty.Create(nameof(View.CounterClockwiseFocusableView), typeof(View), typeof(View), null,
3226 propertyChanged: SetInternalCounterClockwiseFocusableViewProperty, defaultValueCreator: GetInternalCounterClockwiseFocusableViewProperty);
3228 FocusableProperty = BindableProperty.Create(nameof(Focusable), typeof(bool), typeof(View), false,
3229 propertyChanged: SetInternalFocusableProperty, defaultValueCreator: GetInternalFocusableProperty);
3231 FocusableChildrenProperty = BindableProperty.Create(nameof(FocusableChildren), typeof(bool), typeof(View), true,
3232 propertyChanged: SetInternalFocusableChildrenProperty, defaultValueCreator: GetInternalFocusableChildrenProperty);
3234 FocusableInTouchProperty = BindableProperty.Create(nameof(FocusableInTouch), typeof(bool), typeof(View), false,
3235 propertyChanged: SetInternalFocusableInTouchProperty, defaultValueCreator: GetInternalFocusableInTouchProperty);
3237 Size2DProperty = BindableProperty.Create(nameof(Size2D), typeof(Size2D), typeof(View), null,
3238 propertyChanged: SetInternalSize2DProperty, defaultValueCreator: GetInternalSize2DProperty);
3240 OpacityProperty = BindableProperty.Create(nameof(Opacity), typeof(float), typeof(View), default(float),
3241 propertyChanged: SetInternalOpacityProperty, defaultValueCreator: GetInternalOpacityProperty);
3243 Position2DProperty = BindableProperty.Create(nameof(Position2D), typeof(Position2D), typeof(View), null,
3244 propertyChanged: SetInternalPosition2DProperty, defaultValueCreator: GetInternalPosition2DProperty);
3246 PositionUsesPivotPointProperty = BindableProperty.Create(nameof(PositionUsesPivotPoint), typeof(bool), typeof(View), true,
3247 propertyChanged: SetInternalPositionUsesPivotPointProperty, defaultValueCreator: GetInternalPositionUsesPivotPointProperty);
3249 SiblingOrderProperty = BindableProperty.Create(nameof(SiblingOrder), typeof(int), typeof(View), default(int),
3250 propertyChanged: SetInternalSiblingOrderProperty, defaultValueCreator: GetInternalSiblingOrderProperty);
3252 ParentOriginProperty = BindableProperty.Create(nameof(ParentOrigin), typeof(Position), typeof(View), null,
3253 propertyChanged: SetInternalParentOriginProperty, defaultValueCreator: GetInternalParentOriginProperty);
3255 PivotPointProperty = BindableProperty.Create(nameof(PivotPoint), typeof(Position), typeof(View), null,
3256 propertyChanged: SetInternalPivotPointProperty, defaultValueCreator: GetInternalPivotPointProperty);
3258 SizeWidthProperty = BindableProperty.Create(nameof(SizeWidth), typeof(float), typeof(View), default(float),
3259 propertyChanged: SetInternalSizeWidthProperty, defaultValueCreator: GetInternalSizeWidthProperty);
3261 SizeHeightProperty = BindableProperty.Create(nameof(SizeHeight), typeof(float), typeof(View), default(float),
3262 propertyChanged: SetInternalSizeHeightProperty, defaultValueCreator: GetInternalSizeHeightProperty);
3264 PositionProperty = BindableProperty.Create(nameof(Position), typeof(Position), typeof(View), null,
3265 propertyChanged: SetInternalPositionProperty, defaultValueCreator: GetInternalPositionProperty);
3267 PositionXProperty = BindableProperty.Create(nameof(PositionX), typeof(float), typeof(View), default(float),
3268 propertyChanged: SetInternalPositionXProperty, defaultValueCreator: GetInternalPositionXProperty);
3270 PositionYProperty = BindableProperty.Create(nameof(PositionY), typeof(float), typeof(View), default(float),
3271 propertyChanged: SetInternalPositionYProperty, defaultValueCreator: GetInternalPositionYProperty);
3273 PositionZProperty = BindableProperty.Create(nameof(PositionZ), typeof(float), typeof(View), default(float),
3274 propertyChanged: SetInternalPositionZProperty, defaultValueCreator: GetInternalPositionZProperty);
3276 OrientationProperty = BindableProperty.Create(nameof(Orientation), typeof(Rotation), typeof(View), null,
3277 propertyChanged: SetInternalOrientationProperty, defaultValueCreator: GetInternalOrientationProperty);
3279 ScaleProperty = BindableProperty.Create(nameof(Scale), typeof(Vector3), typeof(View), null,
3280 propertyChanged: SetInternalScaleProperty, defaultValueCreator: GetInternalScaleProperty);
3282 ScaleXProperty = BindableProperty.Create(nameof(ScaleX), typeof(float), typeof(View), default(float),
3283 propertyChanged: SetInternalScaleXProperty, defaultValueCreator: GetInternalScaleXProperty);
3285 ScaleYProperty = BindableProperty.Create(nameof(ScaleY), typeof(float), typeof(View), default(float),
3286 propertyChanged: SetInternalScaleYProperty, defaultValueCreator: GetInternalScaleYProperty);
3288 ScaleZProperty = BindableProperty.Create(nameof(ScaleZ), typeof(float), typeof(View), default(float),
3289 propertyChanged: SetInternalScaleZProperty, defaultValueCreator: GetInternalScaleZProperty);
3291 NameProperty = BindableProperty.Create(nameof(Name), typeof(string), typeof(View), string.Empty,
3292 propertyChanged: SetInternalNameProperty, defaultValueCreator: GetInternalNameProperty);
3294 SensitiveProperty = BindableProperty.Create(nameof(Sensitive), typeof(bool), typeof(View), false,
3295 propertyChanged: SetInternalSensitiveProperty, defaultValueCreator: GetInternalSensitiveProperty);
3297 IsEnabledProperty = BindableProperty.Create(nameof(IsEnabled), typeof(bool), typeof(View), false,
3298 propertyChanged: SetInternalIsEnabledProperty, defaultValueCreator: GetInternalIsEnabledProperty);
3300 DispatchKeyEventsProperty = BindableProperty.Create(nameof(DispatchKeyEvents), typeof(bool), typeof(View), false,
3301 propertyChanged: SetInternalDispatchKeyEventsProperty, defaultValueCreator: GetInternalDispatchKeyEventsProperty);
3303 LeaveRequiredProperty = BindableProperty.Create(nameof(LeaveRequired), typeof(bool), typeof(View), false,
3304 propertyChanged: SetInternalLeaveRequiredProperty, defaultValueCreator: GetInternalLeaveRequiredProperty);
3306 InheritOrientationProperty = BindableProperty.Create(nameof(InheritOrientation), typeof(bool), typeof(View), false,
3307 propertyChanged: SetInternalInheritOrientationProperty, defaultValueCreator: GetInternalInheritOrientationProperty);
3309 InheritScaleProperty = BindableProperty.Create(nameof(InheritScale), typeof(bool), typeof(View), false,
3310 propertyChanged: SetInternalInheritScaleProperty, defaultValueCreator: GetInternalInheritScaleProperty);
3312 DrawModeProperty = BindableProperty.Create(nameof(DrawMode), typeof(DrawModeType), typeof(View), DrawModeType.Normal,
3313 propertyChanged: SetInternalDrawModeProperty, defaultValueCreator: GetInternalDrawModeProperty);
3315 SizeModeFactorProperty = BindableProperty.Create(nameof(SizeModeFactor), typeof(Vector3), typeof(View), null,
3316 propertyChanged: SetInternalSizeModeFactorProperty, defaultValueCreator: GetInternalSizeModeFactorProperty);
3318 WidthResizePolicyProperty = BindableProperty.Create(nameof(WidthResizePolicy), typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed,
3319 propertyChanged: SetInternalWidthResizePolicyProperty, defaultValueCreator: GetInternalWidthResizePolicyProperty);
3321 HeightResizePolicyProperty = BindableProperty.Create(nameof(HeightResizePolicy), typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed,
3322 propertyChanged: SetInternalHeightResizePolicyProperty, defaultValueCreator: GetInternalHeightResizePolicyProperty);
3324 SizeScalePolicyProperty = BindableProperty.Create(nameof(SizeScalePolicy), typeof(SizeScalePolicyType), typeof(View), SizeScalePolicyType.UseSizeSet,
3325 propertyChanged: SetInternalSizeScalePolicyProperty, defaultValueCreator: GetInternalSizeScalePolicyProperty);
3327 WidthForHeightProperty = BindableProperty.Create(nameof(WidthForHeight), typeof(bool), typeof(View), false,
3328 propertyChanged: SetInternalWidthForHeightProperty, defaultValueCreator: GetInternalWidthForHeightProperty);
3330 HeightForWidthProperty = BindableProperty.Create(nameof(HeightForWidth), typeof(bool), typeof(View), false,
3331 propertyChanged: SetInternalHeightForWidthProperty, defaultValueCreator: GetInternalHeightForWidthProperty);
3333 PaddingProperty = BindableProperty.Create(nameof(Padding), typeof(Extents), typeof(View), null,
3334 propertyChanged: SetInternalPaddingProperty, defaultValueCreator: GetInternalPaddingProperty);
3336 SizeProperty = BindableProperty.Create(nameof(Size), typeof(Size), typeof(View), null,
3337 propertyChanged: SetInternalSizeProperty, defaultValueCreator: GetInternalSizeProperty);
3339 MinimumSizeProperty = BindableProperty.Create(nameof(MinimumSize), typeof(Size2D), typeof(View), null,
3340 propertyChanged: SetInternalMinimumSizeProperty, defaultValueCreator: GetInternalMinimumSizeProperty);
3342 MaximumSizeProperty = BindableProperty.Create(nameof(MaximumSize), typeof(Size2D), typeof(View), null,
3343 propertyChanged: SetInternalMaximumSizeProperty, defaultValueCreator: GetInternalMaximumSizeProperty);
3345 InheritPositionProperty = BindableProperty.Create(nameof(InheritPosition), typeof(bool), typeof(View), false,
3346 propertyChanged: SetInternalInheritPositionProperty, defaultValueCreator: GetInternalInheritPositionProperty);
3348 ClippingModeProperty = BindableProperty.Create(nameof(ClippingMode), typeof(ClippingModeType), typeof(View), ClippingModeType.Disabled,
3349 propertyChanged: SetInternalClippingModeProperty, defaultValueCreator: GetInternalClippingModeProperty);
3351 InheritLayoutDirectionProperty = BindableProperty.Create(nameof(InheritLayoutDirection), typeof(bool), typeof(View), false,
3352 propertyChanged: SetInternalInheritLayoutDirectionProperty, defaultValueCreator: GetInternalInheritLayoutDirectionProperty);
3354 LayoutDirectionProperty = BindableProperty.Create(nameof(LayoutDirection), typeof(ViewLayoutDirectionType), typeof(View), ViewLayoutDirectionType.LTR,
3355 propertyChanged: SetInternalLayoutDirectionProperty, defaultValueCreator: GetInternalLayoutDirectionProperty);
3357 MarginProperty = BindableProperty.Create(nameof(Margin), typeof(Extents), typeof(View), null,
3358 propertyChanged: SetInternalMarginProperty, defaultValueCreator: GetInternalMarginProperty);
3360 UpdateAreaHintProperty = BindableProperty.Create(nameof(UpdateAreaHint), typeof(Vector4), typeof(View), null,
3361 propertyChanged: SetInternalUpdateAreaHintProperty, defaultValueCreator: GetInternalUpdateAreaHintProperty);
3363 ImageShadowProperty = BindableProperty.Create(nameof(ImageShadow), typeof(ImageShadow), typeof(View), null,
3364 propertyChanged: SetInternalImageShadowProperty, defaultValueCreator: GetInternalImageShadowProperty);
3366 BoxShadowProperty = BindableProperty.Create(nameof(BoxShadow), typeof(Shadow), typeof(View), null,
3367 propertyChanged: SetInternalBoxShadowProperty, defaultValueCreator: GetInternalBoxShadowProperty);
3369 CornerRadiusProperty = BindableProperty.Create(nameof(CornerRadius), typeof(Vector4), typeof(View), null,
3370 propertyChanged: SetInternalCornerRadiusProperty, defaultValueCreator: GetInternalCornerRadiusProperty);
3372 CornerRadiusPolicyProperty = BindableProperty.Create(nameof(CornerRadiusPolicy), typeof(VisualTransformPolicyType), typeof(View), VisualTransformPolicyType.Absolute,
3373 propertyChanged: SetInternalCornerRadiusPolicyProperty, defaultValueCreator: GetInternalCornerRadiusPolicyProperty);
3375 BorderlineWidthProperty = BindableProperty.Create(nameof(BorderlineWidth), typeof(float), typeof(View), default(float),
3376 propertyChanged: SetInternalBorderlineWidthProperty, defaultValueCreator: GetInternalBorderlineWidthProperty);
3378 BorderlineColorProperty = BindableProperty.Create(nameof(BorderlineColor), typeof(Color), typeof(View), null,
3379 propertyChanged: SetInternalBorderlineColorProperty, defaultValueCreator: GetInternalBorderlineColorProperty);
3381 BorderlineColorSelectorProperty = BindableProperty.Create(nameof(BorderlineColorSelector), typeof(Selector<Color>), typeof(View), null,
3382 propertyChanged: SetInternalBorderlineColorSelectorProperty, defaultValueCreator: GetInternalBorderlineColorSelectorProperty);
3384 BorderlineOffsetProperty = BindableProperty.Create(nameof(BorderlineOffset), typeof(float), typeof(View), default(float),
3385 propertyChanged: SetInternalBorderlineOffsetProperty, defaultValueCreator: GetInternalBorderlineOffsetProperty);
3387 EnableControlStateProperty = BindableProperty.Create(nameof(EnableControlState), typeof(bool), typeof(View), false,
3388 propertyChanged: SetInternalEnableControlStateProperty, defaultValueCreator: GetInternalEnableControlStateProperty);
3390 ThemeChangeSensitiveProperty = BindableProperty.Create(nameof(ThemeChangeSensitive), typeof(bool), typeof(View), false,
3391 propertyChanged: SetInternalThemeChangeSensitiveProperty, defaultValueCreator: GetInternalThemeChangeSensitiveProperty);
3393 AccessibilityNameProperty = BindableProperty.Create(nameof(AccessibilityName), typeof(string), typeof(View), string.Empty,
3394 propertyChanged: SetInternalAccessibilityNameProperty, defaultValueCreator: GetInternalAccessibilityNameProperty);
3396 AccessibilityDescriptionProperty = BindableProperty.Create(nameof(AccessibilityDescription), typeof(string), typeof(View), string.Empty,
3397 propertyChanged: SetInternalAccessibilityDescriptionProperty, defaultValueCreator: GetInternalAccessibilityDescriptionProperty);
3399 AccessibilityTranslationDomainProperty = BindableProperty.Create(nameof(AccessibilityTranslationDomain), typeof(string), typeof(View), string.Empty,
3400 propertyChanged: SetInternalAccessibilityTranslationDomainProperty, defaultValueCreator: GetInternalAccessibilityTranslationDomainProperty);
3402 AccessibilityRoleProperty = BindableProperty.Create(nameof(AccessibilityRole), typeof(Role), typeof(View), default(Role),
3403 propertyChanged: SetInternalAccessibilityRoleProperty, defaultValueCreator: GetInternalAccessibilityRoleProperty);
3405 AccessibilityHighlightableProperty = BindableProperty.Create(nameof(AccessibilityHighlightable), typeof(bool), typeof(View), false,
3406 propertyChanged: SetInternalAccessibilityHighlightableProperty, defaultValueCreator: GetInternalAccessibilityHighlightableProperty);
3408 AccessibilityHiddenProperty = BindableProperty.Create(nameof(AccessibilityHidden), typeof(bool), typeof(View), false,
3409 propertyChanged: SetInternalAccessibilityHiddenProperty, defaultValueCreator: GetInternalAccessibilityHiddenProperty);
3411 ExcludeLayoutingProperty = BindableProperty.Create(nameof(ExcludeLayouting), typeof(bool), typeof(View), false,
3412 propertyChanged: SetInternalExcludeLayoutingProperty, defaultValueCreator: GetInternalExcludeLayoutingProperty);
3414 TooltipTextProperty = BindableProperty.Create(nameof(TooltipText), typeof(string), typeof(View), string.Empty,
3415 propertyChanged: SetInternalTooltipTextProperty, defaultValueCreator: GetInternalTooltipTextProperty);
3417 PositionUsesAnchorPointProperty = BindableProperty.Create(nameof(PositionUsesAnchorPoint), typeof(bool), typeof(View), false,
3418 propertyChanged: SetInternalPositionUsesAnchorPointProperty, defaultValueCreator: GetInternalPositionUsesAnchorPointProperty);
3420 AnchorPointProperty = BindableProperty.Create(nameof(AnchorPoint), typeof(Tizen.NUI.Position), typeof(View), null,
3421 propertyChanged: SetInternalAnchorPointProperty, defaultValueCreator: GetInternalAnchorPointProperty);
3423 WidthSpecificationProperty = BindableProperty.Create(nameof(WidthSpecification), typeof(int), typeof(View), 0,
3424 propertyChanged: SetInternalWidthSpecificationProperty, defaultValueCreator: GetInternalWidthSpecificationProperty);
3426 HeightSpecificationProperty = BindableProperty.Create(nameof(HeightSpecification), typeof(int), typeof(View), 0,
3427 propertyChanged: SetInternalHeightSpecificationProperty, defaultValueCreator: GetInternalHeightSpecificationProperty);
3429 LayoutTransitionProperty = BindableProperty.Create(nameof(LayoutTransition), typeof(Tizen.NUI.LayoutTransition), typeof(View), null,
3430 propertyChanged: SetInternalLayoutTransitionProperty, defaultValueCreator: GetInternalLayoutTransitionProperty);
3432 PaddingEXProperty = BindableProperty.Create(nameof(PaddingEX), typeof(Tizen.NUI.Extents), typeof(View), null,
3433 propertyChanged: SetInternalPaddingEXProperty, defaultValueCreator: GetInternalPaddingEXProperty);
3435 LayoutProperty = BindableProperty.Create(nameof(Layout), typeof(Tizen.NUI.LayoutItem), typeof(View), null,
3436 propertyChanged: SetInternalLayoutProperty, defaultValueCreator: GetInternalLayoutProperty);
3438 BackgroundImageSynchronosLoadingProperty = BindableProperty.Create(nameof(BackgroundImageSynchronosLoading), typeof(bool), typeof(View), false,
3439 propertyChanged: SetInternalBackgroundImageSynchronosLoadingProperty, defaultValueCreator: GetInternalBackgroundImageSynchronosLoadingProperty);
3441 BackgroundImageSynchronousLoadingProperty = BindableProperty.Create(nameof(BackgroundImageSynchronousLoading), typeof(bool), typeof(View), false,
3442 propertyChanged: SetInternalBackgroundImageSynchronousLoadingProperty, defaultValueCreator: GetInternalBackgroundImageSynchronousLoadingProperty);
3444 EnableControlStatePropagationProperty = BindableProperty.Create(nameof(EnableControlStatePropagation), typeof(bool), typeof(View), false,
3445 propertyChanged: SetInternalEnableControlStatePropagationProperty, defaultValueCreator: GetInternalEnableControlStatePropagationProperty);
3447 PropagatableControlStatesProperty = BindableProperty.Create(nameof(PropagatableControlStates), typeof(ControlState), typeof(View), ControlState.All,
3448 propertyChanged: SetInternalPropagatableControlStatesProperty, defaultValueCreator: GetInternalPropagatableControlStatesProperty);
3450 GrabTouchAfterLeaveProperty = BindableProperty.Create(nameof(GrabTouchAfterLeave), typeof(bool), typeof(View), false,
3451 propertyChanged: SetInternalGrabTouchAfterLeaveProperty, defaultValueCreator: GetInternalGrabTouchAfterLeaveProperty);
3453 AllowOnlyOwnTouchProperty = BindableProperty.Create(nameof(AllowOnlyOwnTouch), typeof(bool), typeof(View), false,
3454 propertyChanged: SetInternalAllowOnlyOwnTouchProperty, defaultValueCreator: GetInternalAllowOnlyOwnTouchProperty);
3456 BlendEquationProperty = BindableProperty.Create(nameof(BlendEquation), typeof(BlendEquationType), typeof(View), default(BlendEquationType),
3457 propertyChanged: SetInternalBlendEquationProperty, defaultValueCreator: GetInternalBlendEquationProperty);
3459 TransitionOptionsProperty = BindableProperty.Create(nameof(TransitionOptions), typeof(TransitionOptions), typeof(View), default(TransitionOptions),
3460 propertyChanged: SetInternalTransitionOptionsProperty, defaultValueCreator: GetInternalTransitionOptionsProperty);
3462 AutomationIdProperty = BindableProperty.Create(nameof(AutomationId), typeof(string), typeof(View), string.Empty,
3463 propertyChanged: SetInternalAutomationIdProperty, defaultValueCreator: GetInternalAutomationIdProperty);
3465 TouchAreaOffsetProperty = BindableProperty.Create(nameof(TouchAreaOffset), typeof(Offset), typeof(View), default(Offset),
3466 propertyChanged: SetInternalTouchAreaOffsetProperty, defaultValueCreator: GetInternalTouchAreaOffsetProperty);
3468 DispatchTouchMotionProperty = BindableProperty.Create(nameof(DispatchTouchMotion), typeof(bool), typeof(View), false,
3469 propertyChanged: SetInternalDispatchTouchMotionProperty, defaultValueCreator: GetInternalDispatchTouchMotionProperty);
3471 DispatchHoverMotionProperty = BindableProperty.Create(nameof(DispatchHoverMotion), typeof(bool), typeof(View), false,
3472 propertyChanged: SetInternalDispatchHoverMotionProperty, defaultValueCreator: GetInternalDispatchHoverMotionProperty);
3474 RegisterPropertyGroup(PositionProperty, positionPropertyGroup);
3475 RegisterPropertyGroup(Position2DProperty, positionPropertyGroup);
3476 RegisterPropertyGroup(PositionXProperty, positionPropertyGroup);
3477 RegisterPropertyGroup(PositionYProperty, positionPropertyGroup);
3479 RegisterPropertyGroup(SizeProperty, sizePropertyGroup);
3480 RegisterPropertyGroup(Size2DProperty, sizePropertyGroup);
3481 RegisterPropertyGroup(SizeWidthProperty, sizePropertyGroup);
3482 RegisterPropertyGroup(SizeHeightProperty, sizePropertyGroup);
3484 RegisterPropertyGroup(ScaleProperty, scalePropertyGroup);
3485 RegisterPropertyGroup(ScaleXProperty, scalePropertyGroup);
3486 RegisterPropertyGroup(ScaleYProperty, scalePropertyGroup);
3487 RegisterPropertyGroup(ScaleZProperty, scalePropertyGroup);
3490 // keep readonly for BindableProperty
3494 /// Gets View's Size2D set by user.
3496 internal Size2D GetUserSize2D()
3498 return new Size2D((int)userSizeWidth, (int)userSizeHeight);
3501 private void SetBackgroundImage(string value)
3503 if (string.IsNullOrEmpty(value))
3505 backgroundExtraDataUpdatedFlag &= ~BackgroundExtraDataUpdatedFlag.Background;
3507 var empty = new PropertyValue();
3509 Object.SetProperty(SwigCPtr, Property.BACKGROUND, empty);
3514 if (value.StartsWith("*Resource*"))
3516 string resource = Tizen.Applications.Application.Current.DirectoryInfo.Resource;
3517 value = value.Replace("*Resource*", resource);
3520 if (backgroundExtraData == null)
3523 Object.InternalSetPropertyString(SwigCPtr, View.Property.BACKGROUND, value);
3524 BackgroundImageSynchronousLoading = backgroundImageSynchronousLoading;
3528 var map = new PropertyMap();
3529 var url = new PropertyValue(value);
3530 var cornerRadiusValue = backgroundExtraData.CornerRadius == null ? new PropertyValue() : new PropertyValue(backgroundExtraData.CornerRadius);
3531 var cornerRadius = new PropertyValue(cornerRadiusValue);
3532 var cornerRadiusPolicy = new PropertyValue((int)(backgroundExtraData.CornerRadiusPolicy));
3533 var borderlineWidth = new PropertyValue(backgroundExtraData.BorderlineWidth);
3534 var borderlineColorValue = backgroundExtraData.BorderlineColor == null ? new PropertyValue(Color.Black) : new PropertyValue(backgroundExtraData.BorderlineColor);
3535 var borderlineColor = new PropertyValue(borderlineColorValue);
3536 var borderlineOffset = new PropertyValue(backgroundExtraData.BorderlineOffset);
3537 var synchronousLoading = new PropertyValue(backgroundImageSynchronousLoading);
3538 var npatchType = new PropertyValue((int)Visual.Type.NPatch);
3539 var border = (backgroundExtraData.BackgroundImageBorder != null) ? new PropertyValue(backgroundExtraData.BackgroundImageBorder) : null;
3540 var imageType = new PropertyValue((int)Visual.Type.Image);
3542 map.Add(ImageVisualProperty.URL, url)
3543 .Add(Visual.Property.CornerRadius, cornerRadius)
3544 .Add(Visual.Property.CornerRadiusPolicy, cornerRadiusPolicy)
3545 .Add(Visual.Property.BorderlineWidth, borderlineWidth)
3546 .Add(Visual.Property.BorderlineColor, borderlineColor)
3547 .Add(Visual.Property.BorderlineOffset, borderlineOffset)
3548 .Add(ImageVisualProperty.SynchronousLoading, synchronousLoading);
3550 if (backgroundExtraData.BackgroundImageBorder != null)
3552 map.Add(Visual.Property.Type, npatchType)
3553 .Add(NpatchImageVisualProperty.Border, border);
3557 map.Add(Visual.Property.Type, imageType);
3560 backgroundExtraDataUpdatedFlag &= ~BackgroundExtraDataUpdatedFlag.Background;
3562 var mapValue = new PropertyValue(map);
3563 Object.SetProperty(SwigCPtr, Property.BACKGROUND, mapValue);
3565 imageType?.Dispose();
3567 npatchType?.Dispose();
3568 synchronousLoading?.Dispose();
3569 borderlineOffset?.Dispose();
3570 borderlineColor?.Dispose();
3571 borderlineColorValue?.Dispose();
3572 borderlineWidth?.Dispose();
3573 cornerRadiusPolicy?.Dispose();
3574 cornerRadius?.Dispose();
3575 cornerRadiusValue?.Dispose();
3578 mapValue?.Dispose();
3581 private void SetBackgroundImageBorder(Rectangle value)
3583 bool isEmptyValue = Rectangle.IsNullOrZero(value);
3585 var backgroundImageBorder = isEmptyValue ? null : value;
3587 (backgroundExtraData ?? (backgroundExtraData = new BackgroundExtraData())).BackgroundImageBorder = backgroundImageBorder;
3594 PropertyMap map = Background;
3601 map[NpatchImageVisualProperty.Border] = new PropertyValue(backgroundImageBorder);
3605 map.Find(Visual.Property.Type)?.Get(out visualType);
3607 if (visualType == (int)Visual.Type.Image)
3609 map[Visual.Property.Type] = new PropertyValue((int)Visual.Type.NPatch);
3612 // Background extra data flag is not meanful anymore.
3613 backgroundExtraDataUpdatedFlag &= ~BackgroundExtraDataUpdatedFlag.Background;
3615 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, View.Property.BACKGROUND, new PropertyValue(map));
3618 private void SetBorderlineColor(Color value)
3625 (backgroundExtraData ?? (backgroundExtraData = new BackgroundExtraData())).BorderlineColor = value;
3627 UpdateBackgroundExtraData(BackgroundExtraDataUpdatedFlag.Borderline);
3630 private void SetBackgroundColor(Color value)
3637 if (backgroundExtraData == null)
3640 Object.InternalSetPropertyVector4(SwigCPtr, View.Property.BACKGROUND, ((Color)value).SwigCPtr);
3644 var map = new PropertyMap();
3645 var colorType = new PropertyValue((int)Visual.Type.Color);
3646 var mixColor = new PropertyValue(value);
3647 var cornerRadiusValue = backgroundExtraData.CornerRadius == null ? new PropertyValue() : new PropertyValue(backgroundExtraData.CornerRadius);
3648 var cornerRadius = new PropertyValue(cornerRadiusValue);
3649 var cornerRadiusPolicy = new PropertyValue((int)(backgroundExtraData.CornerRadiusPolicy));
3650 var borderlineWidth = new PropertyValue(backgroundExtraData.BorderlineWidth);
3651 var borderlineColorValue = backgroundExtraData.BorderlineColor == null ? new PropertyValue(Color.Black) : new PropertyValue(backgroundExtraData.BorderlineColor);
3652 var borderlineColor = new PropertyValue(borderlineColorValue);
3653 var borderlineOffset = new PropertyValue(backgroundExtraData.BorderlineOffset);
3655 map.Add(Visual.Property.Type, colorType)
3656 .Add(ColorVisualProperty.MixColor, mixColor)
3657 .Add(Visual.Property.CornerRadius, cornerRadius)
3658 .Add(Visual.Property.CornerRadiusPolicy, cornerRadiusPolicy)
3659 .Add(Visual.Property.BorderlineWidth, borderlineWidth)
3660 .Add(Visual.Property.BorderlineColor, borderlineColor)
3661 .Add(Visual.Property.BorderlineOffset, borderlineOffset);
3663 backgroundExtraDataUpdatedFlag &= ~BackgroundExtraDataUpdatedFlag.Background;
3665 var mapValue = new PropertyValue(map);
3666 Object.SetProperty(SwigCPtr, Property.BACKGROUND, mapValue);
3668 borderlineOffset?.Dispose();
3669 borderlineColor?.Dispose();
3670 borderlineColorValue?.Dispose();
3671 borderlineWidth?.Dispose();
3672 cornerRadiusPolicy?.Dispose();
3673 cornerRadius?.Dispose();
3674 cornerRadiusValue?.Dispose();
3675 mixColor?.Dispose();
3676 colorType?.Dispose();
3678 mapValue?.Dispose();
3681 private void SetColor(Color value)
3688 Interop.ActorInternal.SetColor(SwigCPtr, value.SwigCPtr);
3689 if (NDalicPINVOKE.SWIGPendingException.Pending)
3690 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3693 private void SetColorRed(float? value)
3700 Object.InternalSetPropertyFloat(SwigCPtr, View.Property.ColorRed, (float)value);
3701 if (NDalicPINVOKE.SWIGPendingException.Pending)
3702 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3705 private void SetColorGreen(float? value)
3712 Object.InternalSetPropertyFloat(SwigCPtr, View.Property.ColorGreen, (float)value);
3713 if (NDalicPINVOKE.SWIGPendingException.Pending)
3714 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3717 private void SetColorBlue(float? value)
3724 Object.InternalSetPropertyFloat(SwigCPtr, View.Property.ColorBlue, (float)value);
3725 if (NDalicPINVOKE.SWIGPendingException.Pending)
3726 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3729 private void SetOpacity(float? value)
3736 Object.InternalSetPropertyFloat(SwigCPtr, View.Property.OPACITY, (float)value);
3739 private void SetShadow(ShadowBase value)
3741 backgroundExtraDataUpdatedFlag &= ~BackgroundExtraDataUpdatedFlag.Shadow;
3742 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, View.Property.SHADOW, value == null ? new PropertyValue() : value.ToPropertyValue(this));