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;
286 return (string)view.backgroundImageUrl;
291 /// BackgroundImageBorderProperty
293 [EditorBrowsable(EditorBrowsableState.Never)]
294 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
295 public static BindableProperty BackgroundImageBorderProperty = null;
297 public static readonly BindableProperty BackgroundImageBorderProperty = null;
299 internal static void SetInternalBackgroundImageBorderProperty(BindableObject bindable, object oldValue, object newValue)
301 var view = (View)bindable;
303 view.themeData?.selectorData?.BackgroundImageBorder?.Reset(view);
305 if (newValue is Selector<Rectangle> selector)
307 if (selector.HasAll()) view.SetBackgroundImageBorder(selector.All);
308 else view.EnsureSelectorData().BackgroundImageBorder = new TriggerableSelector<Rectangle>(view, selector, view.SetBackgroundImageBorder, true);
312 view.SetBackgroundImageBorder((Rectangle)newValue);
315 internal static object GetInternalBackgroundImageBorderProperty(BindableObject bindable)
317 var view = (View)bindable;
319 return view.backgroundExtraData?.BackgroundImageBorder;
323 /// BackgroundProperty
325 [EditorBrowsable(EditorBrowsableState.Never)]
326 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
327 public static BindableProperty BackgroundProperty = null;
329 public static readonly BindableProperty BackgroundProperty = null;
331 internal static void SetInternalBackgroundProperty(BindableObject bindable, object oldValue, object newValue)
333 var view = (View)bindable;
334 if (newValue != null)
336 PropertyMap map = (PropertyMap)newValue;
338 // Background extra data is not valid anymore. We should ignore lazy UpdateBackgroundExtraData
339 view.backgroundExtraData = null;
340 view.backgroundExtraDataUpdatedFlag = BackgroundExtraDataUpdatedFlag.None;
342 // Update backgroundImageUrl and backgroundImageSynchronousLoading from Map
343 foreach (int key in cachedNUIViewBackgroundImagePropertyKeyList)
345 using PropertyValue propertyValue = map.Find(key);
346 if (propertyValue != null)
348 if (key == ImageVisualProperty.URL)
350 propertyValue.Get(out view.backgroundImageUrl);
352 else if (key == ImageVisualProperty.SynchronousLoading)
354 propertyValue.Get(out view.backgroundImageSynchronousLoading);
359 using var mapValue = new PropertyValue(map);
360 Object.SetProperty(view.SwigCPtr, Property.BACKGROUND, mapValue);
363 internal static object GetInternalBackgroundProperty(BindableObject bindable)
365 var view = (View)bindable;
367 // Sync as current properties
368 view.UpdateBackgroundExtraData();
370 PropertyMap tmp = new PropertyMap();
371 var propertyValue = Object.GetProperty(view.SwigCPtr, Property.BACKGROUND);
372 propertyValue.Get(tmp);
373 propertyValue.Dispose();
374 propertyValue = null;
381 [EditorBrowsable(EditorBrowsableState.Never)]
382 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
383 public static BindableProperty StateProperty = null;
385 public static readonly BindableProperty StateProperty = null;
387 internal static void SetInternalStateProperty(BindableObject bindable, object oldValue, object newValue)
389 var view = (View)bindable;
390 if (newValue != null)
392 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.STATE, (int)newValue);
395 internal static object GetInternalStateProperty(BindableObject bindable)
397 var view = (View)bindable;
399 temp = Object.InternalGetPropertyInt(view.SwigCPtr, View.Property.STATE);
402 case 0: return States.Normal;
403 case 1: return States.Focused;
404 case 2: return States.Disabled;
405 default: return States.Normal;
412 [EditorBrowsable(EditorBrowsableState.Never)]
413 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
414 public static BindableProperty SubStateProperty = null;
416 public static readonly BindableProperty SubStateProperty = null;
418 internal static void SetInternalSubStateProperty(BindableObject bindable, object oldValue, object newValue)
420 var view = (View)bindable;
421 string valueToString = "";
422 if (newValue != null)
424 valueToString = ((States)newValue).GetDescription();
425 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.SubState, valueToString);
428 internal static object GetInternalSubStateProperty(BindableObject bindable)
430 var view = (View)bindable;
432 temp = Object.InternalGetPropertyString(view.SwigCPtr, View.Property.SubState);
433 return temp.GetValueByDescription<States>();
439 [EditorBrowsable(EditorBrowsableState.Never)]
440 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
441 public static BindableProperty TooltipProperty = null;
443 public static readonly BindableProperty TooltipProperty = null;
445 internal static void SetInternalTooltipProperty(BindableObject bindable, object oldValue, object newValue)
447 var view = (View)bindable;
448 if (newValue != null)
450 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.TOOLTIP, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
453 internal static object GetInternalTooltipProperty(BindableObject bindable)
455 var view = (View)bindable;
456 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
457 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.TOOLTIP).Get(temp);
464 [EditorBrowsable(EditorBrowsableState.Never)]
465 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
466 public static BindableProperty FlexProperty = null;
468 public static readonly BindableProperty FlexProperty = null;
470 internal static void SetInternalFlexProperty(BindableObject bindable, object oldValue, object newValue)
472 var view = (View)bindable;
473 if (newValue != null)
475 Object.InternalSetPropertyFloat(view.SwigCPtr, FlexContainer.ChildProperty.FLEX, (float)newValue);
478 internal static object GetInternalFlexProperty(BindableObject bindable)
480 var view = (View)bindable;
481 return Object.InternalGetPropertyFloat(view.SwigCPtr, FlexContainer.ChildProperty.FLEX);
485 /// AlignSelfProperty
487 [EditorBrowsable(EditorBrowsableState.Never)]
488 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
489 public static BindableProperty AlignSelfProperty = null;
491 public static readonly BindableProperty AlignSelfProperty = null;
493 internal static void SetInternalAlignSelfProperty(BindableObject bindable, object oldValue, object newValue)
495 var view = (View)bindable;
496 if (newValue != null)
498 Object.InternalSetPropertyInt(view.SwigCPtr, FlexContainer.ChildProperty.AlignSelf, (int)newValue);
501 internal static object GetInternalAlignSelfProperty(BindableObject bindable)
503 var view = (View)bindable;
504 return Object.InternalGetPropertyInt(view.SwigCPtr, FlexContainer.ChildProperty.AlignSelf);
508 /// FlexMarginProperty
510 [EditorBrowsable(EditorBrowsableState.Never)]
511 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
512 public static BindableProperty FlexMarginProperty = null;
514 public static readonly BindableProperty FlexMarginProperty = null;
516 internal static void SetInternalFlexMarginProperty(BindableObject bindable, object oldValue, object newValue)
518 var view = (View)bindable;
519 if (newValue != null)
521 Object.InternalSetPropertyVector4(view.SwigCPtr, FlexContainer.ChildProperty.FlexMargin, ((Vector4)newValue).SwigCPtr);
524 internal static object GetInternalFlexMarginProperty(BindableObject bindable)
526 var view = (View)bindable;
527 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
528 Object.InternalRetrievingPropertyVector4(view.SwigCPtr, FlexContainer.ChildProperty.FlexMargin, temp.SwigCPtr);
533 /// CellIndexProperty
535 [EditorBrowsable(EditorBrowsableState.Never)]
536 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
537 public static BindableProperty CellIndexProperty = null;
539 public static readonly BindableProperty CellIndexProperty = null;
541 internal static void SetInternalCellIndexProperty(BindableObject bindable, object oldValue, object newValue)
543 var view = (View)bindable;
544 if (newValue != null)
546 Object.InternalSetPropertyVector2(view.SwigCPtr, TableView.ChildProperty.CellIndex, ((Vector2)newValue).SwigCPtr);
550 internal static object GetInternalCellIndexProperty(BindableObject bindable)
552 var view = (View)bindable;
553 if (view.internalCellIndex == null)
555 view.internalCellIndex = new Vector2(view.OnCellIndexChanged, 0, 0);
557 Object.InternalRetrievingPropertyVector2(view.SwigCPtr, TableView.ChildProperty.CellIndex, view.internalCellIndex.SwigCPtr);
558 return view.internalCellIndex;
565 [EditorBrowsable(EditorBrowsableState.Never)]
566 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
567 public static BindableProperty RowSpanProperty = null;
569 public static readonly BindableProperty RowSpanProperty = null;
571 internal static void SetInternalRowSpanProperty(BindableObject bindable, object oldValue, object newValue)
573 var view = (View)bindable;
574 if (newValue != null)
576 Object.InternalSetPropertyFloat(view.SwigCPtr, TableView.ChildProperty.RowSpan, (float)newValue);
579 internal static object GetInternalRowSpanProperty(BindableObject bindable)
581 var view = (View)bindable;
582 return Object.InternalGetPropertyFloat(view.SwigCPtr, TableView.ChildProperty.RowSpan);
586 /// ColumnSpanProperty
588 [EditorBrowsable(EditorBrowsableState.Never)]
589 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
590 public static BindableProperty ColumnSpanProperty = null;
592 public static readonly BindableProperty ColumnSpanProperty = null;
594 internal static void SetInternalColumnSpanProperty(BindableObject bindable, object oldValue, object newValue)
596 var view = (View)bindable;
597 if (newValue != null)
599 Object.InternalSetPropertyFloat(view.SwigCPtr, TableView.ChildProperty.ColumnSpan, (float)newValue);
602 internal static object GetInternalColumnSpanProperty(BindableObject bindable)
604 var view = (View)bindable;
605 return Object.InternalGetPropertyFloat(view.SwigCPtr, TableView.ChildProperty.ColumnSpan);
609 /// CellHorizontalAlignmentProperty
611 [EditorBrowsable(EditorBrowsableState.Never)]
612 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
613 public static BindableProperty CellHorizontalAlignmentProperty = null;
615 public static readonly BindableProperty CellHorizontalAlignmentProperty = null;
617 internal static void SetInternalCellHorizontalAlignmentProperty(BindableObject bindable, object oldValue, object newValue)
619 var view = (View)bindable;
620 string valueToString = "";
622 if (newValue != null)
624 valueToString = ((HorizontalAlignmentType)newValue).GetDescription();
625 Object.InternalSetPropertyString(view.SwigCPtr, TableView.ChildProperty.CellHorizontalAlignment, valueToString);
628 internal static object GetInternalCellHorizontalAlignmentProperty(BindableObject bindable)
630 var view = (View)bindable;
632 temp = Object.InternalGetPropertyString(view.SwigCPtr, TableView.ChildProperty.CellHorizontalAlignment);
633 return temp.GetValueByDescription<HorizontalAlignmentType>();
637 /// CellVerticalAlignmentProperty
639 [EditorBrowsable(EditorBrowsableState.Never)]
640 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
641 public static BindableProperty CellVerticalAlignmentProperty = null;
643 public static readonly BindableProperty CellVerticalAlignmentProperty = null;
645 internal static void SetInternalCellVerticalAlignmentProperty(BindableObject bindable, object oldValue, object newValue)
647 var view = (View)bindable;
648 string valueToString = "";
650 if (newValue != null)
652 valueToString = ((VerticalAlignmentType)newValue).GetDescription();
653 Object.InternalSetPropertyString(view.SwigCPtr, TableView.ChildProperty.CellVerticalAlignment, valueToString);
656 internal static object GetInternalCellVerticalAlignmentProperty(BindableObject bindable)
658 var view = (View)bindable;
660 temp = Object.InternalGetPropertyString(view.SwigCPtr, TableView.ChildProperty.CellVerticalAlignment);
661 return temp.GetValueByDescription<VerticalAlignmentType>();
665 /// "DO not use this, that will be deprecated. Use 'View Weight' instead of BindableProperty"
666 /// This needs to be hidden as inhouse API until all applications using it have been updated. Do not make public.
668 [EditorBrowsable(EditorBrowsableState.Never)]
669 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
670 public static BindableProperty WeightProperty = null;
672 public static readonly BindableProperty WeightProperty = null;
674 internal static void SetInternalWeightProperty(BindableObject bindable, object oldValue, object newValue)
676 var view = (View)bindable;
677 if (newValue != null)
679 view.Weight = (float)newValue;
682 internal static object GetInternalWeightProperty(BindableObject bindable)
684 var view = (View)bindable;
689 /// LeftFocusableViewProperty
691 [EditorBrowsable(EditorBrowsableState.Never)]
692 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
693 public static BindableProperty LeftFocusableViewProperty = null;
695 public static readonly BindableProperty LeftFocusableViewProperty = null;
697 internal static void SetInternalLeftFocusableViewProperty(BindableObject bindable, object oldValue, object newValue)
699 var view = (View)bindable;
700 if (newValue != null) { view.LeftFocusableViewId = (int)(newValue as View)?.GetId(); }
701 else { view.LeftFocusableViewId = -1; }
703 internal static object GetInternalLeftFocusableViewProperty(BindableObject bindable)
705 var view = (View)bindable;
706 if (view.LeftFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.LeftFocusableViewId); }
711 /// RightFocusableViewProperty
713 [EditorBrowsable(EditorBrowsableState.Never)]
714 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
715 public static BindableProperty RightFocusableViewProperty = null;
717 public static readonly BindableProperty RightFocusableViewProperty = null;
719 internal static void SetInternalRightFocusableViewProperty(BindableObject bindable, object oldValue, object newValue)
721 var view = (View)bindable;
722 if (newValue != null) { view.RightFocusableViewId = (int)(newValue as View)?.GetId(); }
723 else { view.RightFocusableViewId = -1; }
725 internal static object GetInternalRightFocusableViewProperty(BindableObject bindable)
727 var view = (View)bindable;
728 if (view.RightFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.RightFocusableViewId); }
733 /// UpFocusableViewProperty
735 [EditorBrowsable(EditorBrowsableState.Never)]
736 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
737 public static BindableProperty UpFocusableViewProperty = null;
739 public static readonly BindableProperty UpFocusableViewProperty = null;
741 internal static void SetInternalUpFocusableViewProperty(BindableObject bindable, object oldValue, object newValue)
743 var view = (View)bindable;
744 if (newValue != null) { view.UpFocusableViewId = (int)(newValue as View)?.GetId(); }
745 else { view.UpFocusableViewId = -1; }
747 internal static object GetInternalUpFocusableViewProperty(BindableObject bindable)
749 var view = (View)bindable;
750 if (view.UpFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.UpFocusableViewId); }
755 /// DownFocusableViewProperty
757 [EditorBrowsable(EditorBrowsableState.Never)]
758 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
759 public static BindableProperty DownFocusableViewProperty = null;
761 public static readonly BindableProperty DownFocusableViewProperty = null;
763 internal static void SetInternalDownFocusableViewProperty(BindableObject bindable, object oldValue, object newValue)
765 var view = (View)bindable;
766 if (newValue != null) { view.DownFocusableViewId = (int)(newValue as View)?.GetId(); }
767 else { view.DownFocusableViewId = -1; }
769 internal static object GetInternalDownFocusableViewProperty(BindableObject bindable)
771 var view = (View)bindable;
772 if (view.DownFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.DownFocusableViewId); }
777 /// ClockwiseFocusableViewProperty
779 [EditorBrowsable(EditorBrowsableState.Never)]
780 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
781 public static BindableProperty ClockwiseFocusableViewProperty = null;
783 public static readonly BindableProperty ClockwiseFocusableViewProperty = null;
785 internal static void SetInternalClockwiseFocusableViewProperty(BindableObject bindable, object oldValue, object newValue)
787 var view = (View)bindable;
788 if (newValue != null && (newValue is View)) { view.ClockwiseFocusableViewId = (int)(newValue as View)?.GetId(); }
789 else { view.ClockwiseFocusableViewId = -1; }
791 internal static object GetInternalClockwiseFocusableViewProperty(BindableObject bindable)
793 var view = (View)bindable;
794 if (view.ClockwiseFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.ClockwiseFocusableViewId); }
799 /// CounterClockwiseFocusableViewProperty
801 [EditorBrowsable(EditorBrowsableState.Never)]
802 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
803 public static BindableProperty CounterClockwiseFocusableViewProperty = null;
805 public static readonly BindableProperty CounterClockwiseFocusableViewProperty = null;
807 internal static void SetInternalCounterClockwiseFocusableViewProperty(BindableObject bindable, object oldValue, object newValue)
809 var view = (View)bindable;
810 if (newValue != null && (newValue is View)) { view.CounterClockwiseFocusableViewId = (int)(newValue as View)?.GetId(); }
811 else { view.CounterClockwiseFocusableViewId = -1; }
813 internal static object GetInternalCounterClockwiseFocusableViewProperty(BindableObject bindable)
815 var view = (View)bindable;
816 if (view.CounterClockwiseFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.CounterClockwiseFocusableViewId); }
821 /// FocusableProperty
823 [EditorBrowsable(EditorBrowsableState.Never)]
824 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
825 public static BindableProperty FocusableProperty = null;
827 public static readonly BindableProperty FocusableProperty = null;
829 internal static void SetInternalFocusableProperty(BindableObject bindable, object oldValue, object newValue)
831 var view = (View)bindable;
832 if (newValue != null) { view.SetKeyboardFocusable((bool)newValue); }
834 internal static object GetInternalFocusableProperty(BindableObject bindable)
836 var view = (View)bindable;
837 return view.IsKeyboardFocusable();
841 /// FocusableChildrenProperty
843 [EditorBrowsable(EditorBrowsableState.Never)]
844 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
845 public static BindableProperty FocusableChildrenProperty = null;
847 public static readonly BindableProperty FocusableChildrenProperty = null;
849 internal static void SetInternalFocusableChildrenProperty(BindableObject bindable, object oldValue, object newValue)
851 var view = (View)bindable;
852 if (newValue != null) { view.SetKeyboardFocusableChildren((bool)newValue); }
854 internal static object GetInternalFocusableChildrenProperty(BindableObject bindable)
856 var view = (View)bindable;
857 return view.AreChildrenKeyBoardFocusable();
861 /// FocusableInTouchProperty
863 [EditorBrowsable(EditorBrowsableState.Never)]
864 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
865 public static BindableProperty FocusableInTouchProperty = null;
867 public static readonly BindableProperty FocusableInTouchProperty = null;
869 internal static void SetInternalFocusableInTouchProperty(BindableObject bindable, object oldValue, object newValue)
871 var view = (View)bindable;
872 if (newValue != null) { view.SetFocusableInTouch((bool)newValue); }
874 internal static object GetInternalFocusableInTouchProperty(BindableObject bindable)
876 var view = (View)bindable;
877 return view.IsFocusableInTouch();
883 [EditorBrowsable(EditorBrowsableState.Never)]
884 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
885 public static BindableProperty Size2DProperty = null;
887 public static readonly BindableProperty Size2DProperty = null;
889 internal static void SetInternalSize2DProperty(BindableObject bindable, object oldValue, object newValue)
891 var view = (View)bindable;
892 if (newValue != null)
894 // Size property setter is only used by user.
895 // Framework code uses SetSize() instead of Size property setter.
896 // Size set by user is returned by GetUserSize2D() for SuggestedMinimumWidth/Height.
897 // SuggestedMinimumWidth/Height is used by Layout calculation.
898 int width = ((Size2D)newValue).Width;
899 int height = ((Size2D)newValue).Height;
900 view.userSizeWidth = (float)width;
901 view.userSizeHeight = (float)height;
903 bool relayoutRequired = false;
904 // To avoid duplicated size setup, change internal policy directly.
905 if (view.widthPolicy != width)
907 view.widthPolicy = width;
908 relayoutRequired = true;
910 if (view.heightPolicy != height)
912 view.heightPolicy = height;
913 relayoutRequired = true;
915 if (relayoutRequired)
917 view.layout?.RequestLayout();
920 Object.InternalSetPropertyVector2ActualVector3(view.SwigCPtr, View.Property.SIZE, ((Size2D)newValue).SwigCPtr);
923 internal static object GetInternalSize2DProperty(BindableObject bindable)
925 var view = (View)bindable;
926 if (view.internalSize2D == null)
928 view.internalSize2D = new Size2D(view.OnSize2DChanged, 0, 0);
930 Object.InternalRetrievingPropertyVector2ActualVector3(view.SwigCPtr, View.Property.SIZE, view.internalSize2D.SwigCPtr);
932 return view.internalSize2D;
938 [EditorBrowsable(EditorBrowsableState.Never)]
939 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
940 public static BindableProperty OpacityProperty = null;
942 public static readonly BindableProperty OpacityProperty = null;
944 internal static void SetInternalOpacityProperty(BindableObject bindable, object oldValue, object newValue)
946 var view = (View)bindable;
948 view.themeData?.selectorData?.Opacity?.Reset(view);
950 if (newValue is Selector<float?> selector)
952 if (selector.HasAll()) view.SetOpacity(selector.All);
953 else view.EnsureSelectorData().Opacity = new TriggerableSelector<float?>(view, selector, view.SetOpacity, true);
957 view.SetOpacity((float?)newValue);
960 internal static object GetInternalOpacityProperty(BindableObject bindable)
962 var view = (View)bindable;
963 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.OPACITY);
967 /// Position2DProperty
969 [EditorBrowsable(EditorBrowsableState.Never)]
970 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
971 public static BindableProperty Position2DProperty = null;
973 public static readonly BindableProperty Position2DProperty = null;
975 internal static void SetInternalPosition2DProperty(BindableObject bindable, object oldValue, object newValue)
977 var view = (View)bindable;
978 if (newValue != null)
980 Object.InternalSetPropertyVector2ActualVector3(view.SwigCPtr, View.Property.POSITION, ((Position2D)newValue).SwigCPtr);
983 internal static object GetInternalPosition2DProperty(BindableObject bindable)
985 var view = (View)bindable;
986 if (view.internalPosition2D == null)
988 view.internalPosition2D = new Position2D(view.OnPosition2DChanged, 0, 0);
990 Object.InternalRetrievingPropertyVector2ActualVector3(view.SwigCPtr, View.Property.POSITION, view.internalPosition2D.SwigCPtr);
991 return view.internalPosition2D;
995 /// PositionUsesPivotPointProperty
997 [EditorBrowsable(EditorBrowsableState.Never)]
998 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
999 public static BindableProperty PositionUsesPivotPointProperty = null;
1001 public static readonly BindableProperty PositionUsesPivotPointProperty = null;
1003 internal static void SetInternalPositionUsesPivotPointProperty(BindableObject bindable, object oldValue, object newValue)
1005 var view = (View)bindable;
1006 if (newValue != null)
1008 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.PositionUsesAnchorPoint, (bool)newValue);
1011 internal static object GetInternalPositionUsesPivotPointProperty(BindableObject bindable)
1013 var view = (View)bindable;
1014 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.PositionUsesAnchorPoint);
1018 /// SiblingOrderProperty
1020 [EditorBrowsable(EditorBrowsableState.Never)]
1021 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1022 public static BindableProperty SiblingOrderProperty = null;
1024 public static readonly BindableProperty SiblingOrderProperty = null;
1026 internal static void SetInternalSiblingOrderProperty(BindableObject bindable, object oldValue, object newValue)
1028 var view = (View)bindable;
1030 if (newValue != null)
1032 value = (int)newValue;
1035 NUILog.Error("SiblingOrder should be bigger than 0 or equal to 0.");
1038 var siblings = view.GetParent()?.Children;
1039 if (siblings != null)
1041 int currentOrder = siblings.IndexOf(view);
1042 if (value != currentOrder)
1044 if (value == 0) { view.LowerToBottom(); }
1045 else if (value < siblings.Count - 1)
1047 if (value > currentOrder) { view.RaiseAbove(siblings[value]); }
1048 else { view.LowerBelow(siblings[value]); }
1050 else { view.RaiseToTop(); }
1055 internal static object GetInternalSiblingOrderProperty(BindableObject bindable)
1057 var view = (View)bindable;
1058 var parentChildren = view.GetParent()?.Children;
1059 int currentOrder = 0;
1060 if (parentChildren != null)
1062 currentOrder = parentChildren.IndexOf(view);
1064 if (currentOrder < 0) { return 0; }
1065 else if (currentOrder < parentChildren.Count) { return currentOrder; }
1072 /// ParentOriginProperty
1074 [EditorBrowsable(EditorBrowsableState.Never)]
1075 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1076 public static BindableProperty ParentOriginProperty = null;
1078 public static readonly BindableProperty ParentOriginProperty = null;
1080 internal static void SetInternalParentOriginProperty(BindableObject bindable, object oldValue, object newValue)
1082 var view = (View)bindable;
1083 if (newValue != null)
1085 Object.InternalSetPropertyVector3(view.SwigCPtr, View.Property.ParentOrigin, ((Position)newValue).SwigCPtr);
1088 internal static object GetInternalParentOriginProperty(BindableObject bindable)
1090 var view = (View)bindable;
1091 Position temp = new Position(0.0f, 0.0f, 0.0f);
1092 Object.InternalRetrievingPropertyVector3(view.SwigCPtr, View.Property.ParentOrigin, temp.SwigCPtr);
1098 /// PivotPointProperty
1100 [EditorBrowsable(EditorBrowsableState.Never)]
1101 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1102 public static BindableProperty PivotPointProperty = null;
1104 public static readonly BindableProperty PivotPointProperty = null;
1106 internal static void SetInternalPivotPointProperty(BindableObject bindable, object oldValue, object newValue)
1108 var view = (View)bindable;
1109 if (newValue != null)
1111 view.SetAnchorPoint((Position)newValue);
1114 internal static object GetInternalPivotPointProperty(BindableObject bindable)
1116 var view = (View)bindable;
1117 if (view.internalPivotPoint == null)
1119 view.internalPivotPoint = new Position(view.OnPivotPointChanged, 0, 0, 0);
1121 Object.InternalRetrievingPropertyVector3(view.SwigCPtr, View.Property.AnchorPoint, view.internalPivotPoint.SwigCPtr);
1122 return view.internalPivotPoint;
1126 /// SizeWidthProperty
1128 [EditorBrowsable(EditorBrowsableState.Never)]
1129 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1130 public static BindableProperty SizeWidthProperty = null;
1132 public static readonly BindableProperty SizeWidthProperty = null;
1134 internal static void SetInternalSizeWidthProperty(BindableObject bindable, object oldValue, object newValue)
1136 var view = (View)bindable;
1137 if (newValue != null)
1139 // Size property setter is only used by user.
1140 // Framework code uses SetSize() instead of Size property setter.
1141 // Size set by user is returned by GetUserSize2D() for SuggestedMinimumWidth/Height.
1142 // SuggestedMinimumWidth/Height is used by Layout calculation.
1143 float width = (float)newValue;
1144 view.userSizeWidth = width;
1146 // To avoid duplicated size setup, change internal policy directly.
1147 int widthPolicy = (int)System.Math.Ceiling(width);
1148 if (view.widthPolicy != widthPolicy)
1150 view.widthPolicy = widthPolicy;
1151 view.layout?.RequestLayout();
1154 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.SizeWidth, width);
1157 internal static object GetInternalSizeWidthProperty(BindableObject bindable)
1159 var view = (View)bindable;
1160 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.SizeWidth);
1164 /// SizeHeightProperty
1166 [EditorBrowsable(EditorBrowsableState.Never)]
1167 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1168 public static BindableProperty SizeHeightProperty = null;
1170 public static readonly BindableProperty SizeHeightProperty = null;
1172 internal static void SetInternalSizeHeightProperty(BindableObject bindable, object oldValue, object newValue)
1174 var view = (View)bindable;
1175 if (newValue != null)
1177 // Size property setter is only used by user.
1178 // Framework code uses SetSize() instead of Size property setter.
1179 // Size set by user is returned by GetUserSize2D() for SuggestedMinimumWidth/Height.
1180 // SuggestedMinimumWidth/Height is used by Layout calculation.
1181 float height = (float)newValue;
1182 view.userSizeHeight = height;
1184 // To avoid duplicated size setup, change internal policy directly.
1185 int heightPolicy = (int)System.Math.Ceiling(height);
1186 if (view.heightPolicy != heightPolicy)
1188 view.heightPolicy = heightPolicy;
1189 view.layout?.RequestLayout();
1192 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.SizeHeight, height);
1195 internal static object GetInternalSizeHeightProperty(BindableObject bindable)
1197 var view = (View)bindable;
1198 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.SizeHeight);
1202 /// PositionProperty
1204 [EditorBrowsable(EditorBrowsableState.Never)]
1205 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1206 public static BindableProperty PositionProperty = null;
1208 public static readonly BindableProperty PositionProperty = null;
1210 internal static void SetInternalPositionProperty(BindableObject bindable, object oldValue, object newValue)
1212 var view = (View)bindable;
1213 if (newValue != null)
1215 Object.InternalSetPropertyVector3(view.SwigCPtr, View.Property.POSITION, ((Position)newValue).SwigCPtr);
1218 internal static object GetInternalPositionProperty(BindableObject bindable)
1220 var view = (View)bindable;
1221 if (view.internalPosition == null)
1223 view.internalPosition = new Position(view.OnPositionChanged, 0, 0, 0);
1225 Object.InternalRetrievingPropertyVector3(view.SwigCPtr, View.Property.POSITION, view.internalPosition.SwigCPtr);
1226 return view.internalPosition;
1230 /// PositionXProperty
1232 [EditorBrowsable(EditorBrowsableState.Never)]
1233 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1234 public static BindableProperty PositionXProperty = null;
1236 public static readonly BindableProperty PositionXProperty = null;
1238 internal static void SetInternalPositionXProperty(BindableObject bindable, object oldValue, object newValue)
1240 var view = (View)bindable;
1241 if (newValue != null)
1243 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.PositionX, (float)newValue);
1246 internal static object GetInternalPositionXProperty(BindableObject bindable)
1248 var view = (View)bindable;
1249 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.PositionX);
1253 /// PositionYProperty
1255 [EditorBrowsable(EditorBrowsableState.Never)]
1256 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1257 public static BindableProperty PositionYProperty = null;
1259 public static readonly BindableProperty PositionYProperty = null;
1261 internal static void SetInternalPositionYProperty(BindableObject bindable, object oldValue, object newValue)
1263 var view = (View)bindable;
1264 if (newValue != null)
1266 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.PositionY, (float)newValue);
1269 internal static object GetInternalPositionYProperty(BindableObject bindable)
1271 var view = (View)bindable;
1272 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.PositionY);
1276 /// PositionZProperty
1278 [EditorBrowsable(EditorBrowsableState.Never)]
1279 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1280 public static BindableProperty PositionZProperty = null;
1282 public static readonly BindableProperty PositionZProperty = null;
1284 internal static void SetInternalPositionZProperty(BindableObject bindable, object oldValue, object newValue)
1286 var view = (View)bindable;
1287 if (newValue != null)
1289 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.PositionZ, (float)newValue);
1293 internal static object GetInternalPositionZProperty(BindableObject bindable)
1295 var view = (View)bindable;
1296 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.PositionZ);
1300 /// OrientationProperty
1302 [EditorBrowsable(EditorBrowsableState.Never)]
1303 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1304 public static BindableProperty OrientationProperty = null;
1306 public static readonly BindableProperty OrientationProperty = null;
1308 internal static void SetInternalOrientationProperty(BindableObject bindable, object oldValue, object newValue)
1310 var view = (View)bindable;
1311 if (newValue != null)
1313 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ORIENTATION, new Tizen.NUI.PropertyValue((Rotation)newValue));
1316 internal static object GetInternalOrientationProperty(BindableObject bindable)
1318 var view = (View)bindable;
1319 Rotation temp = new Rotation();
1320 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ORIENTATION).Get(temp);
1327 [EditorBrowsable(EditorBrowsableState.Never)]
1328 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1329 public static BindableProperty ScaleProperty = null;
1331 public static readonly BindableProperty ScaleProperty = null;
1333 internal static void SetInternalScaleProperty(BindableObject bindable, object oldValue, object newValue)
1335 var view = (View)bindable;
1336 if (newValue != null)
1338 view.SetScale((Vector3)newValue);
1342 internal static object GetInternalScaleProperty(BindableObject bindable)
1344 var view = (View)bindable;
1345 if (view.internalScale == null)
1347 view.internalScale = new Vector3(view.OnScaleChanged, 0, 0, 0);
1349 Object.InternalRetrievingPropertyVector3(view.SwigCPtr, View.Property.SCALE, view.internalScale.SwigCPtr);
1350 return view.internalScale;
1356 [EditorBrowsable(EditorBrowsableState.Never)]
1357 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1358 public static BindableProperty ScaleXProperty = null;
1360 public static readonly BindableProperty ScaleXProperty = null;
1362 internal static void SetInternalScaleXProperty(BindableObject bindable, object oldValue, object newValue)
1364 var view = (View)bindable;
1365 if (newValue != null)
1367 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.ScaleX, (float)newValue);
1370 internal static object GetInternalScaleXProperty(BindableObject bindable)
1372 var view = (View)bindable;
1373 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.ScaleX);
1379 [EditorBrowsable(EditorBrowsableState.Never)]
1380 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1381 public static BindableProperty ScaleYProperty = null;
1383 public static readonly BindableProperty ScaleYProperty = null;
1385 internal static void SetInternalScaleYProperty(BindableObject bindable, object oldValue, object newValue)
1387 var view = (View)bindable;
1388 if (newValue != null)
1390 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.ScaleY, (float)newValue);
1393 internal static object GetInternalScaleYProperty(BindableObject bindable)
1395 var view = (View)bindable;
1396 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.ScaleY);
1402 [EditorBrowsable(EditorBrowsableState.Never)]
1403 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1404 public static BindableProperty ScaleZProperty = null;
1406 public static readonly BindableProperty ScaleZProperty = null;
1408 internal static void SetInternalScaleZProperty(BindableObject bindable, object oldValue, object newValue)
1410 var view = (View)bindable;
1411 if (newValue != null)
1413 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.ScaleZ, (float)newValue);
1416 internal static object GetInternalScaleZProperty(BindableObject bindable)
1418 var view = (View)bindable;
1419 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.ScaleZ);
1425 [EditorBrowsable(EditorBrowsableState.Never)]
1426 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1427 public static BindableProperty NameProperty = null;
1429 public static readonly BindableProperty NameProperty = null;
1431 internal static void SetInternalNameProperty(BindableObject bindable, object oldValue, object newValue)
1433 var view = (View)bindable;
1434 if (newValue != null)
1436 view.internalName = (string)newValue;
1437 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.NAME, (string)newValue);
1440 internal static object GetInternalNameProperty(BindableObject bindable)
1442 var view = (View)bindable;
1443 return view.internalName;
1447 /// SensitiveProperty
1449 [EditorBrowsable(EditorBrowsableState.Never)]
1450 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1451 public static BindableProperty SensitiveProperty = null;
1453 public static readonly BindableProperty SensitiveProperty = null;
1455 internal static void SetInternalSensitiveProperty(BindableObject bindable, object oldValue, object newValue)
1457 var view = (View)bindable;
1458 if (newValue != null)
1460 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.SENSITIVE, (bool)newValue);
1463 internal static object GetInternalSensitiveProperty(BindableObject bindable)
1465 var view = (View)bindable;
1466 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.SENSITIVE);
1470 /// IsEnabledProperty
1472 [EditorBrowsable(EditorBrowsableState.Never)]
1473 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1474 public static BindableProperty IsEnabledProperty = null;
1476 public static readonly BindableProperty IsEnabledProperty = null;
1478 internal static void SetInternalIsEnabledProperty(BindableObject bindable, object oldValue, object newValue)
1480 var view = (View)bindable;
1481 if (newValue != null)
1483 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.UserInteractionEnabled, (bool)newValue);
1484 view.OnEnabled((bool)newValue);
1487 internal static object GetInternalIsEnabledProperty(BindableObject bindable)
1489 var view = (View)bindable;
1490 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.UserInteractionEnabled);
1494 /// DispatchKeyEventsProperty
1496 [EditorBrowsable(EditorBrowsableState.Never)]
1497 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1498 public static BindableProperty DispatchKeyEventsProperty = null;
1500 public static readonly BindableProperty DispatchKeyEventsProperty = null;
1502 internal static void SetInternalDispatchKeyEventsProperty(BindableObject bindable, object oldValue, object newValue)
1504 var view = (View)bindable;
1505 if (newValue != null)
1507 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.DispatchKeyEvents, (bool)newValue);
1510 internal static object GetInternalDispatchKeyEventsProperty(BindableObject bindable)
1512 var view = (View)bindable;
1513 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.DispatchKeyEvents);
1517 /// LeaveRequiredProperty
1519 [EditorBrowsable(EditorBrowsableState.Never)]
1520 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1521 public static BindableProperty LeaveRequiredProperty = null;
1523 public static readonly BindableProperty LeaveRequiredProperty = null;
1525 internal static void SetInternalLeaveRequiredProperty(BindableObject bindable, object oldValue, object newValue)
1527 var view = (View)bindable;
1528 if (newValue != null)
1530 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.LeaveRequired, (bool)newValue);
1533 internal static object GetInternalLeaveRequiredProperty(BindableObject bindable)
1535 var view = (View)bindable;
1536 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.LeaveRequired);
1540 /// InheritOrientationProperty
1542 [EditorBrowsable(EditorBrowsableState.Never)]
1543 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1544 public static BindableProperty InheritOrientationProperty = null;
1546 public static readonly BindableProperty InheritOrientationProperty = null;
1548 internal static void SetInternalInheritOrientationProperty(BindableObject bindable, object oldValue, object newValue)
1550 var view = (View)bindable;
1551 if (newValue != null)
1553 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.InheritOrientation, (bool)newValue);
1556 internal static object GetInternalInheritOrientationProperty(BindableObject bindable)
1558 var view = (View)bindable;
1559 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.InheritOrientation);
1563 /// InheritScaleProperty
1565 [EditorBrowsable(EditorBrowsableState.Never)]
1566 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1567 public static BindableProperty InheritScaleProperty = null;
1569 public static readonly BindableProperty InheritScaleProperty = null;
1571 internal static void SetInternalInheritScaleProperty(BindableObject bindable, object oldValue, object newValue)
1573 var view = (View)bindable;
1574 if (newValue != null)
1576 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.InheritScale, (bool)newValue);
1579 internal static object GetInternalInheritScaleProperty(BindableObject bindable)
1581 var view = (View)bindable;
1582 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.InheritScale);
1586 /// DrawModeProperty
1588 [EditorBrowsable(EditorBrowsableState.Never)]
1589 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1590 public static BindableProperty DrawModeProperty = null;
1592 public static readonly BindableProperty DrawModeProperty = null;
1594 internal static void SetInternalDrawModeProperty(BindableObject bindable, object oldValue, object newValue)
1596 var view = (View)bindable;
1597 if (newValue != null)
1599 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.DrawMode, (int)newValue);
1602 internal static object GetInternalDrawModeProperty(BindableObject bindable)
1604 var view = (View)bindable;
1605 return (DrawModeType)Object.InternalGetPropertyInt(view.SwigCPtr, View.Property.DrawMode);
1609 /// SizeModeFactorProperty
1611 [EditorBrowsable(EditorBrowsableState.Never)]
1612 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1613 public static BindableProperty SizeModeFactorProperty = null;
1615 public static readonly BindableProperty SizeModeFactorProperty = null;
1617 internal static void SetInternalSizeModeFactorProperty(BindableObject bindable, object oldValue, object newValue)
1619 var view = (View)bindable;
1620 if (newValue != null)
1622 Object.InternalSetPropertyVector3(view.SwigCPtr, View.Property.SizeModeFactor, ((Vector3)newValue).SwigCPtr);
1626 internal static object GetInternalSizeModeFactorProperty(BindableObject bindable)
1628 var view = (View)bindable;
1629 if (view.internalSizeModeFactor == null)
1631 view.internalSizeModeFactor = new Vector3(view.OnSizeModeFactorChanged, 0, 0, 0);
1633 Object.InternalRetrievingPropertyVector3(view.SwigCPtr, View.Property.SizeModeFactor, view.internalSizeModeFactor.SwigCPtr);
1634 return view.internalSizeModeFactor;
1638 /// WidthResizePolicyProperty
1640 [EditorBrowsable(EditorBrowsableState.Never)]
1641 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1642 public static BindableProperty WidthResizePolicyProperty = null;
1644 public static readonly BindableProperty WidthResizePolicyProperty = null;
1646 internal static void SetInternalWidthResizePolicyProperty(BindableObject bindable, object oldValue, object newValue)
1648 var view = (View)bindable;
1649 if (newValue != null)
1651 if ((ResizePolicyType)newValue == ResizePolicyType.KeepSizeFollowingParent)
1653 if (view.widthConstraint == null)
1655 view.widthConstraint = new EqualConstraintWithParentFloat((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeWidth, View.Property.SizeWidth);
1656 view.widthConstraint.Apply();
1658 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.WidthResizePolicy, (int)ResizePolicyType.FillToParent);
1662 view.widthConstraint?.Remove();
1663 view.widthConstraint?.Dispose();
1664 view.widthConstraint = null;
1666 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.WidthResizePolicy, (int)newValue);
1668 // Match ResizePolicy to new Layouting.
1669 // Parent relative policies can not be mapped at this point as parent size unknown.
1670 switch ((ResizePolicyType)newValue)
1672 case ResizePolicyType.UseNaturalSize:
1674 view.WidthSpecification = LayoutParamPolicies.WrapContent;
1677 case ResizePolicyType.FillToParent:
1679 view.WidthSpecification = LayoutParamPolicies.MatchParent;
1682 case ResizePolicyType.FitToChildren:
1684 view.WidthSpecification = LayoutParamPolicies.WrapContent;
1692 internal static object GetInternalWidthResizePolicyProperty(BindableObject bindable)
1694 var view = (View)bindable;
1697 temp = Object.InternalGetPropertyString(view.SwigCPtr, View.Property.WidthResizePolicy);
1698 return temp.GetValueByDescription<ResizePolicyType>();
1702 /// HeightResizePolicyProperty
1704 [EditorBrowsable(EditorBrowsableState.Never)]
1705 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1706 public static BindableProperty HeightResizePolicyProperty = null;
1708 public static readonly BindableProperty HeightResizePolicyProperty = null;
1710 internal static void SetInternalHeightResizePolicyProperty(BindableObject bindable, object oldValue, object newValue)
1712 var view = (View)bindable;
1713 if (newValue != null)
1715 if ((ResizePolicyType)newValue == ResizePolicyType.KeepSizeFollowingParent)
1717 if (view.heightConstraint == null)
1719 view.heightConstraint = new EqualConstraintWithParentFloat((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeHeight, View.Property.SizeHeight);
1720 view.heightConstraint.Apply();
1723 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.HeightResizePolicy, (int)ResizePolicyType.FillToParent);
1727 view.heightConstraint?.Remove();
1728 view.heightConstraint?.Dispose();
1729 view.heightConstraint = null;
1731 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.HeightResizePolicy, (int)newValue);
1733 // Match ResizePolicy to new Layouting.
1734 // Parent relative policies can not be mapped at this point as parent size unknown.
1735 switch ((ResizePolicyType)newValue)
1737 case ResizePolicyType.UseNaturalSize:
1739 view.HeightSpecification = LayoutParamPolicies.WrapContent;
1742 case ResizePolicyType.FillToParent:
1744 view.HeightSpecification = LayoutParamPolicies.MatchParent;
1747 case ResizePolicyType.FitToChildren:
1749 view.HeightSpecification = LayoutParamPolicies.WrapContent;
1757 internal static object GetInternalHeightResizePolicyProperty(BindableObject bindable)
1759 var view = (View)bindable;
1762 temp = Object.InternalGetPropertyString(view.SwigCPtr, View.Property.HeightResizePolicy);
1763 return temp.GetValueByDescription<ResizePolicyType>();
1767 /// SizeScalePolicyProperty
1769 [EditorBrowsable(EditorBrowsableState.Never)]
1770 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1771 public static BindableProperty SizeScalePolicyProperty = null;
1773 public static readonly BindableProperty SizeScalePolicyProperty = null;
1775 internal static void SetInternalSizeScalePolicyProperty(BindableObject bindable, object oldValue, object newValue)
1777 var view = (View)bindable;
1778 string valueToString = "";
1779 if (newValue != null)
1781 valueToString = ((SizeScalePolicyType)newValue).GetDescription();
1783 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.SizeScalePolicy, valueToString);
1786 internal static object GetInternalSizeScalePolicyProperty(BindableObject bindable)
1788 var view = (View)bindable;
1790 return (SizeScalePolicyType)Object.InternalGetPropertyInt(view.SwigCPtr, View.Property.SizeScalePolicy);
1794 /// WidthForHeightProperty
1796 [EditorBrowsable(EditorBrowsableState.Never)]
1797 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1798 public static BindableProperty WidthForHeightProperty = null;
1800 public static readonly BindableProperty WidthForHeightProperty = null;
1802 internal static void SetInternalWidthForHeightProperty(BindableObject bindable, object oldValue, object newValue)
1804 var view = (View)bindable;
1805 if (newValue != null)
1807 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.WidthForHeight, (bool)newValue);
1810 internal static object GetInternalWidthForHeightProperty(BindableObject bindable)
1812 var view = (View)bindable;
1814 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.WidthForHeight);
1818 /// HeightForWidthProperty
1820 [EditorBrowsable(EditorBrowsableState.Never)]
1821 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1822 public static BindableProperty HeightForWidthProperty = null;
1824 public static readonly BindableProperty HeightForWidthProperty = null;
1826 internal static void SetInternalHeightForWidthProperty(BindableObject bindable, object oldValue, object newValue)
1828 var view = (View)bindable;
1829 if (newValue != null)
1832 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.HeightForWidth, (bool)newValue);
1835 internal static object GetInternalHeightForWidthProperty(BindableObject bindable)
1837 var view = (View)bindable;
1839 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.HeightForWidth);
1845 [EditorBrowsable(EditorBrowsableState.Never)]
1846 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1847 public static BindableProperty PaddingProperty = null;
1849 public static readonly BindableProperty PaddingProperty = null;
1851 internal static void SetInternalPaddingProperty(BindableObject bindable, object oldValue, object newValue)
1853 var view = (View)bindable;
1854 if (newValue != null)
1856 if (view.Layout != null)
1858 view.Layout.Padding = new Extents((Extents)newValue);
1859 if ((view.Padding.Start != 0) || (view.Padding.End != 0) || (view.Padding.Top != 0) || (view.Padding.Bottom != 0))
1861 var tmp = new PropertyValue(new Extents(0, 0, 0, 0));
1862 Object.SetProperty(view.SwigCPtr, Property.PADDING, tmp);
1865 view.Layout.RequestLayout();
1869 var tmp = new PropertyValue((Extents)newValue);
1870 Object.SetProperty(view.SwigCPtr, Property.PADDING, tmp);
1875 internal static object GetInternalPaddingProperty(BindableObject bindable)
1877 var view = (View)bindable;
1878 if ((view.internalPadding == null) || (view.Layout != null))
1880 ushort start = 0, end = 0, top = 0, bottom = 0;
1881 if (view.Layout != null)
1883 if (view.Layout.Padding != null)
1885 start = view.Layout.Padding.Start;
1886 end = view.Layout.Padding.End;
1887 top = view.Layout.Padding.Top;
1888 bottom = view.Layout.Padding.Bottom;
1891 view.internalPadding = new Extents(view.OnPaddingChanged, start, end, top, bottom);
1894 if (view.Layout == null)
1896 var tmp = Object.GetProperty(view.SwigCPtr, Property.PADDING);
1897 tmp?.Get(view.internalPadding);
1901 return view.internalPadding;
1907 [EditorBrowsable(EditorBrowsableState.Never)]
1908 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1909 public static BindableProperty SizeProperty = null;
1911 public static readonly BindableProperty SizeProperty = null;
1913 internal static void SetInternalSizeProperty(BindableObject bindable, object oldValue, object newValue)
1915 var view = (View)bindable;
1916 if (newValue != null)
1918 // Size property setter is only used by user.
1919 // Framework code uses SetSize() instead of Size property setter.
1920 // Size set by user is returned by GetUserSize2D() for SuggestedMinimumWidth/Height.
1921 // SuggestedMinimumWidth/Height is used by Layout calculation.
1922 float width = ((Size)newValue).Width;
1923 float height = ((Size)newValue).Height;
1924 float depth = ((Size)newValue).Depth;
1926 view.userSizeWidth = width;
1927 view.userSizeHeight = height;
1929 // Set Specification so when layouts measure this View it matches the value set here.
1930 // All Views are currently Layouts.
1931 int widthPolicy = (int)System.Math.Ceiling(width);
1932 int heightPolicy = (int)System.Math.Ceiling(height);
1934 bool relayoutRequired = false;
1935 // To avoid duplicated size setup, change internal policy directly.
1936 if (view.widthPolicy != widthPolicy)
1938 view.widthPolicy = widthPolicy;
1939 relayoutRequired = true;
1941 if (view.heightPolicy != heightPolicy)
1943 view.heightPolicy = heightPolicy;
1944 relayoutRequired = true;
1946 if (relayoutRequired)
1948 view.layout?.RequestLayout();
1951 view.SetSize(width, height, depth);
1954 internal static object GetInternalSizeProperty(BindableObject bindable)
1956 var view = (View)bindable;
1958 if (view.internalSize == null)
1960 view.internalSize = new Size(view.OnSizeChanged, 0, 0, 0);
1962 Object.InternalRetrievingPropertyVector3(view.SwigCPtr, View.Property.SIZE, view.internalSize.SwigCPtr);
1964 return view.internalSize;
1968 /// MinimumSizeProperty
1970 [EditorBrowsable(EditorBrowsableState.Never)]
1971 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1972 public static BindableProperty MinimumSizeProperty = null;
1974 public static readonly BindableProperty MinimumSizeProperty = null;
1976 internal static void SetInternalMinimumSizeProperty(BindableObject bindable, object oldValue, object newValue)
1978 var view = (View)bindable;
1979 if (newValue != null)
1982 Object.InternalSetPropertyVector2(view.SwigCPtr, View.Property.MinimumSize, ((Size2D)newValue).SwigCPtr);
1985 internal static object GetInternalMinimumSizeProperty(BindableObject bindable)
1988 var view = (View)bindable;
1989 if (view.internalMinimumSize == null)
1991 view.internalMinimumSize = new Size2D(view.OnMinimumSizeChanged, 0, 0);
1993 Object.InternalRetrievingPropertyVector2(view.SwigCPtr, View.Property.MinimumSize, view.internalMinimumSize.SwigCPtr);
1994 return view.internalMinimumSize;
1998 /// MaximumSizeProperty
2000 [EditorBrowsable(EditorBrowsableState.Never)]
2001 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2002 public static BindableProperty MaximumSizeProperty = null;
2004 public static readonly BindableProperty MaximumSizeProperty = null;
2006 internal static void SetInternalMaximumSizeProperty(BindableObject bindable, object oldValue, object newValue)
2008 var view = (View)bindable;
2009 if (newValue != null)
2012 Object.InternalSetPropertyVector2(view.SwigCPtr, View.Property.MaximumSize, ((Size2D)newValue).SwigCPtr);
2015 internal static object GetInternalMaximumSizeProperty(BindableObject bindable)
2017 var view = (View)bindable;
2019 if (view.internalMaximumSize == null)
2021 view.internalMaximumSize = new Size2D(view.OnMaximumSizeChanged, 0, 0);
2023 Object.InternalRetrievingPropertyVector2(view.SwigCPtr, View.Property.MaximumSize, view.internalMaximumSize.SwigCPtr);
2024 return view.internalMaximumSize;
2028 /// InheritPositionProperty
2030 [EditorBrowsable(EditorBrowsableState.Never)]
2031 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2032 public static BindableProperty InheritPositionProperty = null;
2034 public static readonly BindableProperty InheritPositionProperty = null;
2036 internal static void SetInternalInheritPositionProperty(BindableObject bindable, object oldValue, object newValue)
2038 var view = (View)bindable;
2039 if (newValue != null)
2041 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.InheritPosition, (bool)newValue);
2044 internal static object GetInternalInheritPositionProperty(BindableObject bindable)
2046 var view = (View)bindable;
2048 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.InheritPosition);
2052 /// ClippingModeProperty
2054 [EditorBrowsable(EditorBrowsableState.Never)]
2055 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2056 public static BindableProperty ClippingModeProperty = null;
2058 public static readonly BindableProperty ClippingModeProperty = null;
2060 internal static void SetInternalClippingModeProperty(BindableObject bindable, object oldValue, object newValue)
2062 var view = (View)bindable;
2063 if (newValue != null)
2066 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.ClippingMode, (int)newValue);
2069 internal static object GetInternalClippingModeProperty(BindableObject bindable)
2071 var view = (View)bindable;
2073 return (ClippingModeType)Object.InternalGetPropertyInt(view.SwigCPtr, View.Property.ClippingMode);
2077 /// InheritLayoutDirectionProperty
2079 [EditorBrowsable(EditorBrowsableState.Never)]
2080 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2081 public static BindableProperty InheritLayoutDirectionProperty = null;
2083 public static readonly BindableProperty InheritLayoutDirectionProperty = null;
2085 internal static void SetInternalInheritLayoutDirectionProperty(BindableObject bindable, object oldValue, object newValue)
2087 var view = (View)bindable;
2088 if (newValue != null)
2091 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.InheritLayoutDirection, (bool)newValue);
2094 internal static object GetInternalInheritLayoutDirectionProperty(BindableObject bindable)
2096 var view = (View)bindable;
2098 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.InheritLayoutDirection);
2102 /// LayoutDirectionProperty
2104 [EditorBrowsable(EditorBrowsableState.Never)]
2105 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2106 public static BindableProperty LayoutDirectionProperty = null;
2108 public static readonly BindableProperty LayoutDirectionProperty = null;
2110 internal static void SetInternalLayoutDirectionProperty(BindableObject bindable, object oldValue, object newValue)
2112 var view = (View)bindable;
2113 if (newValue != null)
2116 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.LayoutDirection, (int)newValue);
2119 internal static object GetInternalLayoutDirectionProperty(BindableObject bindable)
2121 var view = (View)bindable;
2123 return (ViewLayoutDirectionType)Object.InternalGetPropertyInt(view.SwigCPtr, View.Property.LayoutDirection);
2129 [EditorBrowsable(EditorBrowsableState.Never)]
2130 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2131 public static BindableProperty MarginProperty = null;
2133 public static readonly BindableProperty MarginProperty = null;
2135 internal static void SetInternalMarginProperty(BindableObject bindable, object oldValue, object newValue)
2137 var view = (View)bindable;
2138 if (newValue != null)
2140 if (view.Layout != null)
2142 view.Layout.Margin = new Extents((Extents)newValue);
2143 if ((view.Margin.Start != 0) || (view.Margin.End != 0) || (view.Margin.Top != 0) || (view.Margin.Bottom != 0))
2145 var tmp = new PropertyValue(new Extents(0, 0, 0, 0));
2146 Object.SetProperty(view.SwigCPtr, Property.MARGIN, tmp);
2149 view.Layout.RequestLayout();
2153 var tmp = new PropertyValue((Extents)newValue);
2154 Object.SetProperty(view.SwigCPtr, Property.MARGIN, tmp);
2159 internal static object GetInternalMarginProperty(BindableObject bindable)
2161 var view = (View)bindable;
2162 if ((view.internalMargin == null) || (view.Layout != null))
2164 ushort start = 0, end = 0, top = 0, bottom = 0;
2165 if (view.Layout != null)
2167 if (view.Layout.Margin != null)
2169 start = view.Layout.Margin.Start;
2170 end = view.Layout.Margin.End;
2171 top = view.Layout.Margin.Top;
2172 bottom = view.Layout.Margin.Bottom;
2175 view.internalMargin = new Extents(view.OnMarginChanged, start, end, top, bottom);
2178 if (view.Layout == null)
2181 var tmp = Object.GetProperty(view.SwigCPtr, Property.MARGIN);
2182 tmp?.Get(view.internalMargin);
2186 return view.internalMargin;
2190 /// UpdateAreaHintProperty
2192 [EditorBrowsable(EditorBrowsableState.Never)]
2193 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2194 public static BindableProperty UpdateAreaHintProperty = null;
2196 public static readonly BindableProperty UpdateAreaHintProperty = null;
2198 internal static void SetInternalUpdateAreaHintProperty(BindableObject bindable, object oldValue, object newValue)
2200 var view = (View)bindable;
2201 if (newValue != null)
2204 Object.InternalSetPropertyVector4(view.SwigCPtr, Interop.ActorProperty.UpdateAreaHintGet(), ((Vector4)newValue).SwigCPtr);
2207 internal static object GetInternalUpdateAreaHintProperty(BindableObject bindable)
2209 var view = (View)bindable;
2210 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
2212 Object.InternalRetrievingPropertyVector4(view.SwigCPtr, Interop.ActorProperty.UpdateAreaHintGet(), temp.SwigCPtr);
2217 /// ImageShadow Property
2219 [EditorBrowsable(EditorBrowsableState.Never)]
2220 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2221 public static BindableProperty ImageShadowProperty = null;
2223 public static readonly BindableProperty ImageShadowProperty = null;
2225 internal static void SetInternalImageShadowProperty(BindableObject bindable, object oldValue, object newValue)
2227 var view = (View)bindable;
2229 view.themeData?.selectorData?.ClearShadow(view);
2231 if (newValue is Selector<ImageShadow> selector)
2233 if (selector.HasAll()) view.SetShadow(selector.All);
2234 else view.EnsureSelectorData().ImageShadow = new TriggerableSelector<ImageShadow>(view, selector, view.SetShadow, true);
2238 view.SetShadow((ImageShadow)newValue);
2241 internal static object GetInternalImageShadowProperty(BindableObject bindable)
2243 var view = (View)bindable;
2245 // Sync as current properties
2246 view.UpdateBackgroundExtraData();
2248 PropertyMap map = new PropertyMap();
2249 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SHADOW).Get(map);
2251 var shadow = new ImageShadow(map);
2252 return shadow.IsEmpty() ? null : shadow;
2258 [EditorBrowsable(EditorBrowsableState.Never)]
2259 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2260 public static BindableProperty BoxShadowProperty = null;
2262 public static readonly BindableProperty BoxShadowProperty = null;
2264 internal static void SetInternalBoxShadowProperty(BindableObject bindable, object oldValue, object newValue)
2266 var view = (View)bindable;
2268 view.themeData?.selectorData?.ClearShadow(view);
2270 if (newValue is Selector<Shadow> selector)
2272 if (selector.HasAll()) view.SetShadow(selector.All);
2273 else view.EnsureSelectorData().BoxShadow = new TriggerableSelector<Shadow>(view, selector, view.SetShadow, true);
2277 view.SetShadow((Shadow)newValue);
2280 internal static object GetInternalBoxShadowProperty(BindableObject bindable)
2282 var view = (View)bindable;
2284 // Sync as current properties
2285 view.UpdateBackgroundExtraData();
2287 PropertyMap map = new PropertyMap();
2288 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SHADOW).Get(map);
2290 var shadow = new Shadow(map);
2291 return shadow.IsEmpty() ? null : shadow;
2295 /// CornerRadius Property
2297 [EditorBrowsable(EditorBrowsableState.Never)]
2298 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2299 public static BindableProperty CornerRadiusProperty = null;
2301 public static readonly BindableProperty CornerRadiusProperty = null;
2303 internal static void SetInternalCornerRadiusProperty(BindableObject bindable, object oldValue, object newValue)
2305 var view = (View)bindable;
2306 (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).CornerRadius = (Vector4)newValue;
2307 view.UpdateBackgroundExtraData(BackgroundExtraDataUpdatedFlag.CornerRadius);
2309 internal static object GetInternalCornerRadiusProperty(BindableObject bindable)
2311 var view = (View)bindable;
2312 return view.backgroundExtraData == null ? 0.0f : view.backgroundExtraData.CornerRadius;
2316 /// CornerRadiusPolicy Property
2318 [EditorBrowsable(EditorBrowsableState.Never)]
2319 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2320 public static BindableProperty CornerRadiusPolicyProperty = null;
2322 public static readonly BindableProperty CornerRadiusPolicyProperty = null;
2324 internal static void SetInternalCornerRadiusPolicyProperty(BindableObject bindable, object oldValue, object newValue)
2326 var view = (View)bindable;
2327 (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).CornerRadiusPolicy = (VisualTransformPolicyType)newValue;
2329 if (view.backgroundExtraData.CornerRadius != null)
2331 view.UpdateBackgroundExtraData(BackgroundExtraDataUpdatedFlag.CornerRadius);
2334 internal static object GetInternalCornerRadiusPolicyProperty(BindableObject bindable)
2336 var view = (View)bindable;
2337 return view.backgroundExtraData == null ? VisualTransformPolicyType.Absolute : view.backgroundExtraData.CornerRadiusPolicy;
2341 /// BorderlineWidth Property
2343 [EditorBrowsable(EditorBrowsableState.Never)]
2344 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2345 public static BindableProperty BorderlineWidthProperty = null;
2347 public static readonly BindableProperty BorderlineWidthProperty = null;
2349 internal static void SetInternalBorderlineWidthProperty(BindableObject bindable, object oldValue, object newValue)
2351 var view = (View)bindable;
2352 (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).BorderlineWidth = (float)newValue;
2353 view.UpdateBackgroundExtraData(BackgroundExtraDataUpdatedFlag.Borderline);
2355 internal static object GetInternalBorderlineWidthProperty(BindableObject bindable)
2357 var view = (View)bindable;
2358 return view.backgroundExtraData == null ? 0.0f : view.backgroundExtraData.BorderlineWidth;
2362 /// BorderlineColor Property
2364 [EditorBrowsable(EditorBrowsableState.Never)]
2365 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2366 public static BindableProperty BorderlineColorProperty = null;
2368 public static readonly BindableProperty BorderlineColorProperty = null;
2370 internal static void SetInternalBorderlineColorProperty(BindableObject bindable, object oldValue, object newValue)
2372 var view = (View)bindable;
2374 view.themeData?.selectorData?.BorderlineColor?.Reset(view);
2376 if (newValue is Selector<Color> selector)
2378 if (selector.HasAll()) view.SetBorderlineColor(selector.All);
2379 else view.EnsureSelectorData().BorderlineColor = new TriggerableSelector<Color>(view, selector, view.SetBorderlineColor, true);
2383 view.SetBorderlineColor((Color)newValue);
2386 internal static object GetInternalBorderlineColorProperty(BindableObject bindable)
2388 var view = (View)bindable;
2389 return view.backgroundExtraData == null ? Color.Black : view.backgroundExtraData.BorderlineColor;
2393 /// BorderlineColorSelector Property
2394 /// Like BackgroundColor, color selector typed BorderlineColor should be used in ViewStyle only.
2395 /// So this API is internally used only.
2397 [EditorBrowsable(EditorBrowsableState.Never)]
2398 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2399 public static BindableProperty BorderlineColorSelectorProperty = null;
2401 public static readonly BindableProperty BorderlineColorSelectorProperty = null;
2403 internal static void SetInternalBorderlineColorSelectorProperty(BindableObject bindable, object oldValue, object newValue)
2405 var view = (View)bindable;
2407 view.themeData?.selectorData?.BorderlineColor?.Reset(view);
2409 if (newValue is Selector<Color> selector)
2411 if (selector.HasAll()) view.SetBorderlineColor(selector.All);
2412 else view.EnsureSelectorData().BorderlineColor = new TriggerableSelector<Color>(view, selector, view.SetBorderlineColor, true);
2416 view.SetBorderlineColor((Color)newValue);
2419 internal static object GetInternalBorderlineColorSelectorProperty(BindableObject bindable)
2421 var view = (View)bindable;
2422 var selector = view.themeData?.selectorData?.BorderlineColor?.Get();
2423 return (null != selector) ? selector : new Selector<Color>();
2427 /// BorderlineOffset Property
2429 [EditorBrowsable(EditorBrowsableState.Never)]
2430 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2431 public static BindableProperty BorderlineOffsetProperty = null;
2433 public static readonly BindableProperty BorderlineOffsetProperty = null;
2435 internal static void SetInternalBorderlineOffsetProperty(BindableObject bindable, object oldValue, object newValue)
2437 var view = (View)bindable;
2438 (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).BorderlineOffset = (float)newValue;
2439 view.UpdateBackgroundExtraData(BackgroundExtraDataUpdatedFlag.Borderline);
2441 internal static object GetInternalBorderlineOffsetProperty(BindableObject bindable)
2443 var view = (View)bindable;
2444 return view.backgroundExtraData == null ? 0.0f : view.backgroundExtraData.BorderlineOffset;
2448 /// EnableControlState property
2450 [EditorBrowsable(EditorBrowsableState.Never)]
2451 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2452 public static BindableProperty EnableControlStateProperty = null;
2454 public static readonly BindableProperty EnableControlStateProperty = null;
2456 internal static void SetInternalEnableControlStateProperty(BindableObject bindable, object oldValue, object newValue)
2458 var view = (View)bindable;
2459 bool prev = view.enableControlState;
2460 view.enableControlState = (bool)newValue;
2462 if (prev != view.enableControlState)
2466 view.TouchEvent -= view.EmptyOnTouch;
2470 view.TouchEvent += view.EmptyOnTouch;
2474 internal static object GetInternalEnableControlStateProperty(BindableObject bindable)
2476 return ((View)bindable).enableControlState;
2480 /// ThemeChangeSensitive property
2482 [EditorBrowsable(EditorBrowsableState.Never)]
2483 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2484 public static BindableProperty ThemeChangeSensitiveProperty = null;
2486 public static readonly BindableProperty ThemeChangeSensitiveProperty = null;
2488 internal static void SetInternalThemeChangeSensitiveProperty(BindableObject bindable, object oldValue, object newValue)
2490 var view = (View)bindable;
2492 if (view.ThemeChangeSensitive == (bool)newValue) return;
2494 if (view.themeData == null) view.themeData = new ThemeData();
2496 view.themeData.ThemeChangeSensitive = (bool)newValue;
2498 if (view.themeData.ThemeChangeSensitive && !view.themeData.ListeningThemeChangeEvent)
2500 view.themeData.ListeningThemeChangeEvent = true;
2501 ThemeManager.ThemeChangedInternal.Add(view.OnThemeChanged);
2503 else if (!view.themeData.ThemeChangeSensitive && view.themeData.ListeningThemeChangeEvent)
2505 view.themeData.ListeningThemeChangeEvent = false;
2506 ThemeManager.ThemeChangedInternal.Remove(view.OnThemeChanged);
2509 internal static object GetInternalThemeChangeSensitiveProperty(BindableObject bindable)
2511 return ((View)bindable).themeData?.ThemeChangeSensitive ?? ThemeManager.ApplicationThemeChangeSensitive;
2515 /// AccessibilityNameProperty
2517 [EditorBrowsable(EditorBrowsableState.Never)]
2518 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2519 public static BindableProperty AccessibilityNameProperty = null;
2521 public static readonly BindableProperty AccessibilityNameProperty = null;
2523 internal static void SetInternalAccessibilityNameProperty(BindableObject bindable, object oldValue, object newValue)
2525 var view = (View)bindable;
2526 if (newValue != null)
2528 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.AccessibilityName, (string)newValue);
2531 internal static object GetInternalAccessibilityNameProperty(BindableObject bindable)
2533 var view = (View)bindable;
2534 return Object.InternalGetPropertyString(view.SwigCPtr, View.Property.AccessibilityName);
2538 /// AccessibilityDescriptionProperty
2540 [EditorBrowsable(EditorBrowsableState.Never)]
2541 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2542 public static BindableProperty AccessibilityDescriptionProperty = null;
2544 public static readonly BindableProperty AccessibilityDescriptionProperty = null;
2546 internal static void SetInternalAccessibilityDescriptionProperty(BindableObject bindable, object oldValue, object newValue)
2548 var view = (View)bindable;
2549 if (newValue != null)
2552 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.AccessibilityDescription, (string)newValue);
2555 internal static object GetInternalAccessibilityDescriptionProperty(BindableObject bindable)
2557 var view = (View)bindable;
2559 return Object.InternalGetPropertyString(view.SwigCPtr, View.Property.AccessibilityDescription);
2563 /// AccessibilityTranslationDomainProperty
2565 [EditorBrowsable(EditorBrowsableState.Never)]
2566 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2567 public static BindableProperty AccessibilityTranslationDomainProperty = null;
2569 public static readonly BindableProperty AccessibilityTranslationDomainProperty = null;
2571 internal static void SetInternalAccessibilityTranslationDomainProperty(BindableObject bindable, object oldValue, object newValue)
2573 var view = (View)bindable;
2574 if (newValue != null)
2577 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.AccessibilityTranslationDomain, (string)newValue);
2580 internal static object GetInternalAccessibilityTranslationDomainProperty(BindableObject bindable)
2582 var view = (View)bindable;
2584 return Object.InternalGetPropertyString(view.SwigCPtr, View.Property.AccessibilityTranslationDomain);
2588 /// AccessibilityRoleProperty
2590 [EditorBrowsable(EditorBrowsableState.Never)]
2591 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2592 public static BindableProperty AccessibilityRoleProperty = null;
2594 public static readonly BindableProperty AccessibilityRoleProperty = null;
2596 internal static void SetInternalAccessibilityRoleProperty(BindableObject bindable, object oldValue, object newValue)
2598 var view = (View)bindable;
2599 if (newValue != null)
2602 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.AccessibilityRole, (int)newValue);
2605 internal static object GetInternalAccessibilityRoleProperty(BindableObject bindable)
2607 var view = (View)bindable;
2609 return (Role)Object.InternalGetPropertyInt(view.SwigCPtr, View.Property.AccessibilityRole);
2613 /// AccessibilityHighlightableProperty
2615 [EditorBrowsable(EditorBrowsableState.Never)]
2616 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2617 public static BindableProperty AccessibilityHighlightableProperty = null;
2619 public static readonly BindableProperty AccessibilityHighlightableProperty = null;
2621 internal static void SetInternalAccessibilityHighlightableProperty(BindableObject bindable, object oldValue, object newValue)
2623 var view = (View)bindable;
2624 if (newValue != null)
2627 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.AccessibilityHighlightable, (bool)newValue);
2630 internal static object GetInternalAccessibilityHighlightableProperty(BindableObject bindable)
2632 var view = (View)bindable;
2634 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.AccessibilityHighlightable);
2638 /// AccessibilityHiddenProperty
2640 [EditorBrowsable(EditorBrowsableState.Never)]
2641 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2642 public static BindableProperty AccessibilityHiddenProperty = null;
2644 public static readonly BindableProperty AccessibilityHiddenProperty = null;
2646 internal static void SetInternalAccessibilityHiddenProperty(BindableObject bindable, object oldValue, object newValue)
2648 var view = (View)bindable;
2649 if (newValue != null)
2652 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.AccessibilityHidden, (bool)newValue);
2655 internal static object GetInternalAccessibilityHiddenProperty(BindableObject bindable)
2657 var view = (View)bindable;
2659 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.AccessibilityHidden);
2663 /// ExcludeLayoutingProperty
2665 [EditorBrowsable(EditorBrowsableState.Never)]
2666 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2667 public static BindableProperty ExcludeLayoutingProperty = null;
2669 public static readonly BindableProperty ExcludeLayoutingProperty = null;
2671 internal static void SetInternalExcludeLayoutingProperty(BindableObject bindable, object oldValue, object newValue)
2673 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2674 if (newValue != null)
2676 instance.InternalExcludeLayouting = (bool)newValue;
2679 internal static object GetInternalExcludeLayoutingProperty(BindableObject bindable)
2681 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2682 return instance.InternalExcludeLayouting;
2686 /// TooltipTextProperty
2688 [EditorBrowsable(EditorBrowsableState.Never)]
2689 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2690 public static BindableProperty TooltipTextProperty = null;
2692 public static readonly BindableProperty TooltipTextProperty = null;
2694 internal static void SetInternalTooltipTextProperty(BindableObject bindable, object oldValue, object newValue)
2696 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2697 if (newValue != null)
2699 instance.InternalTooltipText = (string)newValue;
2702 internal static object GetInternalTooltipTextProperty(BindableObject bindable)
2704 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2705 return instance.InternalTooltipText;
2709 /// PositionUsesAnchorPointProperty
2711 [EditorBrowsable(EditorBrowsableState.Never)]
2712 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2713 public static BindableProperty PositionUsesAnchorPointProperty = null;
2715 public static readonly BindableProperty PositionUsesAnchorPointProperty = null;
2717 internal static void SetInternalPositionUsesAnchorPointProperty(BindableObject bindable, object oldValue, object newValue)
2719 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2720 if (newValue != null)
2722 instance.InternalPositionUsesAnchorPoint = (bool)newValue;
2725 internal static object GetInternalPositionUsesAnchorPointProperty(BindableObject bindable)
2727 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2728 return instance.InternalPositionUsesAnchorPoint;
2732 /// AnchorPointProperty
2734 [EditorBrowsable(EditorBrowsableState.Never)]
2735 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2736 public static BindableProperty AnchorPointProperty = null;
2738 public static readonly BindableProperty AnchorPointProperty = null;
2740 internal static void SetInternalAnchorPointProperty(BindableObject bindable, object oldValue, object newValue)
2742 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2743 if (newValue != null)
2745 instance.InternalAnchorPoint = (Tizen.NUI.Position)newValue;
2748 internal static object GetInternalAnchorPointProperty(BindableObject bindable)
2750 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2751 return instance.InternalAnchorPoint;
2755 /// WidthSpecificationProperty
2757 [EditorBrowsable(EditorBrowsableState.Never)]
2758 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2759 public static BindableProperty WidthSpecificationProperty = null;
2761 public static readonly BindableProperty WidthSpecificationProperty = null;
2763 internal static void SetInternalWidthSpecificationProperty(BindableObject bindable, object oldValue, object newValue)
2765 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2766 if (newValue != null)
2768 instance.InternalWidthSpecification = (int)newValue;
2771 internal static object GetInternalWidthSpecificationProperty(BindableObject bindable)
2773 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2774 return instance.InternalWidthSpecification;
2778 /// HeightSpecificationProperty
2780 [EditorBrowsable(EditorBrowsableState.Never)]
2781 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2782 public static BindableProperty HeightSpecificationProperty = null;
2784 public static readonly BindableProperty HeightSpecificationProperty = null;
2786 internal static void SetInternalHeightSpecificationProperty(BindableObject bindable, object oldValue, object newValue)
2788 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2789 if (newValue != null)
2791 instance.InternalHeightSpecification = (int)newValue;
2794 internal static object GetInternalHeightSpecificationProperty(BindableObject bindable)
2796 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2797 return instance.InternalHeightSpecification;
2801 /// LayoutTransitionProperty
2803 [EditorBrowsable(EditorBrowsableState.Never)]
2804 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2805 public static BindableProperty LayoutTransitionProperty = null;
2807 public static readonly BindableProperty LayoutTransitionProperty = null;
2809 internal static void SetInternalLayoutTransitionProperty(BindableObject bindable, object oldValue, object newValue)
2811 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2812 if (newValue != null)
2814 instance.InternalLayoutTransition = (Tizen.NUI.LayoutTransition)newValue;
2817 internal static object GetInternalLayoutTransitionProperty(BindableObject bindable)
2819 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2820 return instance.InternalLayoutTransition;
2824 /// PaddingEXProperty
2826 [EditorBrowsable(EditorBrowsableState.Never)]
2827 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2828 public static BindableProperty PaddingEXProperty = null;
2830 public static readonly BindableProperty PaddingEXProperty = null;
2832 internal static void SetInternalPaddingEXProperty(BindableObject bindable, object oldValue, object newValue)
2834 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2835 if (newValue != null)
2837 instance.InternalPaddingEX = (Tizen.NUI.Extents)newValue;
2840 internal static object GetInternalPaddingEXProperty(BindableObject bindable)
2842 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2843 return instance.InternalPaddingEX;
2849 [EditorBrowsable(EditorBrowsableState.Never)]
2850 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2851 public static BindableProperty LayoutProperty = null;
2853 public static readonly BindableProperty LayoutProperty = null;
2855 internal static void SetInternalLayoutProperty(BindableObject bindable, object oldValue, object newValue)
2857 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2858 if (newValue != null)
2860 instance.InternalLayout = (Tizen.NUI.LayoutItem)newValue;
2863 internal static object GetInternalLayoutProperty(BindableObject bindable)
2865 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2866 return instance.InternalLayout;
2870 /// BackgroundImageSynchronosLoadingProperty
2872 [EditorBrowsable(EditorBrowsableState.Never)]
2873 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2874 public static BindableProperty BackgroundImageSynchronosLoadingProperty = null;
2876 public static readonly BindableProperty BackgroundImageSynchronosLoadingProperty = null;
2878 internal static void SetInternalBackgroundImageSynchronosLoadingProperty(BindableObject bindable, object oldValue, object newValue)
2880 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2881 if (newValue != null)
2883 instance.InternalBackgroundImageSynchronosLoading = (bool)newValue;
2886 internal static object GetInternalBackgroundImageSynchronosLoadingProperty(BindableObject bindable)
2888 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2889 return instance.InternalBackgroundImageSynchronosLoading;
2893 /// BackgroundImageSynchronousLoadingProperty
2895 [EditorBrowsable(EditorBrowsableState.Never)]
2896 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2897 public static BindableProperty BackgroundImageSynchronousLoadingProperty = null;
2899 public static readonly BindableProperty BackgroundImageSynchronousLoadingProperty = null;
2901 internal static void SetInternalBackgroundImageSynchronousLoadingProperty(BindableObject bindable, object oldValue, object newValue)
2903 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2904 if (newValue != null)
2906 instance.InternalBackgroundImageSynchronousLoading = (bool)newValue;
2909 internal static object GetInternalBackgroundImageSynchronousLoadingProperty(BindableObject bindable)
2911 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2912 return instance.InternalBackgroundImageSynchronousLoading;
2916 /// EnableControlStatePropagationProperty
2918 [EditorBrowsable(EditorBrowsableState.Never)]
2919 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2920 public static BindableProperty EnableControlStatePropagationProperty = null;
2922 public static readonly BindableProperty EnableControlStatePropagationProperty = null;
2924 internal static void SetInternalEnableControlStatePropagationProperty(BindableObject bindable, object oldValue, object newValue)
2926 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2927 if (newValue != null)
2929 instance.InternalEnableControlStatePropagation = (bool)newValue;
2932 internal static object GetInternalEnableControlStatePropagationProperty(BindableObject bindable)
2934 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2935 return instance.InternalEnableControlStatePropagation;
2939 /// PropagatableControlStatesProperty
2941 [EditorBrowsable(EditorBrowsableState.Never)]
2942 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2943 public static BindableProperty PropagatableControlStatesProperty = null;
2945 public static readonly BindableProperty PropagatableControlStatesProperty = null;
2947 internal static void SetInternalPropagatableControlStatesProperty(BindableObject bindable, object oldValue, object newValue)
2949 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2950 if (newValue != null)
2952 instance.InternalPropagatableControlStates = (ControlState)newValue;
2955 internal static object GetInternalPropagatableControlStatesProperty(BindableObject bindable)
2957 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2958 return instance.InternalPropagatableControlStates;
2962 /// GrabTouchAfterLeaveProperty
2964 [EditorBrowsable(EditorBrowsableState.Never)]
2965 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2966 public static BindableProperty GrabTouchAfterLeaveProperty = null;
2968 public static readonly BindableProperty GrabTouchAfterLeaveProperty = null;
2970 internal static void SetInternalGrabTouchAfterLeaveProperty(BindableObject bindable, object oldValue, object newValue)
2972 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2973 if (newValue != null)
2975 instance.InternalGrabTouchAfterLeave = (bool)newValue;
2978 internal static object GetInternalGrabTouchAfterLeaveProperty(BindableObject bindable)
2980 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2981 return instance.InternalGrabTouchAfterLeave;
2985 /// AllowOnlyOwnTouchProperty
2987 [EditorBrowsable(EditorBrowsableState.Never)]
2988 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2989 public static BindableProperty AllowOnlyOwnTouchProperty = null;
2991 public static readonly BindableProperty AllowOnlyOwnTouchProperty = null;
2993 internal static void SetInternalAllowOnlyOwnTouchProperty(BindableObject bindable, object oldValue, object newValue)
2995 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2996 if (newValue != null)
2998 instance.InternalAllowOnlyOwnTouch = (bool)newValue;
3001 internal static object GetInternalAllowOnlyOwnTouchProperty(BindableObject bindable)
3003 var instance = (Tizen.NUI.BaseComponents.View)bindable;
3004 return instance.InternalAllowOnlyOwnTouch;
3008 /// BlendEquationProperty
3010 [EditorBrowsable(EditorBrowsableState.Never)]
3011 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
3012 public static BindableProperty BlendEquationProperty = null;
3014 public static readonly BindableProperty BlendEquationProperty = null;
3016 internal static void SetInternalBlendEquationProperty(BindableObject bindable, object oldValue, object newValue)
3018 var instance = (Tizen.NUI.BaseComponents.View)bindable;
3019 if (newValue != null)
3021 instance.InternalBlendEquation = (Tizen.NUI.BlendEquationType)newValue;
3024 internal static object GetInternalBlendEquationProperty(BindableObject bindable)
3026 var instance = (Tizen.NUI.BaseComponents.View)bindable;
3027 return instance.InternalBlendEquation;
3031 /// TransitionOptionsProperty
3033 [EditorBrowsable(EditorBrowsableState.Never)]
3034 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
3035 public static BindableProperty TransitionOptionsProperty = null;
3037 public static readonly BindableProperty TransitionOptionsProperty = null;
3039 internal static void SetInternalTransitionOptionsProperty(BindableObject bindable, object oldValue, object newValue)
3041 var instance = (Tizen.NUI.BaseComponents.View)bindable;
3042 if (newValue != null)
3044 instance.InternalTransitionOptions = (Tizen.NUI.TransitionOptions)newValue;
3047 internal static object GetInternalTransitionOptionsProperty(BindableObject bindable)
3049 var instance = (Tizen.NUI.BaseComponents.View)bindable;
3050 return instance.InternalTransitionOptions;
3054 /// AutomationIdProperty
3056 [EditorBrowsable(EditorBrowsableState.Never)]
3057 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
3058 public static BindableProperty AutomationIdProperty = null;
3060 public static readonly BindableProperty AutomationIdProperty = null;
3062 internal static void SetInternalAutomationIdProperty(BindableObject bindable, object oldValue, object newValue)
3064 var instance = (Tizen.NUI.BaseComponents.View)bindable;
3065 if (newValue != null)
3068 Object.InternalSetPropertyString(instance.SwigCPtr, View.Property.AutomationId, (string)newValue);
3071 internal static object GetInternalAutomationIdProperty(BindableObject bindable)
3073 var instance = (Tizen.NUI.BaseComponents.View)bindable;
3075 return Object.InternalGetPropertyString(instance.SwigCPtr, View.Property.AutomationId);
3079 /// TouchAreaOffsetProperty
3081 [EditorBrowsable(EditorBrowsableState.Never)]
3082 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
3083 public static BindableProperty TouchAreaOffsetProperty = null;
3085 public static readonly BindableProperty TouchAreaOffsetProperty = null;
3087 internal static void SetInternalTouchAreaOffsetProperty(BindableObject bindable, object oldValue, object newValue)
3089 var instance = (Tizen.NUI.BaseComponents.View)bindable;
3090 if (newValue != null)
3092 instance.InternalTouchAreaOffset = (Tizen.NUI.Offset)newValue;
3095 internal static object GetInternalTouchAreaOffsetProperty(BindableObject bindable)
3097 var instance = (Tizen.NUI.BaseComponents.View)bindable;
3098 return instance.InternalTouchAreaOffset;
3102 /// DispatchTouchMotionProperty
3104 [EditorBrowsable(EditorBrowsableState.Never)]
3105 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
3106 public static BindableProperty DispatchTouchMotionProperty = null;
3108 public static readonly BindableProperty DispatchTouchMotionProperty = null;
3110 internal static void SetInternalDispatchTouchMotionProperty(BindableObject bindable, object oldValue, object newValue)
3112 var instance = (Tizen.NUI.BaseComponents.View)bindable;
3113 if (newValue != null)
3115 instance.InternalDispatchTouchMotion = (bool)newValue;
3118 internal static object GetInternalDispatchTouchMotionProperty(BindableObject bindable)
3120 var instance = (Tizen.NUI.BaseComponents.View)bindable;
3121 return instance.InternalDispatchTouchMotion;
3125 /// DispatchHoverMotionProperty
3127 [EditorBrowsable(EditorBrowsableState.Never)]
3128 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
3129 public static BindableProperty DispatchHoverMotionProperty = null;
3131 public static readonly BindableProperty DispatchHoverMotionProperty = null;
3133 internal static void SetInternalDispatchHoverMotionProperty(BindableObject bindable, object oldValue, object newValue)
3135 var instance = (Tizen.NUI.BaseComponents.View)bindable;
3136 if (newValue != null)
3138 instance.InternalDispatchHoverMotion = (bool)newValue;
3142 internal static object GetInternalDispatchHoverMotionProperty(BindableObject bindable)
3144 var instance = (Tizen.NUI.BaseComponents.View)bindable;
3145 return instance.InternalDispatchHoverMotion;
3148 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
3149 internal static void CreateBindableProperties()
3151 if (NUIApplication.IsUsingXaml)
3153 StyleNameProperty = BindableProperty.Create(nameof(StyleName), typeof(string), typeof(View), string.Empty,
3154 propertyChanged: SetInternalStyleNameProperty, defaultValueCreator: GetInternalStyleNameProperty);
3156 KeyInputFocusProperty = BindableProperty.Create(nameof(KeyInputFocus), typeof(bool), typeof(View), false,
3157 propertyChanged: SetInternalKeyInputFocusProperty, defaultValueCreator: GetInternalKeyInputFocusProperty);
3159 BackgroundColorProperty = BindableProperty.Create(nameof(BackgroundColor), typeof(Color), typeof(View), null,
3160 propertyChanged: SetInternalBackgroundColorProperty, defaultValueCreator: GetInternalBackgroundColorProperty);
3162 ColorProperty = BindableProperty.Create(nameof(Color), typeof(Color), typeof(View), null,
3163 propertyChanged: SetInternalColorProperty, defaultValueCreator: GetInternalColorProperty);
3165 ColorRedProperty = BindableProperty.Create(nameof(ColorRed), typeof(float), typeof(View), default(float),
3166 propertyChanged: SetInternalColorRedProperty, defaultValueCreator: GetInternalColorRedProperty);
3168 ColorGreenProperty = BindableProperty.Create(nameof(ColorGreen), typeof(float), typeof(View), default(float),
3169 propertyChanged: SetInternalColorGreenProperty, defaultValueCreator: GetInternalColorGreenProperty);
3171 ColorBlueProperty = BindableProperty.Create(nameof(ColorBlue), typeof(float), typeof(View), default(float),
3172 propertyChanged: SetInternalColorBlueProperty, defaultValueCreator: GetInternalColorBlueProperty);
3174 BackgroundImageProperty = BindableProperty.Create(nameof(BackgroundImage), typeof(string), typeof(View), default(string),
3175 propertyChanged: SetInternalBackgroundImageProperty, defaultValueCreator: GetInternalBackgroundImageProperty);
3177 BackgroundImageBorderProperty = BindableProperty.Create(nameof(BackgroundImageBorder), typeof(Rectangle), typeof(View), default(Rectangle),
3178 propertyChanged: SetInternalBackgroundImageBorderProperty, defaultValueCreator: GetInternalBackgroundImageBorderProperty);
3180 BackgroundProperty = BindableProperty.Create(nameof(Background), typeof(PropertyMap), typeof(View), null,
3181 propertyChanged: SetInternalBackgroundProperty, defaultValueCreator: GetInternalBackgroundProperty);
3183 StateProperty = BindableProperty.Create(nameof(State), typeof(States), typeof(View), States.Normal,
3184 propertyChanged: SetInternalStateProperty, defaultValueCreator: GetInternalStateProperty);
3186 SubStateProperty = BindableProperty.Create(nameof(SubState), typeof(States), typeof(View), States.Normal,
3187 propertyChanged: SetInternalSubStateProperty, defaultValueCreator: GetInternalSubStateProperty);
3189 TooltipProperty = BindableProperty.Create(nameof(Tooltip), typeof(PropertyMap), typeof(View), null,
3190 propertyChanged: SetInternalTooltipProperty, defaultValueCreator: GetInternalTooltipProperty);
3192 FlexProperty = BindableProperty.Create(nameof(Flex), typeof(float), typeof(View), default(float),
3193 propertyChanged: SetInternalFlexProperty, defaultValueCreator: GetInternalFlexProperty);
3195 AlignSelfProperty = BindableProperty.Create(nameof(AlignSelf), typeof(int), typeof(View), default(int),
3196 propertyChanged: SetInternalAlignSelfProperty, defaultValueCreator: GetInternalAlignSelfProperty);
3198 FlexMarginProperty = BindableProperty.Create(nameof(FlexMargin), typeof(Vector4), typeof(View), null,
3199 propertyChanged: SetInternalFlexMarginProperty, defaultValueCreator: GetInternalFlexMarginProperty);
3201 CellIndexProperty = BindableProperty.Create(nameof(CellIndex), typeof(Vector2), typeof(View), null,
3202 propertyChanged: SetInternalCellIndexProperty, defaultValueCreator: GetInternalCellIndexProperty);
3204 RowSpanProperty = BindableProperty.Create(nameof(RowSpan), typeof(float), typeof(View), default(float),
3205 propertyChanged: SetInternalRowSpanProperty, defaultValueCreator: GetInternalRowSpanProperty);
3207 ColumnSpanProperty = BindableProperty.Create(nameof(ColumnSpan), typeof(float), typeof(View), default(float),
3208 propertyChanged: SetInternalColumnSpanProperty, defaultValueCreator: GetInternalColumnSpanProperty);
3210 CellHorizontalAlignmentProperty = BindableProperty.Create(nameof(CellHorizontalAlignment), typeof(HorizontalAlignmentType), typeof(View), HorizontalAlignmentType.Left,
3211 propertyChanged: SetInternalCellHorizontalAlignmentProperty, defaultValueCreator: GetInternalCellHorizontalAlignmentProperty);
3213 CellVerticalAlignmentProperty = BindableProperty.Create(nameof(CellVerticalAlignment), typeof(VerticalAlignmentType), typeof(View), VerticalAlignmentType.Top,
3214 propertyChanged: SetInternalCellVerticalAlignmentProperty, defaultValueCreator: GetInternalCellVerticalAlignmentProperty);
3216 WeightProperty = BindableProperty.Create(nameof(Weight), typeof(float), typeof(View), default(float),
3217 propertyChanged: SetInternalWeightProperty, defaultValueCreator: GetInternalWeightProperty);
3219 LeftFocusableViewProperty = BindableProperty.Create(nameof(View.LeftFocusableView), typeof(View), typeof(View), null,
3220 propertyChanged: SetInternalLeftFocusableViewProperty, defaultValueCreator: GetInternalLeftFocusableViewProperty);
3222 RightFocusableViewProperty = BindableProperty.Create(nameof(View.RightFocusableView), typeof(View), typeof(View), null,
3223 propertyChanged: SetInternalRightFocusableViewProperty, defaultValueCreator: GetInternalRightFocusableViewProperty);
3225 UpFocusableViewProperty = BindableProperty.Create(nameof(View.UpFocusableView), typeof(View), typeof(View), null,
3226 propertyChanged: SetInternalUpFocusableViewProperty, defaultValueCreator: GetInternalUpFocusableViewProperty);
3228 DownFocusableViewProperty = BindableProperty.Create(nameof(View.DownFocusableView), typeof(View), typeof(View), null,
3229 propertyChanged: SetInternalDownFocusableViewProperty, defaultValueCreator: GetInternalDownFocusableViewProperty);
3231 ClockwiseFocusableViewProperty = BindableProperty.Create(nameof(View.ClockwiseFocusableView), typeof(View), typeof(View), null,
3232 propertyChanged: SetInternalClockwiseFocusableViewProperty, defaultValueCreator: GetInternalClockwiseFocusableViewProperty);
3234 CounterClockwiseFocusableViewProperty = BindableProperty.Create(nameof(View.CounterClockwiseFocusableView), typeof(View), typeof(View), null,
3235 propertyChanged: SetInternalCounterClockwiseFocusableViewProperty, defaultValueCreator: GetInternalCounterClockwiseFocusableViewProperty);
3237 FocusableProperty = BindableProperty.Create(nameof(Focusable), typeof(bool), typeof(View), false,
3238 propertyChanged: SetInternalFocusableProperty, defaultValueCreator: GetInternalFocusableProperty);
3240 FocusableChildrenProperty = BindableProperty.Create(nameof(FocusableChildren), typeof(bool), typeof(View), true,
3241 propertyChanged: SetInternalFocusableChildrenProperty, defaultValueCreator: GetInternalFocusableChildrenProperty);
3243 FocusableInTouchProperty = BindableProperty.Create(nameof(FocusableInTouch), typeof(bool), typeof(View), false,
3244 propertyChanged: SetInternalFocusableInTouchProperty, defaultValueCreator: GetInternalFocusableInTouchProperty);
3246 Size2DProperty = BindableProperty.Create(nameof(Size2D), typeof(Size2D), typeof(View), null,
3247 propertyChanged: SetInternalSize2DProperty, defaultValueCreator: GetInternalSize2DProperty);
3249 OpacityProperty = BindableProperty.Create(nameof(Opacity), typeof(float), typeof(View), default(float),
3250 propertyChanged: SetInternalOpacityProperty, defaultValueCreator: GetInternalOpacityProperty);
3252 Position2DProperty = BindableProperty.Create(nameof(Position2D), typeof(Position2D), typeof(View), null,
3253 propertyChanged: SetInternalPosition2DProperty, defaultValueCreator: GetInternalPosition2DProperty);
3255 PositionUsesPivotPointProperty = BindableProperty.Create(nameof(PositionUsesPivotPoint), typeof(bool), typeof(View), true,
3256 propertyChanged: SetInternalPositionUsesPivotPointProperty, defaultValueCreator: GetInternalPositionUsesPivotPointProperty);
3258 SiblingOrderProperty = BindableProperty.Create(nameof(SiblingOrder), typeof(int), typeof(View), default(int),
3259 propertyChanged: SetInternalSiblingOrderProperty, defaultValueCreator: GetInternalSiblingOrderProperty);
3261 ParentOriginProperty = BindableProperty.Create(nameof(ParentOrigin), typeof(Position), typeof(View), null,
3262 propertyChanged: SetInternalParentOriginProperty, defaultValueCreator: GetInternalParentOriginProperty);
3264 PivotPointProperty = BindableProperty.Create(nameof(PivotPoint), typeof(Position), typeof(View), null,
3265 propertyChanged: SetInternalPivotPointProperty, defaultValueCreator: GetInternalPivotPointProperty);
3267 SizeWidthProperty = BindableProperty.Create(nameof(SizeWidth), typeof(float), typeof(View), default(float),
3268 propertyChanged: SetInternalSizeWidthProperty, defaultValueCreator: GetInternalSizeWidthProperty);
3270 SizeHeightProperty = BindableProperty.Create(nameof(SizeHeight), typeof(float), typeof(View), default(float),
3271 propertyChanged: SetInternalSizeHeightProperty, defaultValueCreator: GetInternalSizeHeightProperty);
3273 PositionProperty = BindableProperty.Create(nameof(Position), typeof(Position), typeof(View), null,
3274 propertyChanged: SetInternalPositionProperty, defaultValueCreator: GetInternalPositionProperty);
3276 PositionXProperty = BindableProperty.Create(nameof(PositionX), typeof(float), typeof(View), default(float),
3277 propertyChanged: SetInternalPositionXProperty, defaultValueCreator: GetInternalPositionXProperty);
3279 PositionYProperty = BindableProperty.Create(nameof(PositionY), typeof(float), typeof(View), default(float),
3280 propertyChanged: SetInternalPositionYProperty, defaultValueCreator: GetInternalPositionYProperty);
3282 PositionZProperty = BindableProperty.Create(nameof(PositionZ), typeof(float), typeof(View), default(float),
3283 propertyChanged: SetInternalPositionZProperty, defaultValueCreator: GetInternalPositionZProperty);
3285 OrientationProperty = BindableProperty.Create(nameof(Orientation), typeof(Rotation), typeof(View), null,
3286 propertyChanged: SetInternalOrientationProperty, defaultValueCreator: GetInternalOrientationProperty);
3288 ScaleProperty = BindableProperty.Create(nameof(Scale), typeof(Vector3), typeof(View), null,
3289 propertyChanged: SetInternalScaleProperty, defaultValueCreator: GetInternalScaleProperty);
3291 ScaleXProperty = BindableProperty.Create(nameof(ScaleX), typeof(float), typeof(View), default(float),
3292 propertyChanged: SetInternalScaleXProperty, defaultValueCreator: GetInternalScaleXProperty);
3294 ScaleYProperty = BindableProperty.Create(nameof(ScaleY), typeof(float), typeof(View), default(float),
3295 propertyChanged: SetInternalScaleYProperty, defaultValueCreator: GetInternalScaleYProperty);
3297 ScaleZProperty = BindableProperty.Create(nameof(ScaleZ), typeof(float), typeof(View), default(float),
3298 propertyChanged: SetInternalScaleZProperty, defaultValueCreator: GetInternalScaleZProperty);
3300 NameProperty = BindableProperty.Create(nameof(Name), typeof(string), typeof(View), string.Empty,
3301 propertyChanged: SetInternalNameProperty, defaultValueCreator: GetInternalNameProperty);
3303 SensitiveProperty = BindableProperty.Create(nameof(Sensitive), typeof(bool), typeof(View), false,
3304 propertyChanged: SetInternalSensitiveProperty, defaultValueCreator: GetInternalSensitiveProperty);
3306 IsEnabledProperty = BindableProperty.Create(nameof(IsEnabled), typeof(bool), typeof(View), false,
3307 propertyChanged: SetInternalIsEnabledProperty, defaultValueCreator: GetInternalIsEnabledProperty);
3309 DispatchKeyEventsProperty = BindableProperty.Create(nameof(DispatchKeyEvents), typeof(bool), typeof(View), false,
3310 propertyChanged: SetInternalDispatchKeyEventsProperty, defaultValueCreator: GetInternalDispatchKeyEventsProperty);
3312 LeaveRequiredProperty = BindableProperty.Create(nameof(LeaveRequired), typeof(bool), typeof(View), false,
3313 propertyChanged: SetInternalLeaveRequiredProperty, defaultValueCreator: GetInternalLeaveRequiredProperty);
3315 InheritOrientationProperty = BindableProperty.Create(nameof(InheritOrientation), typeof(bool), typeof(View), false,
3316 propertyChanged: SetInternalInheritOrientationProperty, defaultValueCreator: GetInternalInheritOrientationProperty);
3318 InheritScaleProperty = BindableProperty.Create(nameof(InheritScale), typeof(bool), typeof(View), false,
3319 propertyChanged: SetInternalInheritScaleProperty, defaultValueCreator: GetInternalInheritScaleProperty);
3321 DrawModeProperty = BindableProperty.Create(nameof(DrawMode), typeof(DrawModeType), typeof(View), DrawModeType.Normal,
3322 propertyChanged: SetInternalDrawModeProperty, defaultValueCreator: GetInternalDrawModeProperty);
3324 SizeModeFactorProperty = BindableProperty.Create(nameof(SizeModeFactor), typeof(Vector3), typeof(View), null,
3325 propertyChanged: SetInternalSizeModeFactorProperty, defaultValueCreator: GetInternalSizeModeFactorProperty);
3327 WidthResizePolicyProperty = BindableProperty.Create(nameof(WidthResizePolicy), typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed,
3328 propertyChanged: SetInternalWidthResizePolicyProperty, defaultValueCreator: GetInternalWidthResizePolicyProperty);
3330 HeightResizePolicyProperty = BindableProperty.Create(nameof(HeightResizePolicy), typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed,
3331 propertyChanged: SetInternalHeightResizePolicyProperty, defaultValueCreator: GetInternalHeightResizePolicyProperty);
3333 SizeScalePolicyProperty = BindableProperty.Create(nameof(SizeScalePolicy), typeof(SizeScalePolicyType), typeof(View), SizeScalePolicyType.UseSizeSet,
3334 propertyChanged: SetInternalSizeScalePolicyProperty, defaultValueCreator: GetInternalSizeScalePolicyProperty);
3336 WidthForHeightProperty = BindableProperty.Create(nameof(WidthForHeight), typeof(bool), typeof(View), false,
3337 propertyChanged: SetInternalWidthForHeightProperty, defaultValueCreator: GetInternalWidthForHeightProperty);
3339 HeightForWidthProperty = BindableProperty.Create(nameof(HeightForWidth), typeof(bool), typeof(View), false,
3340 propertyChanged: SetInternalHeightForWidthProperty, defaultValueCreator: GetInternalHeightForWidthProperty);
3342 PaddingProperty = BindableProperty.Create(nameof(Padding), typeof(Extents), typeof(View), null,
3343 propertyChanged: SetInternalPaddingProperty, defaultValueCreator: GetInternalPaddingProperty);
3345 SizeProperty = BindableProperty.Create(nameof(Size), typeof(Size), typeof(View), null,
3346 propertyChanged: SetInternalSizeProperty, defaultValueCreator: GetInternalSizeProperty);
3348 MinimumSizeProperty = BindableProperty.Create(nameof(MinimumSize), typeof(Size2D), typeof(View), null,
3349 propertyChanged: SetInternalMinimumSizeProperty, defaultValueCreator: GetInternalMinimumSizeProperty);
3351 MaximumSizeProperty = BindableProperty.Create(nameof(MaximumSize), typeof(Size2D), typeof(View), null,
3352 propertyChanged: SetInternalMaximumSizeProperty, defaultValueCreator: GetInternalMaximumSizeProperty);
3354 InheritPositionProperty = BindableProperty.Create(nameof(InheritPosition), typeof(bool), typeof(View), false,
3355 propertyChanged: SetInternalInheritPositionProperty, defaultValueCreator: GetInternalInheritPositionProperty);
3357 ClippingModeProperty = BindableProperty.Create(nameof(ClippingMode), typeof(ClippingModeType), typeof(View), ClippingModeType.Disabled,
3358 propertyChanged: SetInternalClippingModeProperty, defaultValueCreator: GetInternalClippingModeProperty);
3360 InheritLayoutDirectionProperty = BindableProperty.Create(nameof(InheritLayoutDirection), typeof(bool), typeof(View), false,
3361 propertyChanged: SetInternalInheritLayoutDirectionProperty, defaultValueCreator: GetInternalInheritLayoutDirectionProperty);
3363 LayoutDirectionProperty = BindableProperty.Create(nameof(LayoutDirection), typeof(ViewLayoutDirectionType), typeof(View), ViewLayoutDirectionType.LTR,
3364 propertyChanged: SetInternalLayoutDirectionProperty, defaultValueCreator: GetInternalLayoutDirectionProperty);
3366 MarginProperty = BindableProperty.Create(nameof(Margin), typeof(Extents), typeof(View), null,
3367 propertyChanged: SetInternalMarginProperty, defaultValueCreator: GetInternalMarginProperty);
3369 UpdateAreaHintProperty = BindableProperty.Create(nameof(UpdateAreaHint), typeof(Vector4), typeof(View), null,
3370 propertyChanged: SetInternalUpdateAreaHintProperty, defaultValueCreator: GetInternalUpdateAreaHintProperty);
3372 ImageShadowProperty = BindableProperty.Create(nameof(ImageShadow), typeof(ImageShadow), typeof(View), null,
3373 propertyChanged: SetInternalImageShadowProperty, defaultValueCreator: GetInternalImageShadowProperty);
3375 BoxShadowProperty = BindableProperty.Create(nameof(BoxShadow), typeof(Shadow), typeof(View), null,
3376 propertyChanged: SetInternalBoxShadowProperty, defaultValueCreator: GetInternalBoxShadowProperty);
3378 CornerRadiusProperty = BindableProperty.Create(nameof(CornerRadius), typeof(Vector4), typeof(View), null,
3379 propertyChanged: SetInternalCornerRadiusProperty, defaultValueCreator: GetInternalCornerRadiusProperty);
3381 CornerRadiusPolicyProperty = BindableProperty.Create(nameof(CornerRadiusPolicy), typeof(VisualTransformPolicyType), typeof(View), VisualTransformPolicyType.Absolute,
3382 propertyChanged: SetInternalCornerRadiusPolicyProperty, defaultValueCreator: GetInternalCornerRadiusPolicyProperty);
3384 BorderlineWidthProperty = BindableProperty.Create(nameof(BorderlineWidth), typeof(float), typeof(View), default(float),
3385 propertyChanged: SetInternalBorderlineWidthProperty, defaultValueCreator: GetInternalBorderlineWidthProperty);
3387 BorderlineColorProperty = BindableProperty.Create(nameof(BorderlineColor), typeof(Color), typeof(View), null,
3388 propertyChanged: SetInternalBorderlineColorProperty, defaultValueCreator: GetInternalBorderlineColorProperty);
3390 BorderlineColorSelectorProperty = BindableProperty.Create(nameof(BorderlineColorSelector), typeof(Selector<Color>), typeof(View), null,
3391 propertyChanged: SetInternalBorderlineColorSelectorProperty, defaultValueCreator: GetInternalBorderlineColorSelectorProperty);
3393 BorderlineOffsetProperty = BindableProperty.Create(nameof(BorderlineOffset), typeof(float), typeof(View), default(float),
3394 propertyChanged: SetInternalBorderlineOffsetProperty, defaultValueCreator: GetInternalBorderlineOffsetProperty);
3396 EnableControlStateProperty = BindableProperty.Create(nameof(EnableControlState), typeof(bool), typeof(View), false,
3397 propertyChanged: SetInternalEnableControlStateProperty, defaultValueCreator: GetInternalEnableControlStateProperty);
3399 ThemeChangeSensitiveProperty = BindableProperty.Create(nameof(ThemeChangeSensitive), typeof(bool), typeof(View), false,
3400 propertyChanged: SetInternalThemeChangeSensitiveProperty, defaultValueCreator: GetInternalThemeChangeSensitiveProperty);
3402 AccessibilityNameProperty = BindableProperty.Create(nameof(AccessibilityName), typeof(string), typeof(View), string.Empty,
3403 propertyChanged: SetInternalAccessibilityNameProperty, defaultValueCreator: GetInternalAccessibilityNameProperty);
3405 AccessibilityDescriptionProperty = BindableProperty.Create(nameof(AccessibilityDescription), typeof(string), typeof(View), string.Empty,
3406 propertyChanged: SetInternalAccessibilityDescriptionProperty, defaultValueCreator: GetInternalAccessibilityDescriptionProperty);
3408 AccessibilityTranslationDomainProperty = BindableProperty.Create(nameof(AccessibilityTranslationDomain), typeof(string), typeof(View), string.Empty,
3409 propertyChanged: SetInternalAccessibilityTranslationDomainProperty, defaultValueCreator: GetInternalAccessibilityTranslationDomainProperty);
3411 AccessibilityRoleProperty = BindableProperty.Create(nameof(AccessibilityRole), typeof(Role), typeof(View), default(Role),
3412 propertyChanged: SetInternalAccessibilityRoleProperty, defaultValueCreator: GetInternalAccessibilityRoleProperty);
3414 AccessibilityHighlightableProperty = BindableProperty.Create(nameof(AccessibilityHighlightable), typeof(bool), typeof(View), false,
3415 propertyChanged: SetInternalAccessibilityHighlightableProperty, defaultValueCreator: GetInternalAccessibilityHighlightableProperty);
3417 AccessibilityHiddenProperty = BindableProperty.Create(nameof(AccessibilityHidden), typeof(bool), typeof(View), false,
3418 propertyChanged: SetInternalAccessibilityHiddenProperty, defaultValueCreator: GetInternalAccessibilityHiddenProperty);
3420 ExcludeLayoutingProperty = BindableProperty.Create(nameof(ExcludeLayouting), typeof(bool), typeof(View), false,
3421 propertyChanged: SetInternalExcludeLayoutingProperty, defaultValueCreator: GetInternalExcludeLayoutingProperty);
3423 TooltipTextProperty = BindableProperty.Create(nameof(TooltipText), typeof(string), typeof(View), string.Empty,
3424 propertyChanged: SetInternalTooltipTextProperty, defaultValueCreator: GetInternalTooltipTextProperty);
3426 PositionUsesAnchorPointProperty = BindableProperty.Create(nameof(PositionUsesAnchorPoint), typeof(bool), typeof(View), false,
3427 propertyChanged: SetInternalPositionUsesAnchorPointProperty, defaultValueCreator: GetInternalPositionUsesAnchorPointProperty);
3429 AnchorPointProperty = BindableProperty.Create(nameof(AnchorPoint), typeof(Tizen.NUI.Position), typeof(View), null,
3430 propertyChanged: SetInternalAnchorPointProperty, defaultValueCreator: GetInternalAnchorPointProperty);
3432 WidthSpecificationProperty = BindableProperty.Create(nameof(WidthSpecification), typeof(int), typeof(View), 0,
3433 propertyChanged: SetInternalWidthSpecificationProperty, defaultValueCreator: GetInternalWidthSpecificationProperty);
3435 HeightSpecificationProperty = BindableProperty.Create(nameof(HeightSpecification), typeof(int), typeof(View), 0,
3436 propertyChanged: SetInternalHeightSpecificationProperty, defaultValueCreator: GetInternalHeightSpecificationProperty);
3438 LayoutTransitionProperty = BindableProperty.Create(nameof(LayoutTransition), typeof(Tizen.NUI.LayoutTransition), typeof(View), null,
3439 propertyChanged: SetInternalLayoutTransitionProperty, defaultValueCreator: GetInternalLayoutTransitionProperty);
3441 PaddingEXProperty = BindableProperty.Create(nameof(PaddingEX), typeof(Tizen.NUI.Extents), typeof(View), null,
3442 propertyChanged: SetInternalPaddingEXProperty, defaultValueCreator: GetInternalPaddingEXProperty);
3444 LayoutProperty = BindableProperty.Create(nameof(Layout), typeof(Tizen.NUI.LayoutItem), typeof(View), null,
3445 propertyChanged: SetInternalLayoutProperty, defaultValueCreator: GetInternalLayoutProperty);
3447 BackgroundImageSynchronosLoadingProperty = BindableProperty.Create(nameof(BackgroundImageSynchronosLoading), typeof(bool), typeof(View), false,
3448 propertyChanged: SetInternalBackgroundImageSynchronosLoadingProperty, defaultValueCreator: GetInternalBackgroundImageSynchronosLoadingProperty);
3450 BackgroundImageSynchronousLoadingProperty = BindableProperty.Create(nameof(BackgroundImageSynchronousLoading), typeof(bool), typeof(View), false,
3451 propertyChanged: SetInternalBackgroundImageSynchronousLoadingProperty, defaultValueCreator: GetInternalBackgroundImageSynchronousLoadingProperty);
3453 EnableControlStatePropagationProperty = BindableProperty.Create(nameof(EnableControlStatePropagation), typeof(bool), typeof(View), false,
3454 propertyChanged: SetInternalEnableControlStatePropagationProperty, defaultValueCreator: GetInternalEnableControlStatePropagationProperty);
3456 PropagatableControlStatesProperty = BindableProperty.Create(nameof(PropagatableControlStates), typeof(ControlState), typeof(View), ControlState.All,
3457 propertyChanged: SetInternalPropagatableControlStatesProperty, defaultValueCreator: GetInternalPropagatableControlStatesProperty);
3459 GrabTouchAfterLeaveProperty = BindableProperty.Create(nameof(GrabTouchAfterLeave), typeof(bool), typeof(View), false,
3460 propertyChanged: SetInternalGrabTouchAfterLeaveProperty, defaultValueCreator: GetInternalGrabTouchAfterLeaveProperty);
3462 AllowOnlyOwnTouchProperty = BindableProperty.Create(nameof(AllowOnlyOwnTouch), typeof(bool), typeof(View), false,
3463 propertyChanged: SetInternalAllowOnlyOwnTouchProperty, defaultValueCreator: GetInternalAllowOnlyOwnTouchProperty);
3465 BlendEquationProperty = BindableProperty.Create(nameof(BlendEquation), typeof(BlendEquationType), typeof(View), default(BlendEquationType),
3466 propertyChanged: SetInternalBlendEquationProperty, defaultValueCreator: GetInternalBlendEquationProperty);
3468 TransitionOptionsProperty = BindableProperty.Create(nameof(TransitionOptions), typeof(TransitionOptions), typeof(View), default(TransitionOptions),
3469 propertyChanged: SetInternalTransitionOptionsProperty, defaultValueCreator: GetInternalTransitionOptionsProperty);
3471 AutomationIdProperty = BindableProperty.Create(nameof(AutomationId), typeof(string), typeof(View), string.Empty,
3472 propertyChanged: SetInternalAutomationIdProperty, defaultValueCreator: GetInternalAutomationIdProperty);
3474 TouchAreaOffsetProperty = BindableProperty.Create(nameof(TouchAreaOffset), typeof(Offset), typeof(View), default(Offset),
3475 propertyChanged: SetInternalTouchAreaOffsetProperty, defaultValueCreator: GetInternalTouchAreaOffsetProperty);
3477 DispatchTouchMotionProperty = BindableProperty.Create(nameof(DispatchTouchMotion), typeof(bool), typeof(View), false,
3478 propertyChanged: SetInternalDispatchTouchMotionProperty, defaultValueCreator: GetInternalDispatchTouchMotionProperty);
3480 DispatchHoverMotionProperty = BindableProperty.Create(nameof(DispatchHoverMotion), typeof(bool), typeof(View), false,
3481 propertyChanged: SetInternalDispatchHoverMotionProperty, defaultValueCreator: GetInternalDispatchHoverMotionProperty);
3484 RegisterPropertyGroup(PositionProperty, positionPropertyGroup);
3485 RegisterPropertyGroup(Position2DProperty, positionPropertyGroup);
3486 RegisterPropertyGroup(PositionXProperty, positionPropertyGroup);
3487 RegisterPropertyGroup(PositionYProperty, positionPropertyGroup);
3489 RegisterPropertyGroup(SizeProperty, sizePropertyGroup);
3490 RegisterPropertyGroup(Size2DProperty, sizePropertyGroup);
3491 RegisterPropertyGroup(SizeWidthProperty, sizePropertyGroup);
3492 RegisterPropertyGroup(SizeHeightProperty, sizePropertyGroup);
3494 RegisterPropertyGroup(ScaleProperty, scalePropertyGroup);
3495 RegisterPropertyGroup(ScaleXProperty, scalePropertyGroup);
3496 RegisterPropertyGroup(ScaleYProperty, scalePropertyGroup);
3497 RegisterPropertyGroup(ScaleZProperty, scalePropertyGroup);
3501 // keep readonly for BindableProperty
3505 /// Gets View's Size2D set by user.
3507 internal Size2D GetUserSize2D()
3509 return new Size2D((int)userSizeWidth, (int)userSizeHeight);
3512 private void SetBackgroundImage(string value)
3514 if (string.IsNullOrEmpty(value))
3516 backgroundExtraDataUpdatedFlag &= ~BackgroundExtraDataUpdatedFlag.Background;
3518 backgroundImageUrl = null;
3520 var empty = new PropertyValue();
3522 Object.SetProperty(SwigCPtr, Property.BACKGROUND, empty);
3527 if (value.StartsWith("*Resource*"))
3529 string resource = Tizen.Applications.Application.Current.DirectoryInfo.Resource;
3530 value = value.Replace("*Resource*", resource);
3533 backgroundImageUrl = value;
3535 // Fast return for usual cases.
3536 if (backgroundExtraData == null && !backgroundImageSynchronousLoading)
3538 Object.InternalSetPropertyString(SwigCPtr, View.Property.BACKGROUND, value);
3542 using var map = new PropertyMap();
3543 using var url = new PropertyValue(value);
3544 using var synchronousLoading = new PropertyValue(backgroundImageSynchronousLoading);
3546 map.Add(ImageVisualProperty.URL, url)
3547 .Add(ImageVisualProperty.SynchronousLoading, synchronousLoading);
3549 if ((backgroundExtraData?.BackgroundImageBorder) != null)
3551 using var npatchType = new PropertyValue((int)Visual.Type.NPatch);
3552 using var border = new PropertyValue(backgroundExtraData.BackgroundImageBorder);
3553 map.Add(Visual.Property.Type, npatchType)
3554 .Add(NpatchImageVisualProperty.Border, border);
3558 using var imageType = new PropertyValue((int)Visual.Type.Image);
3559 map.Add(Visual.Property.Type, imageType);
3562 if(backgroundExtraData != null)
3564 using var cornerRadiusValue = backgroundExtraData.CornerRadius == null ? new PropertyValue() : new PropertyValue(backgroundExtraData.CornerRadius);
3565 using var cornerRadius = new PropertyValue(cornerRadiusValue);
3566 using var cornerRadiusPolicy = new PropertyValue((int)(backgroundExtraData.CornerRadiusPolicy));
3567 using var borderlineWidth = new PropertyValue(backgroundExtraData.BorderlineWidth);
3568 using var borderlineColorValue = backgroundExtraData.BorderlineColor == null ? new PropertyValue(Color.Black) : new PropertyValue(backgroundExtraData.BorderlineColor);
3569 using var borderlineColor = new PropertyValue(borderlineColorValue);
3570 using var borderlineOffset = new PropertyValue(backgroundExtraData.BorderlineOffset);
3572 map.Add(Visual.Property.CornerRadius, cornerRadius)
3573 .Add(Visual.Property.CornerRadiusPolicy, cornerRadiusPolicy)
3574 .Add(Visual.Property.BorderlineWidth, borderlineWidth)
3575 .Add(Visual.Property.BorderlineColor, borderlineColor)
3576 .Add(Visual.Property.BorderlineOffset, borderlineOffset);
3579 backgroundExtraDataUpdatedFlag &= ~BackgroundExtraDataUpdatedFlag.Background;
3581 using var mapValue = new PropertyValue(map);
3582 Object.SetProperty(SwigCPtr, Property.BACKGROUND, mapValue);
3585 private void SetBackgroundImageBorder(Rectangle value)
3587 bool isEmptyValue = Rectangle.IsNullOrZero(value);
3589 var backgroundImageBorder = isEmptyValue ? null : value;
3591 (backgroundExtraData ?? (backgroundExtraData = new BackgroundExtraData())).BackgroundImageBorder = backgroundImageBorder;
3598 PropertyMap map = Background;
3605 map[NpatchImageVisualProperty.Border] = new PropertyValue(backgroundImageBorder);
3609 map.Find(Visual.Property.Type)?.Get(out visualType);
3611 if (visualType == (int)Visual.Type.Image)
3613 map[Visual.Property.Type] = new PropertyValue((int)Visual.Type.NPatch);
3616 // Background extra data flag is not meanful anymore.
3617 backgroundExtraDataUpdatedFlag &= ~BackgroundExtraDataUpdatedFlag.Background;
3619 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, View.Property.BACKGROUND, new PropertyValue(map));
3622 private void SetBorderlineColor(Color value)
3629 (backgroundExtraData ?? (backgroundExtraData = new BackgroundExtraData())).BorderlineColor = value;
3631 UpdateBackgroundExtraData(BackgroundExtraDataUpdatedFlag.Borderline);
3634 private void SetBackgroundColor(Color value)
3641 // Background property will be Color after now. Remove background image url information.
3642 backgroundImageUrl = null;
3644 if (backgroundExtraData == null)
3646 Object.InternalSetPropertyVector4(SwigCPtr, View.Property.BACKGROUND, ((Color)value).SwigCPtr);
3650 var map = new PropertyMap();
3651 var colorType = new PropertyValue((int)Visual.Type.Color);
3652 var mixColor = new PropertyValue(value);
3653 var cornerRadiusValue = backgroundExtraData.CornerRadius == null ? new PropertyValue() : new PropertyValue(backgroundExtraData.CornerRadius);
3654 var cornerRadius = new PropertyValue(cornerRadiusValue);
3655 var cornerRadiusPolicy = new PropertyValue((int)(backgroundExtraData.CornerRadiusPolicy));
3656 var borderlineWidth = new PropertyValue(backgroundExtraData.BorderlineWidth);
3657 var borderlineColorValue = backgroundExtraData.BorderlineColor == null ? new PropertyValue(Color.Black) : new PropertyValue(backgroundExtraData.BorderlineColor);
3658 var borderlineColor = new PropertyValue(borderlineColorValue);
3659 var borderlineOffset = new PropertyValue(backgroundExtraData.BorderlineOffset);
3661 map.Add(Visual.Property.Type, colorType)
3662 .Add(ColorVisualProperty.MixColor, mixColor)
3663 .Add(Visual.Property.CornerRadius, cornerRadius)
3664 .Add(Visual.Property.CornerRadiusPolicy, cornerRadiusPolicy)
3665 .Add(Visual.Property.BorderlineWidth, borderlineWidth)
3666 .Add(Visual.Property.BorderlineColor, borderlineColor)
3667 .Add(Visual.Property.BorderlineOffset, borderlineOffset);
3669 backgroundExtraDataUpdatedFlag &= ~BackgroundExtraDataUpdatedFlag.Background;
3671 var mapValue = new PropertyValue(map);
3672 Object.SetProperty(SwigCPtr, Property.BACKGROUND, mapValue);
3674 borderlineOffset?.Dispose();
3675 borderlineColor?.Dispose();
3676 borderlineColorValue?.Dispose();
3677 borderlineWidth?.Dispose();
3678 cornerRadiusPolicy?.Dispose();
3679 cornerRadius?.Dispose();
3680 cornerRadiusValue?.Dispose();
3681 mixColor?.Dispose();
3682 colorType?.Dispose();
3684 mapValue?.Dispose();
3687 private void SetColor(Color value)
3694 Interop.ActorInternal.SetColor(SwigCPtr, value.SwigCPtr);
3695 if (NDalicPINVOKE.SWIGPendingException.Pending)
3696 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3699 private void SetColorRed(float? value)
3706 Object.InternalSetPropertyFloat(SwigCPtr, View.Property.ColorRed, (float)value);
3707 if (NDalicPINVOKE.SWIGPendingException.Pending)
3708 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3711 private void SetColorGreen(float? value)
3718 Object.InternalSetPropertyFloat(SwigCPtr, View.Property.ColorGreen, (float)value);
3719 if (NDalicPINVOKE.SWIGPendingException.Pending)
3720 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3723 private void SetColorBlue(float? value)
3730 Object.InternalSetPropertyFloat(SwigCPtr, View.Property.ColorBlue, (float)value);
3731 if (NDalicPINVOKE.SWIGPendingException.Pending)
3732 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3735 private void SetOpacity(float? value)
3742 Object.InternalSetPropertyFloat(SwigCPtr, View.Property.OPACITY, (float)value);
3745 private void SetShadow(ShadowBase value)
3747 backgroundExtraDataUpdatedFlag &= ~BackgroundExtraDataUpdatedFlag.Shadow;
3748 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, View.Property.SHADOW, value == null ? new PropertyValue() : value.ToPropertyValue(this));