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 var view = (View)bindable;
220 if (view.themeData?.selectorData != null)
222 view.themeData.selectorData.BackgroundColor?.Reset(view);
223 view.themeData.selectorData.BackgroundImage?.Reset(view);
226 if (newValue is Selector<string> selector)
228 if (selector.HasAll()) view.SetBackgroundImage(selector.All);
229 else view.EnsureSelectorData().BackgroundImage = new TriggerableSelector<string>(view, selector, view.SetBackgroundImage, true);
233 view.SetBackgroundImage((string)newValue);
236 defaultValueCreator: (bindable) =>
238 var view = (View)bindable;
239 string backgroundImage = "";
241 Interop.View.InternalRetrievingVisualPropertyString(view.SwigCPtr, Property.BACKGROUND, ImageVisualProperty.URL, out backgroundImage);
243 return backgroundImage;
248 /// <summary>BackgroundImageBorderProperty</summary>
249 [EditorBrowsable(EditorBrowsableState.Never)]
250 public static readonly BindableProperty BackgroundImageBorderProperty = BindableProperty.Create(nameof(BackgroundImageBorder), typeof(Rectangle), typeof(View), default(Rectangle), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
252 var view = (View)bindable;
254 view.themeData?.selectorData?.BackgroundImageBorder?.Reset(view);
256 if (newValue is Selector<Rectangle> selector)
258 if (selector.HasAll()) view.SetBackgroundImageBorder(selector.All);
259 else view.EnsureSelectorData().BackgroundImageBorder = new TriggerableSelector<Rectangle>(view, selector, view.SetBackgroundImageBorder, true);
263 view.SetBackgroundImageBorder((Rectangle)newValue);
266 defaultValueCreator: (bindable) =>
268 var view = (View)bindable;
270 return view.backgroundExtraData?.BackgroundImageBorder;
274 /// BackgroundProperty
276 [EditorBrowsable(EditorBrowsableState.Never)]
277 public static readonly BindableProperty BackgroundProperty = BindableProperty.Create(nameof(Background), typeof(PropertyMap), typeof(View), null,
278 propertyChanged: (bindable, oldValue, newValue) =>
280 var view = (View)bindable;
281 if (newValue != null)
283 var propertyValue = new PropertyValue((PropertyMap)newValue);
284 Object.SetProperty(view.SwigCPtr, Property.BACKGROUND, propertyValue);
286 view.backgroundExtraData = null;
288 propertyValue.Dispose();
289 propertyValue = null;
292 defaultValueCreator: (bindable) =>
294 var view = (View)bindable;
295 PropertyMap tmp = new PropertyMap();
296 var propertyValue = Object.GetProperty(view.SwigCPtr, Property.BACKGROUND);
297 propertyValue.Get(tmp);
298 propertyValue.Dispose();
299 propertyValue = null;
307 [EditorBrowsable(EditorBrowsableState.Never)]
308 public static readonly BindableProperty StateProperty = BindableProperty.Create(nameof(State), typeof(States), typeof(View), States.Normal, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
310 var view = (View)bindable;
311 if (newValue != null)
313 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.STATE, (int)newValue);
316 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
318 var view = (View)bindable;
320 temp = Object.InternalGetPropertyInt(view.SwigCPtr, View.Property.STATE);
323 case 0: return States.Normal;
324 case 1: return States.Focused;
325 case 2: return States.Disabled;
326 default: return States.Normal;
333 [EditorBrowsable(EditorBrowsableState.Never)]
334 public static readonly BindableProperty SubStateProperty = BindableProperty.Create(nameof(SubState), typeof(States), typeof(View), States.Normal, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
336 var view = (View)bindable;
337 string valueToString = "";
338 if (newValue != null)
340 valueToString = ((States)newValue).GetDescription();
341 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.SubState, valueToString);
344 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
346 var view = (View)bindable;
348 temp = Object.InternalGetPropertyString(view.SwigCPtr, View.Property.SubState);
349 return temp.GetValueByDescription<States>();
355 [EditorBrowsable(EditorBrowsableState.Never)]
356 public static readonly BindableProperty TooltipProperty = BindableProperty.Create(nameof(Tooltip), typeof(PropertyMap), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
358 var view = (View)bindable;
359 if (newValue != null)
361 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.TOOLTIP, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
364 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
366 var view = (View)bindable;
367 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
368 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.TOOLTIP).Get(temp);
375 [EditorBrowsable(EditorBrowsableState.Never)]
376 public static readonly BindableProperty FlexProperty = BindableProperty.Create(nameof(Flex), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
378 var view = (View)bindable;
379 if (newValue != null)
381 Object.InternalSetPropertyFloat(view.SwigCPtr, FlexContainer.ChildProperty.FLEX, (float)newValue);
384 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
386 var view = (View)bindable;
387 return Object.InternalGetPropertyFloat(view.SwigCPtr, FlexContainer.ChildProperty.FLEX);
391 /// AlignSelfProperty
393 [EditorBrowsable(EditorBrowsableState.Never)]
394 public static readonly BindableProperty AlignSelfProperty = BindableProperty.Create(nameof(AlignSelf), typeof(int), typeof(View), default(int), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
396 var view = (View)bindable;
397 if (newValue != null)
399 Object.InternalSetPropertyInt(view.SwigCPtr, FlexContainer.ChildProperty.AlignSelf, (int)newValue);
402 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
404 var view = (View)bindable;
405 return Object.InternalGetPropertyInt(view.SwigCPtr, FlexContainer.ChildProperty.AlignSelf);
409 /// FlexMarginProperty
411 [EditorBrowsable(EditorBrowsableState.Never)]
412 public static readonly BindableProperty FlexMarginProperty = BindableProperty.Create(nameof(FlexMargin), typeof(Vector4), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
414 var view = (View)bindable;
415 if (newValue != null)
417 Object.InternalSetPropertyVector4(view.SwigCPtr, FlexContainer.ChildProperty.FlexMargin, ((Vector4)newValue).SwigCPtr);
420 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
422 var view = (View)bindable;
423 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
424 Object.InternalRetrievingPropertyVector4(view.SwigCPtr, FlexContainer.ChildProperty.FlexMargin, temp.SwigCPtr);
429 /// CellIndexProperty
431 [EditorBrowsable(EditorBrowsableState.Never)]
432 public static readonly BindableProperty CellIndexProperty = BindableProperty.Create(nameof(CellIndex), typeof(Vector2), typeof(View), null,
433 propertyChanged: (bindable, oldValue, newValue) =>
435 var view = (View)bindable;
436 if (newValue != null)
438 Object.InternalSetPropertyVector2(view.SwigCPtr, TableView.ChildProperty.CellIndex, ((Vector2)newValue).SwigCPtr);
441 defaultValueCreator: (bindable) =>
443 var view = (View)bindable;
444 if (view.internalCellIndex == null)
446 view.internalCellIndex = new Vector2(view.OnCellIndexChanged, 0, 0);
448 Object.InternalRetrievingPropertyVector2(view.SwigCPtr, TableView.ChildProperty.CellIndex, view.internalCellIndex.SwigCPtr);
449 return view.internalCellIndex;
456 [EditorBrowsable(EditorBrowsableState.Never)]
457 public static readonly BindableProperty RowSpanProperty = BindableProperty.Create(nameof(RowSpan), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
459 var view = (View)bindable;
460 if (newValue != null)
462 Object.InternalSetPropertyFloat(view.SwigCPtr, TableView.ChildProperty.RowSpan, (float)newValue);
465 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
467 var view = (View)bindable;
468 return Object.InternalGetPropertyFloat(view.SwigCPtr, TableView.ChildProperty.RowSpan);
472 /// ColumnSpanProperty
474 [EditorBrowsable(EditorBrowsableState.Never)]
475 public static readonly BindableProperty ColumnSpanProperty = BindableProperty.Create(nameof(ColumnSpan), 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.ColumnSpan, (float)newValue);
483 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
485 var view = (View)bindable;
486 return Object.InternalGetPropertyFloat(view.SwigCPtr, TableView.ChildProperty.ColumnSpan);
490 /// CellHorizontalAlignmentProperty
492 [EditorBrowsable(EditorBrowsableState.Never)]
493 public static readonly BindableProperty CellHorizontalAlignmentProperty = BindableProperty.Create(nameof(CellHorizontalAlignment), typeof(HorizontalAlignmentType), typeof(View), HorizontalAlignmentType.Left, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
495 var view = (View)bindable;
496 string valueToString = "";
498 if (newValue != null)
500 valueToString = ((HorizontalAlignmentType)newValue).GetDescription();
501 Object.InternalSetPropertyString(view.SwigCPtr, TableView.ChildProperty.CellHorizontalAlignment, valueToString);
504 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
506 var view = (View)bindable;
508 temp = Object.InternalGetPropertyString(view.SwigCPtr, TableView.ChildProperty.CellHorizontalAlignment);
509 return temp.GetValueByDescription<HorizontalAlignmentType>();
513 /// CellVerticalAlignmentProperty
515 [EditorBrowsable(EditorBrowsableState.Never)]
516 public static readonly BindableProperty CellVerticalAlignmentProperty = BindableProperty.Create(nameof(CellVerticalAlignment), typeof(VerticalAlignmentType), typeof(View), VerticalAlignmentType.Top, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
518 var view = (View)bindable;
519 string valueToString = "";
521 if (newValue != null)
523 valueToString = ((VerticalAlignmentType)newValue).GetDescription();
524 Object.InternalSetPropertyString(view.SwigCPtr, TableView.ChildProperty.CellVerticalAlignment, valueToString);
527 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
529 var view = (View)bindable;
531 temp = Object.InternalGetPropertyString(view.SwigCPtr, TableView.ChildProperty.CellVerticalAlignment);
532 return temp.GetValueByDescription<VerticalAlignmentType>();
536 /// "DO not use this, that will be deprecated. Use 'View Weight' instead of BindableProperty"
537 /// This needs to be hidden as inhouse API until all applications using it have been updated. Do not make public.
539 [EditorBrowsable(EditorBrowsableState.Never)]
540 public static readonly BindableProperty WeightProperty = BindableProperty.Create(nameof(Weight), typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
542 var view = (View)bindable;
543 if (newValue != null)
545 view.Weight = (float)newValue;
549 defaultValueCreator: (bindable) =>
551 var view = (View)bindable;
556 /// LeftFocusableViewProperty
558 [EditorBrowsable(EditorBrowsableState.Never)]
559 public static readonly BindableProperty LeftFocusableViewProperty = BindableProperty.Create(nameof(View.LeftFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
561 var view = (View)bindable;
562 if (newValue != null) { view.LeftFocusableViewId = (int)(newValue as View)?.GetId(); }
563 else { view.LeftFocusableViewId = -1; }
565 defaultValueCreator: (bindable) =>
567 var view = (View)bindable;
568 if (view.LeftFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.LeftFocusableViewId); }
573 /// RightFocusableViewProperty
575 [EditorBrowsable(EditorBrowsableState.Never)]
576 public static readonly BindableProperty RightFocusableViewProperty = BindableProperty.Create(nameof(View.RightFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
578 var view = (View)bindable;
579 if (newValue != null) { view.RightFocusableViewId = (int)(newValue as View)?.GetId(); }
580 else { view.RightFocusableViewId = -1; }
582 defaultValueCreator: (bindable) =>
584 var view = (View)bindable;
585 if (view.RightFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.RightFocusableViewId); }
590 /// UpFocusableViewProperty
592 [EditorBrowsable(EditorBrowsableState.Never)]
593 public static readonly BindableProperty UpFocusableViewProperty = BindableProperty.Create(nameof(View.UpFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
595 var view = (View)bindable;
596 if (newValue != null) { view.UpFocusableViewId = (int)(newValue as View)?.GetId(); }
597 else { view.UpFocusableViewId = -1; }
599 defaultValueCreator: (bindable) =>
601 var view = (View)bindable;
602 if (view.UpFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.UpFocusableViewId); }
607 /// DownFocusableViewProperty
609 [EditorBrowsable(EditorBrowsableState.Never)]
610 public static readonly BindableProperty DownFocusableViewProperty = BindableProperty.Create(nameof(View.DownFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
612 var view = (View)bindable;
613 if (newValue != null) { view.DownFocusableViewId = (int)(newValue as View)?.GetId(); }
614 else { view.DownFocusableViewId = -1; }
616 defaultValueCreator: (bindable) =>
618 var view = (View)bindable;
619 if (view.DownFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.DownFocusableViewId); }
624 /// ClockwiseFocusableViewProperty
626 [EditorBrowsable(EditorBrowsableState.Never)]
627 public static readonly BindableProperty ClockwiseFocusableViewProperty = BindableProperty.Create(nameof(View.ClockwiseFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
629 var view = (View)bindable;
630 if (newValue != null && (newValue is View)) { view.ClockwiseFocusableViewId = (int)(newValue as View)?.GetId(); }
631 else { view.ClockwiseFocusableViewId = -1; }
633 defaultValueCreator: (bindable) =>
635 var view = (View)bindable;
636 if (view.ClockwiseFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.ClockwiseFocusableViewId); }
641 /// CounterClockwiseFocusableViewProperty
643 [EditorBrowsable(EditorBrowsableState.Never)]
644 public static readonly BindableProperty CounterClockwiseFocusableViewProperty = BindableProperty.Create(nameof(View.CounterClockwiseFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
646 var view = (View)bindable;
647 if (newValue != null && (newValue is View)) { view.CounterClockwiseFocusableViewId = (int)(newValue as View)?.GetId(); }
648 else { view.CounterClockwiseFocusableViewId = -1; }
650 defaultValueCreator: (bindable) =>
652 var view = (View)bindable;
653 if (view.CounterClockwiseFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.CounterClockwiseFocusableViewId); }
658 /// FocusableProperty
660 [EditorBrowsable(EditorBrowsableState.Never)]
661 public static readonly BindableProperty FocusableProperty = BindableProperty.Create(nameof(Focusable), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
663 var view = (View)bindable;
664 if (newValue != null) { view.SetKeyboardFocusable((bool)newValue); }
666 defaultValueCreator: (bindable) =>
668 var view = (View)bindable;
669 return view.IsKeyboardFocusable();
673 /// FocusableChildrenProperty
675 [EditorBrowsable(EditorBrowsableState.Never)]
676 public static readonly BindableProperty FocusableChildrenProperty = BindableProperty.Create(nameof(FocusableChildren), typeof(bool), typeof(View), true, propertyChanged: (bindable, oldValue, newValue) =>
678 var view = (View)bindable;
679 if (newValue != null) { view.SetKeyboardFocusableChildren((bool)newValue); }
681 defaultValueCreator: (bindable) =>
683 var view = (View)bindable;
684 return view.AreChildrenKeyBoardFocusable();
688 /// FocusableInTouchProperty
690 [EditorBrowsable(EditorBrowsableState.Never)]
691 public static readonly BindableProperty FocusableInTouchProperty = BindableProperty.Create(nameof(FocusableInTouch), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
693 var view = (View)bindable;
694 if (newValue != null) { view.SetFocusableInTouch((bool)newValue); }
696 defaultValueCreator: (bindable) =>
698 var view = (View)bindable;
699 return view.IsFocusableInTouch();
705 [EditorBrowsable(EditorBrowsableState.Never)]
706 public static readonly BindableProperty Size2DProperty = BindableProperty.Create(nameof(Size2D), typeof(Size2D), typeof(View), null,
707 propertyChanged: (bindable, oldValue, newValue) =>
709 var view = (View)bindable;
710 if (newValue != null)
712 // Size property setter is only used by user.
713 // Framework code uses SetSize() instead of Size property setter.
714 // Size set by user is returned by GetUserSize2D() for SuggestedMinimumWidth/Height.
715 // SuggestedMinimumWidth/Height is used by Layout calculation.
716 view.userSizeWidth = ((Size2D)newValue).Width;
717 view.userSizeHeight = ((Size2D)newValue).Height;
719 Object.InternalSetPropertyVector2ActualVector3(view.SwigCPtr, View.Property.SIZE, ((Size2D)newValue).SwigCPtr);
721 view.widthPolicy = ((Size2D)newValue).Width;
722 view.heightPolicy = ((Size2D)newValue).Height;
724 view.layout?.RequestLayout();
727 defaultValueCreator: (bindable) =>
729 var view = (View)bindable;
730 if (view.internalSize2D == null)
732 view.internalSize2D = new Size2D(view.OnSize2DChanged, 0, 0);
734 Object.InternalRetrievingPropertyVector2ActualVector3(view.SwigCPtr, View.Property.SIZE, view.internalSize2D.SwigCPtr);
736 return view.internalSize2D;
743 [EditorBrowsable(EditorBrowsableState.Never)]
744 public static readonly BindableProperty OpacityProperty = BindableProperty.Create(nameof(Opacity), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
746 var view = (View)bindable;
748 view.themeData?.selectorData?.Opacity?.Reset(view);
750 if (newValue is Selector<float?> selector)
752 if (selector.HasAll()) view.SetOpacity(selector.All);
753 else view.EnsureSelectorData().Opacity = new TriggerableSelector<float?>(view, selector, view.SetOpacity, true);
757 view.SetOpacity((float?)newValue);
760 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
762 var view = (View)bindable;
763 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.OPACITY);
767 /// Position2DProperty
769 [EditorBrowsable(EditorBrowsableState.Never)]
770 public static readonly BindableProperty Position2DProperty = BindableProperty.Create(nameof(Position2D), typeof(Position2D), typeof(View), null,
771 propertyChanged: (bindable, oldValue, newValue) =>
773 var view = (View)bindable;
774 if (newValue != null)
776 Object.InternalSetPropertyVector2ActualVector3(view.SwigCPtr, View.Property.POSITION, ((Position2D)newValue).SwigCPtr);
779 defaultValueCreator: (bindable) =>
781 var view = (View)bindable;
782 if (view.internalPosition2D == null)
784 view.internalPosition2D = new Position2D(view.OnPosition2DChanged, 0, 0);
786 Object.InternalRetrievingPropertyVector2ActualVector3(view.SwigCPtr, View.Property.POSITION, view.internalPosition2D.SwigCPtr);
787 return view.internalPosition2D;
792 /// PositionUsesPivotPointProperty
794 [EditorBrowsable(EditorBrowsableState.Never)]
795 public static readonly BindableProperty PositionUsesPivotPointProperty = BindableProperty.Create(nameof(PositionUsesPivotPoint), typeof(bool), typeof(View), true, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
797 var view = (View)bindable;
798 if (newValue != null)
800 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.PositionUsesAnchorPoint, (bool)newValue);
803 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
805 var view = (View)bindable;
806 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.PositionUsesAnchorPoint);
810 /// SiblingOrderProperty
812 [EditorBrowsable(EditorBrowsableState.Never)]
813 public static readonly BindableProperty SiblingOrderProperty = BindableProperty.Create(nameof(SiblingOrder), typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
815 var view = (View)bindable;
817 if (newValue != null)
819 value = (int)newValue;
822 NUILog.Error("SiblingOrder should be bigger than 0 or equal to 0.");
825 var siblings = view.GetParent()?.Children;
826 if (siblings != null)
828 int currentOrder = siblings.IndexOf(view);
829 if (value != currentOrder)
831 if (value == 0) { view.LowerToBottom(); }
832 else if (value < siblings.Count - 1)
834 if (value > currentOrder) { view.RaiseAbove(siblings[value]); }
835 else { view.LowerBelow(siblings[value]); }
837 else { view.RaiseToTop(); }
842 defaultValueCreator: (bindable) =>
844 var view = (View)bindable;
845 var parentChildren = view.GetParent()?.Children;
846 int currentOrder = 0;
847 if (parentChildren != null)
849 currentOrder = parentChildren.IndexOf(view);
851 if (currentOrder < 0) { return 0; }
852 else if (currentOrder < parentChildren.Count) { return currentOrder; }
859 /// ParentOriginProperty
861 [EditorBrowsable(EditorBrowsableState.Never)]
862 public static readonly BindableProperty ParentOriginProperty = BindableProperty.Create(nameof(ParentOrigin), typeof(Position), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
864 var view = (View)bindable;
865 if (newValue != null)
867 Object.InternalSetPropertyVector3(view.SwigCPtr, View.Property.ParentOrigin, ((Position)newValue).SwigCPtr);
870 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
872 var view = (View)bindable;
873 Position temp = new Position(0.0f, 0.0f, 0.0f);
874 Object.InternalRetrievingPropertyVector3(view.SwigCPtr, View.Property.ParentOrigin, temp.SwigCPtr);
880 /// PivotPointProperty
882 [EditorBrowsable(EditorBrowsableState.Never)]
883 public static readonly BindableProperty PivotPointProperty = BindableProperty.Create(nameof(PivotPoint), typeof(Position), typeof(View), null,
884 propertyChanged: (bindable, oldValue, newValue) =>
886 var view = (View)bindable;
887 if (newValue != null)
889 view.SetAnchorPoint((Position)newValue);
892 defaultValueCreator: (bindable) =>
894 var view = (View)bindable;
895 if (view.internalPivotPoint == null)
897 view.internalPivotPoint = new Position(view.OnPivotPointChanged, 0, 0, 0);
899 Object.InternalRetrievingPropertyVector3(view.SwigCPtr, View.Property.AnchorPoint, view.internalPivotPoint.SwigCPtr);
900 return view.internalPivotPoint;
905 /// SizeWidthProperty
907 [EditorBrowsable(EditorBrowsableState.Never)]
908 public static readonly BindableProperty SizeWidthProperty = BindableProperty.Create(nameof(SizeWidth), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
910 var view = (View)bindable;
911 if (newValue != null)
913 // Size property setter is only used by user.
914 // Framework code uses SetSize() instead of Size property setter.
915 // Size set by user is returned by GetUserSize2D() for SuggestedMinimumWidth/Height.
916 // SuggestedMinimumWidth/Height is used by Layout calculation.
917 view.userSizeWidth = (float)newValue;
918 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.SizeWidth, (float)newValue);
919 view.WidthSpecification = (int)System.Math.Ceiling((float)newValue);
922 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
924 var view = (View)bindable;
925 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.SizeWidth);
929 /// SizeHeightProperty
931 [EditorBrowsable(EditorBrowsableState.Never)]
932 public static readonly BindableProperty SizeHeightProperty = BindableProperty.Create(nameof(SizeHeight), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
934 var view = (View)bindable;
935 if (newValue != null)
937 // Size property setter is only used by user.
938 // Framework code uses SetSize() instead of Size property setter.
939 // Size set by user is returned by GetUserSize2D() for SuggestedMinimumWidth/Height.
940 // SuggestedMinimumWidth/Height is used by Layout calculation.
941 view.userSizeHeight = (float)newValue;
942 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.SizeHeight, (float)newValue);
943 view.HeightSpecification = (int)System.Math.Ceiling((float)newValue);
946 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
948 var view = (View)bindable;
949 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.SizeHeight);
955 [EditorBrowsable(EditorBrowsableState.Never)]
956 public static readonly BindableProperty PositionProperty = BindableProperty.Create(nameof(Position), typeof(Position), typeof(View), null,
957 propertyChanged: (bindable, oldValue, newValue) =>
959 var view = (View)bindable;
960 if (newValue != null)
962 Object.InternalSetPropertyVector3(view.SwigCPtr, View.Property.POSITION, ((Position)newValue).SwigCPtr);
965 defaultValueCreator: (bindable) =>
967 var view = (View)bindable;
968 if (view.internalPosition == null)
970 view.internalPosition = new Position(view.OnPositionChanged, 0, 0, 0);
972 Object.InternalRetrievingPropertyVector3(view.SwigCPtr, View.Property.POSITION, view.internalPosition.SwigCPtr);
973 return view.internalPosition;
978 /// PositionXProperty
980 [EditorBrowsable(EditorBrowsableState.Never)]
981 public static readonly BindableProperty PositionXProperty = BindableProperty.Create(nameof(PositionX), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
983 var view = (View)bindable;
984 if (newValue != null)
986 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.PositionX, (float)newValue);
989 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
991 var view = (View)bindable;
992 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.PositionX);
996 /// PositionYProperty
998 [EditorBrowsable(EditorBrowsableState.Never)]
999 public static readonly BindableProperty PositionYProperty = BindableProperty.Create(nameof(PositionY), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1001 var view = (View)bindable;
1002 if (newValue != null)
1004 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.PositionY, (float)newValue);
1007 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1009 var view = (View)bindable;
1010 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.PositionY);
1014 /// PositionZProperty
1016 [EditorBrowsable(EditorBrowsableState.Never)]
1017 public static readonly BindableProperty PositionZProperty = BindableProperty.Create(nameof(PositionZ), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1019 var view = (View)bindable;
1020 if (newValue != null)
1022 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.PositionZ, (float)newValue);
1025 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1027 var view = (View)bindable;
1028 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.PositionZ);
1032 /// OrientationProperty
1034 [EditorBrowsable(EditorBrowsableState.Never)]
1035 public static readonly BindableProperty OrientationProperty = BindableProperty.Create(nameof(Orientation), typeof(Rotation), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1037 var view = (View)bindable;
1038 if (newValue != null)
1040 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ORIENTATION, new Tizen.NUI.PropertyValue((Rotation)newValue));
1043 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1045 var view = (View)bindable;
1046 Rotation temp = new Rotation();
1047 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ORIENTATION).Get(temp);
1054 [EditorBrowsable(EditorBrowsableState.Never)]
1055 public static readonly BindableProperty ScaleProperty = BindableProperty.Create(nameof(Scale), typeof(Vector3), typeof(View), null,
1056 propertyChanged: (bindable, oldValue, newValue) =>
1058 var view = (View)bindable;
1059 if (newValue != null)
1061 view.SetScale((Vector3)newValue);
1064 defaultValueCreator: (bindable) =>
1066 var view = (View)bindable;
1067 if (view.internalScale == null)
1069 view.internalScale = new Vector3(view.OnScaleChanged, 0, 0, 0);
1071 Object.InternalRetrievingPropertyVector3(view.SwigCPtr, View.Property.SCALE, view.internalScale.SwigCPtr);
1072 return view.internalScale;
1079 [EditorBrowsable(EditorBrowsableState.Never)]
1080 public static readonly BindableProperty ScaleXProperty = BindableProperty.Create(nameof(ScaleX), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1082 var view = (View)bindable;
1083 if (newValue != null)
1085 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.ScaleX, (float)newValue);
1088 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1090 var view = (View)bindable;
1091 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.ScaleX);
1097 [EditorBrowsable(EditorBrowsableState.Never)]
1098 public static readonly BindableProperty ScaleYProperty = BindableProperty.Create(nameof(ScaleY), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1100 var view = (View)bindable;
1101 if (newValue != null)
1103 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.ScaleY, (float)newValue);
1106 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1108 var view = (View)bindable;
1109 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.ScaleY);
1115 [EditorBrowsable(EditorBrowsableState.Never)]
1116 public static readonly BindableProperty ScaleZProperty = BindableProperty.Create(nameof(ScaleZ), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1118 var view = (View)bindable;
1119 if (newValue != null)
1121 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.ScaleZ, (float)newValue);
1124 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1126 var view = (View)bindable;
1127 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.ScaleZ);
1133 [EditorBrowsable(EditorBrowsableState.Never)]
1134 public static readonly BindableProperty NameProperty = BindableProperty.Create(nameof(Name), typeof(string), typeof(View), string.Empty,
1135 propertyChanged: (bindable, oldValue, newValue) =>
1137 var view = (View)bindable;
1138 if (newValue != null)
1140 view.internalName = (string)newValue;
1141 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.NAME, (string)newValue);
1144 defaultValueCreator: (bindable) =>
1146 var view = (View)bindable;
1147 return view.internalName;
1152 /// SensitiveProperty
1154 [EditorBrowsable(EditorBrowsableState.Never)]
1155 public static readonly BindableProperty SensitiveProperty = BindableProperty.Create(nameof(Sensitive), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1157 var view = (View)bindable;
1158 if (newValue != null)
1160 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.SENSITIVE, (bool)newValue);
1163 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1165 var view = (View)bindable;
1166 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.SENSITIVE);
1170 /// IsEnabledProperty
1172 [EditorBrowsable(EditorBrowsableState.Never)]
1173 public static readonly BindableProperty IsEnabledProperty = BindableProperty.Create(nameof(IsEnabled), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1175 var view = (View)bindable;
1176 if (newValue != null)
1178 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.UserInteractionEnabled, (bool)newValue);
1179 view.OnEnabled((bool)newValue);
1182 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1184 var view = (View)bindable;
1185 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.UserInteractionEnabled);
1189 /// DispatchKeyEventsProperty
1191 [EditorBrowsable(EditorBrowsableState.Never)]
1192 public static readonly BindableProperty DispatchKeyEventsProperty = BindableProperty.Create(nameof(DispatchKeyEvents), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1194 var view = (View)bindable;
1195 if (newValue != null)
1197 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.DispatchKeyEvents, (bool)newValue);
1200 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1202 var view = (View)bindable;
1203 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.DispatchKeyEvents);
1207 /// LeaveRequiredProperty
1209 [EditorBrowsable(EditorBrowsableState.Never)]
1210 public static readonly BindableProperty LeaveRequiredProperty = BindableProperty.Create(nameof(LeaveRequired), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1212 var view = (View)bindable;
1213 if (newValue != null)
1215 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.LeaveRequired, (bool)newValue);
1218 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1220 var view = (View)bindable;
1221 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.LeaveRequired);
1225 /// InheritOrientationProperty
1227 [EditorBrowsable(EditorBrowsableState.Never)]
1228 public static readonly BindableProperty InheritOrientationProperty = BindableProperty.Create(nameof(InheritOrientation), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1230 var view = (View)bindable;
1231 if (newValue != null)
1233 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.InheritOrientation, (bool)newValue);
1236 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1238 var view = (View)bindable;
1239 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.InheritOrientation);
1243 /// InheritScaleProperty
1245 [EditorBrowsable(EditorBrowsableState.Never)]
1246 public static readonly BindableProperty InheritScaleProperty = BindableProperty.Create(nameof(InheritScale), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1248 var view = (View)bindable;
1249 if (newValue != null)
1251 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.InheritScale, (bool)newValue);
1254 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1256 var view = (View)bindable;
1257 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.InheritScale);
1261 /// DrawModeProperty
1263 [EditorBrowsable(EditorBrowsableState.Never)]
1264 public static readonly BindableProperty DrawModeProperty = BindableProperty.Create(nameof(DrawMode), typeof(DrawModeType), typeof(View), DrawModeType.Normal, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1266 var view = (View)bindable;
1267 if (newValue != null)
1269 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.DrawMode, (int)newValue);
1272 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1274 var view = (View)bindable;
1275 return (DrawModeType)Object.InternalGetPropertyInt(view.SwigCPtr, View.Property.DrawMode);
1279 /// SizeModeFactorProperty
1281 [EditorBrowsable(EditorBrowsableState.Never)]
1282 public static readonly BindableProperty SizeModeFactorProperty = BindableProperty.Create(nameof(SizeModeFactor), typeof(Vector3), typeof(View), null,
1283 propertyChanged: (bindable, oldValue, newValue) =>
1285 var view = (View)bindable;
1286 if (newValue != null)
1288 Object.InternalSetPropertyVector3(view.SwigCPtr, View.Property.SizeModeFactor, ((Vector3)newValue).SwigCPtr);
1291 defaultValueCreator: (bindable) =>
1293 var view = (View)bindable;
1294 if (view.internalSizeModeFactor == null)
1296 view.internalSizeModeFactor = new Vector3(view.OnSizeModeFactorChanged, 0, 0, 0);
1298 Object.InternalRetrievingPropertyVector3(view.SwigCPtr, View.Property.SizeModeFactor, view.internalSizeModeFactor.SwigCPtr);
1299 return view.internalSizeModeFactor;
1304 /// WidthResizePolicyProperty
1306 [EditorBrowsable(EditorBrowsableState.Never)]
1307 public static readonly BindableProperty WidthResizePolicyProperty = BindableProperty.Create(nameof(WidthResizePolicy), typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1309 var view = (View)bindable;
1310 if (newValue != null)
1312 if ((ResizePolicyType)newValue == ResizePolicyType.KeepSizeFollowingParent)
1314 if (view.widthConstraint == null)
1316 view.widthConstraint = new EqualConstraintWithParentFloat((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeWidth, View.Property.SizeWidth);
1317 view.widthConstraint.Apply();
1319 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.WidthResizePolicy, (int)ResizePolicyType.FillToParent);
1323 view.widthConstraint?.Remove();
1324 view.widthConstraint?.Dispose();
1325 view.widthConstraint = null;
1327 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.WidthResizePolicy, (int)newValue);
1329 // Match ResizePolicy to new Layouting.
1330 // Parent relative policies can not be mapped at this point as parent size unknown.
1331 switch ((ResizePolicyType)newValue)
1333 case ResizePolicyType.UseNaturalSize:
1335 view.WidthSpecification = LayoutParamPolicies.WrapContent;
1338 case ResizePolicyType.FillToParent:
1340 view.WidthSpecification = LayoutParamPolicies.MatchParent;
1343 case ResizePolicyType.FitToChildren:
1345 view.WidthSpecification = LayoutParamPolicies.WrapContent;
1353 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1355 var view = (View)bindable;
1358 temp = Object.InternalGetPropertyString(view.SwigCPtr, View.Property.WidthResizePolicy);
1359 return temp.GetValueByDescription<ResizePolicyType>();
1363 /// HeightResizePolicyProperty
1365 [EditorBrowsable(EditorBrowsableState.Never)]
1366 public static readonly BindableProperty HeightResizePolicyProperty = BindableProperty.Create(nameof(HeightResizePolicy), typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1368 var view = (View)bindable;
1369 if (newValue != null)
1371 if ((ResizePolicyType)newValue == ResizePolicyType.KeepSizeFollowingParent)
1373 if (view.heightConstraint == null)
1375 view.heightConstraint = new EqualConstraintWithParentFloat((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeHeight, View.Property.SizeHeight);
1376 view.heightConstraint.Apply();
1379 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.HeightResizePolicy, (int)ResizePolicyType.FillToParent);
1383 view.heightConstraint?.Remove();
1384 view.heightConstraint?.Dispose();
1385 view.heightConstraint = null;
1387 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.HeightResizePolicy, (int)newValue);
1389 // Match ResizePolicy to new Layouting.
1390 // Parent relative policies can not be mapped at this point as parent size unknown.
1391 switch ((ResizePolicyType)newValue)
1393 case ResizePolicyType.UseNaturalSize:
1395 view.HeightSpecification = LayoutParamPolicies.WrapContent;
1398 case ResizePolicyType.FillToParent:
1400 view.HeightSpecification = LayoutParamPolicies.MatchParent;
1403 case ResizePolicyType.FitToChildren:
1405 view.HeightSpecification = LayoutParamPolicies.WrapContent;
1413 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1415 var view = (View)bindable;
1418 temp = Object.InternalGetPropertyString(view.SwigCPtr, View.Property.HeightResizePolicy);
1419 return temp.GetValueByDescription<ResizePolicyType>();
1423 /// SizeScalePolicyProperty
1425 [EditorBrowsable(EditorBrowsableState.Never)]
1426 public static readonly BindableProperty SizeScalePolicyProperty = BindableProperty.Create(nameof(SizeScalePolicy), typeof(SizeScalePolicyType), typeof(View), SizeScalePolicyType.UseSizeSet, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1428 var view = (View)bindable;
1429 string valueToString = "";
1430 if (newValue != null)
1432 valueToString = ((SizeScalePolicyType)newValue).GetDescription();
1434 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.SizeScalePolicy, valueToString);
1437 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1439 var view = (View)bindable;
1441 return (SizeScalePolicyType)Object.InternalGetPropertyInt(view.SwigCPtr, View.Property.SizeScalePolicy);
1445 /// WidthForHeightProperty
1447 [EditorBrowsable(EditorBrowsableState.Never)]
1448 public static readonly BindableProperty WidthForHeightProperty = BindableProperty.Create(nameof(WidthForHeight), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1450 var view = (View)bindable;
1451 if (newValue != null)
1453 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.WidthForHeight, (bool)newValue);
1456 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1458 var view = (View)bindable;
1460 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.WidthForHeight);
1464 /// HeightForWidthProperty
1466 [EditorBrowsable(EditorBrowsableState.Never)]
1467 public static readonly BindableProperty HeightForWidthProperty = BindableProperty.Create(nameof(HeightForWidth), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1469 var view = (View)bindable;
1470 if (newValue != null)
1473 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.HeightForWidth, (bool)newValue);
1476 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1478 var view = (View)bindable;
1480 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.HeightForWidth);
1486 [EditorBrowsable(EditorBrowsableState.Never)]
1487 public static readonly BindableProperty PaddingProperty = BindableProperty.Create(nameof(Padding), typeof(Extents), typeof(View), null,
1488 propertyChanged: (bindable, oldValue, newValue) =>
1490 var view = (View)bindable;
1491 if (newValue != null)
1493 if (view.Layout != null)
1495 view.Layout.Padding = new Extents((Extents)newValue);
1496 if ((view.Padding.Start != 0) || (view.Padding.End != 0) || (view.Padding.Top != 0) || (view.Padding.Bottom != 0))
1498 var tmp = new PropertyValue(new Extents(0, 0, 0, 0));
1499 Object.SetProperty(view.SwigCPtr, Property.PADDING, tmp);
1502 view.Layout.RequestLayout();
1506 var tmp = new PropertyValue((Extents)newValue);
1507 Object.SetProperty(view.SwigCPtr, Property.PADDING, tmp);
1512 defaultValueCreator: (bindable) =>
1514 var view = (View)bindable;
1515 if ((view.internalPadding == null) || (view.Layout != null))
1517 ushort start = 0, end = 0, top = 0, bottom = 0;
1518 if (view.Layout != null)
1520 if (view.Layout.Padding != null)
1522 start = view.Layout.Padding.Start;
1523 end = view.Layout.Padding.End;
1524 top = view.Layout.Padding.Top;
1525 bottom = view.Layout.Padding.Bottom;
1528 view.internalPadding = new Extents(view.OnPaddingChanged, start, end, top, bottom);
1531 if (view.Layout == null)
1533 var tmp = Object.GetProperty(view.SwigCPtr, Property.PADDING);
1534 tmp?.Get(view.internalPadding);
1538 return view.internalPadding;
1545 [EditorBrowsable(EditorBrowsableState.Never)]
1546 public static readonly BindableProperty SizeProperty = BindableProperty.Create(nameof(Size), typeof(Size), typeof(View), null,
1547 propertyChanged: (bindable, oldValue, newValue) =>
1549 var view = (View)bindable;
1550 if (newValue != null)
1552 // Size property setter is only used by user.
1553 // Framework code uses SetSize() instead of Size property setter.
1554 // Size set by user is returned by GetUserSize2D() for SuggestedMinimumWidth/Height.
1555 // SuggestedMinimumWidth/Height is used by Layout calculation.
1556 view.userSizeWidth = ((Size)newValue).Width;
1557 view.userSizeHeight = ((Size)newValue).Height;
1559 // Set Specification so when layouts measure this View it matches the value set here.
1560 // All Views are currently Layouts.
1561 view.WidthSpecification = (int)System.Math.Ceiling(((Size)newValue).Width);
1562 view.HeightSpecification = (int)System.Math.Ceiling(((Size)newValue).Height);
1564 view.SetSize(((Size)newValue).Width, ((Size)newValue).Height, ((Size)newValue).Depth);
1567 defaultValueCreator: (bindable) =>
1569 var view = (View)bindable;
1571 if (view.internalSize == null)
1573 view.internalSize = new Size(view.OnSizeChanged, 0, 0, 0);
1575 Object.InternalRetrievingPropertyVector3(view.SwigCPtr, View.Property.SIZE, view.internalSize.SwigCPtr);
1577 return view.internalSize;
1582 /// MinimumSizeProperty
1584 [EditorBrowsable(EditorBrowsableState.Never)]
1585 public static readonly BindableProperty MinimumSizeProperty = BindableProperty.Create(nameof(MinimumSize), typeof(Size2D), typeof(View), null,
1586 propertyChanged: (bindable, oldValue, newValue) =>
1588 var view = (View)bindable;
1589 if (newValue != null)
1592 Object.InternalSetPropertyVector2(view.SwigCPtr, View.Property.MinimumSize, ((Size2D)newValue).SwigCPtr);
1595 defaultValueCreator: (bindable) =>
1598 var view = (View)bindable;
1599 if (view.internalMinimumSize == null)
1601 view.internalMinimumSize = new Size2D(view.OnMinimumSizeChanged, 0, 0);
1603 Object.InternalRetrievingPropertyVector2(view.SwigCPtr, View.Property.MinimumSize, view.internalMinimumSize.SwigCPtr);
1604 return view.internalMinimumSize;
1609 /// MaximumSizeProperty
1611 [EditorBrowsable(EditorBrowsableState.Never)]
1612 public static readonly BindableProperty MaximumSizeProperty = BindableProperty.Create(nameof(MaximumSize), typeof(Size2D), typeof(View), null,
1613 propertyChanged: (bindable, oldValue, newValue) =>
1615 var view = (View)bindable;
1616 if (newValue != null)
1619 Object.InternalSetPropertyVector2(view.SwigCPtr, View.Property.MaximumSize, ((Size2D)newValue).SwigCPtr);
1622 defaultValueCreator: (bindable) =>
1624 var view = (View)bindable;
1626 if (view.internalMaximumSize == null)
1628 view.internalMaximumSize = new Size2D(view.OnMaximumSizeChanged, 0, 0);
1630 Object.InternalRetrievingPropertyVector2(view.SwigCPtr, View.Property.MaximumSize, view.internalMaximumSize.SwigCPtr);
1631 return view.internalMaximumSize;
1636 /// InheritPositionProperty
1638 [EditorBrowsable(EditorBrowsableState.Never)]
1639 public static readonly BindableProperty InheritPositionProperty = BindableProperty.Create(nameof(InheritPosition), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1641 var view = (View)bindable;
1642 if (newValue != null)
1644 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.InheritPosition, (bool)newValue);
1647 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1649 var view = (View)bindable;
1651 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.InheritPosition);
1655 /// ClippingModeProperty
1657 [EditorBrowsable(EditorBrowsableState.Never)]
1658 public static readonly BindableProperty ClippingModeProperty = BindableProperty.Create(nameof(ClippingMode), typeof(ClippingModeType), typeof(View), ClippingModeType.Disabled, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1660 var view = (View)bindable;
1661 if (newValue != null)
1664 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.ClippingMode, (int)newValue);
1667 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1669 var view = (View)bindable;
1671 return (ClippingModeType)Object.InternalGetPropertyInt(view.SwigCPtr, View.Property.ClippingMode);
1675 /// InheritLayoutDirectionProperty
1677 [EditorBrowsable(EditorBrowsableState.Never)]
1678 public static readonly BindableProperty InheritLayoutDirectionProperty = BindableProperty.Create(nameof(InheritLayoutDirection), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1680 var view = (View)bindable;
1681 if (newValue != null)
1684 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.InheritLayoutDirection, (bool)newValue);
1687 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1689 var view = (View)bindable;
1691 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.InheritLayoutDirection);
1695 /// LayoutDirectionProperty
1697 [EditorBrowsable(EditorBrowsableState.Never)]
1698 public static readonly BindableProperty LayoutDirectionProperty = BindableProperty.Create(nameof(LayoutDirection), typeof(ViewLayoutDirectionType), typeof(View), ViewLayoutDirectionType.LTR, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1700 var view = (View)bindable;
1701 if (newValue != null)
1704 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.LayoutDirection, (int)newValue);
1707 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1709 var view = (View)bindable;
1711 return (ViewLayoutDirectionType)Object.InternalGetPropertyInt(view.SwigCPtr, View.Property.LayoutDirection);
1717 [EditorBrowsable(EditorBrowsableState.Never)]
1718 public static readonly BindableProperty MarginProperty = BindableProperty.Create(nameof(Margin), typeof(Extents), typeof(View), null,
1719 propertyChanged: (bindable, oldValue, newValue) =>
1721 var view = (View)bindable;
1722 if (newValue != null)
1724 if (view.Layout != null)
1726 view.Layout.Margin = new Extents((Extents)newValue);
1727 if ((view.Margin.Start != 0) || (view.Margin.End != 0) || (view.Margin.Top != 0) || (view.Margin.Bottom != 0))
1729 var tmp = new PropertyValue(new Extents(0, 0, 0, 0));
1730 Object.SetProperty(view.SwigCPtr, Property.MARGIN, tmp);
1733 view.Layout.RequestLayout();
1737 var tmp = new PropertyValue((Extents)newValue);
1738 Object.SetProperty(view.SwigCPtr, Property.MARGIN, tmp);
1743 defaultValueCreator: (bindable) =>
1745 var view = (View)bindable;
1746 if ((view.internalMargin == null) || (view.Layout != null))
1748 ushort start = 0, end = 0, top = 0, bottom = 0;
1749 if (view.Layout != null)
1751 if (view.Layout.Margin != null)
1753 start = view.Layout.Margin.Start;
1754 end = view.Layout.Margin.End;
1755 top = view.Layout.Margin.Top;
1756 bottom = view.Layout.Margin.Bottom;
1759 view.internalMargin = new Extents(view.OnMarginChanged, start, end, top, bottom);
1762 if (view.Layout == null)
1765 var tmp = Object.GetProperty(view.SwigCPtr, Property.MARGIN);
1766 tmp?.Get(view.internalMargin);
1770 return view.internalMargin;
1775 /// UpdateAreaHintProperty
1777 [EditorBrowsable(EditorBrowsableState.Never)]
1778 public static readonly BindableProperty UpdateAreaHintProperty = BindableProperty.Create(nameof(UpdateAreaHint), typeof(Vector4), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1780 var view = (View)bindable;
1781 if (newValue != null)
1784 Object.InternalSetPropertyVector4(view.SwigCPtr, Interop.ActorProperty.UpdateAreaHintGet(), ((Vector4)newValue).SwigCPtr);
1787 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1789 var view = (View)bindable;
1790 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1792 Object.InternalRetrievingPropertyVector4(view.SwigCPtr, Interop.ActorProperty.UpdateAreaHintGet(), temp.SwigCPtr);
1797 /// ImageShadow Property
1799 [EditorBrowsable(EditorBrowsableState.Never)]
1800 public static readonly BindableProperty ImageShadowProperty = BindableProperty.Create(nameof(ImageShadow), typeof(ImageShadow), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1802 var view = (View)bindable;
1804 view.themeData?.selectorData?.ClearShadow(view);
1806 if (newValue is Selector<ImageShadow> selector)
1808 if (selector.HasAll()) view.SetShadow(selector.All);
1809 else view.EnsureSelectorData().ImageShadow = new TriggerableSelector<ImageShadow>(view, selector, view.SetShadow, true);
1813 view.SetShadow((ImageShadow)newValue);
1816 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1818 var view = (View)bindable;
1820 PropertyMap map = new PropertyMap();
1821 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SHADOW).Get(map);
1823 var shadow = new ImageShadow(map);
1824 return shadow.IsEmpty() ? null : shadow;
1830 [EditorBrowsable(EditorBrowsableState.Never)]
1831 public static readonly BindableProperty BoxShadowProperty = BindableProperty.Create(nameof(BoxShadow), typeof(Shadow), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1833 var view = (View)bindable;
1835 view.themeData?.selectorData?.ClearShadow(view);
1837 if (newValue is Selector<Shadow> selector)
1839 if (selector.HasAll()) view.SetShadow(selector.All);
1840 else view.EnsureSelectorData().BoxShadow = new TriggerableSelector<Shadow>(view, selector, view.SetShadow, true);
1844 view.SetShadow((Shadow)newValue);
1847 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1849 var view = (View)bindable;
1851 PropertyMap map = new PropertyMap();
1852 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SHADOW).Get(map);
1854 var shadow = new Shadow(map);
1855 return shadow.IsEmpty() ? null : shadow;
1859 /// CornerRadius Property
1861 [EditorBrowsable(EditorBrowsableState.Never)]
1862 public static readonly BindableProperty CornerRadiusProperty = BindableProperty.Create(nameof(CornerRadius), typeof(Vector4), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1864 var view = (View)bindable;
1865 (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).CornerRadius = (Vector4)newValue;
1866 view.ApplyCornerRadius();
1868 defaultValueCreator: (bindable) =>
1870 var view = (View)bindable;
1871 return view.backgroundExtraData == null ? 0.0f : view.backgroundExtraData.CornerRadius;
1875 /// CornerRadiusPolicy Property
1877 [EditorBrowsable(EditorBrowsableState.Never)]
1878 public static readonly BindableProperty CornerRadiusPolicyProperty = BindableProperty.Create(nameof(CornerRadiusPolicy), typeof(VisualTransformPolicyType), typeof(View), VisualTransformPolicyType.Absolute, propertyChanged: (bindable, oldValue, newValue) =>
1880 var view = (View)bindable;
1881 (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).CornerRadiusPolicy = (VisualTransformPolicyType)newValue;
1883 if (view.backgroundExtraData.CornerRadius != null)
1885 view.ApplyCornerRadius();
1888 defaultValueCreator: (bindable) =>
1890 var view = (View)bindable;
1891 return view.backgroundExtraData == null ? VisualTransformPolicyType.Absolute : view.backgroundExtraData.CornerRadiusPolicy;
1895 /// BorderlineWidth Property
1897 [EditorBrowsable(EditorBrowsableState.Never)]
1898 public static readonly BindableProperty BorderlineWidthProperty = BindableProperty.Create(nameof(BorderlineWidth), typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
1900 var view = (View)bindable;
1901 (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).BorderlineWidth = (float)newValue;
1902 view.ApplyBorderline();
1904 defaultValueCreator: (bindable) =>
1906 var view = (View)bindable;
1907 return view.backgroundExtraData == null ? 0.0f : view.backgroundExtraData.BorderlineWidth;
1911 /// BorderlineColor Property
1913 [EditorBrowsable(EditorBrowsableState.Never)]
1914 public static readonly BindableProperty BorderlineColorProperty = BindableProperty.Create(nameof(BorderlineColor), typeof(Color), typeof(View), null,
1915 propertyChanged: (bindable, oldValue, newValue) =>
1917 var view = (View)bindable;
1919 view.themeData?.selectorData?.BorderlineColor?.Reset(view);
1921 if (newValue is Selector<Color> selector)
1923 if (selector.HasAll()) view.SetBorderlineColor(selector.All);
1924 else view.EnsureSelectorData().BorderlineColor = new TriggerableSelector<Color>(view, selector, view.SetBorderlineColor, true);
1928 view.SetBorderlineColor((Color)newValue);
1931 defaultValueCreator: (bindable) =>
1933 var view = (View)bindable;
1934 return view.backgroundExtraData == null ? Color.Black : view.backgroundExtraData.BorderlineColor;
1939 /// BorderlineColorSelector Property
1940 /// Like BackgroundColor, color selector typed BorderlineColor should be used in ViewStyle only.
1941 /// So this API is internally used only.
1943 internal static readonly BindableProperty BorderlineColorSelectorProperty = BindableProperty.Create(nameof(BorderlineColorSelector), typeof(Selector<Color>), typeof(View), null,
1944 propertyChanged: (bindable, oldValue, newValue) =>
1946 var view = (View)bindable;
1948 view.themeData?.selectorData?.BorderlineColor?.Reset(view);
1950 if (newValue is Selector<Color> selector)
1952 if (selector.HasAll()) view.SetBorderlineColor(selector.All);
1953 else view.EnsureSelectorData().BorderlineColor = new TriggerableSelector<Color>(view, selector, view.SetBorderlineColor, true);
1957 view.SetBorderlineColor((Color)newValue);
1960 defaultValueCreator: (bindable) =>
1962 var view = (View)bindable;
1963 var selector = view.themeData?.selectorData?.BorderlineColor?.Get();
1964 return (null != selector) ? selector : new Selector<Color>();
1969 /// BorderlineOffset Property
1971 [EditorBrowsable(EditorBrowsableState.Never)]
1972 public static readonly BindableProperty BorderlineOffsetProperty = BindableProperty.Create(nameof(BorderlineOffset), typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
1974 var view = (View)bindable;
1975 (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).BorderlineOffset = (float)newValue;
1976 view.ApplyBorderline();
1978 defaultValueCreator: (bindable) =>
1980 var view = (View)bindable;
1981 return view.backgroundExtraData == null ? 0.0f : view.backgroundExtraData.BorderlineOffset;
1985 /// EnableControlState property
1987 [EditorBrowsable(EditorBrowsableState.Never)]
1988 public static readonly BindableProperty EnableControlStateProperty = BindableProperty.Create(nameof(EnableControlState), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1990 var view = (View)bindable;
1991 bool prev = view.enableControlState;
1992 view.enableControlState = (bool)newValue;
1994 if (prev != view.enableControlState)
1998 view.TouchEvent -= view.EmptyOnTouch;
2002 view.TouchEvent += view.EmptyOnTouch;
2006 defaultValueCreator: (bindable) =>
2008 return ((View)bindable).enableControlState;
2012 /// ThemeChangeSensitive property
2014 [EditorBrowsable(EditorBrowsableState.Never)]
2015 public static readonly BindableProperty ThemeChangeSensitiveProperty = BindableProperty.Create(nameof(ThemeChangeSensitive), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2017 var view = (View)bindable;
2019 if (view.ThemeChangeSensitive == (bool)newValue) return;
2021 if (view.themeData == null) view.themeData = new ThemeData();
2023 view.themeData.ThemeChangeSensitive = (bool)newValue;
2025 if (!view.themeData.ThemeApplied) return;
2027 if (view.themeData.ThemeChangeSensitive && !view.themeData.ListeningThemeChangeEvent)
2029 view.themeData.ListeningThemeChangeEvent = true;
2030 ThemeManager.ThemeChangedInternal.Add(view.OnThemeChanged);
2032 else if (!view.themeData.ThemeChangeSensitive && view.themeData.ListeningThemeChangeEvent)
2034 view.themeData.ListeningThemeChangeEvent = false;
2035 ThemeManager.ThemeChangedInternal.Remove(view.OnThemeChanged);
2038 defaultValueCreator: (bindable) =>
2040 return ((View)bindable).themeData?.ThemeChangeSensitive ?? ThemeManager.ApplicationThemeChangeSensitive;
2044 /// AccessibilityNameProperty
2046 [EditorBrowsable(EditorBrowsableState.Never)]
2047 public static readonly BindableProperty AccessibilityNameProperty = BindableProperty.Create(nameof(AccessibilityName), typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
2049 var view = (View)bindable;
2050 if (newValue != null)
2053 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.AccessibilityName, (string)newValue);
2056 defaultValueCreator: (bindable) =>
2058 var view = (View)bindable;
2060 return Object.InternalGetPropertyString(view.SwigCPtr, View.Property.AccessibilityName);
2064 /// AccessibilityDescriptionProperty
2066 [EditorBrowsable(EditorBrowsableState.Never)]
2067 public static readonly BindableProperty AccessibilityDescriptionProperty = BindableProperty.Create(nameof(AccessibilityDescription), typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
2069 var view = (View)bindable;
2070 if (newValue != null)
2073 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.AccessibilityDescription, (string)newValue);
2076 defaultValueCreator: (bindable) =>
2078 var view = (View)bindable;
2080 return Object.InternalGetPropertyString(view.SwigCPtr, View.Property.AccessibilityDescription);
2084 /// AccessibilityTranslationDomainProperty
2086 [EditorBrowsable(EditorBrowsableState.Never)]
2087 public static readonly BindableProperty AccessibilityTranslationDomainProperty = BindableProperty.Create(nameof(AccessibilityTranslationDomain), typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
2089 var view = (View)bindable;
2090 if (newValue != null)
2093 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.AccessibilityTranslationDomain, (string)newValue);
2096 defaultValueCreator: (bindable) =>
2098 var view = (View)bindable;
2100 return Object.InternalGetPropertyString(view.SwigCPtr, View.Property.AccessibilityTranslationDomain);
2104 /// AccessibilityRoleProperty
2106 [EditorBrowsable(EditorBrowsableState.Never)]
2107 public static readonly BindableProperty AccessibilityRoleProperty = BindableProperty.Create(nameof(AccessibilityRole), typeof(Role), typeof(View), default(Role), propertyChanged: (bindable, oldValue, newValue) =>
2109 var view = (View)bindable;
2110 if (newValue != null)
2113 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.AccessibilityRole, (int)newValue);
2116 defaultValueCreator: (bindable) =>
2118 var view = (View)bindable;
2120 return (Role)Object.InternalGetPropertyInt(view.SwigCPtr, View.Property.AccessibilityRole);
2124 /// AccessibilityHighlightableProperty
2126 [EditorBrowsable(EditorBrowsableState.Never)]
2127 public static readonly BindableProperty AccessibilityHighlightableProperty = BindableProperty.Create(nameof(AccessibilityHighlightable), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2129 var view = (View)bindable;
2130 if (newValue != null)
2133 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.AccessibilityHighlightable, (bool)newValue);
2136 defaultValueCreator: (bindable) =>
2138 var view = (View)bindable;
2140 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.AccessibilityHighlightable);
2144 /// AccessibilityHiddenProperty
2146 [EditorBrowsable(EditorBrowsableState.Never)]
2147 public static readonly BindableProperty AccessibilityHiddenProperty = BindableProperty.Create(nameof(AccessibilityHidden), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2149 var view = (View)bindable;
2150 if (newValue != null)
2153 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.AccessibilityHidden, (bool)newValue);
2156 defaultValueCreator: (bindable) =>
2158 var view = (View)bindable;
2160 return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.AccessibilityHidden);
2164 /// ExcludeLayoutingProperty
2166 [EditorBrowsable(EditorBrowsableState.Never)]
2167 public static readonly BindableProperty ExcludeLayoutingProperty = BindableProperty.Create(nameof(ExcludeLayouting), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2169 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2170 if (newValue != null)
2172 instance.InternalExcludeLayouting = (bool)newValue;
2175 defaultValueCreator: (bindable) =>
2177 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2178 return instance.InternalExcludeLayouting;
2182 /// TooltipTextProperty
2184 [EditorBrowsable(EditorBrowsableState.Never)]
2185 public static readonly BindableProperty TooltipTextProperty = BindableProperty.Create(nameof(TooltipText), typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
2187 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2188 if (newValue != null)
2190 instance.InternalTooltipText = (string)newValue;
2193 defaultValueCreator: (bindable) =>
2195 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2196 return instance.InternalTooltipText;
2200 /// PositionUsesAnchorPointProperty
2202 [EditorBrowsable(EditorBrowsableState.Never)]
2203 public static readonly BindableProperty PositionUsesAnchorPointProperty = BindableProperty.Create(nameof(PositionUsesAnchorPoint), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2205 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2206 if (newValue != null)
2208 instance.InternalPositionUsesAnchorPoint = (bool)newValue;
2211 defaultValueCreator: (bindable) =>
2213 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2214 return instance.InternalPositionUsesAnchorPoint;
2218 /// AnchorPointProperty
2220 [EditorBrowsable(EditorBrowsableState.Never)]
2221 public static readonly BindableProperty AnchorPointProperty = BindableProperty.Create(nameof(AnchorPoint), typeof(Tizen.NUI.Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
2223 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2224 if (newValue != null)
2226 instance.InternalAnchorPoint = (Tizen.NUI.Position)newValue;
2229 defaultValueCreator: (bindable) =>
2231 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2232 return instance.InternalAnchorPoint;
2236 /// WidthSpecificationProperty
2238 [EditorBrowsable(EditorBrowsableState.Never)]
2239 public static readonly BindableProperty WidthSpecificationProperty = BindableProperty.Create(nameof(WidthSpecification), typeof(int), typeof(View), 0, propertyChanged: (bindable, oldValue, newValue) =>
2241 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2242 if (newValue != null)
2244 instance.InternalWidthSpecification = (int)newValue;
2247 defaultValueCreator: (bindable) =>
2249 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2250 return instance.InternalWidthSpecification;
2254 /// HeightSpecificationProperty
2256 [EditorBrowsable(EditorBrowsableState.Never)]
2257 public static readonly BindableProperty HeightSpecificationProperty = BindableProperty.Create(nameof(HeightSpecification), typeof(int), typeof(View), 0, propertyChanged: (bindable, oldValue, newValue) =>
2259 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2260 if (newValue != null)
2262 instance.InternalHeightSpecification = (int)newValue;
2265 defaultValueCreator: (bindable) =>
2267 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2268 return instance.InternalHeightSpecification;
2272 /// LayoutTransitionProperty
2274 [EditorBrowsable(EditorBrowsableState.Never)]
2275 public static readonly BindableProperty LayoutTransitionProperty = BindableProperty.Create(nameof(LayoutTransition), typeof(Tizen.NUI.LayoutTransition), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
2277 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2278 if (newValue != null)
2280 instance.InternalLayoutTransition = (Tizen.NUI.LayoutTransition)newValue;
2283 defaultValueCreator: (bindable) =>
2285 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2286 return instance.InternalLayoutTransition;
2290 /// PaddingEXProperty
2292 [EditorBrowsable(EditorBrowsableState.Never)]
2293 public static readonly BindableProperty PaddingEXProperty = BindableProperty.Create(nameof(PaddingEX), typeof(Tizen.NUI.Extents), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
2295 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2296 if (newValue != null)
2298 instance.InternalPaddingEX = (Tizen.NUI.Extents)newValue;
2301 defaultValueCreator: (bindable) =>
2303 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2304 return instance.InternalPaddingEX;
2310 [EditorBrowsable(EditorBrowsableState.Never)]
2311 public static readonly BindableProperty LayoutProperty = BindableProperty.Create(nameof(Layout), typeof(Tizen.NUI.LayoutItem), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
2313 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2314 if (newValue != null)
2316 instance.InternalLayout = (Tizen.NUI.LayoutItem)newValue;
2319 defaultValueCreator: (bindable) =>
2321 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2322 return instance.InternalLayout;
2326 /// BackgroundImageSynchronosLoadingProperty
2328 [EditorBrowsable(EditorBrowsableState.Never)]
2329 public static readonly BindableProperty BackgroundImageSynchronosLoadingProperty = BindableProperty.Create(nameof(BackgroundImageSynchronosLoading), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2331 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2332 if (newValue != null)
2334 instance.InternalBackgroundImageSynchronosLoading = (bool)newValue;
2337 defaultValueCreator: (bindable) =>
2339 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2340 return instance.InternalBackgroundImageSynchronosLoading;
2344 /// BackgroundImageSynchronousLoadingProperty
2346 [EditorBrowsable(EditorBrowsableState.Never)]
2347 public static readonly BindableProperty BackgroundImageSynchronousLoadingProperty = BindableProperty.Create(nameof(BackgroundImageSynchronousLoading), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2349 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2350 if (newValue != null)
2352 instance.InternalBackgroundImageSynchronousLoading = (bool)newValue;
2355 defaultValueCreator: (bindable) =>
2357 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2358 return instance.InternalBackgroundImageSynchronousLoading;
2362 /// EnableControlStatePropagationProperty
2364 [EditorBrowsable(EditorBrowsableState.Never)]
2365 public static readonly BindableProperty EnableControlStatePropagationProperty = BindableProperty.Create(nameof(EnableControlStatePropagation), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2367 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2368 if (newValue != null)
2370 instance.InternalEnableControlStatePropagation = (bool)newValue;
2373 defaultValueCreator: (bindable) =>
2375 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2376 return instance.InternalEnableControlStatePropagation;
2380 /// PropagatableControlStatesProperty
2382 [EditorBrowsable(EditorBrowsableState.Never)]
2383 public static readonly BindableProperty PropagatableControlStatesProperty = BindableProperty.Create(nameof(PropagatableControlStates), typeof(ControlState), typeof(View), ControlState.All, propertyChanged: (bindable, oldValue, newValue) =>
2385 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2386 if (newValue != null)
2388 instance.InternalPropagatableControlStates = (ControlState)newValue;
2391 defaultValueCreator: (bindable) =>
2393 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2394 return instance.InternalPropagatableControlStates;
2398 /// GrabTouchAfterLeaveProperty
2400 [EditorBrowsable(EditorBrowsableState.Never)]
2401 public static readonly BindableProperty GrabTouchAfterLeaveProperty = BindableProperty.Create(nameof(GrabTouchAfterLeave), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2403 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2404 if (newValue != null)
2406 instance.InternalGrabTouchAfterLeave = (bool)newValue;
2409 defaultValueCreator: (bindable) =>
2411 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2412 return instance.InternalGrabTouchAfterLeave;
2416 /// AllowOnlyOwnTouchProperty
2418 [EditorBrowsable(EditorBrowsableState.Never)]
2419 public static readonly BindableProperty AllowOnlyOwnTouchProperty = BindableProperty.Create(nameof(AllowOnlyOwnTouch), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2421 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2422 if (newValue != null)
2424 instance.InternalAllowOnlyOwnTouch = (bool)newValue;
2427 defaultValueCreator: (bindable) =>
2429 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2430 return instance.InternalAllowOnlyOwnTouch;
2435 /// BlendEquationProperty
2437 [EditorBrowsable(EditorBrowsableState.Never)]
2438 public static readonly BindableProperty BlendEquationProperty = BindableProperty.Create(nameof(BlendEquation), typeof(BlendEquationType), typeof(View), default(BlendEquationType), propertyChanged: (bindable, oldValue, newValue) =>
2440 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2441 if (newValue != null)
2443 instance.InternalBlendEquation = (Tizen.NUI.BlendEquationType)newValue;
2446 defaultValueCreator: (bindable) =>
2448 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2449 return instance.InternalBlendEquation;
2453 /// TransitionOptionsProperty
2455 [EditorBrowsable(EditorBrowsableState.Never)]
2456 public static readonly BindableProperty TransitionOptionsProperty = BindableProperty.Create(nameof(TransitionOptions), typeof(TransitionOptions), typeof(View), default(TransitionOptions), propertyChanged: (bindable, oldValue, newValue) =>
2458 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2459 if (newValue != null)
2461 instance.InternalTransitionOptions = (Tizen.NUI.TransitionOptions)newValue;
2464 defaultValueCreator: (bindable) =>
2466 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2467 return instance.InternalTransitionOptions;
2471 /// AutomationIdProperty
2473 [EditorBrowsable(EditorBrowsableState.Never)]
2474 public static readonly BindableProperty AutomationIdProperty = BindableProperty.Create(nameof(AutomationId), typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
2476 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2477 if (newValue != null)
2480 Object.InternalSetPropertyString(instance.SwigCPtr, View.Property.AutomationId, (string)newValue);
2483 defaultValueCreator: (bindable) =>
2485 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2487 return Object.InternalGetPropertyString(instance.SwigCPtr, View.Property.AutomationId);
2491 /// TouchAreaOffsetProperty
2493 [EditorBrowsable(EditorBrowsableState.Never)]
2494 public static readonly BindableProperty TouchAreaOffsetProperty = BindableProperty.Create(nameof(TouchAreaOffset), typeof(Offset), typeof(View), default(Offset), propertyChanged: (bindable, oldValue, newValue) =>
2496 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2497 if (newValue != null)
2499 instance.InternalTouchAreaOffset = (Tizen.NUI.Offset)newValue;
2502 defaultValueCreator: (bindable) =>
2504 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2505 return instance.InternalTouchAreaOffset;
2509 /// Gets View's Size2D set by user.
2511 internal Size2D GetUserSize2D()
2513 return new Size2D((int)userSizeWidth, (int)userSizeHeight);
2516 private void SetBackgroundImage(string value)
2518 if (string.IsNullOrEmpty(value))
2520 var empty = new PropertyValue();
2522 Object.SetProperty(SwigCPtr, Property.BACKGROUND, empty);
2527 if (value.StartsWith("*Resource*"))
2529 string resource = Tizen.Applications.Application.Current.DirectoryInfo.Resource;
2530 value = value.Replace("*Resource*", resource);
2533 if (backgroundExtraData == null)
2536 Object.InternalSetPropertyString(SwigCPtr, View.Property.BACKGROUND, value);
2537 BackgroundImageSynchronousLoading = backgroundImageSynchronousLoading;
2541 var map = new PropertyMap();
2542 var url = new PropertyValue(value);
2543 var cornerRadiusValue = backgroundExtraData.CornerRadius == null ? new PropertyValue() : new PropertyValue(backgroundExtraData.CornerRadius);
2544 var cornerRadius = new PropertyValue(cornerRadiusValue);
2545 var cornerRadiusPolicy = new PropertyValue((int)(backgroundExtraData.CornerRadiusPolicy));
2546 var borderlineWidth = new PropertyValue(backgroundExtraData.BorderlineWidth);
2547 var borderlineColorValue = backgroundExtraData.BorderlineColor == null ? new PropertyValue(Color.Black) : new PropertyValue(backgroundExtraData.BorderlineColor);
2548 var borderlineColor = new PropertyValue(borderlineColorValue);
2549 var borderlineOffset = new PropertyValue(backgroundExtraData.BorderlineOffset);
2550 var synchronousLoading = new PropertyValue(backgroundImageSynchronousLoading);
2551 var npatchType = new PropertyValue((int)Visual.Type.NPatch);
2552 var border = (backgroundExtraData.BackgroundImageBorder != null) ? new PropertyValue(backgroundExtraData.BackgroundImageBorder) : null;
2553 var imageType = new PropertyValue((int)Visual.Type.Image);
2555 map.Add(ImageVisualProperty.URL, url)
2556 .Add(Visual.Property.CornerRadius, cornerRadius)
2557 .Add(Visual.Property.CornerRadiusPolicy, cornerRadiusPolicy)
2558 .Add(Visual.Property.BorderlineWidth, borderlineWidth)
2559 .Add(Visual.Property.BorderlineColor, borderlineColor)
2560 .Add(Visual.Property.BorderlineOffset, borderlineOffset)
2561 .Add(ImageVisualProperty.SynchronousLoading, synchronousLoading);
2563 if (backgroundExtraData.BackgroundImageBorder != null)
2565 map.Add(Visual.Property.Type, npatchType)
2566 .Add(NpatchImageVisualProperty.Border, border);
2570 map.Add(Visual.Property.Type, imageType);
2573 var mapValue = new PropertyValue(map);
2574 Object.SetProperty(SwigCPtr, Property.BACKGROUND, mapValue);
2576 imageType?.Dispose();
2578 npatchType?.Dispose();
2579 synchronousLoading?.Dispose();
2580 borderlineOffset?.Dispose();
2581 borderlineColor?.Dispose();
2582 borderlineColorValue?.Dispose();
2583 borderlineWidth?.Dispose();
2584 cornerRadiusPolicy?.Dispose();
2585 cornerRadius?.Dispose();
2586 cornerRadiusValue?.Dispose();
2589 mapValue?.Dispose();
2592 private void SetBackgroundImageBorder(Rectangle value)
2594 bool isEmptyValue = Rectangle.IsNullOrZero(value);
2596 var backgroundImageBorder = isEmptyValue ? null : value;
2598 (backgroundExtraData ?? (backgroundExtraData = new BackgroundExtraData())).BackgroundImageBorder = backgroundImageBorder;
2605 PropertyMap map = Background;
2612 map[NpatchImageVisualProperty.Border] = new PropertyValue(backgroundImageBorder);
2616 map.Find(Visual.Property.Type)?.Get(out visualType);
2618 if (visualType == (int)Visual.Type.Image)
2620 map[Visual.Property.Type] = new PropertyValue((int)Visual.Type.NPatch);
2623 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, View.Property.BACKGROUND, new PropertyValue(map));
2626 private void SetBorderlineColor(Color value)
2633 (backgroundExtraData ?? (backgroundExtraData = new BackgroundExtraData())).BorderlineColor = value;
2638 private void SetBackgroundColor(Color value)
2645 if (backgroundExtraData == null)
2648 Object.InternalSetPropertyVector4(SwigCPtr, View.Property.BACKGROUND, ((Color)value).SwigCPtr);
2652 var map = new PropertyMap();
2653 var colorType = new PropertyValue((int)Visual.Type.Color);
2654 var mixColor = new PropertyValue(value);
2655 var cornerRadiusValue = backgroundExtraData.CornerRadius == null ? new PropertyValue() : new PropertyValue(backgroundExtraData.CornerRadius);
2656 var cornerRadius = new PropertyValue(cornerRadiusValue);
2657 var cornerRadiusPolicy = new PropertyValue((int)(backgroundExtraData.CornerRadiusPolicy));
2658 var borderlineWidth = new PropertyValue(backgroundExtraData.BorderlineWidth);
2659 var borderlineColorValue = backgroundExtraData.BorderlineColor == null ? new PropertyValue(Color.Black) : new PropertyValue(backgroundExtraData.BorderlineColor);
2660 var borderlineColor = new PropertyValue(borderlineColorValue);
2661 var borderlineOffset = new PropertyValue(backgroundExtraData.BorderlineOffset);
2663 map.Add(Visual.Property.Type, colorType)
2664 .Add(ColorVisualProperty.MixColor, mixColor)
2665 .Add(Visual.Property.CornerRadius, cornerRadius)
2666 .Add(Visual.Property.CornerRadiusPolicy, cornerRadiusPolicy)
2667 .Add(Visual.Property.BorderlineWidth, borderlineWidth)
2668 .Add(Visual.Property.BorderlineColor, borderlineColor)
2669 .Add(Visual.Property.BorderlineOffset, borderlineOffset);
2671 var mapValue = new PropertyValue(map);
2672 Object.SetProperty(SwigCPtr, Property.BACKGROUND, mapValue);
2674 borderlineOffset?.Dispose();
2675 borderlineColor?.Dispose();
2676 borderlineColorValue?.Dispose();
2677 borderlineWidth?.Dispose();
2678 cornerRadiusPolicy?.Dispose();
2679 cornerRadius?.Dispose();
2680 cornerRadiusValue?.Dispose();
2681 mixColor?.Dispose();
2682 colorType?.Dispose();
2684 mapValue?.Dispose();
2687 private void SetColor(Color value)
2694 Interop.ActorInternal.SetColor(SwigCPtr, value.SwigCPtr);
2695 if (NDalicPINVOKE.SWIGPendingException.Pending)
2696 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2699 private void SetColorRed(float? value)
2706 Object.InternalSetPropertyFloat(SwigCPtr, View.Property.ColorRed, (float)value);
2707 if (NDalicPINVOKE.SWIGPendingException.Pending)
2708 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2711 private void SetColorGreen(float? value)
2718 Object.InternalSetPropertyFloat(SwigCPtr, View.Property.ColorGreen, (float)value);
2719 if (NDalicPINVOKE.SWIGPendingException.Pending)
2720 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2723 private void SetColorBlue(float? value)
2730 Object.InternalSetPropertyFloat(SwigCPtr, View.Property.ColorBlue, (float)value);
2731 if (NDalicPINVOKE.SWIGPendingException.Pending)
2732 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2735 private void SetOpacity(float? value)
2742 Object.InternalSetPropertyFloat(SwigCPtr, View.Property.OPACITY, (float)value);
2745 private void SetShadow(ShadowBase value)
2747 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, View.Property.SHADOW, value == null ? new PropertyValue() : value.ToPropertyValue(this));