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;
43 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.StyleName, new Tizen.NUI.PropertyValue(styleName));
45 view.styleName = styleName;
47 if (string.IsNullOrEmpty(styleName)) return;
49 var style = ThemeManager.GetUpdateStyleWithoutClone(styleName);
51 if (style == null) return;
53 view.ApplyStyle(style);
54 view.SetThemeApplied();
57 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
59 var view = (View)bindable;
61 if (!string.IsNullOrEmpty(view.styleName)) return view.styleName;
64 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.StyleName).Get(out temp);
69 /// KeyInputFocusProperty
71 [EditorBrowsable(EditorBrowsableState.Never)]
72 public static readonly BindableProperty KeyInputFocusProperty = BindableProperty.Create(nameof(KeyInputFocus), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
74 var view = (View)bindable;
77 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.KeyInputFocus, new Tizen.NUI.PropertyValue((bool)newValue));
80 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
82 var view = (View)bindable;
84 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.KeyInputFocus).Get(out temp);
89 /// BackgroundColorProperty
91 [EditorBrowsable(EditorBrowsableState.Never)]
92 public static readonly BindableProperty BackgroundColorProperty = BindableProperty.Create(nameof(BackgroundColor), typeof(Color), typeof(View), null,
93 propertyChanged: (bindable, oldValue, newValue) =>
95 var view = (View)bindable;
97 view.themeData?.selectorData?.ClearBackground(view);
99 if (newValue is Selector<Color> selector)
101 if (selector.HasAll()) view.SetBackgroundColor(selector.All);
102 else view.EnsureSelectorData().BackgroundColor = new TriggerableSelector<Color>(view, selector, view.SetBackgroundColor, true);
106 view.SetBackgroundColor((Color)newValue);
109 defaultValueCreator: (bindable) =>
111 var view = (View)bindable;
113 if (view.internalBackgroundColor == null)
115 view.internalBackgroundColor = new Color(view.OnBackgroundColorChanged, 0, 0, 0, 0);
118 PropertyMap background = view.Background;
120 background.Find(Visual.Property.Type)?.Get(out visualType);
121 if (visualType == (int)Visual.Type.Color)
123 background.Find(ColorVisualProperty.MixColor)?.Get(view.internalBackgroundColor);
126 background?.Dispose();
129 return view.internalBackgroundColor;
136 [EditorBrowsable(EditorBrowsableState.Never)]
137 public static readonly BindableProperty ColorProperty = BindableProperty.Create(nameof(Color), typeof(Color), typeof(View), null,
138 propertyChanged: (bindable, oldValue, newValue) =>
140 var view = (View)bindable;
142 view.themeData?.selectorData?.Color?.Reset(view);
144 if (newValue is Selector<Color> selector)
146 if (selector.HasAll()) view.SetColor(selector.All);
147 else view.EnsureSelectorData().Color = new TriggerableSelector<Color>(view, selector, view.SetColor, true);
151 view.SetColor((Color)newValue);
154 defaultValueCreator: (bindable) =>
156 var view = (View)bindable;
157 var tmpProperty = view.GetProperty(Interop.ActorProperty.ColorGet());
159 if (view.internalColor == null)
161 view.internalColor = new Color(view.OnColorChanged, 0, 0, 0, 0);
164 tmpProperty?.Get(view.internalColor);
165 tmpProperty?.Dispose();
167 return view.internalColor;
171 /// <summary> BackgroundImageProperty </summary>
172 [EditorBrowsable(EditorBrowsableState.Never)]
173 public static readonly BindableProperty BackgroundImageProperty = BindableProperty.Create(nameof(BackgroundImage), typeof(string), typeof(View), default(string),
174 propertyChanged: (bindable, oldValue, newValue) =>
176 var view = (View)bindable;
178 if (view.themeData?.selectorData != null)
180 view.themeData.selectorData.BackgroundColor?.Reset(view);
181 view.themeData.selectorData.BackgroundImage?.Reset(view);
184 if (newValue is Selector<string> selector)
186 if (selector.HasAll()) view.SetBackgroundImage(selector.All);
187 else view.EnsureSelectorData().BackgroundImage = new TriggerableSelector<string>(view, selector, view.SetBackgroundImage, true);
191 view.SetBackgroundImage((string)newValue);
194 defaultValueCreator: (bindable) =>
196 var view = (View)bindable;
197 string backgroundImage = "";
199 PropertyMap background = view.Background;
200 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
202 background.Dispose();
205 return backgroundImage;
210 /// <summary>BackgroundImageBorderProperty</summary>
211 [EditorBrowsable(EditorBrowsableState.Never)]
212 public static readonly BindableProperty BackgroundImageBorderProperty = BindableProperty.Create(nameof(BackgroundImageBorder), typeof(Rectangle), typeof(View), default(Rectangle), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
214 var view = (View)bindable;
216 view.themeData?.selectorData?.BackgroundImageBorder?.Reset(view);
218 if (newValue is Selector<Rectangle> selector)
220 if (selector.HasAll()) view.SetBackgroundImageBorder(selector.All);
221 else view.EnsureSelectorData().BackgroundImageBorder = new TriggerableSelector<Rectangle>(view, selector, view.SetBackgroundImageBorder, true);
225 view.SetBackgroundImageBorder((Rectangle)newValue);
228 defaultValueCreator: (bindable) =>
230 var view = (View)bindable;
232 return view.backgroundExtraData?.BackgroundImageBorder;
236 /// BackgroundProperty
238 [EditorBrowsable(EditorBrowsableState.Never)]
239 public static readonly BindableProperty BackgroundProperty = BindableProperty.Create(nameof(Background), typeof(PropertyMap), typeof(View), null,
240 propertyChanged: (bindable, oldValue, newValue) =>
242 var view = (View)bindable;
243 if (newValue != null)
245 var propertyValue = new PropertyValue((PropertyMap)newValue);
246 Object.SetProperty(view.SwigCPtr, Property.BACKGROUND, propertyValue);
248 view.backgroundExtraData = null;
250 propertyValue.Dispose();
251 propertyValue = null;
254 defaultValueCreator: (bindable) =>
256 var view = (View)bindable;
257 PropertyMap tmp = new PropertyMap();
258 var propertyValue = Object.GetProperty(view.SwigCPtr, Property.BACKGROUND);
259 propertyValue.Get(tmp);
260 propertyValue.Dispose();
261 propertyValue = null;
269 [EditorBrowsable(EditorBrowsableState.Never)]
270 public static readonly BindableProperty StateProperty = BindableProperty.Create(nameof(State), typeof(States), typeof(View), States.Normal, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
272 var view = (View)bindable;
273 if (newValue != null)
275 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.STATE, new Tizen.NUI.PropertyValue((int)newValue));
278 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
280 var view = (View)bindable;
282 if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.STATE).Get(out temp) == false)
284 NUILog.Error("State get error!");
288 case 0: return States.Normal;
289 case 1: return States.Focused;
290 case 2: return States.Disabled;
291 default: return States.Normal;
298 [EditorBrowsable(EditorBrowsableState.Never)]
299 public static readonly BindableProperty SubStateProperty = BindableProperty.Create(nameof(SubState), typeof(States), typeof(View), States.Normal, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
301 var view = (View)bindable;
302 string valueToString = "";
303 if (newValue != null)
305 valueToString = ((States)newValue).GetDescription();
306 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SubState, new Tizen.NUI.PropertyValue(valueToString));
309 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
311 var view = (View)bindable;
313 if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SubState).Get(out temp) == false)
315 NUILog.Error("subState get error!");
317 return temp.GetValueByDescription<States>();
323 [EditorBrowsable(EditorBrowsableState.Never)]
324 public static readonly BindableProperty TooltipProperty = BindableProperty.Create(nameof(Tooltip), typeof(PropertyMap), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
326 var view = (View)bindable;
327 if (newValue != null)
329 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.TOOLTIP, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
332 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
334 var view = (View)bindable;
335 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
336 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.TOOLTIP).Get(temp);
343 [EditorBrowsable(EditorBrowsableState.Never)]
344 public static readonly BindableProperty FlexProperty = BindableProperty.Create(nameof(Flex), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
346 var view = (View)bindable;
347 if (newValue != null)
349 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue((float)newValue));
352 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
354 var view = (View)bindable;
356 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, FlexContainer.ChildProperty.FLEX).Get(out temp);
361 /// AlignSelfProperty
363 [EditorBrowsable(EditorBrowsableState.Never)]
364 public static readonly BindableProperty AlignSelfProperty = BindableProperty.Create(nameof(AlignSelf), typeof(int), typeof(View), default(int), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
366 var view = (View)bindable;
367 if (newValue != null)
369 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, FlexContainer.ChildProperty.AlignSelf, new Tizen.NUI.PropertyValue((int)newValue));
372 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
374 var view = (View)bindable;
376 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, FlexContainer.ChildProperty.AlignSelf).Get(out temp);
381 /// FlexMarginProperty
383 [EditorBrowsable(EditorBrowsableState.Never)]
384 public static readonly BindableProperty FlexMarginProperty = BindableProperty.Create(nameof(FlexMargin), typeof(Vector4), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
386 var view = (View)bindable;
387 if (newValue != null)
389 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, FlexContainer.ChildProperty.FlexMargin, new Tizen.NUI.PropertyValue((Vector4)newValue));
392 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
394 var view = (View)bindable;
395 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
396 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, FlexContainer.ChildProperty.FlexMargin).Get(temp);
401 /// CellIndexProperty
403 [EditorBrowsable(EditorBrowsableState.Never)]
404 public static readonly BindableProperty CellIndexProperty = BindableProperty.Create(nameof(CellIndex), typeof(Vector2), typeof(View), null,
405 propertyChanged: (bindable, oldValue, newValue) =>
407 var view = (View)bindable;
408 if (newValue != null)
410 var tmp = new PropertyValue((Vector2)newValue);
411 Object.SetProperty(view.SwigCPtr, TableView.ChildProperty.CellIndex, tmp);
415 defaultValueCreator: (bindable) =>
417 var view = (View)bindable;
418 if (view.internalCellIndex == null)
420 view.internalCellIndex = new Vector2(view.OnCellIndexChanged, 0, 0);
423 var tmp = Object.GetProperty(view.SwigCPtr, TableView.ChildProperty.CellIndex);
424 tmp?.Get(view.internalCellIndex);
427 return view.internalCellIndex;
434 [EditorBrowsable(EditorBrowsableState.Never)]
435 public static readonly BindableProperty RowSpanProperty = BindableProperty.Create(nameof(RowSpan), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
437 var view = (View)bindable;
438 if (newValue != null)
440 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, TableView.ChildProperty.RowSpan, new Tizen.NUI.PropertyValue((float)newValue));
443 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
445 var view = (View)bindable;
447 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, TableView.ChildProperty.RowSpan).Get(out temp);
452 /// ColumnSpanProperty
454 [EditorBrowsable(EditorBrowsableState.Never)]
455 public static readonly BindableProperty ColumnSpanProperty = BindableProperty.Create(nameof(ColumnSpan), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
457 var view = (View)bindable;
458 if (newValue != null)
460 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, TableView.ChildProperty.ColumnSpan, new Tizen.NUI.PropertyValue((float)newValue));
463 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
465 var view = (View)bindable;
467 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, TableView.ChildProperty.ColumnSpan).Get(out temp);
472 /// CellHorizontalAlignmentProperty
474 [EditorBrowsable(EditorBrowsableState.Never)]
475 public static readonly BindableProperty CellHorizontalAlignmentProperty = BindableProperty.Create(nameof(CellHorizontalAlignment), typeof(HorizontalAlignmentType), typeof(View), HorizontalAlignmentType.Left, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
477 var view = (View)bindable;
478 string valueToString = "";
480 if (newValue != null)
482 valueToString = ((HorizontalAlignmentType)newValue).GetDescription();
483 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, TableView.ChildProperty.CellHorizontalAlignment, new Tizen.NUI.PropertyValue(valueToString));
486 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
488 var view = (View)bindable;
490 if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, TableView.ChildProperty.CellHorizontalAlignment).Get(out temp) == false)
492 NUILog.Error("CellHorizontalAlignment get error!");
495 return temp.GetValueByDescription<HorizontalAlignmentType>();
499 /// CellVerticalAlignmentProperty
501 [EditorBrowsable(EditorBrowsableState.Never)]
502 public static readonly BindableProperty CellVerticalAlignmentProperty = BindableProperty.Create(nameof(CellVerticalAlignment), typeof(VerticalAlignmentType), typeof(View), VerticalAlignmentType.Top, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
504 var view = (View)bindable;
505 string valueToString = "";
507 if (newValue != null)
509 valueToString = ((VerticalAlignmentType)newValue).GetDescription();
510 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, TableView.ChildProperty.CellVerticalAlignment, new Tizen.NUI.PropertyValue(valueToString));
513 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
515 var view = (View)bindable;
517 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, TableView.ChildProperty.CellVerticalAlignment).Get(out temp);
519 NUILog.Error("CellVerticalAlignment get error!");
522 return temp.GetValueByDescription<VerticalAlignmentType>();
526 /// "DO not use this, that will be deprecated. Use 'View Weight' instead of BindableProperty"
527 /// This needs to be hidden as inhouse API until all applications using it have been updated. Do not make public.
529 [EditorBrowsable(EditorBrowsableState.Never)]
530 public static readonly BindableProperty WeightProperty = BindableProperty.Create(nameof(Weight), typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
532 var view = (View)bindable;
533 if (newValue != null)
535 view.Weight = (float)newValue;
539 defaultValueCreator: (bindable) =>
541 var view = (View)bindable;
546 /// LeftFocusableViewProperty
548 [EditorBrowsable(EditorBrowsableState.Never)]
549 public static readonly BindableProperty LeftFocusableViewProperty = BindableProperty.Create(nameof(View.LeftFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
551 var view = (View)bindable;
552 if (newValue != null) { view.LeftFocusableViewId = (int)(newValue as View)?.GetId(); }
553 else { view.LeftFocusableViewId = -1; }
555 defaultValueCreator: (bindable) =>
557 var view = (View)bindable;
558 if (view.LeftFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.LeftFocusableViewId); }
563 /// RightFocusableViewProperty
565 [EditorBrowsable(EditorBrowsableState.Never)]
566 public static readonly BindableProperty RightFocusableViewProperty = BindableProperty.Create(nameof(View.RightFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
568 var view = (View)bindable;
569 if (newValue != null) { view.RightFocusableViewId = (int)(newValue as View)?.GetId(); }
570 else { view.RightFocusableViewId = -1; }
572 defaultValueCreator: (bindable) =>
574 var view = (View)bindable;
575 if (view.RightFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.RightFocusableViewId); }
580 /// UpFocusableViewProperty
582 [EditorBrowsable(EditorBrowsableState.Never)]
583 public static readonly BindableProperty UpFocusableViewProperty = BindableProperty.Create(nameof(View.UpFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
585 var view = (View)bindable;
586 if (newValue != null) { view.UpFocusableViewId = (int)(newValue as View)?.GetId(); }
587 else { view.UpFocusableViewId = -1; }
589 defaultValueCreator: (bindable) =>
591 var view = (View)bindable;
592 if (view.UpFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.UpFocusableViewId); }
597 /// DownFocusableViewProperty
599 [EditorBrowsable(EditorBrowsableState.Never)]
600 public static readonly BindableProperty DownFocusableViewProperty = BindableProperty.Create(nameof(View.DownFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
602 var view = (View)bindable;
603 if (newValue != null) { view.DownFocusableViewId = (int)(newValue as View)?.GetId(); }
604 else { view.DownFocusableViewId = -1; }
606 defaultValueCreator: (bindable) =>
608 var view = (View)bindable;
609 if (view.DownFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.DownFocusableViewId); }
614 /// ClockwiseFocusableViewProperty
616 [EditorBrowsable(EditorBrowsableState.Never)]
617 public static readonly BindableProperty ClockwiseFocusableViewProperty = BindableProperty.Create(nameof(View.ClockwiseFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
619 var view = (View)bindable;
620 if (newValue != null && (newValue is View)) { view.ClockwiseFocusableViewId = (int)(newValue as View)?.GetId(); }
621 else { view.ClockwiseFocusableViewId = -1; }
623 defaultValueCreator: (bindable) =>
625 var view = (View)bindable;
626 if (view.ClockwiseFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.ClockwiseFocusableViewId); }
631 /// CounterClockwiseFocusableViewProperty
633 [EditorBrowsable(EditorBrowsableState.Never)]
634 public static readonly BindableProperty CounterClockwiseFocusableViewProperty = BindableProperty.Create(nameof(View.CounterClockwiseFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
636 var view = (View)bindable;
637 if (newValue != null && (newValue is View)) { view.CounterClockwiseFocusableViewId = (int)(newValue as View)?.GetId(); }
638 else { view.CounterClockwiseFocusableViewId = -1; }
640 defaultValueCreator: (bindable) =>
642 var view = (View)bindable;
643 if (view.CounterClockwiseFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.CounterClockwiseFocusableViewId); }
648 /// FocusableProperty
650 [EditorBrowsable(EditorBrowsableState.Never)]
651 public static readonly BindableProperty FocusableProperty = BindableProperty.Create(nameof(Focusable), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
653 var view = (View)bindable;
654 if (newValue != null) { view.SetKeyboardFocusable((bool)newValue); }
656 defaultValueCreator: (bindable) =>
658 var view = (View)bindable;
659 return view.IsKeyboardFocusable();
663 /// FocusableChildrenProperty
665 [EditorBrowsable(EditorBrowsableState.Never)]
666 public static readonly BindableProperty FocusableChildrenProperty = BindableProperty.Create(nameof(FocusableChildren), typeof(bool), typeof(View), true, propertyChanged: (bindable, oldValue, newValue) =>
668 var view = (View)bindable;
669 if (newValue != null) { view.SetKeyboardFocusableChildren((bool)newValue); }
671 defaultValueCreator: (bindable) =>
673 var view = (View)bindable;
674 return view.AreChildrenKeyBoardFocusable();
678 /// FocusableInTouchProperty
680 [EditorBrowsable(EditorBrowsableState.Never)]
681 public static readonly BindableProperty FocusableInTouchProperty = BindableProperty.Create(nameof(FocusableInTouch), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
683 var view = (View)bindable;
684 if (newValue != null) { view.SetFocusableInTouch((bool)newValue); }
686 defaultValueCreator: (bindable) =>
688 var view = (View)bindable;
689 return view.IsFocusableInTouch();
695 [EditorBrowsable(EditorBrowsableState.Never)]
696 public static readonly BindableProperty Size2DProperty = BindableProperty.Create(nameof(Size2D), typeof(Size2D), typeof(View), null,
697 propertyChanged: (bindable, oldValue, newValue) =>
699 var view = (View)bindable;
700 if (newValue != null)
702 // Size property setter is only used by user.
703 // Framework code uses SetSize() instead of Size property setter.
704 // Size set by user is returned by GetUserSize2D() for SuggestedMinimumWidth/Height.
705 // SuggestedMinimumWidth/Height is used by Layout calculation.
706 view.userSizeWidth = ((Size2D)newValue).Width;
707 view.userSizeHeight = ((Size2D)newValue).Height;
709 view.SetSize(((Size2D)newValue).Width, ((Size2D)newValue).Height, 0);
711 view.widthPolicy = ((Size2D)newValue).Width;
712 view.heightPolicy = ((Size2D)newValue).Height;
714 view.layout?.RequestLayout();
717 defaultValueCreator: (bindable) =>
719 var view = (View)bindable;
720 var tmp = new Size(0, 0, 0);
721 var tmpProperty = Object.GetProperty(view.SwigCPtr, Property.SIZE);
722 tmpProperty?.Get(tmp);
724 if (view.internalSize2D == null)
726 view.internalSize2D = new Size2D(view.OnSize2DChanged, (int)tmp?.Width, (int)tmp?.Height);
730 if (view.internalSize2D.SwigCPtr.Handle != global::System.IntPtr.Zero)
732 Interop.Vector2.WidthSet(view.internalSize2D.SwigCPtr, (float)tmp?.Width);
733 Interop.Vector2.HeightSet(view.internalSize2D.SwigCPtr, (float)tmp?.Height);
737 tmpProperty?.Dispose();
740 return view.internalSize2D;
747 [EditorBrowsable(EditorBrowsableState.Never)]
748 public static readonly BindableProperty OpacityProperty = BindableProperty.Create(nameof(Opacity), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
750 var view = (View)bindable;
752 view.themeData?.selectorData?.Opacity?.Reset(view);
754 if (newValue is Selector<float?> selector)
756 if (selector.HasAll()) view.SetOpacity(selector.All);
757 else view.EnsureSelectorData().Opacity = new TriggerableSelector<float?>(view, selector, view.SetOpacity, true);
761 view.SetOpacity((float?)newValue);
764 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
766 var view = (View)bindable;
768 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.OPACITY).Get(out temp);
773 /// Position2DProperty
775 [EditorBrowsable(EditorBrowsableState.Never)]
776 public static readonly BindableProperty Position2DProperty = BindableProperty.Create(nameof(Position2D), typeof(Position2D), typeof(View), null,
777 propertyChanged: (bindable, oldValue, newValue) =>
779 var view = (View)bindable;
780 if (newValue != null)
782 view.SetPosition(((Position2D)newValue).X, ((Position2D)newValue).Y, 0);
785 defaultValueCreator: (bindable) =>
787 var view = (View)bindable;
788 var tmp = new Position(0, 0, 0);
789 var tmpProperty = Object.GetProperty(view.SwigCPtr, Property.POSITION);
790 tmpProperty?.Get(tmp);
792 if (view.internalPosition2D == null)
794 view.internalPosition2D = new Position2D(view.OnPosition2DChanged, (int)tmp?.X, (int)tmp?.Y);
798 if (view.internalPosition2D.SwigCPtr.Handle != IntPtr.Zero)
800 Interop.Vector2.XSet(view.internalPosition2D.SwigCPtr, (float)tmp?.X);
801 Interop.Vector2.YSet(view.internalPosition2D.SwigCPtr, (float)tmp?.Y);
805 tmpProperty?.Dispose();
808 return view.internalPosition2D;
813 /// PositionUsesPivotPointProperty
815 [EditorBrowsable(EditorBrowsableState.Never)]
816 public static readonly BindableProperty PositionUsesPivotPointProperty = BindableProperty.Create(nameof(PositionUsesPivotPoint), typeof(bool), typeof(View), true, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
818 var view = (View)bindable;
819 if (newValue != null)
821 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.PositionUsesAnchorPoint, new Tizen.NUI.PropertyValue((bool)newValue));
824 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
826 var view = (View)bindable;
828 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.PositionUsesAnchorPoint).Get(out temp);
833 /// SiblingOrderProperty
835 [EditorBrowsable(EditorBrowsableState.Never)]
836 public static readonly BindableProperty SiblingOrderProperty = BindableProperty.Create(nameof(SiblingOrder), typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
838 var view = (View)bindable;
840 if (newValue != null)
842 value = (int)newValue;
845 NUILog.Error("SiblingOrder should be bigger than 0 or equal to 0.");
848 var siblings = view.GetParent()?.Children;
849 if (siblings != null)
851 int currentOrder = siblings.IndexOf(view);
852 if (value != currentOrder)
854 if (value == 0) { view.LowerToBottom(); }
855 else if (value < siblings.Count - 1)
857 if (value > currentOrder) { view.RaiseAbove(siblings[value]); }
858 else { view.LowerBelow(siblings[value]); }
860 else { view.RaiseToTop(); }
865 defaultValueCreator: (bindable) =>
867 var view = (View)bindable;
868 var parentChildren = view.GetParent()?.Children;
869 int currentOrder = 0;
870 if (parentChildren != null)
872 currentOrder = parentChildren.IndexOf(view);
874 if (currentOrder < 0) { return 0; }
875 else if (currentOrder < parentChildren.Count) { return currentOrder; }
882 /// ParentOriginProperty
884 [EditorBrowsable(EditorBrowsableState.Never)]
885 public static readonly BindableProperty ParentOriginProperty = BindableProperty.Create(nameof(ParentOrigin), typeof(Position), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
887 var view = (View)bindable;
888 if (newValue != null)
890 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ParentOrigin, new Tizen.NUI.PropertyValue((Position)newValue));
893 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
895 var view = (View)bindable;
896 Position temp = new Position(0.0f, 0.0f, 0.0f);
897 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ParentOrigin).Get(temp);
903 /// PivotPointProperty
905 [EditorBrowsable(EditorBrowsableState.Never)]
906 public static readonly BindableProperty PivotPointProperty = BindableProperty.Create(nameof(PivotPoint), typeof(Position), typeof(View), null,
907 propertyChanged: (bindable, oldValue, newValue) =>
909 var view = (View)bindable;
910 if (newValue != null)
912 view.SetAnchorPoint((Position)newValue);
915 defaultValueCreator: (bindable) =>
917 var view = (View)bindable;
918 if (view.internalPivotPoint == null)
920 view.internalPivotPoint = new Position(view.OnPivotPointChanged, 0, 0, 0);
922 var tmp = Object.GetProperty(view.SwigCPtr, Property.AnchorPoint);
923 tmp?.Get(view.internalPivotPoint);
926 return view.internalPivotPoint;
931 /// SizeWidthProperty
933 [EditorBrowsable(EditorBrowsableState.Never)]
934 public static readonly BindableProperty SizeWidthProperty = BindableProperty.Create(nameof(SizeWidth), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
936 var view = (View)bindable;
937 if (newValue != null)
939 // Size property setter is only used by user.
940 // Framework code uses SetSize() instead of Size property setter.
941 // Size set by user is returned by GetUserSize2D() for SuggestedMinimumWidth/Height.
942 // SuggestedMinimumWidth/Height is used by Layout calculation.
943 view.userSizeWidth = (float)newValue;
945 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeWidth, new Tizen.NUI.PropertyValue((float)newValue));
946 view.WidthSpecification = (int)System.Math.Ceiling((float)newValue);
949 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
951 var view = (View)bindable;
953 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeWidth).Get(out temp);
958 /// SizeHeightProperty
960 [EditorBrowsable(EditorBrowsableState.Never)]
961 public static readonly BindableProperty SizeHeightProperty = BindableProperty.Create(nameof(SizeHeight), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
963 var view = (View)bindable;
964 if (newValue != null)
966 // Size property setter is only used by user.
967 // Framework code uses SetSize() instead of Size property setter.
968 // Size set by user is returned by GetUserSize2D() for SuggestedMinimumWidth/Height.
969 // SuggestedMinimumWidth/Height is used by Layout calculation.
970 view.userSizeHeight = (float)newValue;
972 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeHeight, new Tizen.NUI.PropertyValue((float)newValue));
973 view.HeightSpecification = (int)System.Math.Ceiling((float)newValue);
976 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
978 var view = (View)bindable;
980 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeHeight).Get(out temp);
987 [EditorBrowsable(EditorBrowsableState.Never)]
988 public static readonly BindableProperty PositionProperty = BindableProperty.Create(nameof(Position), typeof(Position), typeof(View), null,
989 propertyChanged: (bindable, oldValue, newValue) =>
991 var view = (View)bindable;
992 if (newValue != null)
994 view.SetPosition(((Position)newValue).X, ((Position)newValue).Y, ((Position)newValue).Z);
997 defaultValueCreator: (bindable) =>
999 var view = (View)bindable;
1000 var tmpProperty = Object.GetProperty(view.SwigCPtr, Property.POSITION);
1002 if (view.internalPosition == null)
1004 view.internalPosition = new Position(view.OnPositionChanged, 0, 0, 0);
1006 tmpProperty?.Get(view.internalPosition);
1007 tmpProperty?.Dispose();
1009 return view.internalPosition;
1014 /// PositionXProperty
1016 [EditorBrowsable(EditorBrowsableState.Never)]
1017 public static readonly BindableProperty PositionXProperty = BindableProperty.Create(nameof(PositionX), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1019 var view = (View)bindable;
1020 if (newValue != null)
1022 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.PositionX, new Tizen.NUI.PropertyValue((float)newValue));
1025 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1027 var view = (View)bindable;
1029 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.PositionX).Get(out temp);
1034 /// PositionYProperty
1036 [EditorBrowsable(EditorBrowsableState.Never)]
1037 public static readonly BindableProperty PositionYProperty = BindableProperty.Create(nameof(PositionY), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1039 var view = (View)bindable;
1040 if (newValue != null)
1042 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.PositionY, new Tizen.NUI.PropertyValue((float)newValue));
1045 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1047 var view = (View)bindable;
1049 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.PositionY).Get(out temp);
1054 /// PositionZProperty
1056 [EditorBrowsable(EditorBrowsableState.Never)]
1057 public static readonly BindableProperty PositionZProperty = BindableProperty.Create(nameof(PositionZ), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1059 var view = (View)bindable;
1060 if (newValue != null)
1062 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.PositionZ, new Tizen.NUI.PropertyValue((float)newValue));
1065 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1067 var view = (View)bindable;
1069 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.PositionZ).Get(out temp);
1074 /// OrientationProperty
1076 [EditorBrowsable(EditorBrowsableState.Never)]
1077 public static readonly BindableProperty OrientationProperty = BindableProperty.Create(nameof(Orientation), typeof(Rotation), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1079 var view = (View)bindable;
1080 if (newValue != null)
1082 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ORIENTATION, new Tizen.NUI.PropertyValue((Rotation)newValue));
1085 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1087 var view = (View)bindable;
1088 Rotation temp = new Rotation();
1089 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ORIENTATION).Get(temp);
1096 [EditorBrowsable(EditorBrowsableState.Never)]
1097 public static readonly BindableProperty ScaleProperty = BindableProperty.Create(nameof(Scale), typeof(Vector3), typeof(View), null,
1098 propertyChanged: (bindable, oldValue, newValue) =>
1100 var view = (View)bindable;
1101 if (newValue != null)
1103 view.SetScale((Vector3)newValue);
1106 defaultValueCreator: (bindable) =>
1108 var view = (View)bindable;
1109 if (view.internalScale == null)
1111 view.internalScale = new Vector3(view.OnScaleChanged, 0, 0, 0);
1114 var tmpPropery = Object.GetProperty(view.SwigCPtr, Property.SCALE);
1115 tmpPropery?.Get(view.internalScale);
1116 tmpPropery?.Dispose();
1118 return view.internalScale;
1125 [EditorBrowsable(EditorBrowsableState.Never)]
1126 public static readonly BindableProperty ScaleXProperty = BindableProperty.Create(nameof(ScaleX), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1128 var view = (View)bindable;
1129 if (newValue != null)
1131 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ScaleX, new Tizen.NUI.PropertyValue((float)newValue));
1134 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1136 var view = (View)bindable;
1138 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ScaleX).Get(out temp);
1145 [EditorBrowsable(EditorBrowsableState.Never)]
1146 public static readonly BindableProperty ScaleYProperty = BindableProperty.Create(nameof(ScaleY), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1148 var view = (View)bindable;
1149 if (newValue != null)
1151 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ScaleY, new Tizen.NUI.PropertyValue((float)newValue));
1154 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1156 var view = (View)bindable;
1158 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ScaleY).Get(out temp);
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 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ScaleZ, new Tizen.NUI.PropertyValue((float)newValue));
1174 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1176 var view = (View)bindable;
1178 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ScaleZ).Get(out temp);
1185 [EditorBrowsable(EditorBrowsableState.Never)]
1186 public static readonly BindableProperty NameProperty = BindableProperty.Create(nameof(Name), typeof(string), typeof(View), string.Empty,
1187 propertyChanged: (bindable, oldValue, newValue) =>
1189 var view = (View)bindable;
1190 if (newValue != null)
1192 view.SetName((string)newValue);
1195 defaultValueCreator: (bindable) =>
1197 var view = (View)bindable;
1199 temp = view.GetName();
1205 /// SensitiveProperty
1207 [EditorBrowsable(EditorBrowsableState.Never)]
1208 public static readonly BindableProperty SensitiveProperty = BindableProperty.Create(nameof(Sensitive), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1210 var view = (View)bindable;
1211 if (newValue != null)
1213 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SENSITIVE, new Tizen.NUI.PropertyValue((bool)newValue));
1216 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1218 var view = (View)bindable;
1220 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SENSITIVE).Get(out temp);
1225 /// IsEnabledProperty
1227 [EditorBrowsable(EditorBrowsableState.Never)]
1228 public static readonly BindableProperty IsEnabledProperty = BindableProperty.Create(nameof(IsEnabled), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1230 var view = (View)bindable;
1231 if (newValue != null)
1233 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.UserInteractionEnabled, new Tizen.NUI.PropertyValue((bool)newValue));
1234 view.OnEnabled((bool)newValue);
1237 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1239 var view = (View)bindable;
1241 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.UserInteractionEnabled).Get(out temp);
1246 /// DispatchKeyEventsProperty
1248 [EditorBrowsable(EditorBrowsableState.Never)]
1249 public static readonly BindableProperty DispatchKeyEventsProperty = BindableProperty.Create(nameof(DispatchKeyEvents), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1251 var view = (View)bindable;
1252 if (newValue != null)
1254 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.DispatchKeyEvents, new Tizen.NUI.PropertyValue((bool)newValue));
1257 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1259 var view = (View)bindable;
1261 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.DispatchKeyEvents).Get(out temp);
1266 /// LeaveRequiredProperty
1268 [EditorBrowsable(EditorBrowsableState.Never)]
1269 public static readonly BindableProperty LeaveRequiredProperty = BindableProperty.Create(nameof(LeaveRequired), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1271 var view = (View)bindable;
1272 if (newValue != null)
1274 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.LeaveRequired, new Tizen.NUI.PropertyValue((bool)newValue));
1277 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1279 var view = (View)bindable;
1281 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.LeaveRequired).Get(out temp);
1286 /// InheritOrientationProperty
1288 [EditorBrowsable(EditorBrowsableState.Never)]
1289 public static readonly BindableProperty InheritOrientationProperty = BindableProperty.Create(nameof(InheritOrientation), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1291 var view = (View)bindable;
1292 if (newValue != null)
1294 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.InheritOrientation, new Tizen.NUI.PropertyValue((bool)newValue));
1297 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1299 var view = (View)bindable;
1301 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.InheritOrientation).Get(out temp);
1306 /// InheritScaleProperty
1308 [EditorBrowsable(EditorBrowsableState.Never)]
1309 public static readonly BindableProperty InheritScaleProperty = BindableProperty.Create(nameof(InheritScale), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1311 var view = (View)bindable;
1312 if (newValue != null)
1314 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.InheritScale, new Tizen.NUI.PropertyValue((bool)newValue));
1317 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1319 var view = (View)bindable;
1321 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.InheritScale).Get(out temp);
1326 /// DrawModeProperty
1328 [EditorBrowsable(EditorBrowsableState.Never)]
1329 public static readonly BindableProperty DrawModeProperty = BindableProperty.Create(nameof(DrawMode), typeof(DrawModeType), typeof(View), DrawModeType.Normal, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1331 var view = (View)bindable;
1332 if (newValue != null)
1334 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.DrawMode, new Tizen.NUI.PropertyValue((int)newValue));
1337 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1339 var view = (View)bindable;
1341 if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.DrawMode).Get(out temp) == false)
1343 NUILog.Error("DrawMode get error!");
1345 return (DrawModeType)temp;
1349 /// SizeModeFactorProperty
1351 [EditorBrowsable(EditorBrowsableState.Never)]
1352 public static readonly BindableProperty SizeModeFactorProperty = BindableProperty.Create(nameof(SizeModeFactor), typeof(Vector3), typeof(View), null,
1353 propertyChanged: (bindable, oldValue, newValue) =>
1355 var view = (View)bindable;
1356 if (newValue != null)
1358 var tmp = new PropertyValue((Vector3)newValue);
1359 Object.SetProperty(view.SwigCPtr, Property.SizeModeFactor, tmp);
1363 defaultValueCreator: (bindable) =>
1365 var view = (View)bindable;
1366 if (view.internalSizeModeFactor == null)
1368 view.internalSizeModeFactor = new Vector3(view.OnSizeModeFactorChanged, 0, 0, 0);
1370 var tmp = Object.GetProperty(view.SwigCPtr, Property.SizeModeFactor);
1371 tmp?.Get(view.internalSizeModeFactor);
1374 return view.internalSizeModeFactor;
1379 /// WidthResizePolicyProperty
1381 [EditorBrowsable(EditorBrowsableState.Never)]
1382 public static readonly BindableProperty WidthResizePolicyProperty = BindableProperty.Create(nameof(WidthResizePolicy), typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1384 var view = (View)bindable;
1385 if (newValue != null)
1387 if ((ResizePolicyType)newValue == ResizePolicyType.KeepSizeFollowingParent)
1389 if (view.widthConstraint == null)
1391 view.widthConstraint = new EqualConstraintWithParentFloat((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeWidth, View.Property.SizeWidth);
1392 view.widthConstraint.Apply();
1394 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.WidthResizePolicy, new Tizen.NUI.PropertyValue((int)ResizePolicyType.FillToParent));
1398 view.widthConstraint?.Remove();
1399 view.widthConstraint?.Dispose();
1400 view.widthConstraint = null;
1401 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.WidthResizePolicy, new Tizen.NUI.PropertyValue((int)newValue));
1403 // Match ResizePolicy to new Layouting.
1404 // Parent relative policies can not be mapped at this point as parent size unknown.
1405 switch ((ResizePolicyType)newValue)
1407 case ResizePolicyType.UseNaturalSize:
1409 view.WidthSpecification = LayoutParamPolicies.WrapContent;
1412 case ResizePolicyType.FillToParent:
1414 view.WidthSpecification = LayoutParamPolicies.MatchParent;
1417 case ResizePolicyType.FitToChildren:
1419 view.WidthSpecification = LayoutParamPolicies.WrapContent;
1427 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1429 var view = (View)bindable;
1431 if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.WidthResizePolicy).Get(out temp) == false)
1433 NUILog.Error("WidthResizePolicy get error!");
1435 return temp.GetValueByDescription<ResizePolicyType>();
1439 /// HeightResizePolicyProperty
1441 [EditorBrowsable(EditorBrowsableState.Never)]
1442 public static readonly BindableProperty HeightResizePolicyProperty = BindableProperty.Create(nameof(HeightResizePolicy), typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1444 var view = (View)bindable;
1445 if (newValue != null)
1447 if ((ResizePolicyType)newValue == ResizePolicyType.KeepSizeFollowingParent)
1449 if (view.heightConstraint == null)
1451 view.heightConstraint = new EqualConstraintWithParentFloat((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeHeight, View.Property.SizeHeight);
1452 view.heightConstraint.Apply();
1454 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.HeightResizePolicy, new Tizen.NUI.PropertyValue((int)ResizePolicyType.FillToParent));
1458 view.heightConstraint?.Remove();
1459 view.heightConstraint?.Dispose();
1460 view.heightConstraint = null;
1461 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.HeightResizePolicy, new Tizen.NUI.PropertyValue((int)newValue));
1463 // Match ResizePolicy to new Layouting.
1464 // Parent relative policies can not be mapped at this point as parent size unknown.
1465 switch ((ResizePolicyType)newValue)
1467 case ResizePolicyType.UseNaturalSize:
1469 view.HeightSpecification = LayoutParamPolicies.WrapContent;
1472 case ResizePolicyType.FillToParent:
1474 view.HeightSpecification = LayoutParamPolicies.MatchParent;
1477 case ResizePolicyType.FitToChildren:
1479 view.HeightSpecification = LayoutParamPolicies.WrapContent;
1487 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1489 var view = (View)bindable;
1491 if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.HeightResizePolicy).Get(out temp) == false)
1493 NUILog.Error("HeightResizePolicy get error!");
1495 return temp.GetValueByDescription<ResizePolicyType>();
1499 /// SizeScalePolicyProperty
1501 [EditorBrowsable(EditorBrowsableState.Never)]
1502 public static readonly BindableProperty SizeScalePolicyProperty = BindableProperty.Create(nameof(SizeScalePolicy), typeof(SizeScalePolicyType), typeof(View), SizeScalePolicyType.UseSizeSet, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1504 var view = (View)bindable;
1505 string valueToString = "";
1506 if (newValue != null)
1508 valueToString = ((SizeScalePolicyType)newValue).GetDescription();
1509 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeScalePolicy, new Tizen.NUI.PropertyValue(valueToString));
1512 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1514 var view = (View)bindable;
1516 if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeScalePolicy).Get(out temp) == false)
1518 NUILog.Error("SizeScalePolicy get error!");
1520 return (SizeScalePolicyType)temp;
1524 /// WidthForHeightProperty
1526 [EditorBrowsable(EditorBrowsableState.Never)]
1527 public static readonly BindableProperty WidthForHeightProperty = BindableProperty.Create(nameof(WidthForHeight), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1529 var view = (View)bindable;
1530 if (newValue != null)
1532 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.WidthForHeight, new Tizen.NUI.PropertyValue((bool)newValue));
1535 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1537 var view = (View)bindable;
1539 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.WidthForHeight).Get(out temp);
1544 /// HeightForWidthProperty
1546 [EditorBrowsable(EditorBrowsableState.Never)]
1547 public static readonly BindableProperty HeightForWidthProperty = BindableProperty.Create(nameof(HeightForWidth), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1549 var view = (View)bindable;
1550 if (newValue != null)
1552 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.HeightForWidth, new Tizen.NUI.PropertyValue((bool)newValue));
1555 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1557 var view = (View)bindable;
1559 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.HeightForWidth).Get(out temp);
1566 [EditorBrowsable(EditorBrowsableState.Never)]
1567 public static readonly BindableProperty PaddingProperty = BindableProperty.Create(nameof(Padding), typeof(Extents), typeof(View), null,
1568 propertyChanged: (bindable, oldValue, newValue) =>
1570 var view = (View)bindable;
1571 if (newValue != null)
1573 if (view.Layout != null)
1575 view.Layout.Padding = new Extents((Extents)newValue);
1576 if ((view.Padding.Start != 0) || (view.Padding.End != 0) || (view.Padding.Top != 0) || (view.Padding.Bottom != 0))
1578 var tmp = new PropertyValue(new Extents(0, 0, 0, 0));
1579 Object.SetProperty(view.SwigCPtr, Property.PADDING, tmp);
1582 view.Layout.RequestLayout();
1586 var tmp = new PropertyValue((Extents)newValue);
1587 Object.SetProperty(view.SwigCPtr, Property.PADDING, tmp);
1592 defaultValueCreator: (bindable) =>
1594 var view = (View)bindable;
1595 if ((view.internalPadding == null) || (view.Layout != null))
1597 ushort start = 0, end = 0, top = 0, bottom = 0;
1598 if (view.Layout != null)
1600 if (view.Layout.Padding != null)
1602 start = view.Layout.Padding.Start;
1603 end = view.Layout.Padding.End;
1604 top = view.Layout.Padding.Top;
1605 bottom = view.Layout.Padding.Bottom;
1608 view.internalPadding = new Extents(view.OnPaddingChanged, start, end, top, bottom);
1611 if (view.Layout == null)
1613 var tmp = Object.GetProperty(view.SwigCPtr, Property.PADDING);
1614 tmp?.Get(view.internalPadding);
1618 return view.internalPadding;
1625 [EditorBrowsable(EditorBrowsableState.Never)]
1626 public static readonly BindableProperty SizeProperty = BindableProperty.Create(nameof(Size), typeof(Size), typeof(View), null,
1627 propertyChanged: (bindable, oldValue, newValue) =>
1629 var view = (View)bindable;
1630 if (newValue != null)
1632 // Size property setter is only used by user.
1633 // Framework code uses SetSize() instead of Size property setter.
1634 // Size set by user is returned by GetUserSize2D() for SuggestedMinimumWidth/Height.
1635 // SuggestedMinimumWidth/Height is used by Layout calculation.
1636 view.userSizeWidth = ((Size)newValue).Width;
1637 view.userSizeHeight = ((Size)newValue).Height;
1639 // Set Specification so when layouts measure this View it matches the value set here.
1640 // All Views are currently Layouts.
1641 view.WidthSpecification = (int)System.Math.Ceiling(((Size)newValue).Width);
1642 view.HeightSpecification = (int)System.Math.Ceiling(((Size)newValue).Height);
1644 view.SetSize(((Size)newValue).Width, ((Size)newValue).Height, ((Size)newValue).Depth);
1647 defaultValueCreator: (bindable) =>
1649 var view = (View)bindable;
1651 var tmpProperty = Object.GetProperty(view.SwigCPtr, Property.SIZE);
1652 if (view.internalSize == null)
1654 view.internalSize = new Size(view.OnSizeChanged, 0, 0, 0);
1656 tmpProperty?.Get(view.internalSize);
1657 tmpProperty?.Dispose();
1659 return view.internalSize;
1664 /// MinimumSizeProperty
1666 [EditorBrowsable(EditorBrowsableState.Never)]
1667 public static readonly BindableProperty MinimumSizeProperty = BindableProperty.Create(nameof(MinimumSize), typeof(Size2D), typeof(View), null,
1668 propertyChanged: (bindable, oldValue, newValue) =>
1670 var view = (View)bindable;
1671 if (newValue != null)
1673 view.SetMinimumSize((Size2D)newValue);
1676 defaultValueCreator: (bindable) =>
1678 var view = (View)bindable;
1679 if (view.internalMinimumSize == null)
1681 view.internalMinimumSize = new Size2D(view.OnMinimumSizeChanged, 0, 0);
1683 var tmp = Object.GetProperty(view.SwigCPtr, Property.MinimumSize);
1684 tmp?.Get(view.internalMinimumSize);
1687 return view.internalMinimumSize;
1692 /// MaximumSizeProperty
1694 [EditorBrowsable(EditorBrowsableState.Never)]
1695 public static readonly BindableProperty MaximumSizeProperty = BindableProperty.Create(nameof(MaximumSize), typeof(Size2D), typeof(View), null,
1696 propertyChanged: (bindable, oldValue, newValue) =>
1698 var view = (View)bindable;
1699 if (newValue != null)
1701 view.SetMaximumSize((Size2D)newValue);
1704 defaultValueCreator: (bindable) =>
1706 var view = (View)bindable;
1707 if (view.internalMaximumSize == null)
1709 view.internalMaximumSize = new Size2D(view.OnMaximumSizeChanged, 0, 0);
1711 var tmp = Object.GetProperty(view.SwigCPtr, Property.MaximumSize);
1712 tmp?.Get(view.internalMaximumSize);
1715 return view.internalMaximumSize;
1720 /// InheritPositionProperty
1722 [EditorBrowsable(EditorBrowsableState.Never)]
1723 public static readonly BindableProperty InheritPositionProperty = BindableProperty.Create(nameof(InheritPosition), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1725 var view = (View)bindable;
1726 if (newValue != null)
1728 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.InheritPosition, new Tizen.NUI.PropertyValue((bool)newValue));
1731 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1733 var view = (View)bindable;
1735 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.InheritPosition).Get(out temp);
1740 /// ClippingModeProperty
1742 [EditorBrowsable(EditorBrowsableState.Never)]
1743 public static readonly BindableProperty ClippingModeProperty = BindableProperty.Create(nameof(ClippingMode), typeof(ClippingModeType), typeof(View), ClippingModeType.Disabled, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1745 var view = (View)bindable;
1746 if (newValue != null)
1748 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ClippingMode, new Tizen.NUI.PropertyValue((int)newValue));
1751 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1753 var view = (View)bindable;
1755 if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ClippingMode).Get(out temp) == false)
1757 NUILog.Error("ClippingMode get error!");
1759 return (ClippingModeType)temp;
1763 /// InheritLayoutDirectionProperty
1765 [EditorBrowsable(EditorBrowsableState.Never)]
1766 public static readonly BindableProperty InheritLayoutDirectionProperty = BindableProperty.Create(nameof(InheritLayoutDirection), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1768 var view = (View)bindable;
1769 if (newValue != null)
1771 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.InheritLayoutDirection, new Tizen.NUI.PropertyValue((bool)newValue));
1774 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1776 var view = (View)bindable;
1778 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.InheritLayoutDirection).Get(out temp);
1783 /// LayoutDirectionProperty
1785 [EditorBrowsable(EditorBrowsableState.Never)]
1786 public static readonly BindableProperty LayoutDirectionProperty = BindableProperty.Create(nameof(LayoutDirection), typeof(ViewLayoutDirectionType), typeof(View), ViewLayoutDirectionType.LTR, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1788 var view = (View)bindable;
1789 if (newValue != null)
1791 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.LayoutDirection, new Tizen.NUI.PropertyValue((int)newValue));
1794 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1796 var view = (View)bindable;
1798 if (false == Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.LayoutDirection).Get(out temp))
1800 NUILog.Error("LAYOUT_DIRECTION get error!");
1802 return (ViewLayoutDirectionType)temp;
1808 [EditorBrowsable(EditorBrowsableState.Never)]
1809 public static readonly BindableProperty MarginProperty = BindableProperty.Create(nameof(Margin), typeof(Extents), typeof(View), null,
1810 propertyChanged: (bindable, oldValue, newValue) =>
1812 var view = (View)bindable;
1813 if (newValue != null)
1815 if (view.Layout != null)
1817 view.Layout.Margin = new Extents((Extents)newValue);
1818 if ((view.Margin.Start != 0) || (view.Margin.End != 0) || (view.Margin.Top != 0) || (view.Margin.Bottom != 0))
1820 var tmp = new PropertyValue(new Extents(0, 0, 0, 0));
1821 Object.SetProperty(view.SwigCPtr, Property.MARGIN, tmp);
1824 view.Layout.RequestLayout();
1828 var tmp = new PropertyValue((Extents)newValue);
1829 Object.SetProperty(view.SwigCPtr, Property.MARGIN, tmp);
1834 defaultValueCreator: (bindable) =>
1836 var view = (View)bindable;
1837 if ((view.internalMargin == null) || (view.Layout != null))
1839 ushort start = 0, end = 0, top = 0, bottom = 0;
1840 if (view.Layout != null)
1842 if (view.Layout.Margin != null)
1844 start = view.Layout.Margin.Start;
1845 end = view.Layout.Margin.End;
1846 top = view.Layout.Margin.Top;
1847 bottom = view.Layout.Margin.Bottom;
1850 view.internalMargin = new Extents(view.OnMarginChanged, start, end, top, bottom);
1853 if (view.Layout == null)
1856 var tmp = Object.GetProperty(view.SwigCPtr, Property.MARGIN);
1857 tmp?.Get(view.internalMargin);
1861 return view.internalMargin;
1866 /// UpdateSizeHintProperty
1868 [EditorBrowsable(EditorBrowsableState.Never)]
1869 public static readonly BindableProperty UpdateSizeHintProperty = BindableProperty.Create(nameof(UpdateSizeHint), typeof(Vector2), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1871 var view = (View)bindable;
1872 if (newValue != null)
1874 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, Interop.ViewProperty.UpdateSizeHintGet(), new Tizen.NUI.PropertyValue((Vector2)newValue));
1877 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1879 var view = (View)bindable;
1881 Vector2 temp = new Vector2(0.0f, 0.0f);
1882 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, Interop.ViewProperty.UpdateSizeHintGet()).Get(temp);
1887 /// ImageShadow Property
1889 [EditorBrowsable(EditorBrowsableState.Never)]
1890 public static readonly BindableProperty ImageShadowProperty = BindableProperty.Create(nameof(ImageShadow), typeof(ImageShadow), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1892 var view = (View)bindable;
1894 view.themeData?.selectorData?.ClearShadow(view);
1896 if (newValue is Selector<ImageShadow> selector)
1898 if (selector.HasAll()) view.SetShadow(selector.All);
1899 else view.EnsureSelectorData().ImageShadow = new TriggerableSelector<ImageShadow>(view, selector, view.SetShadow, true);
1903 view.SetShadow((ImageShadow)newValue);
1906 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1908 var view = (View)bindable;
1910 PropertyMap map = new PropertyMap();
1911 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SHADOW).Get(map);
1913 var shadow = new ImageShadow(map);
1914 return shadow.IsEmpty() ? null : shadow;
1920 [EditorBrowsable(EditorBrowsableState.Never)]
1921 public static readonly BindableProperty BoxShadowProperty = BindableProperty.Create(nameof(BoxShadow), typeof(Shadow), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1923 var view = (View)bindable;
1925 view.themeData?.selectorData?.ClearShadow(view);
1927 if (newValue is Selector<Shadow> selector)
1929 if (selector.HasAll()) view.SetShadow(selector.All);
1930 else view.EnsureSelectorData().BoxShadow = new TriggerableSelector<Shadow>(view, selector, view.SetShadow, true);
1934 view.SetShadow((Shadow)newValue);
1937 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1939 var view = (View)bindable;
1941 PropertyMap map = new PropertyMap();
1942 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SHADOW).Get(map);
1944 var shadow = new Shadow(map);
1945 return shadow.IsEmpty() ? null : shadow;
1949 /// CornerRadius Property
1951 [EditorBrowsable(EditorBrowsableState.Never)]
1952 public static readonly BindableProperty CornerRadiusProperty = BindableProperty.Create(nameof(CornerRadius), typeof(Vector4), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1954 var view = (View)bindable;
1955 (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).CornerRadius = (Vector4)newValue;
1956 view.ApplyCornerRadius();
1958 defaultValueCreator: (bindable) =>
1960 var view = (View)bindable;
1961 return view.backgroundExtraData == null ? 0.0f : view.backgroundExtraData.CornerRadius;
1965 /// CornerRadiusPolicy Property
1967 [EditorBrowsable(EditorBrowsableState.Never)]
1968 public static readonly BindableProperty CornerRadiusPolicyProperty = BindableProperty.Create(nameof(CornerRadiusPolicy), typeof(VisualTransformPolicyType), typeof(View), VisualTransformPolicyType.Absolute, propertyChanged: (bindable, oldValue, newValue) =>
1970 var view = (View)bindable;
1971 (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).CornerRadiusPolicy = (VisualTransformPolicyType)newValue;
1973 if (view.backgroundExtraData.CornerRadius != null)
1975 view.ApplyCornerRadius();
1978 defaultValueCreator: (bindable) =>
1980 var view = (View)bindable;
1981 return view.backgroundExtraData == null ? VisualTransformPolicyType.Absolute : view.backgroundExtraData.CornerRadiusPolicy;
1985 /// BorderlineWidth Property
1987 [EditorBrowsable(EditorBrowsableState.Never)]
1988 public static readonly BindableProperty BorderlineWidthProperty = BindableProperty.Create(nameof(BorderlineWidth), typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
1990 var view = (View)bindable;
1991 (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).BorderlineWidth = (float)newValue;
1992 view.ApplyBorderline();
1994 defaultValueCreator: (bindable) =>
1996 var view = (View)bindable;
1997 return view.backgroundExtraData == null ? 0.0f : view.backgroundExtraData.BorderlineWidth;
2001 /// BorderlineColor Property
2003 [EditorBrowsable(EditorBrowsableState.Never)]
2004 public static readonly BindableProperty BorderlineColorProperty = BindableProperty.Create(nameof(BorderlineColor), typeof(Color), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
2006 var view = (View)bindable;
2007 (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).BorderlineColor = (Color)newValue;
2008 view.ApplyBorderline();
2010 defaultValueCreator: (bindable) =>
2012 var view = (View)bindable;
2013 return view.backgroundExtraData == null ? Color.Black : view.backgroundExtraData.BorderlineColor;
2017 /// BorderlineOffset Property
2019 [EditorBrowsable(EditorBrowsableState.Never)]
2020 public static readonly BindableProperty BorderlineOffsetProperty = BindableProperty.Create(nameof(BorderlineOffset), typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
2022 var view = (View)bindable;
2023 (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).BorderlineOffset = (float)newValue;
2024 view.ApplyBorderline();
2026 defaultValueCreator: (bindable) =>
2028 var view = (View)bindable;
2029 return view.backgroundExtraData == null ? 0.0f : view.backgroundExtraData.BorderlineOffset;
2033 /// EnableControlState property
2035 [EditorBrowsable(EditorBrowsableState.Never)]
2036 public static readonly BindableProperty EnableControlStateProperty = BindableProperty.Create(nameof(EnableControlState), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2038 var view = (View)bindable;
2039 bool prev = view.enableControlState;
2040 view.enableControlState = (bool)newValue;
2042 if (prev != view.enableControlState)
2046 view.TouchEvent -= view.EmptyOnTouch;
2050 view.TouchEvent += view.EmptyOnTouch;
2054 defaultValueCreator: (bindable) =>
2056 return ((View)bindable).enableControlState;
2060 /// ThemeChangeSensitive property
2062 [EditorBrowsable(EditorBrowsableState.Never)]
2063 public static readonly BindableProperty ThemeChangeSensitiveProperty = BindableProperty.Create(nameof(ThemeChangeSensitive), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2065 var view = (View)bindable;
2067 if (view.ThemeChangeSensitive == (bool)newValue) return;
2069 if (view.themeData == null) view.themeData = new ThemeData();
2071 view.themeData.ThemeChangeSensitive = (bool)newValue;
2073 if (!view.themeData.ThemeApplied) return;
2075 if (view.themeData.ThemeChangeSensitive && !view.themeData.ListeningThemeChangeEvent)
2077 view.themeData.ListeningThemeChangeEvent = true;
2078 ThemeManager.ThemeChangedInternal.Add(view.OnThemeChanged);
2080 else if (!view.themeData.ThemeChangeSensitive && view.themeData.ListeningThemeChangeEvent)
2082 view.themeData.ListeningThemeChangeEvent = false;
2083 ThemeManager.ThemeChangedInternal.Remove(view.OnThemeChanged);
2086 defaultValueCreator: (bindable) =>
2088 return ((View)bindable).themeData?.ThemeChangeSensitive ?? ThemeManager.ApplicationThemeChangeSensitive;
2092 /// AccessibilityNameProperty
2094 [EditorBrowsable(EditorBrowsableState.Never)]
2095 public static readonly BindableProperty AccessibilityNameProperty = BindableProperty.Create(nameof(AccessibilityName), typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
2097 var view = (View)bindable;
2098 if (newValue != null)
2100 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AccessibilityName, new Tizen.NUI.PropertyValue((string)newValue));
2103 defaultValueCreator: (bindable) =>
2105 var view = (View)bindable;
2108 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AccessibilityName).Get(out temp);
2113 /// AccessibilityDescriptionProperty
2115 [EditorBrowsable(EditorBrowsableState.Never)]
2116 public static readonly BindableProperty AccessibilityDescriptionProperty = BindableProperty.Create(nameof(AccessibilityDescription), typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
2118 var view = (View)bindable;
2119 if (newValue != null)
2121 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AccessibilityDescription, new Tizen.NUI.PropertyValue((string)newValue));
2124 defaultValueCreator: (bindable) =>
2126 var view = (View)bindable;
2129 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AccessibilityDescription).Get(out temp);
2134 /// AccessibilityTranslationDomainProperty
2136 [EditorBrowsable(EditorBrowsableState.Never)]
2137 public static readonly BindableProperty AccessibilityTranslationDomainProperty = BindableProperty.Create(nameof(AccessibilityTranslationDomain), typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
2139 var view = (View)bindable;
2140 if (newValue != null)
2142 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AccessibilityTranslationDomain, new Tizen.NUI.PropertyValue((string)newValue));
2145 defaultValueCreator: (bindable) =>
2147 var view = (View)bindable;
2150 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AccessibilityTranslationDomain).Get(out temp);
2155 /// AccessibilityRoleProperty
2157 [EditorBrowsable(EditorBrowsableState.Never)]
2158 public static readonly BindableProperty AccessibilityRoleProperty = BindableProperty.Create(nameof(AccessibilityRole), typeof(Role), typeof(View), default(Role), propertyChanged: (bindable, oldValue, newValue) =>
2160 var view = (View)bindable;
2161 if (newValue != null)
2163 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AccessibilityRole, new Tizen.NUI.PropertyValue((int)newValue));
2166 defaultValueCreator: (bindable) =>
2168 var view = (View)bindable;
2171 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AccessibilityRole).Get(out temp);
2176 /// AccessibilityHighlightableProperty
2178 [EditorBrowsable(EditorBrowsableState.Never)]
2179 public static readonly BindableProperty AccessibilityHighlightableProperty = BindableProperty.Create(nameof(AccessibilityHighlightable), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2181 var view = (View)bindable;
2182 if (newValue != null)
2184 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AccessibilityHighlightable, new Tizen.NUI.PropertyValue((bool)newValue));
2187 defaultValueCreator: (bindable) =>
2189 var view = (View)bindable;
2191 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AccessibilityHighlightable).Get(out temp);
2196 /// AccessibilityHiddenProperty
2198 [EditorBrowsable(EditorBrowsableState.Never)]
2199 public static readonly BindableProperty AccessibilityHiddenProperty = BindableProperty.Create(nameof(AccessibilityHidden), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2201 var view = (View)bindable;
2202 if (newValue != null)
2204 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AccessibilityHidden, new Tizen.NUI.PropertyValue((bool)newValue));
2207 defaultValueCreator: (bindable) =>
2209 var view = (View)bindable;
2211 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AccessibilityHidden).Get(out temp);
2216 /// ExcludeLayoutingProperty
2218 [EditorBrowsable(EditorBrowsableState.Never)]
2219 public static readonly BindableProperty ExcludeLayoutingProperty = BindableProperty.Create(nameof(ExcludeLayouting), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2221 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2222 if (newValue != null)
2224 instance.InternalExcludeLayouting = (bool)newValue;
2227 defaultValueCreator: (bindable) =>
2229 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2230 return instance.InternalExcludeLayouting;
2234 /// TooltipTextProperty
2236 [EditorBrowsable(EditorBrowsableState.Never)]
2237 public static readonly BindableProperty TooltipTextProperty = BindableProperty.Create(nameof(TooltipText), typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
2239 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2240 if (newValue != null)
2242 instance.InternalTooltipText = (string)newValue;
2245 defaultValueCreator: (bindable) =>
2247 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2248 return instance.InternalTooltipText;
2252 /// PositionUsesAnchorPointProperty
2254 [EditorBrowsable(EditorBrowsableState.Never)]
2255 public static readonly BindableProperty PositionUsesAnchorPointProperty = BindableProperty.Create(nameof(PositionUsesAnchorPoint), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2257 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2258 if (newValue != null)
2260 instance.InternalPositionUsesAnchorPoint = (bool)newValue;
2263 defaultValueCreator: (bindable) =>
2265 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2266 return instance.InternalPositionUsesAnchorPoint;
2270 /// AnchorPointProperty
2272 [EditorBrowsable(EditorBrowsableState.Never)]
2273 public static readonly BindableProperty AnchorPointProperty = BindableProperty.Create(nameof(AnchorPoint), typeof(Tizen.NUI.Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
2275 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2276 if (newValue != null)
2278 instance.InternalAnchorPoint = (Tizen.NUI.Position)newValue;
2281 defaultValueCreator: (bindable) =>
2283 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2284 return instance.InternalAnchorPoint;
2288 /// WidthSpecificationProperty
2290 [EditorBrowsable(EditorBrowsableState.Never)]
2291 public static readonly BindableProperty WidthSpecificationProperty = BindableProperty.Create(nameof(WidthSpecification), typeof(int), typeof(View), 0, propertyChanged: (bindable, oldValue, newValue) =>
2293 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2294 if (newValue != null)
2296 instance.InternalWidthSpecification = (int)newValue;
2299 defaultValueCreator: (bindable) =>
2301 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2302 return instance.InternalWidthSpecification;
2306 /// HeightSpecificationProperty
2308 [EditorBrowsable(EditorBrowsableState.Never)]
2309 public static readonly BindableProperty HeightSpecificationProperty = BindableProperty.Create(nameof(HeightSpecification), typeof(int), typeof(View), 0, propertyChanged: (bindable, oldValue, newValue) =>
2311 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2312 if (newValue != null)
2314 instance.InternalHeightSpecification = (int)newValue;
2317 defaultValueCreator: (bindable) =>
2319 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2320 return instance.InternalHeightSpecification;
2324 /// LayoutTransitionProperty
2326 [EditorBrowsable(EditorBrowsableState.Never)]
2327 public static readonly BindableProperty LayoutTransitionProperty = BindableProperty.Create(nameof(LayoutTransition), typeof(Tizen.NUI.LayoutTransition), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
2329 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2330 if (newValue != null)
2332 instance.InternalLayoutTransition = (Tizen.NUI.LayoutTransition)newValue;
2335 defaultValueCreator: (bindable) =>
2337 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2338 return instance.InternalLayoutTransition;
2342 /// PaddingEXProperty
2344 [EditorBrowsable(EditorBrowsableState.Never)]
2345 public static readonly BindableProperty PaddingEXProperty = BindableProperty.Create(nameof(PaddingEX), typeof(Tizen.NUI.Extents), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
2347 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2348 if (newValue != null)
2350 instance.InternalPaddingEX = (Tizen.NUI.Extents)newValue;
2353 defaultValueCreator: (bindable) =>
2355 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2356 return instance.InternalPaddingEX;
2362 [EditorBrowsable(EditorBrowsableState.Never)]
2363 public static readonly BindableProperty LayoutProperty = BindableProperty.Create(nameof(Layout), typeof(Tizen.NUI.LayoutItem), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
2365 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2366 if (newValue != null)
2368 instance.InternalLayout = (Tizen.NUI.LayoutItem)newValue;
2371 defaultValueCreator: (bindable) =>
2373 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2374 return instance.InternalLayout;
2378 /// BackgroundImageSynchronosLoadingProperty
2380 [EditorBrowsable(EditorBrowsableState.Never)]
2381 public static readonly BindableProperty BackgroundImageSynchronosLoadingProperty = BindableProperty.Create(nameof(BackgroundImageSynchronosLoading), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2383 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2384 if (newValue != null)
2386 instance.InternalBackgroundImageSynchronosLoading = (bool)newValue;
2389 defaultValueCreator: (bindable) =>
2391 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2392 return instance.InternalBackgroundImageSynchronosLoading;
2396 /// BackgroundImageSynchronousLoadingProperty
2398 [EditorBrowsable(EditorBrowsableState.Never)]
2399 public static readonly BindableProperty BackgroundImageSynchronousLoadingProperty = BindableProperty.Create(nameof(BackgroundImageSynchronousLoading), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2401 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2402 if (newValue != null)
2404 instance.InternalBackgroundImageSynchronousLoading = (bool)newValue;
2407 defaultValueCreator: (bindable) =>
2409 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2410 return instance.InternalBackgroundImageSynchronousLoading;
2414 /// EnableControlStatePropagationProperty
2416 [EditorBrowsable(EditorBrowsableState.Never)]
2417 public static readonly BindableProperty EnableControlStatePropagationProperty = BindableProperty.Create(nameof(EnableControlStatePropagation), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2419 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2420 if (newValue != null)
2422 instance.InternalEnableControlStatePropagation = (bool)newValue;
2425 defaultValueCreator: (bindable) =>
2427 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2428 return instance.InternalEnableControlStatePropagation;
2432 /// PropagatableControlStatesProperty
2434 [EditorBrowsable(EditorBrowsableState.Never)]
2435 public static readonly BindableProperty PropagatableControlStatesProperty = BindableProperty.Create(nameof(PropagatableControlStates), typeof(ControlState), typeof(View), ControlState.All, propertyChanged: (bindable, oldValue, newValue) =>
2437 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2438 if (newValue != null)
2440 instance.InternalPropagatableControlStates = (ControlState)newValue;
2443 defaultValueCreator: (bindable) =>
2445 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2446 return instance.InternalPropagatableControlStates;
2450 /// GrabTouchAfterLeaveProperty
2452 [EditorBrowsable(EditorBrowsableState.Never)]
2453 public static readonly BindableProperty GrabTouchAfterLeaveProperty = BindableProperty.Create(nameof(GrabTouchAfterLeave), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2455 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2456 if (newValue != null)
2458 instance.InternalGrabTouchAfterLeave = (bool)newValue;
2461 defaultValueCreator: (bindable) =>
2463 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2464 return instance.InternalGrabTouchAfterLeave;
2468 /// BlendEquationProperty
2470 [EditorBrowsable(EditorBrowsableState.Never)]
2471 public static readonly BindableProperty BlendEquationProperty = BindableProperty.Create(nameof(BlendEquation), typeof(BlendEquationType), typeof(View), default(BlendEquationType), propertyChanged: (bindable, oldValue, newValue) =>
2473 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2474 if (newValue != null)
2476 instance.InternalBlendEquation = (Tizen.NUI.BlendEquationType)newValue;
2479 defaultValueCreator: (bindable) =>
2481 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2482 return instance.InternalBlendEquation;
2486 /// TransitionOptionsProperty
2488 [EditorBrowsable(EditorBrowsableState.Never)]
2489 public static readonly BindableProperty TransitionOptionsProperty = BindableProperty.Create(nameof(TransitionOptions), typeof(TransitionOptions), typeof(View), default(TransitionOptions), propertyChanged: (bindable, oldValue, newValue) =>
2491 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2492 if (newValue != null)
2494 instance.InternalTransitionOptions = (Tizen.NUI.TransitionOptions)newValue;
2497 defaultValueCreator: (bindable) =>
2499 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2500 return instance.InternalTransitionOptions;
2504 /// AutomationIdProperty
2506 [EditorBrowsable(EditorBrowsableState.Never)]
2507 public static readonly BindableProperty AutomationIdProperty = BindableProperty.Create(nameof(AutomationId), typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
2509 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2510 if (newValue != null)
2512 instance.InternalAutomationId = (string)newValue;
2515 defaultValueCreator: (bindable) =>
2517 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2518 return instance.InternalAutomationId;
2522 /// TouchAreaOffsetProperty
2524 [EditorBrowsable(EditorBrowsableState.Never)]
2525 public static readonly BindableProperty TouchAreaOffsetProperty = BindableProperty.Create(nameof(TouchAreaOffset), typeof(Offset), typeof(View), default(Offset), propertyChanged: (bindable, oldValue, newValue) =>
2527 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2528 if (newValue != null)
2530 instance.InternalTouchAreaOffset = (Tizen.NUI.Offset)newValue;
2533 defaultValueCreator: (bindable) =>
2535 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2536 return instance.InternalTouchAreaOffset;
2540 /// Gets View's Size2D set by user.
2542 internal Size2D GetUserSize2D()
2544 return new Size2D((int)userSizeWidth, (int)userSizeHeight);
2547 private void SetBackgroundImage(string value)
2549 if (string.IsNullOrEmpty(value))
2551 var empty = new PropertyValue();
2553 Object.SetProperty(SwigCPtr, Property.BACKGROUND, empty);
2558 if (value.StartsWith("*Resource*"))
2560 string resource = Tizen.Applications.Application.Current.DirectoryInfo.Resource;
2561 value = value.Replace("*Resource*", resource);
2564 if (backgroundExtraData == null)
2566 var propertyValue = new PropertyValue(value);
2567 Object.SetProperty(SwigCPtr, Property.BACKGROUND, propertyValue);
2568 BackgroundImageSynchronousLoading = backgroundImageSynchronousLoading;
2569 propertyValue?.Dispose();
2573 var map = new PropertyMap();
2574 var url = new PropertyValue(value);
2575 var cornerRadiusValue = backgroundExtraData.CornerRadius == null ? new PropertyValue() : new PropertyValue(backgroundExtraData.CornerRadius);
2576 var cornerRadius = new PropertyValue(cornerRadiusValue);
2577 var cornerRadiusPolicy = new PropertyValue((int)(backgroundExtraData.CornerRadiusPolicy));
2578 var borderlineWidth = new PropertyValue(backgroundExtraData.BorderlineWidth);
2579 var borderlineColorValue = backgroundExtraData.BorderlineColor == null ? new PropertyValue(Color.Black) : new PropertyValue(backgroundExtraData.BorderlineColor);
2580 var borderlineColor = new PropertyValue(borderlineColorValue);
2581 var borderlineOffset = new PropertyValue(backgroundExtraData.BorderlineOffset);
2582 var synchronousLoading = new PropertyValue(backgroundImageSynchronousLoading);
2583 var npatchType = new PropertyValue((int)Visual.Type.NPatch);
2584 var border = (backgroundExtraData.BackgroundImageBorder != null) ? new PropertyValue(backgroundExtraData.BackgroundImageBorder) : null;
2585 var imageType = new PropertyValue((int)Visual.Type.Image);
2587 map.Add(ImageVisualProperty.URL, url)
2588 .Add(Visual.Property.CornerRadius, cornerRadius)
2589 .Add(Visual.Property.CornerRadiusPolicy, cornerRadiusPolicy)
2590 .Add(Visual.Property.BorderlineWidth, borderlineWidth)
2591 .Add(Visual.Property.BorderlineColor, borderlineColor)
2592 .Add(Visual.Property.BorderlineOffset, borderlineOffset)
2593 .Add(ImageVisualProperty.SynchronousLoading, synchronousLoading);
2595 if (backgroundExtraData.BackgroundImageBorder != null)
2597 map.Add(Visual.Property.Type, npatchType)
2598 .Add(NpatchImageVisualProperty.Border, border);
2602 map.Add(Visual.Property.Type, imageType);
2605 var mapValue = new PropertyValue(map);
2606 Object.SetProperty(SwigCPtr, Property.BACKGROUND, mapValue);
2608 imageType?.Dispose();
2610 npatchType?.Dispose();
2611 synchronousLoading?.Dispose();
2612 borderlineOffset?.Dispose();
2613 borderlineColor?.Dispose();
2614 borderlineColorValue?.Dispose();
2615 borderlineWidth?.Dispose();
2616 cornerRadiusPolicy?.Dispose();
2617 cornerRadius?.Dispose();
2618 cornerRadiusValue?.Dispose();
2621 mapValue?.Dispose();
2624 private void SetBackgroundImageBorder(Rectangle value)
2626 bool isEmptyValue = Rectangle.IsNullOrZero(value);
2628 var backgroundImageBorder = isEmptyValue ? null : value;
2630 (backgroundExtraData ?? (backgroundExtraData = new BackgroundExtraData())).BackgroundImageBorder = backgroundImageBorder;
2637 PropertyMap map = Background;
2644 map[NpatchImageVisualProperty.Border] = new PropertyValue(backgroundImageBorder);
2648 map.Find(Visual.Property.Type)?.Get(out visualType);
2650 if (visualType == (int)Visual.Type.Image)
2652 map[Visual.Property.Type] = new PropertyValue((int)Visual.Type.NPatch);
2655 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, View.Property.BACKGROUND, new PropertyValue(map));
2658 private void SetBackgroundColor(Color value)
2665 if (backgroundExtraData == null)
2667 var background = new PropertyValue(value);
2668 Object.SetProperty(SwigCPtr, Property.BACKGROUND, background);
2669 background?.Dispose();
2673 var map = new PropertyMap();
2674 var colorType = new PropertyValue((int)Visual.Type.Color);
2675 var mixColor = new PropertyValue(value);
2676 var cornerRadiusValue = backgroundExtraData.CornerRadius == null ? new PropertyValue() : new PropertyValue(backgroundExtraData.CornerRadius);
2677 var cornerRadius = new PropertyValue(cornerRadiusValue);
2678 var cornerRadiusPolicy = new PropertyValue((int)(backgroundExtraData.CornerRadiusPolicy));
2679 var borderlineWidth = new PropertyValue(backgroundExtraData.BorderlineWidth);
2680 var borderlineColorValue = backgroundExtraData.BorderlineColor == null ? new PropertyValue(Color.Black) : new PropertyValue(backgroundExtraData.BorderlineColor);
2681 var borderlineColor = new PropertyValue(borderlineColorValue);
2682 var borderlineOffset = new PropertyValue(backgroundExtraData.BorderlineOffset);
2684 map.Add(Visual.Property.Type, colorType)
2685 .Add(ColorVisualProperty.MixColor, mixColor)
2686 .Add(Visual.Property.CornerRadius, cornerRadius)
2687 .Add(Visual.Property.CornerRadiusPolicy, cornerRadiusPolicy)
2688 .Add(Visual.Property.BorderlineWidth, borderlineWidth)
2689 .Add(Visual.Property.BorderlineColor, borderlineColor)
2690 .Add(Visual.Property.BorderlineOffset, borderlineOffset);
2692 var mapValue = new PropertyValue(map);
2693 Object.SetProperty(SwigCPtr, Property.BACKGROUND, mapValue);
2695 borderlineOffset?.Dispose();
2696 borderlineColor?.Dispose();
2697 borderlineColorValue?.Dispose();
2698 borderlineWidth?.Dispose();
2699 cornerRadiusPolicy?.Dispose();
2700 cornerRadius?.Dispose();
2701 cornerRadiusValue?.Dispose();
2702 mixColor?.Dispose();
2703 colorType?.Dispose();
2705 mapValue?.Dispose();
2708 private void SetColor(Color value)
2715 Interop.ActorInternal.SetColor(SwigCPtr, value.SwigCPtr);
2716 if (NDalicPINVOKE.SWIGPendingException.Pending)
2717 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2720 private void SetOpacity(float? value)
2727 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, View.Property.OPACITY, new Tizen.NUI.PropertyValue((float)value));
2730 private void SetShadow(ShadowBase value)
2732 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, View.Property.SHADOW, value == null ? new PropertyValue() : value.ToPropertyValue(this));