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
31 /// StyleNameProperty (DALi json)
33 [EditorBrowsable(EditorBrowsableState.Never)]
34 public static readonly BindableProperty StyleNameProperty = BindableProperty.Create(nameof(StyleName), typeof(string), typeof(View), string.Empty, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
36 var view = (View)bindable;
39 string styleName = (string)newValue;
40 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.StyleName, new Tizen.NUI.PropertyValue(styleName));
42 view.styleName = styleName;
44 if (string.IsNullOrEmpty(styleName)) return;
46 var style = ThemeManager.GetUpdateStyleWithoutClone(styleName);
48 if (style == null) return;
50 view.ApplyStyle(style);
51 view.SetThemeApplied();
54 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
56 var view = (View)bindable;
58 if (!string.IsNullOrEmpty(view.styleName)) return view.styleName;
61 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.StyleName).Get(out temp);
66 /// KeyInputFocusProperty
68 [EditorBrowsable(EditorBrowsableState.Never)]
69 public static readonly BindableProperty KeyInputFocusProperty = BindableProperty.Create(nameof(KeyInputFocus), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
71 var view = (View)bindable;
74 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.KeyInputFocus, new Tizen.NUI.PropertyValue((bool)newValue));
77 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
79 var view = (View)bindable;
81 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.KeyInputFocus).Get(out temp);
86 /// BackgroundColorProperty
88 [EditorBrowsable(EditorBrowsableState.Never)]
89 public static readonly BindableProperty BackgroundColorProperty = BindableProperty.Create(nameof(BackgroundColor), typeof(Color), typeof(View), null,
90 propertyChanged: (bindable, oldValue, newValue) =>
92 var view = (View)bindable;
94 view.themeData?.selectorData?.ClearBackground(view);
96 if (newValue is Selector<Color> selector)
98 if (selector.HasAll()) view.SetBackgroundColor(selector.All);
99 else view.EnsureSelectorData().BackgroundColor = new TriggerableSelector<Color>(view, selector, view.SetBackgroundColor, true);
103 view.SetBackgroundColor((Color)newValue);
106 defaultValueCreator: (bindable) =>
108 var view = (View)bindable;
110 if (view.internalBackgroundColor == null)
112 view.internalBackgroundColor = new Color(view.OnBackgroundColorChanged, 0, 0, 0, 0);
115 PropertyMap background = view.Background;
117 background.Find(Visual.Property.Type)?.Get(out visualType);
118 if (visualType == (int)Visual.Type.Color)
120 background.Find(ColorVisualProperty.MixColor)?.Get(view.internalBackgroundColor);
123 background?.Dispose();
126 return view.internalBackgroundColor;
133 [EditorBrowsable(EditorBrowsableState.Never)]
134 public static readonly BindableProperty ColorProperty = BindableProperty.Create(nameof(Color), typeof(Color), typeof(View), null,
135 propertyChanged: (bindable, oldValue, newValue) =>
137 var view = (View)bindable;
139 view.themeData?.selectorData?.Color?.Reset(view);
141 if (newValue is Selector<Color> selector)
143 if (selector.HasAll()) view.SetColor(selector.All);
144 else view.EnsureSelectorData().Color = new TriggerableSelector<Color>(view, selector, view.SetColor, true);
148 view.SetColor((Color)newValue);
151 defaultValueCreator: (bindable) =>
153 var view = (View)bindable;
154 var tmpProperty = view.GetProperty(Interop.ActorProperty.ColorGet());
156 if (view.internalColor == null)
158 view.internalColor = new Color(view.OnColorChanged, 0, 0, 0, 0);
161 tmpProperty?.Get(view.internalColor);
162 tmpProperty?.Dispose();
164 return view.internalColor;
168 /// <summary> BackgroundImageProperty </summary>
169 [EditorBrowsable(EditorBrowsableState.Never)]
170 public static readonly BindableProperty BackgroundImageProperty = BindableProperty.Create(nameof(BackgroundImage), typeof(string), typeof(View), default(string),
171 propertyChanged: (bindable, oldValue, newValue) =>
173 var view = (View)bindable;
175 if (view.themeData?.selectorData != null)
177 view.themeData.selectorData.BackgroundColor?.Reset(view);
178 view.themeData.selectorData.BackgroundImage?.Reset(view);
181 if (newValue is Selector<string> selector)
183 if (selector.HasAll()) view.SetBackgroundImage(selector.All);
184 else view.EnsureSelectorData().BackgroundImage = new TriggerableSelector<string>(view, selector, view.SetBackgroundImage, true);
188 view.SetBackgroundImage((string)newValue);
191 defaultValueCreator: (bindable) =>
193 var view = (View)bindable;
194 string backgroundImage = "";
196 PropertyMap background = view.Background;
197 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
199 background.Dispose();
202 return backgroundImage;
207 /// <summary>BackgroundImageBorderProperty</summary>
208 [EditorBrowsable(EditorBrowsableState.Never)]
209 public static readonly BindableProperty BackgroundImageBorderProperty = BindableProperty.Create(nameof(BackgroundImageBorder), typeof(Rectangle), typeof(View), default(Rectangle), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
211 var view = (View)bindable;
213 view.themeData?.selectorData?.BackgroundImageBorder?.Reset(view);
215 if (newValue is Selector<Rectangle> selector)
217 if (selector.HasAll()) view.SetBackgroundImageBorder(selector.All);
218 else view.EnsureSelectorData().BackgroundImageBorder = new TriggerableSelector<Rectangle>(view, selector, view.SetBackgroundImageBorder, true);
222 view.SetBackgroundImageBorder((Rectangle)newValue);
225 defaultValueCreator: (bindable) =>
227 var view = (View)bindable;
229 return view.backgroundExtraData?.BackgroundImageBorder;
233 /// BackgroundProperty
235 [EditorBrowsable(EditorBrowsableState.Never)]
236 public static readonly BindableProperty BackgroundProperty = BindableProperty.Create(nameof(Background), typeof(PropertyMap), typeof(View), null,
237 propertyChanged: (bindable, oldValue, newValue) =>
239 var view = (View)bindable;
240 if (newValue != null)
242 var propertyValue = new PropertyValue((PropertyMap)newValue);
243 Object.SetProperty(view.SwigCPtr, Property.BACKGROUND, propertyValue);
245 view.backgroundExtraData = null;
247 propertyValue.Dispose();
248 propertyValue = null;
251 defaultValueCreator: (bindable) =>
253 var view = (View)bindable;
254 PropertyMap tmp = new PropertyMap();
255 var propertyValue = Object.GetProperty(view.SwigCPtr, Property.BACKGROUND);
256 propertyValue.Get(tmp);
257 propertyValue.Dispose();
258 propertyValue = null;
266 [EditorBrowsable(EditorBrowsableState.Never)]
267 public static readonly BindableProperty StateProperty = BindableProperty.Create(nameof(State), typeof(States), typeof(View), States.Normal, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
269 var view = (View)bindable;
270 if (newValue != null)
272 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.STATE, new Tizen.NUI.PropertyValue((int)newValue));
275 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
277 var view = (View)bindable;
279 if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.STATE).Get(out temp) == false)
281 NUILog.Error("State get error!");
285 case 0: return States.Normal;
286 case 1: return States.Focused;
287 case 2: return States.Disabled;
288 default: return States.Normal;
295 [EditorBrowsable(EditorBrowsableState.Never)]
296 public static readonly BindableProperty SubStateProperty = BindableProperty.Create(nameof(SubState), typeof(States), typeof(View), States.Normal, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
298 var view = (View)bindable;
299 string valueToString = "";
300 if (newValue != null)
302 valueToString = ((States)newValue).GetDescription();
303 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SubState, new Tizen.NUI.PropertyValue(valueToString));
306 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
308 var view = (View)bindable;
310 if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SubState).Get(out temp) == false)
312 NUILog.Error("subState get error!");
314 return temp.GetValueByDescription<States>();
320 [EditorBrowsable(EditorBrowsableState.Never)]
321 public static readonly BindableProperty TooltipProperty = BindableProperty.Create(nameof(Tooltip), typeof(PropertyMap), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
323 var view = (View)bindable;
324 if (newValue != null)
326 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.TOOLTIP, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
329 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
331 var view = (View)bindable;
332 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
333 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.TOOLTIP).Get(temp);
340 [EditorBrowsable(EditorBrowsableState.Never)]
341 public static readonly BindableProperty FlexProperty = BindableProperty.Create(nameof(Flex), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
343 var view = (View)bindable;
344 if (newValue != null)
346 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue((float)newValue));
349 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
351 var view = (View)bindable;
353 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, FlexContainer.ChildProperty.FLEX).Get(out temp);
358 /// AlignSelfProperty
360 [EditorBrowsable(EditorBrowsableState.Never)]
361 public static readonly BindableProperty AlignSelfProperty = BindableProperty.Create(nameof(AlignSelf), typeof(int), typeof(View), default(int), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
363 var view = (View)bindable;
364 if (newValue != null)
366 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, FlexContainer.ChildProperty.AlignSelf, new Tizen.NUI.PropertyValue((int)newValue));
369 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
371 var view = (View)bindable;
373 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, FlexContainer.ChildProperty.AlignSelf).Get(out temp);
378 /// FlexMarginProperty
380 [EditorBrowsable(EditorBrowsableState.Never)]
381 public static readonly BindableProperty FlexMarginProperty = BindableProperty.Create(nameof(FlexMargin), typeof(Vector4), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
383 var view = (View)bindable;
384 if (newValue != null)
386 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, FlexContainer.ChildProperty.FlexMargin, new Tizen.NUI.PropertyValue((Vector4)newValue));
389 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
391 var view = (View)bindable;
392 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
393 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, FlexContainer.ChildProperty.FlexMargin).Get(temp);
398 /// CellIndexProperty
400 [EditorBrowsable(EditorBrowsableState.Never)]
401 public static readonly BindableProperty CellIndexProperty = BindableProperty.Create(nameof(CellIndex), typeof(Vector2), typeof(View), null,
402 propertyChanged: (bindable, oldValue, newValue) =>
404 var view = (View)bindable;
405 if (newValue != null)
407 var tmp = new PropertyValue((Vector2)newValue);
408 Object.SetProperty(view.SwigCPtr, TableView.ChildProperty.CellIndex, tmp);
412 defaultValueCreator: (bindable) =>
414 var view = (View)bindable;
415 if (view.internalCellIndex == null)
417 view.internalCellIndex = new Vector2(view.OnCellIndexChanged, 0, 0);
420 var tmp = Object.GetProperty(view.SwigCPtr, TableView.ChildProperty.CellIndex);
421 tmp?.Get(view.internalCellIndex);
424 return view.internalCellIndex;
431 [EditorBrowsable(EditorBrowsableState.Never)]
432 public static readonly BindableProperty RowSpanProperty = BindableProperty.Create(nameof(RowSpan), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
434 var view = (View)bindable;
435 if (newValue != null)
437 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, TableView.ChildProperty.RowSpan, new Tizen.NUI.PropertyValue((float)newValue));
440 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
442 var view = (View)bindable;
444 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, TableView.ChildProperty.RowSpan).Get(out temp);
449 /// ColumnSpanProperty
451 [EditorBrowsable(EditorBrowsableState.Never)]
452 public static readonly BindableProperty ColumnSpanProperty = BindableProperty.Create(nameof(ColumnSpan), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
454 var view = (View)bindable;
455 if (newValue != null)
457 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, TableView.ChildProperty.ColumnSpan, new Tizen.NUI.PropertyValue((float)newValue));
460 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
462 var view = (View)bindable;
464 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, TableView.ChildProperty.ColumnSpan).Get(out temp);
469 /// CellHorizontalAlignmentProperty
471 [EditorBrowsable(EditorBrowsableState.Never)]
472 public static readonly BindableProperty CellHorizontalAlignmentProperty = BindableProperty.Create(nameof(CellHorizontalAlignment), typeof(HorizontalAlignmentType), typeof(View), HorizontalAlignmentType.Left, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
474 var view = (View)bindable;
475 string valueToString = "";
477 if (newValue != null)
479 valueToString = ((HorizontalAlignmentType)newValue).GetDescription();
480 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, TableView.ChildProperty.CellHorizontalAlignment, new Tizen.NUI.PropertyValue(valueToString));
483 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
485 var view = (View)bindable;
487 if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, TableView.ChildProperty.CellHorizontalAlignment).Get(out temp) == false)
489 NUILog.Error("CellHorizontalAlignment get error!");
492 return temp.GetValueByDescription<HorizontalAlignmentType>();
496 /// CellVerticalAlignmentProperty
498 [EditorBrowsable(EditorBrowsableState.Never)]
499 public static readonly BindableProperty CellVerticalAlignmentProperty = BindableProperty.Create(nameof(CellVerticalAlignment), typeof(VerticalAlignmentType), typeof(View), VerticalAlignmentType.Top, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
501 var view = (View)bindable;
502 string valueToString = "";
504 if (newValue != null)
506 valueToString = ((VerticalAlignmentType)newValue).GetDescription();
507 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, TableView.ChildProperty.CellVerticalAlignment, new Tizen.NUI.PropertyValue(valueToString));
510 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
512 var view = (View)bindable;
514 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, TableView.ChildProperty.CellVerticalAlignment).Get(out temp);
516 NUILog.Error("CellVerticalAlignment get error!");
519 return temp.GetValueByDescription<VerticalAlignmentType>();
523 /// "Please DO NOT use! This will be deprecated! Please use 'View Weight' instead of BindableProperty"
524 /// This needs to be hidden as inhouse API until all applications using it have been updated. Do not make public.
526 [EditorBrowsable(EditorBrowsableState.Never)]
527 public static readonly BindableProperty WeightProperty = BindableProperty.Create(nameof(Weight), typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
529 var view = (View)bindable;
530 if (newValue != null)
532 view.Weight = (float)newValue;
536 defaultValueCreator: (bindable) =>
538 var view = (View)bindable;
543 /// LeftFocusableViewProperty
545 [EditorBrowsable(EditorBrowsableState.Never)]
546 public static readonly BindableProperty LeftFocusableViewProperty = BindableProperty.Create(nameof(View.LeftFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
548 var view = (View)bindable;
549 if (newValue != null) { view.LeftFocusableViewId = (int)(newValue as View)?.GetId(); }
550 else { view.LeftFocusableViewId = -1; }
552 defaultValueCreator: (bindable) =>
554 var view = (View)bindable;
555 if (view.LeftFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.LeftFocusableViewId); }
560 /// RightFocusableViewProperty
562 [EditorBrowsable(EditorBrowsableState.Never)]
563 public static readonly BindableProperty RightFocusableViewProperty = BindableProperty.Create(nameof(View.RightFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
565 var view = (View)bindable;
566 if (newValue != null) { view.RightFocusableViewId = (int)(newValue as View)?.GetId(); }
567 else { view.RightFocusableViewId = -1; }
569 defaultValueCreator: (bindable) =>
571 var view = (View)bindable;
572 if (view.RightFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.RightFocusableViewId); }
577 /// UpFocusableViewProperty
579 [EditorBrowsable(EditorBrowsableState.Never)]
580 public static readonly BindableProperty UpFocusableViewProperty = BindableProperty.Create(nameof(View.UpFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
582 var view = (View)bindable;
583 if (newValue != null) { view.UpFocusableViewId = (int)(newValue as View)?.GetId(); }
584 else { view.UpFocusableViewId = -1; }
586 defaultValueCreator: (bindable) =>
588 var view = (View)bindable;
589 if (view.UpFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.UpFocusableViewId); }
594 /// DownFocusableViewProperty
596 [EditorBrowsable(EditorBrowsableState.Never)]
597 public static readonly BindableProperty DownFocusableViewProperty = BindableProperty.Create(nameof(View.DownFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
599 var view = (View)bindable;
600 if (newValue != null) { view.DownFocusableViewId = (int)(newValue as View)?.GetId(); }
601 else { view.DownFocusableViewId = -1; }
603 defaultValueCreator: (bindable) =>
605 var view = (View)bindable;
606 if (view.DownFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.DownFocusableViewId); }
611 /// FocusableProperty
613 [EditorBrowsable(EditorBrowsableState.Never)]
614 public static readonly BindableProperty FocusableProperty = BindableProperty.Create(nameof(Focusable), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
616 var view = (View)bindable;
617 if (newValue != null) { view.SetKeyboardFocusable((bool)newValue); }
619 defaultValueCreator: (bindable) =>
621 var view = (View)bindable;
622 return view.IsKeyboardFocusable();
626 /// FocusableChildrenProperty
628 [EditorBrowsable(EditorBrowsableState.Never)]
629 public static readonly BindableProperty FocusableChildrenProperty = BindableProperty.Create(nameof(FocusableChildren), typeof(bool), typeof(View), true, propertyChanged: (bindable, oldValue, newValue) =>
631 var view = (View)bindable;
632 if (newValue != null) { view.SetKeyboardFocusableChildren((bool)newValue); }
634 defaultValueCreator: (bindable) =>
636 var view = (View)bindable;
637 return view.AreChildrenKeyBoardFocusable();
641 /// FocusableInTouchProperty
643 [EditorBrowsable(EditorBrowsableState.Never)]
644 public static readonly BindableProperty FocusableInTouchProperty = BindableProperty.Create(nameof(FocusableInTouch), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
646 var view = (View)bindable;
647 if (newValue != null) { view.SetFocusableInTouch((bool)newValue); }
649 defaultValueCreator: (bindable) =>
651 var view = (View)bindable;
652 return view.IsFocusableInTouch();
658 [EditorBrowsable(EditorBrowsableState.Never)]
659 public static readonly BindableProperty Size2DProperty = BindableProperty.Create(nameof(Size2D), typeof(Size2D), typeof(View), null,
660 propertyChanged: (bindable, oldValue, newValue) =>
662 var view = (View)bindable;
663 if (newValue != null)
665 view.SetSize(((Size2D)newValue).Width, ((Size2D)newValue).Height, 0);
667 view.widthPolicy = ((Size2D)newValue).Width;
668 view.heightPolicy = ((Size2D)newValue).Height;
670 view.layout?.RequestLayout();
673 defaultValueCreator: (bindable) =>
675 var view = (View)bindable;
676 var tmp = new Size(0, 0, 0);
677 var tmpProperty = Object.GetProperty(view.SwigCPtr, Property.SIZE);
678 tmpProperty?.Get(tmp);
680 if (view.internalSize2D == null)
682 view.internalSize2D = new Size2D(view.OnSize2DChanged, (int)tmp?.Width, (int)tmp?.Height);
686 if (view.internalSize2D.SwigCPtr.Handle != global::System.IntPtr.Zero)
688 Interop.Vector2.WidthSet(view.internalSize2D.SwigCPtr, (float)tmp?.Width);
689 Interop.Vector2.HeightSet(view.internalSize2D.SwigCPtr, (float)tmp?.Height);
693 tmpProperty?.Dispose();
696 return view.internalSize2D;
703 [EditorBrowsable(EditorBrowsableState.Never)]
704 public static readonly BindableProperty OpacityProperty = BindableProperty.Create(nameof(Opacity), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
706 var view = (View)bindable;
708 view.themeData?.selectorData?.Opacity?.Reset(view);
710 if (newValue is Selector<float?> selector)
712 if (selector.HasAll()) view.SetOpacity(selector.All);
713 else view.EnsureSelectorData().Opacity = new TriggerableSelector<float?>(view, selector, view.SetOpacity, true);
717 view.SetOpacity((float?)newValue);
720 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
722 var view = (View)bindable;
724 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.OPACITY).Get(out temp);
729 /// Position2DProperty
731 [EditorBrowsable(EditorBrowsableState.Never)]
732 public static readonly BindableProperty Position2DProperty = BindableProperty.Create(nameof(Position2D), typeof(Position2D), typeof(View), null,
733 propertyChanged: (bindable, oldValue, newValue) =>
735 var view = (View)bindable;
736 if (newValue != null)
738 view.SetPosition(((Position2D)newValue).X, ((Position2D)newValue).Y, 0);
741 defaultValueCreator: (bindable) =>
743 var view = (View)bindable;
744 var tmp = new Position(0, 0, 0);
745 var tmpProperty = Object.GetProperty(view.SwigCPtr, Property.POSITION);
746 tmpProperty?.Get(tmp);
748 if (view.internalPosition2D == null)
750 view.internalPosition2D = new Position2D(view.OnPosition2DChanged, (int)tmp?.X, (int)tmp?.Y);
754 if (view.internalPosition2D.SwigCPtr.Handle != IntPtr.Zero)
756 Interop.Vector2.XSet(view.internalPosition2D.SwigCPtr, (float)tmp?.X);
757 Interop.Vector2.YSet(view.internalPosition2D.SwigCPtr, (float)tmp?.Y);
761 tmpProperty?.Dispose();
764 return view.internalPosition2D;
769 /// PositionUsesPivotPointProperty
771 [EditorBrowsable(EditorBrowsableState.Never)]
772 public static readonly BindableProperty PositionUsesPivotPointProperty = BindableProperty.Create(nameof(PositionUsesPivotPoint), typeof(bool), typeof(View), true, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
774 var view = (View)bindable;
775 if (newValue != null)
777 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.PositionUsesAnchorPoint, new Tizen.NUI.PropertyValue((bool)newValue));
780 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
782 var view = (View)bindable;
784 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.PositionUsesAnchorPoint).Get(out temp);
789 /// SiblingOrderProperty
791 [EditorBrowsable(EditorBrowsableState.Never)]
792 public static readonly BindableProperty SiblingOrderProperty = BindableProperty.Create(nameof(SiblingOrder), typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
794 var view = (View)bindable;
796 if (newValue != null)
798 value = (int)newValue;
801 NUILog.Error("SiblingOrder should be bigger than 0 or equal to 0.");
804 var siblings = view.GetParent()?.Children;
805 if (siblings != null)
807 int currentOrder = siblings.IndexOf(view);
808 if (value != currentOrder)
810 if (value == 0) { view.LowerToBottom(); }
811 else if (value < siblings.Count - 1)
813 if (value > currentOrder) { view.RaiseAbove(siblings[value]); }
814 else { view.LowerBelow(siblings[value]); }
816 else { view.RaiseToTop(); }
821 defaultValueCreator: (bindable) =>
823 var view = (View)bindable;
824 var parentChildren = view.GetParent()?.Children;
825 int currentOrder = 0;
826 if (parentChildren != null)
828 currentOrder = parentChildren.IndexOf(view);
830 if (currentOrder < 0) { return 0; }
831 else if (currentOrder < parentChildren.Count) { return currentOrder; }
838 /// ParentOriginProperty
840 [EditorBrowsable(EditorBrowsableState.Never)]
841 public static readonly BindableProperty ParentOriginProperty = BindableProperty.Create(nameof(ParentOrigin), typeof(Position), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
843 var view = (View)bindable;
844 if (newValue != null)
846 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ParentOrigin, new Tizen.NUI.PropertyValue((Position)newValue));
849 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
851 var view = (View)bindable;
852 Position temp = new Position(0.0f, 0.0f, 0.0f);
853 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ParentOrigin).Get(temp);
859 /// PivotPointProperty
861 [EditorBrowsable(EditorBrowsableState.Never)]
862 public static readonly BindableProperty PivotPointProperty = BindableProperty.Create(nameof(PivotPoint), typeof(Position), typeof(View), null,
863 propertyChanged: (bindable, oldValue, newValue) =>
865 var view = (View)bindable;
866 if (newValue != null)
868 view.SetAnchorPoint((Position)newValue);
871 defaultValueCreator: (bindable) =>
873 var view = (View)bindable;
874 if (view.internalPivotPoint == null)
876 view.internalPivotPoint = new Position(view.OnPivotPointChanged, 0, 0, 0);
878 var tmp = Object.GetProperty(view.SwigCPtr, Property.AnchorPoint);
879 tmp?.Get(view.internalPivotPoint);
882 return view.internalPivotPoint;
887 /// SizeWidthProperty
889 [EditorBrowsable(EditorBrowsableState.Never)]
890 public static readonly BindableProperty SizeWidthProperty = BindableProperty.Create(nameof(SizeWidth), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
892 var view = (View)bindable;
893 if (newValue != null)
895 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeWidth, new Tizen.NUI.PropertyValue((float)newValue));
896 view.WidthSpecification = (int)System.Math.Ceiling((float)newValue);
899 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
901 var view = (View)bindable;
903 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeWidth).Get(out temp);
908 /// SizeHeightProperty
910 [EditorBrowsable(EditorBrowsableState.Never)]
911 public static readonly BindableProperty SizeHeightProperty = BindableProperty.Create(nameof(SizeHeight), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
913 var view = (View)bindable;
914 if (newValue != null)
916 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeHeight, new Tizen.NUI.PropertyValue((float)newValue));
917 view.HeightSpecification = (int)System.Math.Ceiling((float)newValue);
920 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
922 var view = (View)bindable;
924 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeHeight).Get(out temp);
931 [EditorBrowsable(EditorBrowsableState.Never)]
932 public static readonly BindableProperty PositionProperty = BindableProperty.Create(nameof(Position), typeof(Position), typeof(View), null,
933 propertyChanged: (bindable, oldValue, newValue) =>
935 var view = (View)bindable;
936 if (newValue != null)
938 view.SetPosition(((Position)newValue).X, ((Position)newValue).Y, ((Position)newValue).Z);
941 defaultValueCreator: (bindable) =>
943 var view = (View)bindable;
944 var tmpProperty = Object.GetProperty(view.SwigCPtr, Property.POSITION);
946 if (view.internalPosition == null)
948 view.internalPosition = new Position(view.OnPositionChanged, 0, 0, 0);
950 tmpProperty?.Get(view.internalPosition);
951 tmpProperty?.Dispose();
953 return view.internalPosition;
958 /// PositionXProperty
960 [EditorBrowsable(EditorBrowsableState.Never)]
961 public static readonly BindableProperty PositionXProperty = BindableProperty.Create(nameof(PositionX), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
963 var view = (View)bindable;
964 if (newValue != null)
966 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.PositionX, new Tizen.NUI.PropertyValue((float)newValue));
969 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
971 var view = (View)bindable;
973 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.PositionX).Get(out temp);
978 /// PositionYProperty
980 [EditorBrowsable(EditorBrowsableState.Never)]
981 public static readonly BindableProperty PositionYProperty = BindableProperty.Create(nameof(PositionY), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
983 var view = (View)bindable;
984 if (newValue != null)
986 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.PositionY, new Tizen.NUI.PropertyValue((float)newValue));
989 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
991 var view = (View)bindable;
993 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.PositionY).Get(out temp);
998 /// PositionZProperty
1000 [EditorBrowsable(EditorBrowsableState.Never)]
1001 public static readonly BindableProperty PositionZProperty = BindableProperty.Create(nameof(PositionZ), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1003 var view = (View)bindable;
1004 if (newValue != null)
1006 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.PositionZ, new Tizen.NUI.PropertyValue((float)newValue));
1009 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1011 var view = (View)bindable;
1013 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.PositionZ).Get(out temp);
1018 /// OrientationProperty
1020 [EditorBrowsable(EditorBrowsableState.Never)]
1021 public static readonly BindableProperty OrientationProperty = BindableProperty.Create(nameof(Orientation), typeof(Rotation), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1023 var view = (View)bindable;
1024 if (newValue != null)
1026 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ORIENTATION, new Tizen.NUI.PropertyValue((Rotation)newValue));
1029 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1031 var view = (View)bindable;
1032 Rotation temp = new Rotation();
1033 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ORIENTATION).Get(temp);
1040 [EditorBrowsable(EditorBrowsableState.Never)]
1041 public static readonly BindableProperty ScaleProperty = BindableProperty.Create(nameof(Scale), typeof(Vector3), typeof(View), null,
1042 propertyChanged: (bindable, oldValue, newValue) =>
1044 var view = (View)bindable;
1045 if (newValue != null)
1047 view.SetScale((Vector3)newValue);
1050 defaultValueCreator: (bindable) =>
1052 var view = (View)bindable;
1053 if (view.internalScale == null)
1055 view.internalScale = new Vector3(view.OnScaleChanged, 0, 0, 0);
1058 var tmpPropery = Object.GetProperty(view.SwigCPtr, Property.SCALE);
1059 tmpPropery?.Get(view.internalScale);
1060 tmpPropery?.Dispose();
1062 return view.internalScale;
1069 [EditorBrowsable(EditorBrowsableState.Never)]
1070 public static readonly BindableProperty ScaleXProperty = BindableProperty.Create(nameof(ScaleX), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1072 var view = (View)bindable;
1073 if (newValue != null)
1075 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ScaleX, new Tizen.NUI.PropertyValue((float)newValue));
1078 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1080 var view = (View)bindable;
1082 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ScaleX).Get(out temp);
1089 [EditorBrowsable(EditorBrowsableState.Never)]
1090 public static readonly BindableProperty ScaleYProperty = BindableProperty.Create(nameof(ScaleY), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1092 var view = (View)bindable;
1093 if (newValue != null)
1095 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ScaleY, new Tizen.NUI.PropertyValue((float)newValue));
1098 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1100 var view = (View)bindable;
1102 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ScaleY).Get(out temp);
1109 [EditorBrowsable(EditorBrowsableState.Never)]
1110 public static readonly BindableProperty ScaleZProperty = BindableProperty.Create(nameof(ScaleZ), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1112 var view = (View)bindable;
1113 if (newValue != null)
1115 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ScaleZ, new Tizen.NUI.PropertyValue((float)newValue));
1118 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1120 var view = (View)bindable;
1122 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ScaleZ).Get(out temp);
1129 [EditorBrowsable(EditorBrowsableState.Never)]
1130 public static readonly BindableProperty NameProperty = BindableProperty.Create(nameof(Name), typeof(string), typeof(View), string.Empty,
1131 propertyChanged: (bindable, oldValue, newValue) =>
1133 var view = (View)bindable;
1134 if (newValue != null)
1136 view.SetName((string)newValue);
1139 defaultValueCreator: (bindable) =>
1141 var view = (View)bindable;
1143 temp = view.GetName();
1149 /// SensitiveProperty
1151 [EditorBrowsable(EditorBrowsableState.Never)]
1152 public static readonly BindableProperty SensitiveProperty = BindableProperty.Create(nameof(Sensitive), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1154 var view = (View)bindable;
1155 if (newValue != null)
1157 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SENSITIVE, new Tizen.NUI.PropertyValue((bool)newValue));
1160 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1162 var view = (View)bindable;
1164 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SENSITIVE).Get(out temp);
1169 /// IsEnabledProperty
1171 [EditorBrowsable(EditorBrowsableState.Never)]
1172 public static readonly BindableProperty IsEnabledProperty = BindableProperty.Create(nameof(Sensitive), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1174 var view = (View)bindable;
1175 if (newValue != null)
1177 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.UserInteractionEnabled, new Tizen.NUI.PropertyValue((bool)newValue));
1178 view.OnEnabled((bool)newValue);
1181 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1183 var view = (View)bindable;
1185 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.UserInteractionEnabled).Get(out temp);
1190 /// DispatchKeyEventsProperty
1192 [EditorBrowsable(EditorBrowsableState.Never)]
1193 public static readonly BindableProperty DispatchKeyEventsProperty = BindableProperty.Create(nameof(DispatchKeyEvents), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1195 var view = (View)bindable;
1196 if (newValue != null)
1198 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.DispatchKeyEvents, new Tizen.NUI.PropertyValue((bool)newValue));
1201 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1203 var view = (View)bindable;
1205 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.DispatchKeyEvents).Get(out temp);
1210 /// LeaveRequiredProperty
1212 [EditorBrowsable(EditorBrowsableState.Never)]
1213 public static readonly BindableProperty LeaveRequiredProperty = BindableProperty.Create(nameof(LeaveRequired), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1215 var view = (View)bindable;
1216 if (newValue != null)
1218 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.LeaveRequired, new Tizen.NUI.PropertyValue((bool)newValue));
1221 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1223 var view = (View)bindable;
1225 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.LeaveRequired).Get(out temp);
1230 /// InheritOrientationProperty
1232 [EditorBrowsable(EditorBrowsableState.Never)]
1233 public static readonly BindableProperty InheritOrientationProperty = BindableProperty.Create(nameof(InheritOrientation), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1235 var view = (View)bindable;
1236 if (newValue != null)
1238 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.InheritOrientation, new Tizen.NUI.PropertyValue((bool)newValue));
1241 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1243 var view = (View)bindable;
1245 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.InheritOrientation).Get(out temp);
1250 /// InheritScaleProperty
1252 [EditorBrowsable(EditorBrowsableState.Never)]
1253 public static readonly BindableProperty InheritScaleProperty = BindableProperty.Create(nameof(InheritScale), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1255 var view = (View)bindable;
1256 if (newValue != null)
1258 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.InheritScale, new Tizen.NUI.PropertyValue((bool)newValue));
1261 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1263 var view = (View)bindable;
1265 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.InheritScale).Get(out temp);
1270 /// DrawModeProperty
1272 [EditorBrowsable(EditorBrowsableState.Never)]
1273 public static readonly BindableProperty DrawModeProperty = BindableProperty.Create(nameof(DrawMode), typeof(DrawModeType), typeof(View), DrawModeType.Normal, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1275 var view = (View)bindable;
1276 if (newValue != null)
1278 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.DrawMode, new Tizen.NUI.PropertyValue((int)newValue));
1281 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1283 var view = (View)bindable;
1285 if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.DrawMode).Get(out temp) == false)
1287 NUILog.Error("DrawMode get error!");
1289 return (DrawModeType)temp;
1293 /// SizeModeFactorProperty
1295 [EditorBrowsable(EditorBrowsableState.Never)]
1296 public static readonly BindableProperty SizeModeFactorProperty = BindableProperty.Create(nameof(SizeModeFactor), typeof(Vector3), typeof(View), null,
1297 propertyChanged: (bindable, oldValue, newValue) =>
1299 var view = (View)bindable;
1300 if (newValue != null)
1302 var tmp = new PropertyValue((Vector3)newValue);
1303 Object.SetProperty(view.SwigCPtr, Property.SizeModeFactor, tmp);
1307 defaultValueCreator: (bindable) =>
1309 var view = (View)bindable;
1310 if (view.internalSizeModeFactor == null)
1312 view.internalSizeModeFactor = new Vector3(view.OnSizeModeFactorChanged, 0, 0, 0);
1314 var tmp = Object.GetProperty(view.SwigCPtr, Property.SizeModeFactor);
1315 tmp?.Get(view.internalSizeModeFactor);
1318 return view.internalSizeModeFactor;
1323 /// WidthResizePolicyProperty
1325 [EditorBrowsable(EditorBrowsableState.Never)]
1326 public static readonly BindableProperty WidthResizePolicyProperty = BindableProperty.Create(nameof(WidthResizePolicy), typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1328 var view = (View)bindable;
1329 if (newValue != null)
1331 if ((ResizePolicyType)newValue == ResizePolicyType.KeepSizeFollowingParent)
1333 if (view.widthConstraint == null)
1335 view.widthConstraint = new EqualConstraintWithParentFloat((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeWidth, View.Property.SizeWidth);
1336 view.widthConstraint.Apply();
1338 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.WidthResizePolicy, new Tizen.NUI.PropertyValue((int)ResizePolicyType.FillToParent));
1342 view.widthConstraint?.Remove();
1343 view.widthConstraint?.Dispose();
1344 view.widthConstraint = null;
1345 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.WidthResizePolicy, new Tizen.NUI.PropertyValue((int)newValue));
1347 // Match ResizePolicy to new Layouting.
1348 // Parent relative policies can not be mapped at this point as parent size unknown.
1349 switch ((ResizePolicyType)newValue)
1351 case ResizePolicyType.UseNaturalSize:
1353 view.WidthSpecification = LayoutParamPolicies.WrapContent;
1356 case ResizePolicyType.FillToParent:
1358 view.WidthSpecification = LayoutParamPolicies.MatchParent;
1361 case ResizePolicyType.FitToChildren:
1363 view.WidthSpecification = LayoutParamPolicies.WrapContent;
1371 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1373 var view = (View)bindable;
1375 if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.WidthResizePolicy).Get(out temp) == false)
1377 NUILog.Error("WidthResizePolicy get error!");
1379 return temp.GetValueByDescription<ResizePolicyType>();
1383 /// HeightResizePolicyProperty
1385 [EditorBrowsable(EditorBrowsableState.Never)]
1386 public static readonly BindableProperty HeightResizePolicyProperty = BindableProperty.Create(nameof(HeightResizePolicy), typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1388 var view = (View)bindable;
1389 if (newValue != null)
1391 if ((ResizePolicyType)newValue == ResizePolicyType.KeepSizeFollowingParent)
1393 if (view.heightConstraint == null)
1395 view.heightConstraint = new EqualConstraintWithParentFloat((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeHeight, View.Property.SizeHeight);
1396 view.heightConstraint.Apply();
1398 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.HeightResizePolicy, new Tizen.NUI.PropertyValue((int)ResizePolicyType.FillToParent));
1402 view.heightConstraint?.Remove();
1403 view.heightConstraint?.Dispose();
1404 view.heightConstraint = null;
1405 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.HeightResizePolicy, new Tizen.NUI.PropertyValue((int)newValue));
1407 // Match ResizePolicy to new Layouting.
1408 // Parent relative policies can not be mapped at this point as parent size unknown.
1409 switch ((ResizePolicyType)newValue)
1411 case ResizePolicyType.UseNaturalSize:
1413 view.HeightSpecification = LayoutParamPolicies.WrapContent;
1416 case ResizePolicyType.FillToParent:
1418 view.HeightSpecification = LayoutParamPolicies.MatchParent;
1421 case ResizePolicyType.FitToChildren:
1423 view.HeightSpecification = LayoutParamPolicies.WrapContent;
1431 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1433 var view = (View)bindable;
1435 if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.HeightResizePolicy).Get(out temp) == false)
1437 NUILog.Error("HeightResizePolicy get error!");
1439 return temp.GetValueByDescription<ResizePolicyType>();
1443 /// SizeScalePolicyProperty
1445 [EditorBrowsable(EditorBrowsableState.Never)]
1446 public static readonly BindableProperty SizeScalePolicyProperty = BindableProperty.Create(nameof(SizeScalePolicy), typeof(SizeScalePolicyType), typeof(View), SizeScalePolicyType.UseSizeSet, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1448 var view = (View)bindable;
1449 string valueToString = "";
1450 if (newValue != null)
1452 valueToString = ((SizeScalePolicyType)newValue).GetDescription();
1453 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeScalePolicy, new Tizen.NUI.PropertyValue(valueToString));
1456 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1458 var view = (View)bindable;
1460 if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeScalePolicy).Get(out temp) == false)
1462 NUILog.Error("SizeScalePolicy get error!");
1464 return (SizeScalePolicyType)temp;
1468 /// WidthForHeightProperty
1470 [EditorBrowsable(EditorBrowsableState.Never)]
1471 public static readonly BindableProperty WidthForHeightProperty = BindableProperty.Create(nameof(WidthForHeight), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1473 var view = (View)bindable;
1474 if (newValue != null)
1476 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.WidthForHeight, new Tizen.NUI.PropertyValue((bool)newValue));
1479 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1481 var view = (View)bindable;
1483 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.WidthForHeight).Get(out temp);
1488 /// HeightForWidthProperty
1490 [EditorBrowsable(EditorBrowsableState.Never)]
1491 public static readonly BindableProperty HeightForWidthProperty = BindableProperty.Create(nameof(HeightForWidth), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1493 var view = (View)bindable;
1494 if (newValue != null)
1496 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.HeightForWidth, new Tizen.NUI.PropertyValue((bool)newValue));
1499 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1501 var view = (View)bindable;
1503 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.HeightForWidth).Get(out temp);
1510 [EditorBrowsable(EditorBrowsableState.Never)]
1511 public static readonly BindableProperty PaddingProperty = BindableProperty.Create(nameof(Padding), typeof(Extents), typeof(View), null,
1512 propertyChanged: (bindable, oldValue, newValue) =>
1514 var view = (View)bindable;
1515 if (newValue != null)
1517 var tmp = new PropertyValue((Extents)newValue);
1518 Object.SetProperty(view.SwigCPtr, View.Property.PADDING, tmp);
1522 defaultValueCreator: (bindable) =>
1524 var view = (View)bindable;
1525 if (view.internalPadding == null)
1527 view.internalPadding = new Extents(view.OnPaddingChanged, 0, 0, 0, 0);
1530 var tmp = Object.GetProperty(view.SwigCPtr, Property.PADDING);
1531 tmp?.Get(view.internalPadding);
1534 return view.internalPadding;
1541 [EditorBrowsable(EditorBrowsableState.Never)]
1542 public static readonly BindableProperty SizeProperty = BindableProperty.Create(nameof(Size), typeof(Size), typeof(View), null,
1543 propertyChanged: (bindable, oldValue, newValue) =>
1545 var view = (View)bindable;
1546 if (newValue != null)
1548 // Set Specification so when layouts measure this View it matches the value set here.
1549 // All Views are currently Layouts.
1550 view.WidthSpecification = (int)System.Math.Ceiling(((Size)newValue).Width);
1551 view.HeightSpecification = (int)System.Math.Ceiling(((Size)newValue).Height);
1553 view.SetSize(((Size)newValue).Width, ((Size)newValue).Height, ((Size)newValue).Depth);
1556 defaultValueCreator: (bindable) =>
1558 var view = (View)bindable;
1560 var tmpProperty = Object.GetProperty(view.SwigCPtr, Property.SIZE);
1561 if (view.internalSize == null)
1563 view.internalSize = new Size(view.OnSizeChanged, 0, 0, 0);
1565 tmpProperty?.Get(view.internalSize);
1566 tmpProperty?.Dispose();
1568 return view.internalSize;
1573 /// MinimumSizeProperty
1575 [EditorBrowsable(EditorBrowsableState.Never)]
1576 public static readonly BindableProperty MinimumSizeProperty = BindableProperty.Create(nameof(MinimumSize), typeof(Size2D), typeof(View), null,
1577 propertyChanged: (bindable, oldValue, newValue) =>
1579 var view = (View)bindable;
1580 if (newValue != null)
1582 view.SetMinimumSize((Size2D)newValue);
1585 defaultValueCreator: (bindable) =>
1587 var view = (View)bindable;
1588 if (view.internalMinimumSize == null)
1590 view.internalMinimumSize = new Size2D(view.OnMinimumSizeChanged, 0, 0);
1592 var tmp = Object.GetProperty(view.SwigCPtr, Property.MinimumSize);
1593 tmp?.Get(view.internalMinimumSize);
1596 return view.internalMinimumSize;
1601 /// MaximumSizeProperty
1603 [EditorBrowsable(EditorBrowsableState.Never)]
1604 public static readonly BindableProperty MaximumSizeProperty = BindableProperty.Create(nameof(MaximumSize), typeof(Size2D), typeof(View), null,
1605 propertyChanged: (bindable, oldValue, newValue) =>
1607 var view = (View)bindable;
1608 if (newValue != null)
1610 view.SetMaximumSize((Size2D)newValue);
1613 defaultValueCreator: (bindable) =>
1615 var view = (View)bindable;
1616 if (view.internalMaximumSize == null)
1618 view.internalMaximumSize = new Size2D(view.OnMaximumSizeChanged, 0, 0);
1620 var tmp = Object.GetProperty(view.SwigCPtr, Property.MaximumSize);
1621 tmp?.Get(view.internalMaximumSize);
1624 return view.internalMaximumSize;
1629 /// InheritPositionProperty
1631 [EditorBrowsable(EditorBrowsableState.Never)]
1632 public static readonly BindableProperty InheritPositionProperty = BindableProperty.Create(nameof(InheritPosition), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1634 var view = (View)bindable;
1635 if (newValue != null)
1637 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.InheritPosition, new Tizen.NUI.PropertyValue((bool)newValue));
1640 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1642 var view = (View)bindable;
1644 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.InheritPosition).Get(out temp);
1649 /// ClippingModeProperty
1651 [EditorBrowsable(EditorBrowsableState.Never)]
1652 public static readonly BindableProperty ClippingModeProperty = BindableProperty.Create(nameof(ClippingMode), typeof(ClippingModeType), typeof(View), ClippingModeType.Disabled, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1654 var view = (View)bindable;
1655 if (newValue != null)
1657 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ClippingMode, new Tizen.NUI.PropertyValue((int)newValue));
1660 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1662 var view = (View)bindable;
1664 if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ClippingMode).Get(out temp) == false)
1666 NUILog.Error("ClippingMode get error!");
1668 return (ClippingModeType)temp;
1672 /// InheritLayoutDirectionProperty
1674 [EditorBrowsable(EditorBrowsableState.Never)]
1675 public static readonly BindableProperty InheritLayoutDirectionProperty = BindableProperty.Create(nameof(InheritLayoutDirection), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1677 var view = (View)bindable;
1678 if (newValue != null)
1680 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.InheritLayoutDirection, new Tizen.NUI.PropertyValue((bool)newValue));
1683 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1685 var view = (View)bindable;
1687 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.InheritLayoutDirection).Get(out temp);
1692 /// LayoutDirectionProperty
1694 [EditorBrowsable(EditorBrowsableState.Never)]
1695 public static readonly BindableProperty LayoutDirectionProperty = BindableProperty.Create(nameof(LayoutDirection), typeof(ViewLayoutDirectionType), typeof(View), ViewLayoutDirectionType.LTR, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1697 var view = (View)bindable;
1698 if (newValue != null)
1700 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.LayoutDirection, new Tizen.NUI.PropertyValue((int)newValue));
1703 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1705 var view = (View)bindable;
1707 if (false == Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.LayoutDirection).Get(out temp))
1709 NUILog.Error("LAYOUT_DIRECTION get error!");
1711 return (ViewLayoutDirectionType)temp;
1717 [EditorBrowsable(EditorBrowsableState.Never)]
1718 public static readonly BindableProperty MarginProperty = BindableProperty.Create(nameof(Margin), typeof(Extents), typeof(View), null,
1719 propertyChanged: (bindable, oldValue, newValue) =>
1721 var view = (View)bindable;
1722 if (newValue != null)
1724 var tmp = new PropertyValue((Extents)newValue);
1725 Object.SetProperty(view.SwigCPtr, Property.MARGIN, tmp);
1729 defaultValueCreator: (bindable) =>
1731 var view = (View)bindable;
1732 if (view.internalMargin == null)
1734 view.internalMargin = new Extents(view.OnMarginChanged, 0, 0, 0, 0);
1736 var tmp = Object.GetProperty(view.SwigCPtr, Property.MARGIN);
1737 tmp?.Get(view.internalMargin);
1740 return view.internalMargin;
1745 /// UpdateSizeHintProperty
1747 [EditorBrowsable(EditorBrowsableState.Never)]
1748 public static readonly BindableProperty UpdateSizeHintProperty = BindableProperty.Create(nameof(UpdateSizeHint), typeof(Vector2), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1750 var view = (View)bindable;
1751 if (newValue != null)
1753 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, Interop.ViewProperty.UpdateSizeHintGet(), new Tizen.NUI.PropertyValue((Vector2)newValue));
1756 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1758 var view = (View)bindable;
1760 Vector2 temp = new Vector2(0.0f, 0.0f);
1761 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, Interop.ViewProperty.UpdateSizeHintGet()).Get(temp);
1766 /// ImageShadow Property
1768 [EditorBrowsable(EditorBrowsableState.Never)]
1769 public static readonly BindableProperty ImageShadowProperty = BindableProperty.Create(nameof(ImageShadow), typeof(ImageShadow), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1771 var view = (View)bindable;
1773 view.themeData?.selectorData?.ClearShadow(view);
1775 if (newValue is Selector<ImageShadow> selector)
1777 if (selector.HasAll()) view.SetShadow(selector.All);
1778 else view.EnsureSelectorData().ImageShadow = new TriggerableSelector<ImageShadow>(view, selector, view.SetShadow, true);
1782 view.SetShadow((ImageShadow)newValue);
1785 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1787 var view = (View)bindable;
1789 PropertyMap map = new PropertyMap();
1790 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SHADOW).Get(map);
1792 var shadow = new ImageShadow(map);
1793 return shadow.IsEmpty() ? null : shadow;
1799 [EditorBrowsable(EditorBrowsableState.Never)]
1800 public static readonly BindableProperty BoxShadowProperty = BindableProperty.Create(nameof(BoxShadow), typeof(Shadow), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1802 var view = (View)bindable;
1804 view.themeData?.selectorData?.ClearShadow(view);
1806 if (newValue is Selector<Shadow> selector)
1808 if (selector.HasAll()) view.SetShadow(selector.All);
1809 else view.EnsureSelectorData().BoxShadow = new TriggerableSelector<Shadow>(view, selector, view.SetShadow, true);
1813 view.SetShadow((Shadow)newValue);
1816 defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1818 var view = (View)bindable;
1820 PropertyMap map = new PropertyMap();
1821 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SHADOW).Get(map);
1823 var shadow = new Shadow(map);
1824 return shadow.IsEmpty() ? null : shadow;
1828 /// CornerRadius Property
1830 [EditorBrowsable(EditorBrowsableState.Never)]
1831 public static readonly BindableProperty CornerRadiusProperty = BindableProperty.Create(nameof(CornerRadius), typeof(Vector4), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1833 var view = (View)bindable;
1834 (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).CornerRadius = (Vector4)newValue;
1835 view.ApplyCornerRadius();
1837 defaultValueCreator: (bindable) =>
1839 var view = (View)bindable;
1840 return view.backgroundExtraData == null ? 0.0f : view.backgroundExtraData.CornerRadius;
1844 /// CornerRadiusPolicy Property
1846 [EditorBrowsable(EditorBrowsableState.Never)]
1847 public static readonly BindableProperty CornerRadiusPolicyProperty = BindableProperty.Create(nameof(CornerRadiusPolicy), typeof(VisualTransformPolicyType), typeof(View), VisualTransformPolicyType.Absolute, propertyChanged: (bindable, oldValue, newValue) =>
1849 var view = (View)bindable;
1850 (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).CornerRadiusPolicy = (VisualTransformPolicyType)newValue;
1852 if (view.backgroundExtraData.CornerRadius != null)
1854 view.ApplyCornerRadius();
1857 defaultValueCreator: (bindable) =>
1859 var view = (View)bindable;
1860 return view.backgroundExtraData == null ? VisualTransformPolicyType.Absolute : view.backgroundExtraData.CornerRadiusPolicy;
1864 /// BorderlineWidth Property
1866 [EditorBrowsable(EditorBrowsableState.Never)]
1867 public static readonly BindableProperty BorderlineWidthProperty = BindableProperty.Create(nameof(BorderlineWidth), typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
1869 var view = (View)bindable;
1870 (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).BorderlineWidth = (float)newValue;
1871 view.ApplyBorderline();
1873 defaultValueCreator: (bindable) =>
1875 var view = (View)bindable;
1876 return view.backgroundExtraData == null ? 0.0f : view.backgroundExtraData.BorderlineWidth;
1880 /// BorderlineColor Property
1882 [EditorBrowsable(EditorBrowsableState.Never)]
1883 public static readonly BindableProperty BorderlineColorProperty = BindableProperty.Create(nameof(BorderlineColor), typeof(Color), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1885 var view = (View)bindable;
1886 (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).BorderlineColor = (Color)newValue;
1887 view.ApplyBorderline();
1889 defaultValueCreator: (bindable) =>
1891 var view = (View)bindable;
1892 return view.backgroundExtraData == null ? Color.Black : view.backgroundExtraData.BorderlineColor;
1896 /// BorderlineOffset Property
1898 [EditorBrowsable(EditorBrowsableState.Never)]
1899 public static readonly BindableProperty BorderlineOffsetProperty = BindableProperty.Create(nameof(BorderlineOffset), typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
1901 var view = (View)bindable;
1902 (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).BorderlineOffset = (float)newValue;
1903 view.ApplyBorderline();
1905 defaultValueCreator: (bindable) =>
1907 var view = (View)bindable;
1908 return view.backgroundExtraData == null ? 0.0f : view.backgroundExtraData.BorderlineOffset;
1912 /// EnableControlState property
1914 [EditorBrowsable(EditorBrowsableState.Never)]
1915 public static readonly BindableProperty EnableControlStateProperty = BindableProperty.Create(nameof(EnableControlState), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1917 var view = (View)bindable;
1918 bool prev = view.enableControlState;
1919 view.enableControlState = (bool)newValue;
1921 if (prev != view.enableControlState)
1925 view.TouchEvent -= view.EmptyOnTouch;
1929 view.TouchEvent += view.EmptyOnTouch;
1933 defaultValueCreator: (bindable) =>
1935 return ((View)bindable).enableControlState;
1939 /// ThemeChangeSensitive property
1941 [EditorBrowsable(EditorBrowsableState.Never)]
1942 public static readonly BindableProperty ThemeChangeSensitiveProperty = BindableProperty.Create(nameof(ThemeChangeSensitive), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1944 var view = (View)bindable;
1946 if (view.ThemeChangeSensitive == (bool)newValue) return;
1948 if (view.themeData == null) view.themeData = new ThemeData();
1950 view.themeData.ThemeChangeSensitive = (bool)newValue;
1952 if (!view.themeData.ThemeApplied) return;
1954 if (view.themeData.ThemeChangeSensitive && !view.themeData.ListeningThemeChangeEvent)
1956 view.themeData.ListeningThemeChangeEvent = true;
1957 ThemeManager.ThemeChangedInternal.Add(view.OnThemeChanged);
1959 else if (!view.themeData.ThemeChangeSensitive && view.themeData.ListeningThemeChangeEvent)
1961 view.themeData.ListeningThemeChangeEvent = false;
1962 ThemeManager.ThemeChangedInternal.Remove(view.OnThemeChanged);
1965 defaultValueCreator: (bindable) =>
1967 return ((View)bindable).themeData?.ThemeChangeSensitive ?? ThemeManager.ApplicationThemeChangeSensitive;
1971 /// AccessibilityNameProperty
1973 [EditorBrowsable(EditorBrowsableState.Never)]
1974 public static readonly BindableProperty AccessibilityNameProperty = BindableProperty.Create(nameof(AccessibilityName), typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
1976 var view = (View)bindable;
1977 if (newValue != null)
1979 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AccessibilityName, new Tizen.NUI.PropertyValue((string)newValue));
1982 defaultValueCreator: (bindable) =>
1984 var view = (View)bindable;
1987 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AccessibilityName).Get(out temp);
1992 /// AccessibilityDescriptionProperty
1994 [EditorBrowsable(EditorBrowsableState.Never)]
1995 public static readonly BindableProperty AccessibilityDescriptionProperty = BindableProperty.Create(nameof(AccessibilityDescription), typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
1997 var view = (View)bindable;
1998 if (newValue != null)
2000 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AccessibilityDescription, new Tizen.NUI.PropertyValue((string)newValue));
2003 defaultValueCreator: (bindable) =>
2005 var view = (View)bindable;
2008 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AccessibilityDescription).Get(out temp);
2013 /// AccessibilityTranslationDomainProperty
2015 [EditorBrowsable(EditorBrowsableState.Never)]
2016 public static readonly BindableProperty AccessibilityTranslationDomainProperty = BindableProperty.Create(nameof(AccessibilityTranslationDomain), typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
2018 var view = (View)bindable;
2019 if (newValue != null)
2021 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AccessibilityTranslationDomain, new Tizen.NUI.PropertyValue((string)newValue));
2024 defaultValueCreator: (bindable) =>
2026 var view = (View)bindable;
2029 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AccessibilityTranslationDomain).Get(out temp);
2034 /// AccessibilityRoleProperty
2036 [EditorBrowsable(EditorBrowsableState.Never)]
2037 public static readonly BindableProperty AccessibilityRoleProperty = BindableProperty.Create(nameof(AccessibilityRole), typeof(Role), typeof(View), default(Role), propertyChanged: (bindable, oldValue, newValue) =>
2039 var view = (View)bindable;
2040 if (newValue != null)
2042 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AccessibilityRole, new Tizen.NUI.PropertyValue((int)newValue));
2045 defaultValueCreator: (bindable) =>
2047 var view = (View)bindable;
2050 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AccessibilityRole).Get(out temp);
2055 /// AccessibilityHighlightableProperty
2057 [EditorBrowsable(EditorBrowsableState.Never)]
2058 public static readonly BindableProperty AccessibilityHighlightableProperty = BindableProperty.Create(nameof(AccessibilityHighlightable), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2060 var view = (View)bindable;
2061 if (newValue != null)
2063 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AccessibilityHighlightable, new Tizen.NUI.PropertyValue((bool)newValue));
2066 defaultValueCreator: (bindable) =>
2068 var view = (View)bindable;
2070 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AccessibilityHighlightable).Get(out temp);
2075 /// AccessibilityHiddenProperty
2077 [EditorBrowsable(EditorBrowsableState.Never)]
2078 public static readonly BindableProperty AccessibilityHiddenProperty = BindableProperty.Create(nameof(AccessibilityHidden), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2080 var view = (View)bindable;
2081 if (newValue != null)
2083 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AccessibilityHidden, new Tizen.NUI.PropertyValue((bool)newValue));
2086 defaultValueCreator: (bindable) =>
2088 var view = (View)bindable;
2090 Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AccessibilityHidden).Get(out temp);
2095 /// ExcludeLayoutingProperty
2097 [EditorBrowsable(EditorBrowsableState.Never)]
2098 public static readonly BindableProperty ExcludeLayoutingProperty = BindableProperty.Create(nameof(ExcludeLayouting), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2100 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2101 if (newValue != null)
2103 instance.InternalExcludeLayouting = (bool)newValue;
2106 defaultValueCreator: (bindable) =>
2108 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2109 return instance.InternalExcludeLayouting;
2113 /// TooltipTextProperty
2115 [EditorBrowsable(EditorBrowsableState.Never)]
2116 public static readonly BindableProperty TooltipTextProperty = BindableProperty.Create(nameof(TooltipText), typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
2118 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2119 if (newValue != null)
2121 instance.InternalTooltipText = (string)newValue;
2124 defaultValueCreator: (bindable) =>
2126 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2127 return instance.InternalTooltipText;
2131 /// PositionUsesAnchorPointProperty
2133 [EditorBrowsable(EditorBrowsableState.Never)]
2134 public static readonly BindableProperty PositionUsesAnchorPointProperty = BindableProperty.Create(nameof(PositionUsesAnchorPoint), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2136 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2137 if (newValue != null)
2139 instance.InternalPositionUsesAnchorPoint = (bool)newValue;
2142 defaultValueCreator: (bindable) =>
2144 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2145 return instance.InternalPositionUsesAnchorPoint;
2149 /// AnchorPointProperty
2151 [EditorBrowsable(EditorBrowsableState.Never)]
2152 public static readonly BindableProperty AnchorPointProperty = BindableProperty.Create(nameof(AnchorPoint), typeof(Tizen.NUI.Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
2154 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2155 if (newValue != null)
2157 instance.InternalAnchorPoint = (Tizen.NUI.Position)newValue;
2160 defaultValueCreator: (bindable) =>
2162 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2163 return instance.InternalAnchorPoint;
2167 /// WidthSpecificationProperty
2169 [EditorBrowsable(EditorBrowsableState.Never)]
2170 public static readonly BindableProperty WidthSpecificationProperty = BindableProperty.Create(nameof(WidthSpecification), typeof(int), typeof(View), 0, propertyChanged: (bindable, oldValue, newValue) =>
2172 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2173 if (newValue != null)
2175 instance.InternalWidthSpecification = (int)newValue;
2178 defaultValueCreator: (bindable) =>
2180 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2181 return instance.InternalWidthSpecification;
2185 /// HeightSpecificationProperty
2187 [EditorBrowsable(EditorBrowsableState.Never)]
2188 public static readonly BindableProperty HeightSpecificationProperty = BindableProperty.Create(nameof(HeightSpecification), typeof(int), typeof(View), 0, propertyChanged: (bindable, oldValue, newValue) =>
2190 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2191 if (newValue != null)
2193 instance.InternalHeightSpecification = (int)newValue;
2196 defaultValueCreator: (bindable) =>
2198 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2199 return instance.InternalHeightSpecification;
2203 /// LayoutTransitionProperty
2205 [EditorBrowsable(EditorBrowsableState.Never)]
2206 public static readonly BindableProperty LayoutTransitionProperty = BindableProperty.Create(nameof(LayoutTransition), typeof(Tizen.NUI.LayoutTransition), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
2208 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2209 if (newValue != null)
2211 instance.InternalLayoutTransition = (Tizen.NUI.LayoutTransition)newValue;
2214 defaultValueCreator: (bindable) =>
2216 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2217 return instance.InternalLayoutTransition;
2221 /// PaddingEXProperty
2223 [EditorBrowsable(EditorBrowsableState.Never)]
2224 public static readonly BindableProperty PaddingEXProperty = BindableProperty.Create(nameof(PaddingEX), typeof(Tizen.NUI.Extents), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
2226 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2227 if (newValue != null)
2229 instance.InternalPaddingEX = (Tizen.NUI.Extents)newValue;
2232 defaultValueCreator: (bindable) =>
2234 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2235 return instance.InternalPaddingEX;
2241 [EditorBrowsable(EditorBrowsableState.Never)]
2242 public static readonly BindableProperty LayoutProperty = BindableProperty.Create(nameof(Layout), typeof(Tizen.NUI.LayoutItem), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
2244 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2245 if (newValue != null)
2247 instance.InternalLayout = (Tizen.NUI.LayoutItem)newValue;
2250 defaultValueCreator: (bindable) =>
2252 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2253 return instance.InternalLayout;
2257 /// BackgroundImageSynchronosLoadingProperty
2259 [EditorBrowsable(EditorBrowsableState.Never)]
2260 public static readonly BindableProperty BackgroundImageSynchronosLoadingProperty = BindableProperty.Create(nameof(BackgroundImageSynchronosLoading), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2262 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2263 if (newValue != null)
2265 instance.InternalBackgroundImageSynchronosLoading = (bool)newValue;
2268 defaultValueCreator: (bindable) =>
2270 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2271 return instance.InternalBackgroundImageSynchronosLoading;
2275 /// BackgroundImageSynchronousLoadingProperty
2277 [EditorBrowsable(EditorBrowsableState.Never)]
2278 public static readonly BindableProperty BackgroundImageSynchronousLoadingProperty = BindableProperty.Create(nameof(BackgroundImageSynchronousLoading), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2280 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2281 if (newValue != null)
2283 instance.InternalBackgroundImageSynchronousLoading = (bool)newValue;
2286 defaultValueCreator: (bindable) =>
2288 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2289 return instance.InternalBackgroundImageSynchronousLoading;
2293 /// EnableControlStatePropagationProperty
2295 [EditorBrowsable(EditorBrowsableState.Never)]
2296 public static readonly BindableProperty EnableControlStatePropagationProperty = BindableProperty.Create(nameof(EnableControlStatePropagation), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2298 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2299 if (newValue != null)
2301 instance.InternalEnableControlStatePropagation = (bool)newValue;
2304 defaultValueCreator: (bindable) =>
2306 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2307 return instance.InternalEnableControlStatePropagation;
2311 /// GrabTouchAfterLeaveProperty
2313 [EditorBrowsable(EditorBrowsableState.Never)]
2314 public static readonly BindableProperty GrabTouchAfterLeaveProperty = BindableProperty.Create(nameof(GrabTouchAfterLeave), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2316 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2317 if (newValue != null)
2319 instance.InternalGrabTouchAfterLeave = (bool)newValue;
2322 defaultValueCreator: (bindable) =>
2324 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2325 return instance.InternalGrabTouchAfterLeave;
2329 /// BlendEquationProperty
2331 [EditorBrowsable(EditorBrowsableState.Never)]
2332 public static readonly BindableProperty BlendEquationProperty = BindableProperty.Create(nameof(BlendEquation), typeof(BlendEquationType), typeof(View), default(BlendEquationType), propertyChanged: (bindable, oldValue, newValue) =>
2334 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2335 if (newValue != null)
2337 instance.InternalBlendEquation = (Tizen.NUI.BlendEquationType)newValue;
2340 defaultValueCreator: (bindable) =>
2342 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2343 return instance.InternalBlendEquation;
2347 /// TransitionOptionsProperty
2349 [EditorBrowsable(EditorBrowsableState.Never)]
2350 public static readonly BindableProperty TransitionOptionsProperty = BindableProperty.Create(nameof(TransitionOptions), typeof(TransitionOptions), typeof(View), default(TransitionOptions), propertyChanged: (bindable, oldValue, newValue) =>
2352 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2353 if (newValue != null)
2355 instance.InternalTransitionOptions = (Tizen.NUI.TransitionOptions)newValue;
2358 defaultValueCreator: (bindable) =>
2360 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2361 return instance.InternalTransitionOptions;
2365 /// AutomationIdProperty
2367 [EditorBrowsable(EditorBrowsableState.Never)]
2368 public static readonly BindableProperty AutomationIdProperty = BindableProperty.Create(nameof(AutomationId), typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
2370 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2371 if (newValue != null)
2373 instance.InternalAutomationId = (string)newValue;
2376 defaultValueCreator: (bindable) =>
2378 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2379 return instance.InternalAutomationId;
2383 /// TouchAreaOffsetProperty
2385 [EditorBrowsable(EditorBrowsableState.Never)]
2386 public static readonly BindableProperty TouchAreaOffsetProperty = BindableProperty.Create(nameof(TouchAreaOffset), typeof(Offset), typeof(View), default(Offset), propertyChanged: (bindable, oldValue, newValue) =>
2388 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2389 if (newValue != null)
2391 instance.InternalTouchAreaOffset = (Tizen.NUI.Offset)newValue;
2394 defaultValueCreator: (bindable) =>
2396 var instance = (Tizen.NUI.BaseComponents.View)bindable;
2397 return instance.InternalTouchAreaOffset;
2400 private void SetBackgroundImage(string value)
2402 if (string.IsNullOrEmpty(value))
2404 var empty = new PropertyValue();
2406 Object.SetProperty(SwigCPtr, Property.BACKGROUND, empty);
2411 if (value.StartsWith("*Resource*"))
2413 string resource = Tizen.Applications.Application.Current.DirectoryInfo.Resource;
2414 value = value.Replace("*Resource*", resource);
2417 if (backgroundExtraData == null)
2419 var propertyValue = new PropertyValue(value);
2420 Object.SetProperty(SwigCPtr, Property.BACKGROUND, propertyValue);
2421 BackgroundImageSynchronousLoading = backgroundImageSynchronousLoading;
2422 propertyValue?.Dispose();
2426 var map = new PropertyMap();
2427 var url = new PropertyValue(value);
2428 var cornerRadiusValue = backgroundExtraData.CornerRadius == null ? new PropertyValue() : new PropertyValue(backgroundExtraData.CornerRadius);
2429 var cornerRadius = new PropertyValue(cornerRadiusValue);
2430 var cornerRadiusPolicy = new PropertyValue((int)(backgroundExtraData.CornerRadiusPolicy));
2431 var borderlineWidth = new PropertyValue(backgroundExtraData.BorderlineWidth);
2432 var borderlineColorValue = backgroundExtraData.BorderlineColor == null ? new PropertyValue(Color.Black) : new PropertyValue(backgroundExtraData.BorderlineColor);
2433 var borderlineColor = new PropertyValue(borderlineColorValue);
2434 var borderlineOffset = new PropertyValue(backgroundExtraData.BorderlineOffset);
2435 var synchronousLoading = new PropertyValue(backgroundImageSynchronousLoading);
2436 var npatchType = new PropertyValue((int)Visual.Type.NPatch);
2437 var border = (backgroundExtraData.BackgroundImageBorder != null) ? new PropertyValue(backgroundExtraData.BackgroundImageBorder) : null;
2438 var imageType = new PropertyValue((int)Visual.Type.Image);
2440 map.Add(ImageVisualProperty.URL, url)
2441 .Add(Visual.Property.CornerRadius, cornerRadius)
2442 .Add(Visual.Property.CornerRadiusPolicy, cornerRadiusPolicy)
2443 .Add(Visual.Property.BorderlineWidth, borderlineWidth)
2444 .Add(Visual.Property.BorderlineColor, borderlineColor)
2445 .Add(Visual.Property.BorderlineOffset, borderlineOffset)
2446 .Add(ImageVisualProperty.SynchronousLoading, synchronousLoading);
2448 if (backgroundExtraData.BackgroundImageBorder != null)
2450 map.Add(Visual.Property.Type, npatchType)
2451 .Add(NpatchImageVisualProperty.Border, border);
2455 map.Add(Visual.Property.Type, imageType);
2458 var mapValue = new PropertyValue(map);
2459 Object.SetProperty(SwigCPtr, Property.BACKGROUND, mapValue);
2461 imageType?.Dispose();
2463 npatchType?.Dispose();
2464 synchronousLoading?.Dispose();
2465 borderlineOffset?.Dispose();
2466 borderlineColor?.Dispose();
2467 borderlineColorValue?.Dispose();
2468 borderlineWidth?.Dispose();
2469 cornerRadiusPolicy?.Dispose();
2470 cornerRadius?.Dispose();
2471 cornerRadiusValue?.Dispose();
2474 mapValue?.Dispose();
2477 private void SetBackgroundImageBorder(Rectangle value)
2479 bool isEmptyValue = Rectangle.IsNullOrZero(value);
2481 var backgroundImageBorder = isEmptyValue ? null : value;
2483 (backgroundExtraData ?? (backgroundExtraData = new BackgroundExtraData())).BackgroundImageBorder = backgroundImageBorder;
2490 PropertyMap map = Background;
2497 map[NpatchImageVisualProperty.Border] = new PropertyValue(backgroundImageBorder);
2501 map.Find(Visual.Property.Type)?.Get(out visualType);
2503 if (visualType == (int)Visual.Type.Image)
2505 map[Visual.Property.Type] = new PropertyValue((int)Visual.Type.NPatch);
2508 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, View.Property.BACKGROUND, new PropertyValue(map));
2511 private void SetBackgroundColor(Color value)
2518 if (backgroundExtraData == null)
2520 var background = new PropertyValue(value);
2521 Object.SetProperty(SwigCPtr, Property.BACKGROUND, background);
2522 background?.Dispose();
2526 var map = new PropertyMap();
2527 var colorType = new PropertyValue((int)Visual.Type.Color);
2528 var mixColor = new PropertyValue(value);
2529 var cornerRadiusValue = backgroundExtraData.CornerRadius == null ? new PropertyValue() : new PropertyValue(backgroundExtraData.CornerRadius);
2530 var cornerRadius = new PropertyValue(cornerRadiusValue);
2531 var cornerRadiusPolicy = new PropertyValue((int)(backgroundExtraData.CornerRadiusPolicy));
2532 var borderlineWidth = new PropertyValue(backgroundExtraData.BorderlineWidth);
2533 var borderlineColorValue = backgroundExtraData.BorderlineColor == null ? new PropertyValue(Color.Black) : new PropertyValue(backgroundExtraData.BorderlineColor);
2534 var borderlineColor = new PropertyValue(borderlineColorValue);
2535 var borderlineOffset = new PropertyValue(backgroundExtraData.BorderlineOffset);
2537 map.Add(Visual.Property.Type, colorType)
2538 .Add(ColorVisualProperty.MixColor, mixColor)
2539 .Add(Visual.Property.CornerRadius, cornerRadius)
2540 .Add(Visual.Property.CornerRadiusPolicy, cornerRadiusPolicy)
2541 .Add(Visual.Property.BorderlineWidth, borderlineWidth)
2542 .Add(Visual.Property.BorderlineColor, borderlineColor)
2543 .Add(Visual.Property.BorderlineOffset, borderlineOffset);
2545 var mapValue = new PropertyValue(map);
2546 Object.SetProperty(SwigCPtr, Property.BACKGROUND, mapValue);
2548 borderlineOffset?.Dispose();
2549 borderlineColor?.Dispose();
2550 borderlineColorValue?.Dispose();
2551 borderlineWidth?.Dispose();
2552 cornerRadiusPolicy?.Dispose();
2553 cornerRadius?.Dispose();
2554 cornerRadiusValue?.Dispose();
2555 mixColor?.Dispose();
2556 colorType?.Dispose();
2558 mapValue?.Dispose();
2561 private void SetColor(Color value)
2568 Interop.ActorInternal.SetColor(SwigCPtr, value.SwigCPtr);
2569 if (NDalicPINVOKE.SWIGPendingException.Pending)
2570 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2573 private void SetOpacity(float? value)
2580 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, View.Property.OPACITY, new Tizen.NUI.PropertyValue((float)value));
2583 private void SetShadow(ShadowBase value)
2585 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, View.Property.SHADOW, value == null ? new PropertyValue() : value.ToPropertyValue(this));