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 public static readonly BindableProperty StyleNameProperty = BindableProperty.Create(nameof(StyleName), typeof(string), typeof(View), string.Empty, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
39 var view = (View)bindable;
42 string styleName = (string)newValue;
44 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.StyleName, styleName);
46 view.styleName = styleName;
48 if (string.IsNullOrEmpty(styleName)) return;
50 var style = ThemeManager.GetUpdateStyleWithoutClone(styleName);
52 if (style == null) return;
54 view.ApplyStyle(style);
55 view.SetThemeApplied();
58 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
60 var view = (View)bindable;
62 if (!string.IsNullOrEmpty(view.styleName)) return view.styleName;
64 return Object.InternalGetPropertyString(view.SwigCPtr, View.Property.StyleName);
68 /// KeyInputFocusProperty
70 [EditorBrowsable(EditorBrowsableState.Never)]
71 public static readonly BindableProperty KeyInputFocusProperty = BindableProperty.Create(nameof(KeyInputFocus), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
73 var view = (View)bindable;
76 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.KeyInputFocus, (bool)newValue);
79 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
81 var view = (View)bindable;
82 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.KeyInputFocus);
86 /// BackgroundColorProperty
88 [EditorBrowsable(EditorBrowsableState.Never)]
89 public static readonly BindableProperty BackgroundColorProperty = BindableProperty.Create(nameof(BackgroundColor), typeof(Color), typeof(View), null,
90 propertyChanged: (bindable, oldValue, newValue) =>
92 var view = (View)bindable;
94 view.themeData?.selectorData?.ClearBackground(view);
96 if (newValue is Selector<Color> selector)
98 if (selector.HasAll()) view.SetBackgroundColor(selector.All);
99 else view.EnsureSelectorData().BackgroundColor = new TriggerableSelector<Color>(view, selector, view.SetBackgroundColor, true);
103 view.SetBackgroundColor((Color)newValue);
106 defaultValueCreator: (bindable) =>
108 var view = (View)bindable;
110 if (view.internalBackgroundColor == null)
112 view.internalBackgroundColor = new Color(view.OnBackgroundColorChanged, 0, 0, 0, 0);
115 int visualType = (int)Visual.Type.Invalid;
116 Interop.View.InternalRetrievingVisualPropertyInt(view.SwigCPtr, Property.BACKGROUND, Visual.Property.Type, out visualType);
117 if (visualType == (int)Visual.Type.Color)
119 Interop.View.InternalRetrievingVisualPropertyVector4(view.SwigCPtr, Property.BACKGROUND, ColorVisualProperty.MixColor, Color.getCPtr(view.internalBackgroundColor));
121 return view.internalBackgroundColor;
128 [EditorBrowsable(EditorBrowsableState.Never)]
129 public static readonly BindableProperty ColorProperty = BindableProperty.Create(nameof(Color), typeof(Color), typeof(View), null,
130 propertyChanged: (bindable, oldValue, newValue) =>
132 var view = (View)bindable;
134 view.themeData?.selectorData?.Color?.Reset(view);
136 if (newValue is Selector<Color> selector)
138 if (selector.HasAll()) view.SetColor(selector.All);
139 else view.EnsureSelectorData().Color = new TriggerableSelector<Color>(view, selector, view.SetColor, true);
143 view.SetColor((Color)newValue);
146 defaultValueCreator: (bindable) =>
148 var view = (View)bindable;
150 if (view.internalColor == null)
152 view.internalColor = new Color(view.OnColorChanged, 0, 0, 0, 0);
154 Object.InternalRetrievingPropertyVector4(view.SwigCPtr, View.Property.COLOR, view.internalColor.SwigCPtr);
155 return view.internalColor;
162 [EditorBrowsable(EditorBrowsableState.Never)]
163 public static readonly BindableProperty ColorRedProperty = BindableProperty.Create(nameof(ColorRed), typeof(float), typeof(View), default(float),
164 propertyChanged: (bindable, oldValue, newValue) =>
166 var view = (View)bindable;
167 view.SetColorRed((float?)newValue);
169 defaultValueCreator: (bindable) =>
171 var view = (View)bindable;
173 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.ColorRed);
178 /// ColorGreenProperty
180 [EditorBrowsable(EditorBrowsableState.Never)]
181 public static readonly BindableProperty ColorGreenProperty = BindableProperty.Create(nameof(ColorGreen), typeof(float), typeof(View), default(float),
182 propertyChanged: (bindable, oldValue, newValue) =>
184 var view = (View)bindable;
185 view.SetColorGreen((float?)newValue);
187 defaultValueCreator: (bindable) =>
189 var view = (View)bindable;
191 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.ColorGreen);
196 /// ColorBlueProperty
198 [EditorBrowsable(EditorBrowsableState.Never)]
199 public static readonly BindableProperty ColorBlueProperty = BindableProperty.Create(nameof(ColorBlue), typeof(float), typeof(View), default(float),
200 propertyChanged: (bindable, oldValue, newValue) =>
202 var view = (View)bindable;
203 view.SetColorBlue((float?)newValue);
205 defaultValueCreator: (bindable) =>
207 var view = (View)bindable;
209 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.ColorBlue);
213 /// <summary> BackgroundImageProperty </summary>
214 [EditorBrowsable(EditorBrowsableState.Never)]
215 public static readonly BindableProperty BackgroundImageProperty = BindableProperty.Create(nameof(BackgroundImage), typeof(string), typeof(View), default(string),
216 propertyChanged: (bindable, oldValue, newValue) =>
218 if (String.Equals(oldValue, newValue))
220 NUILog.Debug($"oldValue={oldValue} newValue={newValue} are same. just return here");
224 var view = (View)bindable;
226 if (view.themeData?.selectorData != null)
228 view.themeData.selectorData.BackgroundColor?.Reset(view);
229 view.themeData.selectorData.BackgroundImage?.Reset(view);
232 if (newValue is Selector<string> selector)
234 if (selector.HasAll()) view.SetBackgroundImage(selector.All);
235 else view.EnsureSelectorData().BackgroundImage = new TriggerableSelector<string>(view, selector, view.SetBackgroundImage, true);
239 view.SetBackgroundImage((string)newValue);
242 defaultValueCreator: (bindable) =>
244 var view = (View)bindable;
245 string backgroundImage = "";
247 Interop.View.InternalRetrievingVisualPropertyString(view.SwigCPtr, Property.BACKGROUND, ImageVisualProperty.URL, out backgroundImage);
249 return backgroundImage;
254 /// <summary>BackgroundImageBorderProperty</summary>
255 [EditorBrowsable(EditorBrowsableState.Never)]
256 public static readonly BindableProperty BackgroundImageBorderProperty = BindableProperty.Create(nameof(BackgroundImageBorder), typeof(Rectangle), typeof(View), default(Rectangle), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
258 var view = (View)bindable;
260 view.themeData?.selectorData?.BackgroundImageBorder?.Reset(view);
262 if (newValue is Selector<Rectangle> selector)
264 if (selector.HasAll()) view.SetBackgroundImageBorder(selector.All);
265 else view.EnsureSelectorData().BackgroundImageBorder = new TriggerableSelector<Rectangle>(view, selector, view.SetBackgroundImageBorder, true);
269 view.SetBackgroundImageBorder((Rectangle)newValue);
272 defaultValueCreator: (bindable) =>
274 var view = (View)bindable;
276 return view.backgroundExtraData?.BackgroundImageBorder;
280 /// BackgroundProperty
282 [EditorBrowsable(EditorBrowsableState.Never)]
283 public static readonly BindableProperty BackgroundProperty = BindableProperty.Create(nameof(Background), typeof(PropertyMap), typeof(View), null,
284 propertyChanged: (bindable, oldValue, newValue) =>
286 var view = (View)bindable;
287 if (newValue != null)
289 var propertyValue = new PropertyValue((PropertyMap)newValue);
290 Object.SetProperty(view.SwigCPtr, Property.BACKGROUND, propertyValue);
292 view.backgroundExtraData = null;
294 // Background extra data is not valid anymore. We should ignore lazy UpdateBackgroundExtraData
295 view.backgroundExtraDataUpdatedFlag = BackgroundExtraDataUpdatedFlag.None;
296 if (view.backgroundExtraDataUpdateProcessAttachedFlag)
298 ProcessorController.Instance.ProcessorOnceEvent -= view.UpdateBackgroundExtraData;
299 view.backgroundExtraDataUpdateProcessAttachedFlag = false;
302 propertyValue.Dispose();
303 propertyValue = null;
306 defaultValueCreator: (bindable) =>
308 var view = (View)bindable;
310 // Sync as current properties
311 view.UpdateBackgroundExtraData();
313 PropertyMap tmp = new PropertyMap();
314 var propertyValue = Object.GetProperty(view.SwigCPtr, Property.BACKGROUND);
315 propertyValue.Get(tmp);
316 propertyValue.Dispose();
317 propertyValue = null;
325 [EditorBrowsable(EditorBrowsableState.Never)]
326 public static readonly BindableProperty StateProperty = BindableProperty.Create(nameof(State), typeof(States), typeof(View), States.Normal, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
328 var view = (View)bindable;
329 if (newValue != null)
331 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.STATE, (int)newValue);
334 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
336 var view = (View)bindable;
338 temp = Object.InternalGetPropertyInt(view.SwigCPtr, View.Property.STATE);
341 case 0: return States.Normal;
342 case 1: return States.Focused;
343 case 2: return States.Disabled;
344 default: return States.Normal;
351 [EditorBrowsable(EditorBrowsableState.Never)]
352 public static readonly BindableProperty SubStateProperty = BindableProperty.Create(nameof(SubState), typeof(States), typeof(View), States.Normal, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
354 var view = (View)bindable;
355 string valueToString = "";
356 if (newValue != null)
358 valueToString = ((States)newValue).GetDescription();
359 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.SubState, valueToString);
362 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
364 var view = (View)bindable;
366 temp = Object.InternalGetPropertyString(view.SwigCPtr, View.Property.SubState);
367 return temp.GetValueByDescription<States>();
373 [EditorBrowsable(EditorBrowsableState.Never)]
374 public static readonly BindableProperty TooltipProperty = BindableProperty.Create(nameof(Tooltip), typeof(PropertyMap), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
376 var view = (View)bindable;
377 if (newValue != null)
379 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.TOOLTIP, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
382 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
384 var view = (View)bindable;
385 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
386 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.TOOLTIP).Get(temp);
393 [EditorBrowsable(EditorBrowsableState.Never)]
394 public static readonly BindableProperty FlexProperty = BindableProperty.Create(nameof(Flex), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
396 var view = (View)bindable;
397 if (newValue != null)
399 Object.InternalSetPropertyFloat(view.SwigCPtr, FlexContainer.ChildProperty.FLEX, (float)newValue);
402 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
404 var view = (View)bindable;
405 return Object.InternalGetPropertyFloat(view.SwigCPtr, FlexContainer.ChildProperty.FLEX);
409 /// AlignSelfProperty
411 [EditorBrowsable(EditorBrowsableState.Never)]
412 public static readonly BindableProperty AlignSelfProperty = BindableProperty.Create(nameof(AlignSelf), typeof(int), typeof(View), default(int), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
414 var view = (View)bindable;
415 if (newValue != null)
417 Object.InternalSetPropertyInt(view.SwigCPtr, FlexContainer.ChildProperty.AlignSelf, (int)newValue);
420 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
422 var view = (View)bindable;
423 return Object.InternalGetPropertyInt(view.SwigCPtr, FlexContainer.ChildProperty.AlignSelf);
427 /// FlexMarginProperty
429 [EditorBrowsable(EditorBrowsableState.Never)]
430 public static readonly BindableProperty FlexMarginProperty = BindableProperty.Create(nameof(FlexMargin), typeof(Vector4), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
432 var view = (View)bindable;
433 if (newValue != null)
435 Object.InternalSetPropertyVector4(view.SwigCPtr, FlexContainer.ChildProperty.FlexMargin, ((Vector4)newValue).SwigCPtr);
438 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
440 var view = (View)bindable;
441 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
442 Object.InternalRetrievingPropertyVector4(view.SwigCPtr, FlexContainer.ChildProperty.FlexMargin, temp.SwigCPtr);
447 /// CellIndexProperty
449 [EditorBrowsable(EditorBrowsableState.Never)]
450 public static readonly BindableProperty CellIndexProperty = BindableProperty.Create(nameof(CellIndex), typeof(Vector2), typeof(View), null,
451 propertyChanged: (bindable, oldValue, newValue) =>
453 var view = (View)bindable;
454 if (newValue != null)
456 Object.InternalSetPropertyVector2(view.SwigCPtr, TableView.ChildProperty.CellIndex, ((Vector2)newValue).SwigCPtr);
459 defaultValueCreator: (bindable) =>
461 var view = (View)bindable;
462 if (view.internalCellIndex == null)
464 view.internalCellIndex = new Vector2(view.OnCellIndexChanged, 0, 0);
466 Object.InternalRetrievingPropertyVector2(view.SwigCPtr, TableView.ChildProperty.CellIndex, view.internalCellIndex.SwigCPtr);
467 return view.internalCellIndex;
474 [EditorBrowsable(EditorBrowsableState.Never)]
475 public static readonly BindableProperty RowSpanProperty = BindableProperty.Create(nameof(RowSpan), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
477 var view = (View)bindable;
478 if (newValue != null)
480 Object.InternalSetPropertyFloat(view.SwigCPtr, TableView.ChildProperty.RowSpan, (float)newValue);
483 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
485 var view = (View)bindable;
486 return Object.InternalGetPropertyFloat(view.SwigCPtr, TableView.ChildProperty.RowSpan);
490 /// ColumnSpanProperty
492 [EditorBrowsable(EditorBrowsableState.Never)]
493 public static readonly BindableProperty ColumnSpanProperty = BindableProperty.Create(nameof(ColumnSpan), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
495 var view = (View)bindable;
496 if (newValue != null)
498 Object.InternalSetPropertyFloat(view.SwigCPtr, TableView.ChildProperty.ColumnSpan, (float)newValue);
501 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
503 var view = (View)bindable;
504 return Object.InternalGetPropertyFloat(view.SwigCPtr, TableView.ChildProperty.ColumnSpan);
508 /// CellHorizontalAlignmentProperty
510 [EditorBrowsable(EditorBrowsableState.Never)]
511 public static readonly BindableProperty CellHorizontalAlignmentProperty = BindableProperty.Create(nameof(CellHorizontalAlignment), typeof(HorizontalAlignmentType), typeof(View), HorizontalAlignmentType.Left, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
513 var view = (View)bindable;
514 string valueToString = "";
516 if (newValue != null)
518 valueToString = ((HorizontalAlignmentType)newValue).GetDescription();
519 Object.InternalSetPropertyString(view.SwigCPtr, TableView.ChildProperty.CellHorizontalAlignment, valueToString);
522 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
524 var view = (View)bindable;
526 temp = Object.InternalGetPropertyString(view.SwigCPtr, TableView.ChildProperty.CellHorizontalAlignment);
527 return temp.GetValueByDescription<HorizontalAlignmentType>();
531 /// CellVerticalAlignmentProperty
533 [EditorBrowsable(EditorBrowsableState.Never)]
534 public static readonly BindableProperty CellVerticalAlignmentProperty = BindableProperty.Create(nameof(CellVerticalAlignment), typeof(VerticalAlignmentType), typeof(View), VerticalAlignmentType.Top, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
536 var view = (View)bindable;
537 string valueToString = "";
539 if (newValue != null)
541 valueToString = ((VerticalAlignmentType)newValue).GetDescription();
542 Object.InternalSetPropertyString(view.SwigCPtr, TableView.ChildProperty.CellVerticalAlignment, valueToString);
545 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
547 var view = (View)bindable;
549 temp = Object.InternalGetPropertyString(view.SwigCPtr, TableView.ChildProperty.CellVerticalAlignment);
550 return temp.GetValueByDescription<VerticalAlignmentType>();
554 /// "DO not use this, that will be deprecated. Use 'View Weight' instead of BindableProperty"
555 /// This needs to be hidden as inhouse API until all applications using it have been updated. Do not make public.
557 [EditorBrowsable(EditorBrowsableState.Never)]
558 public static readonly BindableProperty WeightProperty = BindableProperty.Create(nameof(Weight), typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
560 var view = (View)bindable;
561 if (newValue != null)
563 view.Weight = (float)newValue;
567 defaultValueCreator: (bindable) =>
569 var view = (View)bindable;
574 /// LeftFocusableViewProperty
576 [EditorBrowsable(EditorBrowsableState.Never)]
577 public static readonly BindableProperty LeftFocusableViewProperty = BindableProperty.Create(nameof(View.LeftFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
579 var view = (View)bindable;
580 if (newValue != null) { view.LeftFocusableViewId = (int)(newValue as View)?.GetId(); }
581 else { view.LeftFocusableViewId = -1; }
583 defaultValueCreator: (bindable) =>
585 var view = (View)bindable;
586 if (view.LeftFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.LeftFocusableViewId); }
591 /// RightFocusableViewProperty
593 [EditorBrowsable(EditorBrowsableState.Never)]
594 public static readonly BindableProperty RightFocusableViewProperty = BindableProperty.Create(nameof(View.RightFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
596 var view = (View)bindable;
597 if (newValue != null) { view.RightFocusableViewId = (int)(newValue as View)?.GetId(); }
598 else { view.RightFocusableViewId = -1; }
600 defaultValueCreator: (bindable) =>
602 var view = (View)bindable;
603 if (view.RightFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.RightFocusableViewId); }
608 /// UpFocusableViewProperty
610 [EditorBrowsable(EditorBrowsableState.Never)]
611 public static readonly BindableProperty UpFocusableViewProperty = BindableProperty.Create(nameof(View.UpFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
613 var view = (View)bindable;
614 if (newValue != null) { view.UpFocusableViewId = (int)(newValue as View)?.GetId(); }
615 else { view.UpFocusableViewId = -1; }
617 defaultValueCreator: (bindable) =>
619 var view = (View)bindable;
620 if (view.UpFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.UpFocusableViewId); }
625 /// DownFocusableViewProperty
627 [EditorBrowsable(EditorBrowsableState.Never)]
628 public static readonly BindableProperty DownFocusableViewProperty = BindableProperty.Create(nameof(View.DownFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
630 var view = (View)bindable;
631 if (newValue != null) { view.DownFocusableViewId = (int)(newValue as View)?.GetId(); }
632 else { view.DownFocusableViewId = -1; }
634 defaultValueCreator: (bindable) =>
636 var view = (View)bindable;
637 if (view.DownFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.DownFocusableViewId); }
642 /// ClockwiseFocusableViewProperty
644 [EditorBrowsable(EditorBrowsableState.Never)]
645 public static readonly BindableProperty ClockwiseFocusableViewProperty = BindableProperty.Create(nameof(View.ClockwiseFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
647 var view = (View)bindable;
648 if (newValue != null && (newValue is View)) { view.ClockwiseFocusableViewId = (int)(newValue as View)?.GetId(); }
649 else { view.ClockwiseFocusableViewId = -1; }
651 defaultValueCreator: (bindable) =>
653 var view = (View)bindable;
654 if (view.ClockwiseFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.ClockwiseFocusableViewId); }
659 /// CounterClockwiseFocusableViewProperty
661 [EditorBrowsable(EditorBrowsableState.Never)]
662 public static readonly BindableProperty CounterClockwiseFocusableViewProperty = BindableProperty.Create(nameof(View.CounterClockwiseFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
664 var view = (View)bindable;
665 if (newValue != null && (newValue is View)) { view.CounterClockwiseFocusableViewId = (int)(newValue as View)?.GetId(); }
666 else { view.CounterClockwiseFocusableViewId = -1; }
668 defaultValueCreator: (bindable) =>
670 var view = (View)bindable;
671 if (view.CounterClockwiseFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.CounterClockwiseFocusableViewId); }
676 /// FocusableProperty
678 [EditorBrowsable(EditorBrowsableState.Never)]
679 public static readonly BindableProperty FocusableProperty = BindableProperty.Create(nameof(Focusable), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
681 var view = (View)bindable;
682 if (newValue != null) { view.SetKeyboardFocusable((bool)newValue); }
684 defaultValueCreator: (bindable) =>
686 var view = (View)bindable;
687 return view.IsKeyboardFocusable();
691 /// FocusableChildrenProperty
693 [EditorBrowsable(EditorBrowsableState.Never)]
694 public static readonly BindableProperty FocusableChildrenProperty = BindableProperty.Create(nameof(FocusableChildren), typeof(bool), typeof(View), true, propertyChanged: (bindable, oldValue, newValue) =>
696 var view = (View)bindable;
697 if (newValue != null) { view.SetKeyboardFocusableChildren((bool)newValue); }
699 defaultValueCreator: (bindable) =>
701 var view = (View)bindable;
702 return view.AreChildrenKeyBoardFocusable();
706 /// FocusableInTouchProperty
708 [EditorBrowsable(EditorBrowsableState.Never)]
709 public static readonly BindableProperty FocusableInTouchProperty = BindableProperty.Create(nameof(FocusableInTouch), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
711 var view = (View)bindable;
712 if (newValue != null) { view.SetFocusableInTouch((bool)newValue); }
714 defaultValueCreator: (bindable) =>
716 var view = (View)bindable;
717 return view.IsFocusableInTouch();
723 [EditorBrowsable(EditorBrowsableState.Never)]
724 public static readonly BindableProperty Size2DProperty = BindableProperty.Create(nameof(Size2D), typeof(Size2D), typeof(View), null,
725 propertyChanged: (bindable, oldValue, newValue) =>
727 var view = (View)bindable;
728 if (newValue != null)
730 // Size property setter is only used by user.
731 // Framework code uses SetSize() instead of Size property setter.
732 // Size set by user is returned by GetUserSize2D() for SuggestedMinimumWidth/Height.
733 // SuggestedMinimumWidth/Height is used by Layout calculation.
734 int width = ((Size2D)newValue).Width;
735 int height = ((Size2D)newValue).Height;
736 view.userSizeWidth = (float)width;
737 view.userSizeHeight = (float)height;
739 bool relayoutRequired = false;
740 // To avoid duplicated size setup, change internal policy directly.
741 if (view.widthPolicy != width)
743 view.widthPolicy = width;
744 relayoutRequired = true;
746 if (view.heightPolicy != height)
748 view.heightPolicy = height;
749 relayoutRequired = true;
751 if (relayoutRequired)
753 view.layout?.RequestLayout();
756 Object.InternalSetPropertyVector2ActualVector3(view.SwigCPtr, View.Property.SIZE, ((Size2D)newValue).SwigCPtr);
759 defaultValueCreator: (bindable) =>
761 var view = (View)bindable;
762 if (view.internalSize2D == null)
764 view.internalSize2D = new Size2D(view.OnSize2DChanged, 0, 0);
766 Object.InternalRetrievingPropertyVector2ActualVector3(view.SwigCPtr, View.Property.SIZE, view.internalSize2D.SwigCPtr);
768 return view.internalSize2D;
775 [EditorBrowsable(EditorBrowsableState.Never)]
776 public static readonly BindableProperty OpacityProperty = BindableProperty.Create(nameof(Opacity), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
778 var view = (View)bindable;
780 view.themeData?.selectorData?.Opacity?.Reset(view);
782 if (newValue is Selector<float?> selector)
784 if (selector.HasAll()) view.SetOpacity(selector.All);
785 else view.EnsureSelectorData().Opacity = new TriggerableSelector<float?>(view, selector, view.SetOpacity, true);
789 view.SetOpacity((float?)newValue);
792 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
794 var view = (View)bindable;
795 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.OPACITY);
799 /// Position2DProperty
801 [EditorBrowsable(EditorBrowsableState.Never)]
802 public static readonly BindableProperty Position2DProperty = BindableProperty.Create(nameof(Position2D), typeof(Position2D), typeof(View), null,
803 propertyChanged: (bindable, oldValue, newValue) =>
805 var view = (View)bindable;
806 if (newValue != null)
808 Object.InternalSetPropertyVector2ActualVector3(view.SwigCPtr, View.Property.POSITION, ((Position2D)newValue).SwigCPtr);
811 defaultValueCreator: (bindable) =>
813 var view = (View)bindable;
814 if (view.internalPosition2D == null)
816 view.internalPosition2D = new Position2D(view.OnPosition2DChanged, 0, 0);
818 Object.InternalRetrievingPropertyVector2ActualVector3(view.SwigCPtr, View.Property.POSITION, view.internalPosition2D.SwigCPtr);
819 return view.internalPosition2D;
824 /// PositionUsesPivotPointProperty
826 [EditorBrowsable(EditorBrowsableState.Never)]
827 public static readonly BindableProperty PositionUsesPivotPointProperty = BindableProperty.Create(nameof(PositionUsesPivotPoint), typeof(bool), typeof(View), true, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
829 var view = (View)bindable;
830 if (newValue != null)
832 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.PositionUsesAnchorPoint, (bool)newValue);
835 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
837 var view = (View)bindable;
838 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.PositionUsesAnchorPoint);
842 /// SiblingOrderProperty
844 [EditorBrowsable(EditorBrowsableState.Never)]
845 public static readonly BindableProperty SiblingOrderProperty = BindableProperty.Create(nameof(SiblingOrder), typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
847 var view = (View)bindable;
849 if (newValue != null)
851 value = (int)newValue;
854 NUILog.Error("SiblingOrder should be bigger than 0 or equal to 0.");
857 var siblings = view.GetParent()?.Children;
858 if (siblings != null)
860 int currentOrder = siblings.IndexOf(view);
861 if (value != currentOrder)
863 if (value == 0) { view.LowerToBottom(); }
864 else if (value < siblings.Count - 1)
866 if (value > currentOrder) { view.RaiseAbove(siblings[value]); }
867 else { view.LowerBelow(siblings[value]); }
869 else { view.RaiseToTop(); }
874 defaultValueCreator: (bindable) =>
876 var view = (View)bindable;
877 var parentChildren = view.GetParent()?.Children;
878 int currentOrder = 0;
879 if (parentChildren != null)
881 currentOrder = parentChildren.IndexOf(view);
883 if (currentOrder < 0) { return 0; }
884 else if (currentOrder < parentChildren.Count) { return currentOrder; }
891 /// ParentOriginProperty
893 [EditorBrowsable(EditorBrowsableState.Never)]
894 public static readonly BindableProperty ParentOriginProperty = BindableProperty.Create(nameof(ParentOrigin), typeof(Position), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
896 var view = (View)bindable;
897 if (newValue != null)
899 Object.InternalSetPropertyVector3(view.SwigCPtr, View.Property.ParentOrigin, ((Position)newValue).SwigCPtr);
902 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
904 var view = (View)bindable;
905 Position temp = new Position(0.0f, 0.0f, 0.0f);
906 Object.InternalRetrievingPropertyVector3(view.SwigCPtr, View.Property.ParentOrigin, temp.SwigCPtr);
912 /// PivotPointProperty
914 [EditorBrowsable(EditorBrowsableState.Never)]
915 public static readonly BindableProperty PivotPointProperty = BindableProperty.Create(nameof(PivotPoint), typeof(Position), typeof(View), null,
916 propertyChanged: (bindable, oldValue, newValue) =>
918 var view = (View)bindable;
919 if (newValue != null)
921 view.SetAnchorPoint((Position)newValue);
924 defaultValueCreator: (bindable) =>
926 var view = (View)bindable;
927 if (view.internalPivotPoint == null)
929 view.internalPivotPoint = new Position(view.OnPivotPointChanged, 0, 0, 0);
931 Object.InternalRetrievingPropertyVector3(view.SwigCPtr, View.Property.AnchorPoint, view.internalPivotPoint.SwigCPtr);
932 return view.internalPivotPoint;
937 /// SizeWidthProperty
939 [EditorBrowsable(EditorBrowsableState.Never)]
940 public static readonly BindableProperty SizeWidthProperty = BindableProperty.Create(nameof(SizeWidth), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
942 var view = (View)bindable;
943 if (newValue != null)
945 // Size property setter is only used by user.
946 // Framework code uses SetSize() instead of Size property setter.
947 // Size set by user is returned by GetUserSize2D() for SuggestedMinimumWidth/Height.
948 // SuggestedMinimumWidth/Height is used by Layout calculation.
949 float width = (float)newValue;
950 view.userSizeWidth = width;
952 // To avoid duplicated size setup, change internal policy directly.
953 int widthPolicy = (int)System.Math.Ceiling(width);
954 if (view.widthPolicy != widthPolicy)
956 view.widthPolicy = widthPolicy;
957 view.layout?.RequestLayout();
960 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.SizeWidth, width);
963 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
965 var view = (View)bindable;
966 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.SizeWidth);
970 /// SizeHeightProperty
972 [EditorBrowsable(EditorBrowsableState.Never)]
973 public static readonly BindableProperty SizeHeightProperty = BindableProperty.Create(nameof(SizeHeight), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
975 var view = (View)bindable;
976 if (newValue != null)
978 // Size property setter is only used by user.
979 // Framework code uses SetSize() instead of Size property setter.
980 // Size set by user is returned by GetUserSize2D() for SuggestedMinimumWidth/Height.
981 // SuggestedMinimumWidth/Height is used by Layout calculation.
982 float height = (float)newValue;
983 view.userSizeHeight = height;
985 // To avoid duplicated size setup, change internal policy directly.
986 int heightPolicy = (int)System.Math.Ceiling(height);
987 if (view.heightPolicy != heightPolicy)
989 view.heightPolicy = heightPolicy;
990 view.layout?.RequestLayout();
993 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.SizeHeight, height);
996 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
998 var view = (View)bindable;
999 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.SizeHeight);
1003 /// PositionProperty
1005 [EditorBrowsable(EditorBrowsableState.Never)]
1006 public static readonly BindableProperty PositionProperty = BindableProperty.Create(nameof(Position), typeof(Position), typeof(View), null,
1007 propertyChanged: (bindable, oldValue, newValue) =>
1009 var view = (View)bindable;
1010 if (newValue != null)
1012 Object.InternalSetPropertyVector3(view.SwigCPtr, View.Property.POSITION, ((Position)newValue).SwigCPtr);
1015 defaultValueCreator: (bindable) =>
1017 var view = (View)bindable;
1018 if (view.internalPosition == null)
1020 view.internalPosition = new Position(view.OnPositionChanged, 0, 0, 0);
1022 Object.InternalRetrievingPropertyVector3(view.SwigCPtr, View.Property.POSITION, view.internalPosition.SwigCPtr);
1023 return view.internalPosition;
1028 /// PositionXProperty
1030 [EditorBrowsable(EditorBrowsableState.Never)]
1031 public static readonly BindableProperty PositionXProperty = BindableProperty.Create(nameof(PositionX), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1033 var view = (View)bindable;
1034 if (newValue != null)
1036 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.PositionX, (float)newValue);
1039 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1041 var view = (View)bindable;
1042 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.PositionX);
1046 /// PositionYProperty
1048 [EditorBrowsable(EditorBrowsableState.Never)]
1049 public static readonly BindableProperty PositionYProperty = BindableProperty.Create(nameof(PositionY), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1051 var view = (View)bindable;
1052 if (newValue != null)
1054 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.PositionY, (float)newValue);
1057 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1059 var view = (View)bindable;
1060 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.PositionY);
1064 /// PositionZProperty
1066 [EditorBrowsable(EditorBrowsableState.Never)]
1067 public static readonly BindableProperty PositionZProperty = BindableProperty.Create(nameof(PositionZ), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1069 var view = (View)bindable;
1070 if (newValue != null)
1072 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.PositionZ, (float)newValue);
1075 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1077 var view = (View)bindable;
1078 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.PositionZ);
1082 /// OrientationProperty
1084 [EditorBrowsable(EditorBrowsableState.Never)]
1085 public static readonly BindableProperty OrientationProperty = BindableProperty.Create(nameof(Orientation), typeof(Rotation), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1087 var view = (View)bindable;
1088 if (newValue != null)
1090 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ORIENTATION, new Tizen.NUI.PropertyValue((Rotation)newValue));
1093 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1095 var view = (View)bindable;
1096 Rotation temp = new Rotation();
1097 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ORIENTATION).Get(temp);
1104 [EditorBrowsable(EditorBrowsableState.Never)]
1105 public static readonly BindableProperty ScaleProperty = BindableProperty.Create(nameof(Scale), typeof(Vector3), typeof(View), null,
1106 propertyChanged: (bindable, oldValue, newValue) =>
1108 var view = (View)bindable;
1109 if (newValue != null)
1111 view.SetScale((Vector3)newValue);
1114 defaultValueCreator: (bindable) =>
1116 var view = (View)bindable;
1117 if (view.internalScale == null)
1119 view.internalScale = new Vector3(view.OnScaleChanged, 0, 0, 0);
1121 Object.InternalRetrievingPropertyVector3(view.SwigCPtr, View.Property.SCALE, view.internalScale.SwigCPtr);
1122 return view.internalScale;
1129 [EditorBrowsable(EditorBrowsableState.Never)]
1130 public static readonly BindableProperty ScaleXProperty = BindableProperty.Create(nameof(ScaleX), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1132 var view = (View)bindable;
1133 if (newValue != null)
1135 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.ScaleX, (float)newValue);
1138 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1140 var view = (View)bindable;
1141 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.ScaleX);
1147 [EditorBrowsable(EditorBrowsableState.Never)]
1148 public static readonly BindableProperty ScaleYProperty = BindableProperty.Create(nameof(ScaleY), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1150 var view = (View)bindable;
1151 if (newValue != null)
1153 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.ScaleY, (float)newValue);
1156 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1158 var view = (View)bindable;
1159 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.ScaleY);
1165 [EditorBrowsable(EditorBrowsableState.Never)]
1166 public static readonly BindableProperty ScaleZProperty = BindableProperty.Create(nameof(ScaleZ), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1168 var view = (View)bindable;
1169 if (newValue != null)
1171 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.ScaleZ, (float)newValue);
1174 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1176 var view = (View)bindable;
1177 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.ScaleZ);
1183 [EditorBrowsable(EditorBrowsableState.Never)]
1184 public static readonly BindableProperty NameProperty = BindableProperty.Create(nameof(Name), typeof(string), typeof(View), string.Empty,
1185 propertyChanged: (bindable, oldValue, newValue) =>
1187 var view = (View)bindable;
1188 if (newValue != null)
1190 view.internalName = (string)newValue;
1191 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.NAME, (string)newValue);
1194 defaultValueCreator: (bindable) =>
1196 var view = (View)bindable;
1197 return view.internalName;
1202 /// SensitiveProperty
1204 [EditorBrowsable(EditorBrowsableState.Never)]
1205 public static readonly BindableProperty SensitiveProperty = BindableProperty.Create(nameof(Sensitive), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1207 var view = (View)bindable;
1208 if (newValue != null)
1210 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.SENSITIVE, (bool)newValue);
1213 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1215 var view = (View)bindable;
1216 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.SENSITIVE);
1220 /// IsEnabledProperty
1222 [EditorBrowsable(EditorBrowsableState.Never)]
1223 public static readonly BindableProperty IsEnabledProperty = BindableProperty.Create(nameof(IsEnabled), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1225 var view = (View)bindable;
1226 if (newValue != null)
1228 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.UserInteractionEnabled, (bool)newValue);
1229 view.OnEnabled((bool)newValue);
1232 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1234 var view = (View)bindable;
1235 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.UserInteractionEnabled);
1239 /// DispatchKeyEventsProperty
1241 [EditorBrowsable(EditorBrowsableState.Never)]
1242 public static readonly BindableProperty DispatchKeyEventsProperty = BindableProperty.Create(nameof(DispatchKeyEvents), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1244 var view = (View)bindable;
1245 if (newValue != null)
1247 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.DispatchKeyEvents, (bool)newValue);
1250 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1252 var view = (View)bindable;
1253 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.DispatchKeyEvents);
1257 /// LeaveRequiredProperty
1259 [EditorBrowsable(EditorBrowsableState.Never)]
1260 public static readonly BindableProperty LeaveRequiredProperty = BindableProperty.Create(nameof(LeaveRequired), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1262 var view = (View)bindable;
1263 if (newValue != null)
1265 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.LeaveRequired, (bool)newValue);
1268 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1270 var view = (View)bindable;
1271 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.LeaveRequired);
1275 /// InheritOrientationProperty
1277 [EditorBrowsable(EditorBrowsableState.Never)]
1278 public static readonly BindableProperty InheritOrientationProperty = BindableProperty.Create(nameof(InheritOrientation), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1280 var view = (View)bindable;
1281 if (newValue != null)
1283 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.InheritOrientation, (bool)newValue);
1286 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1288 var view = (View)bindable;
1289 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.InheritOrientation);
1293 /// InheritScaleProperty
1295 [EditorBrowsable(EditorBrowsableState.Never)]
1296 public static readonly BindableProperty InheritScaleProperty = BindableProperty.Create(nameof(InheritScale), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1298 var view = (View)bindable;
1299 if (newValue != null)
1301 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.InheritScale, (bool)newValue);
1304 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1306 var view = (View)bindable;
1307 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.InheritScale);
1311 /// DrawModeProperty
1313 [EditorBrowsable(EditorBrowsableState.Never)]
1314 public static readonly BindableProperty DrawModeProperty = BindableProperty.Create(nameof(DrawMode), typeof(DrawModeType), typeof(View), DrawModeType.Normal, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1316 var view = (View)bindable;
1317 if (newValue != null)
1319 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.DrawMode, (int)newValue);
1322 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1324 var view = (View)bindable;
1325 return (DrawModeType)Object.InternalGetPropertyInt(view.SwigCPtr, View.Property.DrawMode);
1329 /// SizeModeFactorProperty
1331 [EditorBrowsable(EditorBrowsableState.Never)]
1332 public static readonly BindableProperty SizeModeFactorProperty = BindableProperty.Create(nameof(SizeModeFactor), typeof(Vector3), typeof(View), null,
1333 propertyChanged: (bindable, oldValue, newValue) =>
1335 var view = (View)bindable;
1336 if (newValue != null)
1338 Object.InternalSetPropertyVector3(view.SwigCPtr, View.Property.SizeModeFactor, ((Vector3)newValue).SwigCPtr);
1341 defaultValueCreator: (bindable) =>
1343 var view = (View)bindable;
1344 if (view.internalSizeModeFactor == null)
1346 view.internalSizeModeFactor = new Vector3(view.OnSizeModeFactorChanged, 0, 0, 0);
1348 Object.InternalRetrievingPropertyVector3(view.SwigCPtr, View.Property.SizeModeFactor, view.internalSizeModeFactor.SwigCPtr);
1349 return view.internalSizeModeFactor;
1354 /// WidthResizePolicyProperty
1356 [EditorBrowsable(EditorBrowsableState.Never)]
1357 public static readonly BindableProperty WidthResizePolicyProperty = BindableProperty.Create(nameof(WidthResizePolicy), typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1359 var view = (View)bindable;
1360 if (newValue != null)
1362 if ((ResizePolicyType)newValue == ResizePolicyType.KeepSizeFollowingParent)
1364 if (view.widthConstraint == null)
1366 view.widthConstraint = new EqualConstraintWithParentFloat((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeWidth, View.Property.SizeWidth);
1367 view.widthConstraint.Apply();
1369 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.WidthResizePolicy, (int)ResizePolicyType.FillToParent);
1373 view.widthConstraint?.Remove();
1374 view.widthConstraint?.Dispose();
1375 view.widthConstraint = null;
1377 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.WidthResizePolicy, (int)newValue);
1379 // Match ResizePolicy to new Layouting.
1380 // Parent relative policies can not be mapped at this point as parent size unknown.
1381 switch ((ResizePolicyType)newValue)
1383 case ResizePolicyType.UseNaturalSize:
1385 view.WidthSpecification = LayoutParamPolicies.WrapContent;
1388 case ResizePolicyType.FillToParent:
1390 view.WidthSpecification = LayoutParamPolicies.MatchParent;
1393 case ResizePolicyType.FitToChildren:
1395 view.WidthSpecification = LayoutParamPolicies.WrapContent;
1403 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1405 var view = (View)bindable;
1408 temp = Object.InternalGetPropertyString(view.SwigCPtr, View.Property.WidthResizePolicy);
1409 return temp.GetValueByDescription<ResizePolicyType>();
1413 /// HeightResizePolicyProperty
1415 [EditorBrowsable(EditorBrowsableState.Never)]
1416 public static readonly BindableProperty HeightResizePolicyProperty = BindableProperty.Create(nameof(HeightResizePolicy), typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1418 var view = (View)bindable;
1419 if (newValue != null)
1421 if ((ResizePolicyType)newValue == ResizePolicyType.KeepSizeFollowingParent)
1423 if (view.heightConstraint == null)
1425 view.heightConstraint = new EqualConstraintWithParentFloat((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeHeight, View.Property.SizeHeight);
1426 view.heightConstraint.Apply();
1429 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.HeightResizePolicy, (int)ResizePolicyType.FillToParent);
1433 view.heightConstraint?.Remove();
1434 view.heightConstraint?.Dispose();
1435 view.heightConstraint = null;
1437 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.HeightResizePolicy, (int)newValue);
1439 // Match ResizePolicy to new Layouting.
1440 // Parent relative policies can not be mapped at this point as parent size unknown.
1441 switch ((ResizePolicyType)newValue)
1443 case ResizePolicyType.UseNaturalSize:
1445 view.HeightSpecification = LayoutParamPolicies.WrapContent;
1448 case ResizePolicyType.FillToParent:
1450 view.HeightSpecification = LayoutParamPolicies.MatchParent;
1453 case ResizePolicyType.FitToChildren:
1455 view.HeightSpecification = LayoutParamPolicies.WrapContent;
1463 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1465 var view = (View)bindable;
1468 temp = Object.InternalGetPropertyString(view.SwigCPtr, View.Property.HeightResizePolicy);
1469 return temp.GetValueByDescription<ResizePolicyType>();
1473 /// SizeScalePolicyProperty
1475 [EditorBrowsable(EditorBrowsableState.Never)]
1476 public static readonly BindableProperty SizeScalePolicyProperty = BindableProperty.Create(nameof(SizeScalePolicy), typeof(SizeScalePolicyType), typeof(View), SizeScalePolicyType.UseSizeSet, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1478 var view = (View)bindable;
1479 string valueToString = "";
1480 if (newValue != null)
1482 valueToString = ((SizeScalePolicyType)newValue).GetDescription();
1484 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.SizeScalePolicy, valueToString);
1487 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1489 var view = (View)bindable;
1491 return (SizeScalePolicyType)Object.InternalGetPropertyInt(view.SwigCPtr, View.Property.SizeScalePolicy);
1495 /// WidthForHeightProperty
1497 [EditorBrowsable(EditorBrowsableState.Never)]
1498 public static readonly BindableProperty WidthForHeightProperty = BindableProperty.Create(nameof(WidthForHeight), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1500 var view = (View)bindable;
1501 if (newValue != null)
1503 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.WidthForHeight, (bool)newValue);
1506 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1508 var view = (View)bindable;
1510 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.WidthForHeight);
1514 /// HeightForWidthProperty
1516 [EditorBrowsable(EditorBrowsableState.Never)]
1517 public static readonly BindableProperty HeightForWidthProperty = BindableProperty.Create(nameof(HeightForWidth), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1519 var view = (View)bindable;
1520 if (newValue != null)
1523 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.HeightForWidth, (bool)newValue);
1526 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1528 var view = (View)bindable;
1530 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.HeightForWidth);
1536 [EditorBrowsable(EditorBrowsableState.Never)]
1537 public static readonly BindableProperty PaddingProperty = BindableProperty.Create(nameof(Padding), typeof(Extents), typeof(View), null,
1538 propertyChanged: (bindable, oldValue, newValue) =>
1540 var view = (View)bindable;
1541 if (newValue != null)
1543 if (view.Layout != null)
1545 view.Layout.Padding = new Extents((Extents)newValue);
1546 if ((view.Padding.Start != 0) || (view.Padding.End != 0) || (view.Padding.Top != 0) || (view.Padding.Bottom != 0))
1548 var tmp = new PropertyValue(new Extents(0, 0, 0, 0));
1549 Object.SetProperty(view.SwigCPtr, Property.PADDING, tmp);
1552 view.Layout.RequestLayout();
1556 var tmp = new PropertyValue((Extents)newValue);
1557 Object.SetProperty(view.SwigCPtr, Property.PADDING, tmp);
1562 defaultValueCreator: (bindable) =>
1564 var view = (View)bindable;
1565 if ((view.internalPadding == null) || (view.Layout != null))
1567 ushort start = 0, end = 0, top = 0, bottom = 0;
1568 if (view.Layout != null)
1570 if (view.Layout.Padding != null)
1572 start = view.Layout.Padding.Start;
1573 end = view.Layout.Padding.End;
1574 top = view.Layout.Padding.Top;
1575 bottom = view.Layout.Padding.Bottom;
1578 view.internalPadding = new Extents(view.OnPaddingChanged, start, end, top, bottom);
1581 if (view.Layout == null)
1583 var tmp = Object.GetProperty(view.SwigCPtr, Property.PADDING);
1584 tmp?.Get(view.internalPadding);
1588 return view.internalPadding;
1595 [EditorBrowsable(EditorBrowsableState.Never)]
1596 public static readonly BindableProperty SizeProperty = BindableProperty.Create(nameof(Size), typeof(Size), typeof(View), null,
1597 propertyChanged: (bindable, oldValue, newValue) =>
1599 var view = (View)bindable;
1600 if (newValue != null)
1602 // Size property setter is only used by user.
1603 // Framework code uses SetSize() instead of Size property setter.
1604 // Size set by user is returned by GetUserSize2D() for SuggestedMinimumWidth/Height.
1605 // SuggestedMinimumWidth/Height is used by Layout calculation.
1606 float width = ((Size)newValue).Width;
1607 float height = ((Size)newValue).Height;
1608 float depth = ((Size)newValue).Depth;
1610 view.userSizeWidth = width;
1611 view.userSizeHeight = height;
1613 // Set Specification so when layouts measure this View it matches the value set here.
1614 // All Views are currently Layouts.
1615 int widthPolicy = (int)System.Math.Ceiling(width);
1616 int heightPolicy = (int)System.Math.Ceiling(height);
1618 bool relayoutRequired = false;
1619 // To avoid duplicated size setup, change internal policy directly.
1620 if (view.widthPolicy != widthPolicy)
1622 view.widthPolicy = widthPolicy;
1623 relayoutRequired = true;
1625 if (view.heightPolicy != heightPolicy)
1627 view.heightPolicy = heightPolicy;
1628 relayoutRequired = true;
1630 if (relayoutRequired)
1632 view.layout?.RequestLayout();
1635 view.SetSize(width, height, depth);
1638 defaultValueCreator: (bindable) =>
1640 var view = (View)bindable;
1642 if (view.internalSize == null)
1644 view.internalSize = new Size(view.OnSizeChanged, 0, 0, 0);
1646 Object.InternalRetrievingPropertyVector3(view.SwigCPtr, View.Property.SIZE, view.internalSize.SwigCPtr);
1648 return view.internalSize;
1653 /// MinimumSizeProperty
1655 [EditorBrowsable(EditorBrowsableState.Never)]
1656 public static readonly BindableProperty MinimumSizeProperty = BindableProperty.Create(nameof(MinimumSize), typeof(Size2D), typeof(View), null,
1657 propertyChanged: (bindable, oldValue, newValue) =>
1659 var view = (View)bindable;
1660 if (newValue != null)
1663 Object.InternalSetPropertyVector2(view.SwigCPtr, View.Property.MinimumSize, ((Size2D)newValue).SwigCPtr);
1666 defaultValueCreator: (bindable) =>
1669 var view = (View)bindable;
1670 if (view.internalMinimumSize == null)
1672 view.internalMinimumSize = new Size2D(view.OnMinimumSizeChanged, 0, 0);
1674 Object.InternalRetrievingPropertyVector2(view.SwigCPtr, View.Property.MinimumSize, view.internalMinimumSize.SwigCPtr);
1675 return view.internalMinimumSize;
1680 /// MaximumSizeProperty
1682 [EditorBrowsable(EditorBrowsableState.Never)]
1683 public static readonly BindableProperty MaximumSizeProperty = BindableProperty.Create(nameof(MaximumSize), typeof(Size2D), typeof(View), null,
1684 propertyChanged: (bindable, oldValue, newValue) =>
1686 var view = (View)bindable;
1687 if (newValue != null)
1690 Object.InternalSetPropertyVector2(view.SwigCPtr, View.Property.MaximumSize, ((Size2D)newValue).SwigCPtr);
1693 defaultValueCreator: (bindable) =>
1695 var view = (View)bindable;
1697 if (view.internalMaximumSize == null)
1699 view.internalMaximumSize = new Size2D(view.OnMaximumSizeChanged, 0, 0);
1701 Object.InternalRetrievingPropertyVector2(view.SwigCPtr, View.Property.MaximumSize, view.internalMaximumSize.SwigCPtr);
1702 return view.internalMaximumSize;
1707 /// InheritPositionProperty
1709 [EditorBrowsable(EditorBrowsableState.Never)]
1710 public static readonly BindableProperty InheritPositionProperty = BindableProperty.Create(nameof(InheritPosition), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1712 var view = (View)bindable;
1713 if (newValue != null)
1715 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.InheritPosition, (bool)newValue);
1718 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1720 var view = (View)bindable;
1722 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.InheritPosition);
1726 /// ClippingModeProperty
1728 [EditorBrowsable(EditorBrowsableState.Never)]
1729 public static readonly BindableProperty ClippingModeProperty = BindableProperty.Create(nameof(ClippingMode), typeof(ClippingModeType), typeof(View), ClippingModeType.Disabled, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1731 var view = (View)bindable;
1732 if (newValue != null)
1735 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.ClippingMode, (int)newValue);
1738 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1740 var view = (View)bindable;
1742 return (ClippingModeType)Object.InternalGetPropertyInt(view.SwigCPtr, View.Property.ClippingMode);
1746 /// InheritLayoutDirectionProperty
1748 [EditorBrowsable(EditorBrowsableState.Never)]
1749 public static readonly BindableProperty InheritLayoutDirectionProperty = BindableProperty.Create(nameof(InheritLayoutDirection), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1751 var view = (View)bindable;
1752 if (newValue != null)
1755 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.InheritLayoutDirection, (bool)newValue);
1758 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1760 var view = (View)bindable;
1762 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.InheritLayoutDirection);
1766 /// LayoutDirectionProperty
1768 [EditorBrowsable(EditorBrowsableState.Never)]
1769 public static readonly BindableProperty LayoutDirectionProperty = BindableProperty.Create(nameof(LayoutDirection), typeof(ViewLayoutDirectionType), typeof(View), ViewLayoutDirectionType.LTR, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1771 var view = (View)bindable;
1772 if (newValue != null)
1775 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.LayoutDirection, (int)newValue);
1778 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1780 var view = (View)bindable;
1782 return (ViewLayoutDirectionType)Object.InternalGetPropertyInt(view.SwigCPtr, View.Property.LayoutDirection);
1788 [EditorBrowsable(EditorBrowsableState.Never)]
1789 public static readonly BindableProperty MarginProperty = BindableProperty.Create(nameof(Margin), typeof(Extents), typeof(View), null,
1790 propertyChanged: (bindable, oldValue, newValue) =>
1792 var view = (View)bindable;
1793 if (newValue != null)
1795 if (view.Layout != null)
1797 view.Layout.Margin = new Extents((Extents)newValue);
1798 if ((view.Margin.Start != 0) || (view.Margin.End != 0) || (view.Margin.Top != 0) || (view.Margin.Bottom != 0))
1800 var tmp = new PropertyValue(new Extents(0, 0, 0, 0));
1801 Object.SetProperty(view.SwigCPtr, Property.MARGIN, tmp);
1804 view.Layout.RequestLayout();
1808 var tmp = new PropertyValue((Extents)newValue);
1809 Object.SetProperty(view.SwigCPtr, Property.MARGIN, tmp);
1814 defaultValueCreator: (bindable) =>
1816 var view = (View)bindable;
1817 if ((view.internalMargin == null) || (view.Layout != null))
1819 ushort start = 0, end = 0, top = 0, bottom = 0;
1820 if (view.Layout != null)
1822 if (view.Layout.Margin != null)
1824 start = view.Layout.Margin.Start;
1825 end = view.Layout.Margin.End;
1826 top = view.Layout.Margin.Top;
1827 bottom = view.Layout.Margin.Bottom;
1830 view.internalMargin = new Extents(view.OnMarginChanged, start, end, top, bottom);
1833 if (view.Layout == null)
1836 var tmp = Object.GetProperty(view.SwigCPtr, Property.MARGIN);
1837 tmp?.Get(view.internalMargin);
1841 return view.internalMargin;
1846 /// UpdateAreaHintProperty
1848 [EditorBrowsable(EditorBrowsableState.Never)]
1849 public static readonly BindableProperty UpdateAreaHintProperty = BindableProperty.Create(nameof(UpdateAreaHint), typeof(Vector4), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1851 var view = (View)bindable;
1852 if (newValue != null)
1855 Object.InternalSetPropertyVector4(view.SwigCPtr, Interop.ActorProperty.UpdateAreaHintGet(), ((Vector4)newValue).SwigCPtr);
1858 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1860 var view = (View)bindable;
1861 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1863 Object.InternalRetrievingPropertyVector4(view.SwigCPtr, Interop.ActorProperty.UpdateAreaHintGet(), temp.SwigCPtr);
1868 /// ImageShadow Property
1870 [EditorBrowsable(EditorBrowsableState.Never)]
1871 public static readonly BindableProperty ImageShadowProperty = BindableProperty.Create(nameof(ImageShadow), typeof(ImageShadow), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1873 var view = (View)bindable;
1875 view.themeData?.selectorData?.ClearShadow(view);
1877 if (newValue is Selector<ImageShadow> selector)
1879 if (selector.HasAll()) view.SetShadow(selector.All);
1880 else view.EnsureSelectorData().ImageShadow = new TriggerableSelector<ImageShadow>(view, selector, view.SetShadow, true);
1884 view.SetShadow((ImageShadow)newValue);
1887 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1889 var view = (View)bindable;
1891 // Sync as current properties
1892 view.UpdateBackgroundExtraData();
1894 PropertyMap map = new PropertyMap();
1895 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SHADOW).Get(map);
1897 var shadow = new ImageShadow(map);
1898 return shadow.IsEmpty() ? null : shadow;
1904 [EditorBrowsable(EditorBrowsableState.Never)]
1905 public static readonly BindableProperty BoxShadowProperty = BindableProperty.Create(nameof(BoxShadow), typeof(Shadow), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1907 var view = (View)bindable;
1909 view.themeData?.selectorData?.ClearShadow(view);
1911 if (newValue is Selector<Shadow> selector)
1913 if (selector.HasAll()) view.SetShadow(selector.All);
1914 else view.EnsureSelectorData().BoxShadow = new TriggerableSelector<Shadow>(view, selector, view.SetShadow, true);
1918 view.SetShadow((Shadow)newValue);
1921 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1923 var view = (View)bindable;
1925 // Sync as current properties
1926 view.UpdateBackgroundExtraData();
1928 PropertyMap map = new PropertyMap();
1929 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SHADOW).Get(map);
1931 var shadow = new Shadow(map);
1932 return shadow.IsEmpty() ? null : shadow;
1936 /// CornerRadius Property
1938 [EditorBrowsable(EditorBrowsableState.Never)]
1939 public static readonly BindableProperty CornerRadiusProperty = BindableProperty.Create(nameof(CornerRadius), typeof(Vector4), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1941 var view = (View)bindable;
1942 (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).CornerRadius = (Vector4)newValue;
1943 view.UpdateBackgroundExtraData(BackgroundExtraDataUpdatedFlag.CornerRadius);
1945 defaultValueCreator: (bindable) =>
1947 var view = (View)bindable;
1948 return view.backgroundExtraData == null ? 0.0f : view.backgroundExtraData.CornerRadius;
1952 /// CornerRadiusPolicy Property
1954 [EditorBrowsable(EditorBrowsableState.Never)]
1955 public static readonly BindableProperty CornerRadiusPolicyProperty = BindableProperty.Create(nameof(CornerRadiusPolicy), typeof(VisualTransformPolicyType), typeof(View), VisualTransformPolicyType.Absolute, propertyChanged: (bindable, oldValue, newValue) =>
1957 var view = (View)bindable;
1958 (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).CornerRadiusPolicy = (VisualTransformPolicyType)newValue;
1960 if (view.backgroundExtraData.CornerRadius != null)
1962 view.UpdateBackgroundExtraData(BackgroundExtraDataUpdatedFlag.CornerRadius);
1965 defaultValueCreator: (bindable) =>
1967 var view = (View)bindable;
1968 return view.backgroundExtraData == null ? VisualTransformPolicyType.Absolute : view.backgroundExtraData.CornerRadiusPolicy;
1972 /// BorderlineWidth Property
1974 [EditorBrowsable(EditorBrowsableState.Never)]
1975 public static readonly BindableProperty BorderlineWidthProperty = BindableProperty.Create(nameof(BorderlineWidth), typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
1977 var view = (View)bindable;
1978 (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).BorderlineWidth = (float)newValue;
1979 view.UpdateBackgroundExtraData(BackgroundExtraDataUpdatedFlag.Borderline);
1981 defaultValueCreator: (bindable) =>
1983 var view = (View)bindable;
1984 return view.backgroundExtraData == null ? 0.0f : view.backgroundExtraData.BorderlineWidth;
1988 /// BorderlineColor Property
1990 [EditorBrowsable(EditorBrowsableState.Never)]
1991 public static readonly BindableProperty BorderlineColorProperty = BindableProperty.Create(nameof(BorderlineColor), typeof(Color), typeof(View), null,
1992 propertyChanged: (bindable, oldValue, newValue) =>
1994 var view = (View)bindable;
1996 view.themeData?.selectorData?.BorderlineColor?.Reset(view);
1998 if (newValue is Selector<Color> selector)
2000 if (selector.HasAll()) view.SetBorderlineColor(selector.All);
2001 else view.EnsureSelectorData().BorderlineColor = new TriggerableSelector<Color>(view, selector, view.SetBorderlineColor, true);
2005 view.SetBorderlineColor((Color)newValue);
2008 defaultValueCreator: (bindable) =>
2010 var view = (View)bindable;
2011 return view.backgroundExtraData == null ? Color.Black : view.backgroundExtraData.BorderlineColor;
2016 /// BorderlineColorSelector Property
2017 /// Like BackgroundColor, color selector typed BorderlineColor should be used in ViewStyle only.
2018 /// So this API is internally used only.
2020 internal static readonly BindableProperty BorderlineColorSelectorProperty = BindableProperty.Create(nameof(BorderlineColorSelector), typeof(Selector<Color>), typeof(View), null,
2021 propertyChanged: (bindable, oldValue, newValue) =>
2023 var view = (View)bindable;
2025 view.themeData?.selectorData?.BorderlineColor?.Reset(view);
2027 if (newValue is Selector<Color> selector)
2029 if (selector.HasAll()) view.SetBorderlineColor(selector.All);
2030 else view.EnsureSelectorData().BorderlineColor = new TriggerableSelector<Color>(view, selector, view.SetBorderlineColor, true);
2034 view.SetBorderlineColor((Color)newValue);
2037 defaultValueCreator: (bindable) =>
2039 var view = (View)bindable;
2040 var selector = view.themeData?.selectorData?.BorderlineColor?.Get();
2041 return (null != selector) ? selector : new Selector<Color>();
2046 /// BorderlineOffset Property
2048 [EditorBrowsable(EditorBrowsableState.Never)]
2049 public static readonly BindableProperty BorderlineOffsetProperty = BindableProperty.Create(nameof(BorderlineOffset), typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
2051 var view = (View)bindable;
2052 (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).BorderlineOffset = (float)newValue;
2053 view.UpdateBackgroundExtraData(BackgroundExtraDataUpdatedFlag.Borderline);
2055 defaultValueCreator: (bindable) =>
2057 var view = (View)bindable;
2058 return view.backgroundExtraData == null ? 0.0f : view.backgroundExtraData.BorderlineOffset;
2062 /// EnableControlState property
2064 [EditorBrowsable(EditorBrowsableState.Never)]
2065 public static readonly BindableProperty EnableControlStateProperty = BindableProperty.Create(nameof(EnableControlState), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2067 var view = (View)bindable;
2068 bool prev = view.enableControlState;
2069 view.enableControlState = (bool)newValue;
2071 if (prev != view.enableControlState)
2075 view.TouchEvent -= view.EmptyOnTouch;
2079 view.TouchEvent += view.EmptyOnTouch;
2083 defaultValueCreator: (bindable) =>
2085 return ((View)bindable).enableControlState;
2089 /// ThemeChangeSensitive property
2091 [EditorBrowsable(EditorBrowsableState.Never)]
2092 public static readonly BindableProperty ThemeChangeSensitiveProperty = BindableProperty.Create(nameof(ThemeChangeSensitive), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2094 var view = (View)bindable;
2096 if (view.ThemeChangeSensitive == (bool)newValue) return;
2098 if (view.themeData == null) view.themeData = new ThemeData();
2100 view.themeData.ThemeChangeSensitive = (bool)newValue;
2102 if (!view.themeData.ThemeApplied) return;
2104 if (view.themeData.ThemeChangeSensitive && !view.themeData.ListeningThemeChangeEvent)
2106 view.themeData.ListeningThemeChangeEvent = true;
2107 ThemeManager.ThemeChangedInternal.Add(view.OnThemeChanged);
2109 else if (!view.themeData.ThemeChangeSensitive && view.themeData.ListeningThemeChangeEvent)
2111 view.themeData.ListeningThemeChangeEvent = false;
2112 ThemeManager.ThemeChangedInternal.Remove(view.OnThemeChanged);
2115 defaultValueCreator: (bindable) =>
2117 return ((View)bindable).themeData?.ThemeChangeSensitive ?? ThemeManager.ApplicationThemeChangeSensitive;
2121 /// AccessibilityNameProperty
2123 [EditorBrowsable(EditorBrowsableState.Never)]
2124 public static readonly BindableProperty AccessibilityNameProperty = BindableProperty.Create(nameof(AccessibilityName), typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
2126 var view = (View)bindable;
2127 if (newValue != null)
2130 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.AccessibilityName, (string)newValue);
2133 defaultValueCreator: (bindable) =>
2135 var view = (View)bindable;
2137 return Object.InternalGetPropertyString(view.SwigCPtr, View.Property.AccessibilityName);
2141 /// AccessibilityDescriptionProperty
2143 [EditorBrowsable(EditorBrowsableState.Never)]
2144 public static readonly BindableProperty AccessibilityDescriptionProperty = BindableProperty.Create(nameof(AccessibilityDescription), typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
2146 var view = (View)bindable;
2147 if (newValue != null)
2150 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.AccessibilityDescription, (string)newValue);
2153 defaultValueCreator: (bindable) =>
2155 var view = (View)bindable;
2157 return Object.InternalGetPropertyString(view.SwigCPtr, View.Property.AccessibilityDescription);
2161 /// AccessibilityTranslationDomainProperty
2163 [EditorBrowsable(EditorBrowsableState.Never)]
2164 public static readonly BindableProperty AccessibilityTranslationDomainProperty = BindableProperty.Create(nameof(AccessibilityTranslationDomain), typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
2166 var view = (View)bindable;
2167 if (newValue != null)
2170 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.AccessibilityTranslationDomain, (string)newValue);
2173 defaultValueCreator: (bindable) =>
2175 var view = (View)bindable;
2177 return Object.InternalGetPropertyString(view.SwigCPtr, View.Property.AccessibilityTranslationDomain);
2181 /// AccessibilityRoleProperty
2183 [EditorBrowsable(EditorBrowsableState.Never)]
2184 public static readonly BindableProperty AccessibilityRoleProperty = BindableProperty.Create(nameof(AccessibilityRole), typeof(Role), typeof(View), default(Role), propertyChanged: (bindable, oldValue, newValue) =>
2186 var view = (View)bindable;
2187 if (newValue != null)
2190 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.AccessibilityRole, (int)newValue);
2193 defaultValueCreator: (bindable) =>
2195 var view = (View)bindable;
2197 return (Role)Object.InternalGetPropertyInt(view.SwigCPtr, View.Property.AccessibilityRole);
2201 /// AccessibilityHighlightableProperty
2203 [EditorBrowsable(EditorBrowsableState.Never)]
2204 public static readonly BindableProperty AccessibilityHighlightableProperty = BindableProperty.Create(nameof(AccessibilityHighlightable), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2206 var view = (View)bindable;
2207 if (newValue != null)
2210 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.AccessibilityHighlightable, (bool)newValue);
2213 defaultValueCreator: (bindable) =>
2215 var view = (View)bindable;
2217 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.AccessibilityHighlightable);
2221 /// AccessibilityHiddenProperty
2223 [EditorBrowsable(EditorBrowsableState.Never)]
2224 public static readonly BindableProperty AccessibilityHiddenProperty = BindableProperty.Create(nameof(AccessibilityHidden), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2226 var view = (View)bindable;
2227 if (newValue != null)
2230 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.AccessibilityHidden, (bool)newValue);
2233 defaultValueCreator: (bindable) =>
2235 var view = (View)bindable;
2237 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.AccessibilityHidden);
2241 /// ExcludeLayoutingProperty
2243 [EditorBrowsable(EditorBrowsableState.Never)]
2244 public static readonly BindableProperty ExcludeLayoutingProperty = BindableProperty.Create(nameof(ExcludeLayouting), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2246 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2247 if (newValue != null)
2249 instance.InternalExcludeLayouting = (bool)newValue;
2252 defaultValueCreator: (bindable) =>
2254 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2255 return instance.InternalExcludeLayouting;
2259 /// TooltipTextProperty
2261 [EditorBrowsable(EditorBrowsableState.Never)]
2262 public static readonly BindableProperty TooltipTextProperty = BindableProperty.Create(nameof(TooltipText), typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
2264 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2265 if (newValue != null)
2267 instance.InternalTooltipText = (string)newValue;
2270 defaultValueCreator: (bindable) =>
2272 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2273 return instance.InternalTooltipText;
2277 /// PositionUsesAnchorPointProperty
2279 [EditorBrowsable(EditorBrowsableState.Never)]
2280 public static readonly BindableProperty PositionUsesAnchorPointProperty = BindableProperty.Create(nameof(PositionUsesAnchorPoint), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2282 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2283 if (newValue != null)
2285 instance.InternalPositionUsesAnchorPoint = (bool)newValue;
2288 defaultValueCreator: (bindable) =>
2290 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2291 return instance.InternalPositionUsesAnchorPoint;
2295 /// AnchorPointProperty
2297 [EditorBrowsable(EditorBrowsableState.Never)]
2298 public static readonly BindableProperty AnchorPointProperty = BindableProperty.Create(nameof(AnchorPoint), typeof(Tizen.NUI.Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
2300 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2301 if (newValue != null)
2303 instance.InternalAnchorPoint = (Tizen.NUI.Position)newValue;
2306 defaultValueCreator: (bindable) =>
2308 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2309 return instance.InternalAnchorPoint;
2313 /// WidthSpecificationProperty
2315 [EditorBrowsable(EditorBrowsableState.Never)]
2316 public static readonly BindableProperty WidthSpecificationProperty = BindableProperty.Create(nameof(WidthSpecification), typeof(int), typeof(View), 0, propertyChanged: (bindable, oldValue, newValue) =>
2318 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2319 if (newValue != null)
2321 instance.InternalWidthSpecification = (int)newValue;
2324 defaultValueCreator: (bindable) =>
2326 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2327 return instance.InternalWidthSpecification;
2331 /// HeightSpecificationProperty
2333 [EditorBrowsable(EditorBrowsableState.Never)]
2334 public static readonly BindableProperty HeightSpecificationProperty = BindableProperty.Create(nameof(HeightSpecification), typeof(int), typeof(View), 0, propertyChanged: (bindable, oldValue, newValue) =>
2336 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2337 if (newValue != null)
2339 instance.InternalHeightSpecification = (int)newValue;
2342 defaultValueCreator: (bindable) =>
2344 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2345 return instance.InternalHeightSpecification;
2349 /// LayoutTransitionProperty
2351 [EditorBrowsable(EditorBrowsableState.Never)]
2352 public static readonly BindableProperty LayoutTransitionProperty = BindableProperty.Create(nameof(LayoutTransition), typeof(Tizen.NUI.LayoutTransition), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
2354 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2355 if (newValue != null)
2357 instance.InternalLayoutTransition = (Tizen.NUI.LayoutTransition)newValue;
2360 defaultValueCreator: (bindable) =>
2362 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2363 return instance.InternalLayoutTransition;
2367 /// PaddingEXProperty
2369 [EditorBrowsable(EditorBrowsableState.Never)]
2370 public static readonly BindableProperty PaddingEXProperty = BindableProperty.Create(nameof(PaddingEX), typeof(Tizen.NUI.Extents), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
2372 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2373 if (newValue != null)
2375 instance.InternalPaddingEX = (Tizen.NUI.Extents)newValue;
2378 defaultValueCreator: (bindable) =>
2380 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2381 return instance.InternalPaddingEX;
2387 [EditorBrowsable(EditorBrowsableState.Never)]
2388 public static readonly BindableProperty LayoutProperty = BindableProperty.Create(nameof(Layout), typeof(Tizen.NUI.LayoutItem), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
2390 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2391 if (newValue != null)
2393 instance.InternalLayout = (Tizen.NUI.LayoutItem)newValue;
2396 defaultValueCreator: (bindable) =>
2398 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2399 return instance.InternalLayout;
2403 /// BackgroundImageSynchronosLoadingProperty
2405 [EditorBrowsable(EditorBrowsableState.Never)]
2406 public static readonly BindableProperty BackgroundImageSynchronosLoadingProperty = BindableProperty.Create(nameof(BackgroundImageSynchronosLoading), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2408 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2409 if (newValue != null)
2411 instance.InternalBackgroundImageSynchronosLoading = (bool)newValue;
2414 defaultValueCreator: (bindable) =>
2416 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2417 return instance.InternalBackgroundImageSynchronosLoading;
2421 /// BackgroundImageSynchronousLoadingProperty
2423 [EditorBrowsable(EditorBrowsableState.Never)]
2424 public static readonly BindableProperty BackgroundImageSynchronousLoadingProperty = BindableProperty.Create(nameof(BackgroundImageSynchronousLoading), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2426 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2427 if (newValue != null)
2429 instance.InternalBackgroundImageSynchronousLoading = (bool)newValue;
2432 defaultValueCreator: (bindable) =>
2434 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2435 return instance.InternalBackgroundImageSynchronousLoading;
2439 /// EnableControlStatePropagationProperty
2441 [EditorBrowsable(EditorBrowsableState.Never)]
2442 public static readonly BindableProperty EnableControlStatePropagationProperty = BindableProperty.Create(nameof(EnableControlStatePropagation), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2444 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2445 if (newValue != null)
2447 instance.InternalEnableControlStatePropagation = (bool)newValue;
2450 defaultValueCreator: (bindable) =>
2452 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2453 return instance.InternalEnableControlStatePropagation;
2457 /// PropagatableControlStatesProperty
2459 [EditorBrowsable(EditorBrowsableState.Never)]
2460 public static readonly BindableProperty PropagatableControlStatesProperty = BindableProperty.Create(nameof(PropagatableControlStates), typeof(ControlState), typeof(View), ControlState.All, propertyChanged: (bindable, oldValue, newValue) =>
2462 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2463 if (newValue != null)
2465 instance.InternalPropagatableControlStates = (ControlState)newValue;
2468 defaultValueCreator: (bindable) =>
2470 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2471 return instance.InternalPropagatableControlStates;
2475 /// GrabTouchAfterLeaveProperty
2477 [EditorBrowsable(EditorBrowsableState.Never)]
2478 public static readonly BindableProperty GrabTouchAfterLeaveProperty = BindableProperty.Create(nameof(GrabTouchAfterLeave), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2480 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2481 if (newValue != null)
2483 instance.InternalGrabTouchAfterLeave = (bool)newValue;
2486 defaultValueCreator: (bindable) =>
2488 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2489 return instance.InternalGrabTouchAfterLeave;
2493 /// AllowOnlyOwnTouchProperty
2495 [EditorBrowsable(EditorBrowsableState.Never)]
2496 public static readonly BindableProperty AllowOnlyOwnTouchProperty = BindableProperty.Create(nameof(AllowOnlyOwnTouch), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2498 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2499 if (newValue != null)
2501 instance.InternalAllowOnlyOwnTouch = (bool)newValue;
2504 defaultValueCreator: (bindable) =>
2506 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2507 return instance.InternalAllowOnlyOwnTouch;
2512 /// BlendEquationProperty
2514 [EditorBrowsable(EditorBrowsableState.Never)]
2515 public static readonly BindableProperty BlendEquationProperty = BindableProperty.Create(nameof(BlendEquation), typeof(BlendEquationType), typeof(View), default(BlendEquationType), propertyChanged: (bindable, oldValue, newValue) =>
2517 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2518 if (newValue != null)
2520 instance.InternalBlendEquation = (Tizen.NUI.BlendEquationType)newValue;
2523 defaultValueCreator: (bindable) =>
2525 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2526 return instance.InternalBlendEquation;
2530 /// TransitionOptionsProperty
2532 [EditorBrowsable(EditorBrowsableState.Never)]
2533 public static readonly BindableProperty TransitionOptionsProperty = BindableProperty.Create(nameof(TransitionOptions), typeof(TransitionOptions), typeof(View), default(TransitionOptions), propertyChanged: (bindable, oldValue, newValue) =>
2535 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2536 if (newValue != null)
2538 instance.InternalTransitionOptions = (Tizen.NUI.TransitionOptions)newValue;
2541 defaultValueCreator: (bindable) =>
2543 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2544 return instance.InternalTransitionOptions;
2548 /// AutomationIdProperty
2550 [EditorBrowsable(EditorBrowsableState.Never)]
2551 public static readonly BindableProperty AutomationIdProperty = BindableProperty.Create(nameof(AutomationId), typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
2553 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2554 if (newValue != null)
2557 Object.InternalSetPropertyString(instance.SwigCPtr, View.Property.AutomationId, (string)newValue);
2560 defaultValueCreator: (bindable) =>
2562 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2564 return Object.InternalGetPropertyString(instance.SwigCPtr, View.Property.AutomationId);
2568 /// TouchAreaOffsetProperty
2570 [EditorBrowsable(EditorBrowsableState.Never)]
2571 public static readonly BindableProperty TouchAreaOffsetProperty = BindableProperty.Create(nameof(TouchAreaOffset), typeof(Offset), typeof(View), default(Offset), propertyChanged: (bindable, oldValue, newValue) =>
2573 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2574 if (newValue != null)
2576 instance.InternalTouchAreaOffset = (Tizen.NUI.Offset)newValue;
2579 defaultValueCreator: (bindable) =>
2581 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2582 return instance.InternalTouchAreaOffset;
2586 /// DispatchTouchMotionProperty
2588 [EditorBrowsable(EditorBrowsableState.Never)]
2589 public static readonly BindableProperty DispatchTouchMotionProperty = BindableProperty.Create(nameof(DispatchTouchMotion), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2591 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2592 if (newValue != null)
2594 instance.InternalDispatchTouchMotion = (bool)newValue;
2597 defaultValueCreator: (bindable) =>
2599 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2600 return instance.InternalDispatchTouchMotion;
2604 /// DispatchHoverMotionProperty
2606 [EditorBrowsable(EditorBrowsableState.Never)]
2607 public static readonly BindableProperty DispatchHoverMotionProperty = BindableProperty.Create(nameof(DispatchHoverMotion), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2609 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2610 if (newValue != null)
2612 instance.InternalDispatchHoverMotion = (bool)newValue;
2615 defaultValueCreator: (bindable) =>
2617 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2618 return instance.InternalDispatchHoverMotion;
2622 /// Gets View's Size2D set by user.
2624 internal Size2D GetUserSize2D()
2626 return new Size2D((int)userSizeWidth, (int)userSizeHeight);
2629 private void SetBackgroundImage(string value)
2631 if (string.IsNullOrEmpty(value))
2633 backgroundExtraDataUpdatedFlag &= ~BackgroundExtraDataUpdatedFlag.Background;
2635 var empty = new PropertyValue();
2637 Object.SetProperty(SwigCPtr, Property.BACKGROUND, empty);
2642 if (value.StartsWith("*Resource*"))
2644 string resource = Tizen.Applications.Application.Current.DirectoryInfo.Resource;
2645 value = value.Replace("*Resource*", resource);
2648 if (backgroundExtraData == null)
2651 Object.InternalSetPropertyString(SwigCPtr, View.Property.BACKGROUND, value);
2652 BackgroundImageSynchronousLoading = backgroundImageSynchronousLoading;
2656 var map = new PropertyMap();
2657 var url = new PropertyValue(value);
2658 var cornerRadiusValue = backgroundExtraData.CornerRadius == null ? new PropertyValue() : new PropertyValue(backgroundExtraData.CornerRadius);
2659 var cornerRadius = new PropertyValue(cornerRadiusValue);
2660 var cornerRadiusPolicy = new PropertyValue((int)(backgroundExtraData.CornerRadiusPolicy));
2661 var borderlineWidth = new PropertyValue(backgroundExtraData.BorderlineWidth);
2662 var borderlineColorValue = backgroundExtraData.BorderlineColor == null ? new PropertyValue(Color.Black) : new PropertyValue(backgroundExtraData.BorderlineColor);
2663 var borderlineColor = new PropertyValue(borderlineColorValue);
2664 var borderlineOffset = new PropertyValue(backgroundExtraData.BorderlineOffset);
2665 var synchronousLoading = new PropertyValue(backgroundImageSynchronousLoading);
2666 var npatchType = new PropertyValue((int)Visual.Type.NPatch);
2667 var border = (backgroundExtraData.BackgroundImageBorder != null) ? new PropertyValue(backgroundExtraData.BackgroundImageBorder) : null;
2668 var imageType = new PropertyValue((int)Visual.Type.Image);
2670 map.Add(ImageVisualProperty.URL, url)
2671 .Add(Visual.Property.CornerRadius, cornerRadius)
2672 .Add(Visual.Property.CornerRadiusPolicy, cornerRadiusPolicy)
2673 .Add(Visual.Property.BorderlineWidth, borderlineWidth)
2674 .Add(Visual.Property.BorderlineColor, borderlineColor)
2675 .Add(Visual.Property.BorderlineOffset, borderlineOffset)
2676 .Add(ImageVisualProperty.SynchronousLoading, synchronousLoading);
2678 if (backgroundExtraData.BackgroundImageBorder != null)
2680 map.Add(Visual.Property.Type, npatchType)
2681 .Add(NpatchImageVisualProperty.Border, border);
2685 map.Add(Visual.Property.Type, imageType);
2688 backgroundExtraDataUpdatedFlag &= ~BackgroundExtraDataUpdatedFlag.Background;
2690 var mapValue = new PropertyValue(map);
2691 Object.SetProperty(SwigCPtr, Property.BACKGROUND, mapValue);
2693 imageType?.Dispose();
2695 npatchType?.Dispose();
2696 synchronousLoading?.Dispose();
2697 borderlineOffset?.Dispose();
2698 borderlineColor?.Dispose();
2699 borderlineColorValue?.Dispose();
2700 borderlineWidth?.Dispose();
2701 cornerRadiusPolicy?.Dispose();
2702 cornerRadius?.Dispose();
2703 cornerRadiusValue?.Dispose();
2706 mapValue?.Dispose();
2709 private void SetBackgroundImageBorder(Rectangle value)
2711 bool isEmptyValue = Rectangle.IsNullOrZero(value);
2713 var backgroundImageBorder = isEmptyValue ? null : value;
2715 (backgroundExtraData ?? (backgroundExtraData = new BackgroundExtraData())).BackgroundImageBorder = backgroundImageBorder;
2722 PropertyMap map = Background;
2729 map[NpatchImageVisualProperty.Border] = new PropertyValue(backgroundImageBorder);
2733 map.Find(Visual.Property.Type)?.Get(out visualType);
2735 if (visualType == (int)Visual.Type.Image)
2737 map[Visual.Property.Type] = new PropertyValue((int)Visual.Type.NPatch);
2740 // Background extra data flag is not meanful anymore.
2741 backgroundExtraDataUpdatedFlag &= ~BackgroundExtraDataUpdatedFlag.Background;
2743 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, View.Property.BACKGROUND, new PropertyValue(map));
2746 private void SetBorderlineColor(Color value)
2753 (backgroundExtraData ?? (backgroundExtraData = new BackgroundExtraData())).BorderlineColor = value;
2755 UpdateBackgroundExtraData(BackgroundExtraDataUpdatedFlag.Borderline);
2758 private void SetBackgroundColor(Color value)
2765 if (backgroundExtraData == null)
2768 Object.InternalSetPropertyVector4(SwigCPtr, View.Property.BACKGROUND, ((Color)value).SwigCPtr);
2772 var map = new PropertyMap();
2773 var colorType = new PropertyValue((int)Visual.Type.Color);
2774 var mixColor = new PropertyValue(value);
2775 var cornerRadiusValue = backgroundExtraData.CornerRadius == null ? new PropertyValue() : new PropertyValue(backgroundExtraData.CornerRadius);
2776 var cornerRadius = new PropertyValue(cornerRadiusValue);
2777 var cornerRadiusPolicy = new PropertyValue((int)(backgroundExtraData.CornerRadiusPolicy));
2778 var borderlineWidth = new PropertyValue(backgroundExtraData.BorderlineWidth);
2779 var borderlineColorValue = backgroundExtraData.BorderlineColor == null ? new PropertyValue(Color.Black) : new PropertyValue(backgroundExtraData.BorderlineColor);
2780 var borderlineColor = new PropertyValue(borderlineColorValue);
2781 var borderlineOffset = new PropertyValue(backgroundExtraData.BorderlineOffset);
2783 map.Add(Visual.Property.Type, colorType)
2784 .Add(ColorVisualProperty.MixColor, mixColor)
2785 .Add(Visual.Property.CornerRadius, cornerRadius)
2786 .Add(Visual.Property.CornerRadiusPolicy, cornerRadiusPolicy)
2787 .Add(Visual.Property.BorderlineWidth, borderlineWidth)
2788 .Add(Visual.Property.BorderlineColor, borderlineColor)
2789 .Add(Visual.Property.BorderlineOffset, borderlineOffset);
2791 backgroundExtraDataUpdatedFlag &= ~BackgroundExtraDataUpdatedFlag.Background;
2793 var mapValue = new PropertyValue(map);
2794 Object.SetProperty(SwigCPtr, Property.BACKGROUND, mapValue);
2796 borderlineOffset?.Dispose();
2797 borderlineColor?.Dispose();
2798 borderlineColorValue?.Dispose();
2799 borderlineWidth?.Dispose();
2800 cornerRadiusPolicy?.Dispose();
2801 cornerRadius?.Dispose();
2802 cornerRadiusValue?.Dispose();
2803 mixColor?.Dispose();
2804 colorType?.Dispose();
2806 mapValue?.Dispose();
2809 private void SetColor(Color value)
2816 Interop.ActorInternal.SetColor(SwigCPtr, value.SwigCPtr);
2817 if (NDalicPINVOKE.SWIGPendingException.Pending)
2818 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2821 private void SetColorRed(float? value)
2828 Object.InternalSetPropertyFloat(SwigCPtr, View.Property.ColorRed, (float)value);
2829 if (NDalicPINVOKE.SWIGPendingException.Pending)
2830 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2833 private void SetColorGreen(float? value)
2840 Object.InternalSetPropertyFloat(SwigCPtr, View.Property.ColorGreen, (float)value);
2841 if (NDalicPINVOKE.SWIGPendingException.Pending)
2842 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2845 private void SetColorBlue(float? value)
2852 Object.InternalSetPropertyFloat(SwigCPtr, View.Property.ColorBlue, (float)value);
2853 if (NDalicPINVOKE.SWIGPendingException.Pending)
2854 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2857 private void SetOpacity(float? value)
2864 Object.InternalSetPropertyFloat(SwigCPtr, View.Property.OPACITY, (float)value);
2867 private void SetShadow(ShadowBase value)
2869 backgroundExtraDataUpdatedFlag &= ~BackgroundExtraDataUpdatedFlag.Shadow;
2870 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, View.Property.SHADOW, value == null ? new PropertyValue() : value.ToPropertyValue(this));