2 * Copyright(c) 2018 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.
18 using System.ComponentModel;
19 using System.Runtime.InteropServices;
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 class View : Container, IResourcesProvider
30 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
31 [EditorBrowsable(EditorBrowsableState.Never)]
32 public bool IsResourcesCreated
36 return Application.Current.IsResourcesCreated;
40 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
41 [EditorBrowsable(EditorBrowsableState.Never)]
42 public ResourceDictionary XamlResources
46 return Application.Current.XamlResources;
50 Application.Current.XamlResources = value;
54 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
55 [EditorBrowsable(EditorBrowsableState.Never)]
56 public static readonly BindableProperty StyleNameProperty = BindableProperty.Create("StyleName", typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
58 var view = (View)bindable;
61 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue((string)newValue));
64 defaultValueCreator:(bindable) =>
66 var view = (View)bindable;
68 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.STYLE_NAME).Get(out temp);
71 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
72 [EditorBrowsable(EditorBrowsableState.Never)]
73 public static readonly BindableProperty BackgroundColorProperty = BindableProperty.Create("BackgroundColor", typeof(Color), typeof(View), Color.Transparent, propertyChanged: (bindable, oldValue, newValue) =>
75 var view = (View)bindable;
78 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((Color)newValue));
81 defaultValueCreator:(bindable) =>
83 var view = (View)bindable;
84 Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
86 Tizen.NUI.PropertyMap background = view.Background;
88 background.Find(Visual.Property.Type)?.Get(out visualType);
89 if (visualType == (int)Visual.Type.Color)
91 background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
94 return backgroundColor;
96 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
97 [EditorBrowsable(EditorBrowsableState.Never)]
98 public static readonly BindableProperty BackgroundImageProperty = BindableProperty.Create("BackgroundImage", typeof(string), typeof(View), default(string), propertyChanged: (bindable, oldValue, newValue) =>
100 var view = (View)bindable;
101 if (newValue != null)
103 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((string)newValue));
106 defaultValueCreator:(bindable) =>
108 var view = (View)bindable;
109 string backgroundImage = "";
111 Tizen.NUI.PropertyMap background = view.Background;
113 background.Find(Visual.Property.Type)?.Get(out visualType);
114 if (visualType == (int)Visual.Type.Image)
116 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
119 return backgroundImage;
121 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
122 [EditorBrowsable(EditorBrowsableState.Never)]
123 public static readonly BindableProperty BackgroundProperty = BindableProperty.Create("Background", typeof(PropertyMap), typeof(View), new PropertyMap(), propertyChanged: (bindable, oldValue, newValue) =>
125 var view = (View)bindable;
126 if (newValue != null)
128 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
131 defaultValueCreator:(bindable) =>
133 var view = (View)bindable;
134 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
135 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.BACKGROUND).Get(temp);
138 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
139 [EditorBrowsable(EditorBrowsableState.Never)]
140 public static readonly BindableProperty StateProperty = BindableProperty.Create("State", typeof(States), typeof(View), States.Normal, propertyChanged: (bindable, oldValue, newValue) =>
142 var view = (View)bindable;
143 if (newValue != null)
145 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.STATE, new Tizen.NUI.PropertyValue((int)newValue));
148 defaultValueCreator:(bindable) =>
150 var view = (View)bindable;
152 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.STATE).Get(out temp) == false)
154 NUILog.Error("State get error!");
158 case 0: return States.Normal;
159 case 1: return States.Focused;
160 case 2: return States.Disabled;
161 default: return States.Normal;
164 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
165 [EditorBrowsable(EditorBrowsableState.Never)]
166 public static readonly BindableProperty SubStateProperty = BindableProperty.Create("SubState", typeof(States), typeof(View), States.Normal, propertyChanged: (bindable, oldValue, newValue) =>
168 var view = (View)bindable;
169 string valueToString = "";
170 if (newValue != null)
172 switch ((States)newValue)
174 case States.Normal: { valueToString = "NORMAL"; break; }
175 case States.Focused: { valueToString = "FOCUSED"; break; }
176 case States.Disabled: { valueToString = "DISABLED"; break; }
177 default: { valueToString = "NORMAL"; break; }
179 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
182 defaultValueCreator:(bindable) =>
184 var view = (View)bindable;
186 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SUB_STATE).Get(out temp) == false)
188 NUILog.Error("subState get error!");
192 case "NORMAL": return States.Normal;
193 case "FOCUSED": return States.Focused;
194 case "DISABLED": return States.Disabled;
195 default: return States.Normal;
198 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
199 [EditorBrowsable(EditorBrowsableState.Never)]
200 public static readonly BindableProperty TooltipProperty = BindableProperty.Create("Tooltip", typeof(PropertyMap), typeof(View), new PropertyMap(), propertyChanged: (bindable, oldValue, newValue) =>
202 var view = (View)bindable;
203 if (newValue != null)
205 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.TOOLTIP, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
208 defaultValueCreator:(bindable) =>
210 var view = (View)bindable;
211 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
212 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.TOOLTIP).Get(temp);
215 // public static readonly BindableProperty TooltipTextProperty = BindableProperty.Create("TooltipText", typeof(string), typeof(View), default(string), propertyChanged: (bindable, oldValue, newValue) =>
217 // var view = (View)bindable;
218 // if (newValue != null)
220 // Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.TOOLTIP, new Tizen.NUI.PropertyValue((string)newValue));
223 public static readonly BindableProperty FlexProperty = BindableProperty.Create("Flex", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
225 var view = (View)bindable;
226 if (newValue != null)
228 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue((float)newValue));
231 defaultValueCreator:(bindable) =>
233 var view = (View)bindable;
235 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX).Get(out temp);
238 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
239 [EditorBrowsable(EditorBrowsableState.Never)]
240 public static readonly BindableProperty AlignSelfProperty = BindableProperty.Create("AlignSelf", typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
242 var view = (View)bindable;
243 if (newValue != null)
245 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue((int)newValue));
248 defaultValueCreator:(bindable) =>
250 var view = (View)bindable;
252 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
255 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
256 [EditorBrowsable(EditorBrowsableState.Never)]
257 public static readonly BindableProperty FlexMarginProperty = BindableProperty.Create("FlexMargin", typeof(Vector4), typeof(View), Vector4.Zero, propertyChanged: (bindable, oldValue, newValue) =>
259 var view = (View)bindable;
260 if (newValue != null)
262 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue((Vector4)newValue));
265 defaultValueCreator:(bindable) =>
267 var view = (View)bindable;
268 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
269 Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
272 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
273 [EditorBrowsable(EditorBrowsableState.Never)]
274 public static readonly BindableProperty CellIndexProperty = BindableProperty.Create("CellIndex", typeof(Vector2), typeof(View), Vector2.Zero, propertyChanged: (bindable, oldValue, newValue) =>
276 var view = (View)bindable;
277 if (newValue != null)
279 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue((Vector2)newValue));
282 defaultValueCreator:(bindable) =>
284 var view = (View)bindable;
285 Vector2 temp = new Vector2(0.0f, 0.0f);
286 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_INDEX).Get(temp);
289 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
290 [EditorBrowsable(EditorBrowsableState.Never)]
291 public static readonly BindableProperty RowSpanProperty = BindableProperty.Create("RowSpan", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
293 var view = (View)bindable;
294 if (newValue != null)
296 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue((float)newValue));
299 defaultValueCreator:(bindable) =>
301 var view = (View)bindable;
303 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.ROW_SPAN).Get(out temp);
306 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
307 [EditorBrowsable(EditorBrowsableState.Never)]
308 public static readonly BindableProperty ColumnSpanProperty = BindableProperty.Create("ColumnSpan", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
310 var view = (View)bindable;
311 if (newValue != null)
313 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue((float)newValue));
316 defaultValueCreator:(bindable) =>
318 var view = (View)bindable;
320 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
323 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
324 [EditorBrowsable(EditorBrowsableState.Never)]
325 public static readonly BindableProperty CellHorizontalAlignmentProperty = BindableProperty.Create("CellHorizontalAlignment", typeof(HorizontalAlignmentType), typeof(View), HorizontalAlignmentType.Left, propertyChanged: (bindable, oldValue, newValue) =>
327 var view = (View)bindable;
328 string valueToString = "";
330 if (newValue != null)
332 switch ((HorizontalAlignmentType)newValue)
334 case Tizen.NUI.HorizontalAlignmentType.Left: { valueToString = "left"; break; }
335 case Tizen.NUI.HorizontalAlignmentType.Center: { valueToString = "center"; break; }
336 case Tizen.NUI.HorizontalAlignmentType.Right: { valueToString = "right"; break; }
337 default: { valueToString = "left"; break; }
339 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
342 defaultValueCreator:(bindable) =>
344 var view = (View)bindable;
346 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
348 NUILog.Error("CellHorizontalAlignment get error!");
353 case "left": return Tizen.NUI.HorizontalAlignmentType.Left;
354 case "center": return Tizen.NUI.HorizontalAlignmentType.Center;
355 case "right": return Tizen.NUI.HorizontalAlignmentType.Right;
356 default: return Tizen.NUI.HorizontalAlignmentType.Left;
359 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
360 [EditorBrowsable(EditorBrowsableState.Never)]
361 public static readonly BindableProperty CellVerticalAlignmentProperty = BindableProperty.Create("CellVerticalAlignment", typeof(VerticalAlignmentType), typeof(View), VerticalAlignmentType.Top, propertyChanged: (bindable, oldValue, newValue) =>
363 var view = (View)bindable;
364 string valueToString = "";
366 if (newValue != null)
368 switch ((VerticalAlignmentType)newValue)
370 case Tizen.NUI.VerticalAlignmentType.Top: { valueToString = "top"; break; }
371 case Tizen.NUI.VerticalAlignmentType.Center: { valueToString = "center"; break; }
372 case Tizen.NUI.VerticalAlignmentType.Bottom: { valueToString = "bottom"; break; }
373 default: { valueToString = "top"; break; }
375 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
378 defaultValueCreator:(bindable) =>
380 var view = (View)bindable;
382 Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
384 NUILog.Error("CellVerticalAlignment get error!");
389 case "top": return Tizen.NUI.VerticalAlignmentType.Top;
390 case "center": return Tizen.NUI.VerticalAlignmentType.Center;
391 case "bottom": return Tizen.NUI.VerticalAlignmentType.Bottom;
392 default: return Tizen.NUI.VerticalAlignmentType.Top;
395 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
396 [EditorBrowsable(EditorBrowsableState.Never)]
397 public static readonly BindableProperty LeftFocusableViewProperty = BindableProperty.Create("LeftFocusableView", typeof(View), typeof(View), default(View), propertyChanged: (bindable, oldValue, newValue) =>
399 var view = (View)bindable;
400 if (newValue != null) { view.LeftFocusableViewId = (int)(newValue as View).GetId(); }
401 else { view.LeftFocusableViewId = -1; }
403 defaultValueCreator:(bindable) =>
405 var view = (View)bindable;
406 if (view.LeftFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.LeftFocusableViewId); }
409 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
410 [EditorBrowsable(EditorBrowsableState.Never)]
411 public static readonly BindableProperty RightFocusableViewProperty = BindableProperty.Create("RightFocusableView", typeof(View), typeof(View), default(View), propertyChanged: (bindable, oldValue, newValue) =>
413 var view = (View)bindable;
414 if (newValue != null) { view.RightFocusableViewId = (int)(newValue as View).GetId(); }
415 else { view.RightFocusableViewId = -1; }
417 defaultValueCreator:(bindable) =>
419 var view = (View)bindable;
420 if (view.RightFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.RightFocusableViewId); }
423 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
424 [EditorBrowsable(EditorBrowsableState.Never)]
425 public static readonly BindableProperty UpFocusableViewProperty = BindableProperty.Create("UpFocusableView", typeof(View), typeof(View), default(View), propertyChanged: (bindable, oldValue, newValue) =>
427 var view = (View)bindable;
428 if (newValue != null) { view.UpFocusableViewId = (int)(newValue as View).GetId(); }
429 else { view.UpFocusableViewId = -1; }
431 defaultValueCreator:(bindable) =>
433 var view = (View)bindable;
434 if (view.UpFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.UpFocusableViewId); }
437 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
438 [EditorBrowsable(EditorBrowsableState.Never)]
439 public static readonly BindableProperty DownFocusableViewProperty = BindableProperty.Create("DownFocusableView", typeof(View), typeof(View), default(View), propertyChanged: (bindable, oldValue, newValue) =>
441 var view = (View)bindable;
442 if (newValue != null) { view.DownFocusableViewId = (int)(newValue as View).GetId(); }
443 else { view.DownFocusableViewId = -1; }
445 defaultValueCreator:(bindable) =>
447 var view = (View)bindable;
448 if (view.DownFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.DownFocusableViewId); }
451 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
452 [EditorBrowsable(EditorBrowsableState.Never)]
453 public static readonly BindableProperty FocusableProperty = BindableProperty.Create("Focusable", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
455 var view = (View)bindable;
456 if (newValue != null) { view.SetKeyboardFocusable((bool)newValue); }
458 defaultValueCreator:(bindable) =>
460 var view = (View)bindable;
461 return view.IsKeyboardFocusable();
463 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
464 [EditorBrowsable(EditorBrowsableState.Never)]
465 public static readonly BindableProperty Size2DProperty = BindableProperty.Create("Size2D", typeof(Size2D), typeof(View), new Size2D(0,0), propertyChanged: (bindable, oldValue, newValue) =>
467 var view = (View)bindable;
468 if (newValue != null)
470 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue( new Size((Size2D)newValue)));
473 defaultValueCreator:(bindable) =>
475 var view = (View)bindable;
476 Size temp = new Size(0.0f, 0.0f, 0.0f);
477 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
478 Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
479 Console.WriteLine($"View Size2DProperty get width: {size.Width} height: {size.Height}");
482 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
483 [EditorBrowsable(EditorBrowsableState.Never)]
484 public static readonly BindableProperty OpacityProperty = BindableProperty.Create("Opacity", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
486 var view = (View)bindable;
487 if (newValue != null)
489 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.OPACITY, new Tizen.NUI.PropertyValue((float)newValue));
492 defaultValueCreator:(bindable) =>
494 var view = (View)bindable;
496 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.OPACITY).Get(out temp);
499 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
500 [EditorBrowsable(EditorBrowsableState.Never)]
501 public static readonly BindableProperty Position2DProperty = BindableProperty.Create("Position2D", typeof(Position2D), typeof(View), new Position2D(0,0), propertyChanged: (bindable, oldValue, newValue) =>
503 var view = (View)bindable;
504 if (newValue != null)
506 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue( new Position((Position2D)newValue) ));
509 defaultValueCreator:(bindable) =>
511 var view = (View)bindable;
512 Position temp = new Position(0.0f, 0.0f, 0.0f);
513 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
514 return new Position2D(temp);
516 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
517 [EditorBrowsable(EditorBrowsableState.Never)]
518 public static readonly BindableProperty PositionUsesPivotPointProperty = BindableProperty.Create("PositionUsesPivotPoint", typeof(bool), typeof(View), true, propertyChanged: (bindable, oldValue, newValue) =>
520 var view = (View)bindable;
521 if (newValue != null)
523 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue((bool)newValue));
525 Console.WriteLine("View PositionUsesPivotPointProperty changed: oldValue: " + oldValue + ", newValue: " + newValue);
527 defaultValueCreator:(bindable) =>
529 var view = (View)bindable;
531 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
534 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
535 [EditorBrowsable(EditorBrowsableState.Never)]
536 public static readonly BindableProperty SiblingOrderProperty = BindableProperty.Create("SiblingOrder", typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
538 var view = (View)bindable;
540 if (newValue != null)
542 value = (int)newValue;
545 NUILog.Error("SiblingOrder should be bigger than 0 or equal to 0.");
548 var siblings = view.GetParent()?.Children;
549 if (siblings != null)
551 int currentOrder = siblings.IndexOf(view);
552 if (value != currentOrder)
554 if (value == 0) { view.LowerToBottom(); }
555 else if (value < siblings.Count - 1)
557 if (value > currentOrder) { view.RaiseAbove(siblings[value]); }
558 else { view.LowerBelow(siblings[value]); }
560 else { view.RaiseToTop(); }
565 defaultValueCreator:(bindable) =>
567 var view = (View)bindable;
568 var parentChildren = view.GetParent()?.Children;
569 int currentOrder = 0;
570 if (parentChildren != null)
572 currentOrder = parentChildren.IndexOf(view);
574 if (currentOrder < 0) { return 0; }
575 else if (currentOrder < parentChildren.Count) { return currentOrder; }
580 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
581 [EditorBrowsable(EditorBrowsableState.Never)]
582 public static readonly BindableProperty ParentOriginProperty = BindableProperty.Create("ParentOrigin", typeof(Position), typeof(View), Position.ParentOriginTopLeft, propertyChanged: (bindable, oldValue, newValue) =>
584 var view = (View)bindable;
585 if (newValue != null)
587 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue((Position)newValue));
589 Console.WriteLine("View ParentOriginProperty changed: oldValue: " + oldValue + ", newValue: " + newValue);
591 defaultValueCreator:(bindable) =>
593 var view = (View)bindable;
594 Position temp = new Position(0.0f, 0.0f, 0.0f);
595 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN).Get(temp);
599 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
600 [EditorBrowsable(EditorBrowsableState.Never)]
601 public static readonly BindableProperty PivotPointProperty = BindableProperty.Create("PivotPoint", typeof(Position), typeof(View), Position.PivotPointTopLeft, propertyChanged: (bindable, oldValue, newValue) =>
603 var view = (View)bindable;
604 if (newValue != null)
606 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue((Position)newValue));
608 Console.WriteLine("View PivotPointProperty changed: oldValue: " + oldValue + ", newValue: " + newValue);
610 defaultValueCreator:(bindable) =>
612 var view = (View)bindable;
613 Position temp = new Position(0.0f, 0.0f, 0.0f);
614 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ANCHOR_POINT).Get(temp);
617 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
618 [EditorBrowsable(EditorBrowsableState.Never)]
619 public static readonly BindableProperty SizeWidthProperty = BindableProperty.Create("SizeWidth", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
621 var view = (View)bindable;
622 if (newValue != null)
624 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue((float)newValue));
626 Console.WriteLine("View SizeWidthProperty changed: oldValue: " + oldValue + ", newValue: " + newValue);
628 defaultValueCreator:(bindable) =>
630 var view = (View)bindable;
632 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_WIDTH).Get(out temp);
633 Console.WriteLine($"View SizeWidthProperty get Value: {temp}");
636 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
637 [EditorBrowsable(EditorBrowsableState.Never)]
638 public static readonly BindableProperty SizeHeightProperty = BindableProperty.Create("SizeHeight", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
640 var view = (View)bindable;
641 if (newValue != null)
643 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue((float)newValue));
645 Console.WriteLine("View SizeHeightProperty changed: oldValue: " + oldValue + ", newValue: " + newValue);
647 defaultValueCreator:(bindable) =>
649 var view = (View)bindable;
651 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT).Get(out temp);
652 Console.WriteLine($"View SizeHeightProperty get Value: {temp}");
655 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
656 [EditorBrowsable(EditorBrowsableState.Never)]
657 public static readonly BindableProperty PositionProperty = BindableProperty.Create("Position", typeof(Position), typeof(View), Position.Zero, propertyChanged: (bindable, oldValue, newValue) =>
659 var view = (View)bindable;
660 if (newValue != null)
662 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue((Position)newValue));
665 defaultValueCreator:(bindable) =>
667 var view = (View)bindable;
668 Position temp = new Position(0.0f, 0.0f, 0.0f);
669 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
672 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
673 [EditorBrowsable(EditorBrowsableState.Never)]
674 public static readonly BindableProperty PositionXProperty = BindableProperty.Create("PositionX", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
676 var view = (View)bindable;
677 if (newValue != null)
679 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_X, new Tizen.NUI.PropertyValue((float)newValue));
682 defaultValueCreator:(bindable) =>
684 var view = (View)bindable;
686 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_X).Get(out temp);
689 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
690 [EditorBrowsable(EditorBrowsableState.Never)]
691 public static readonly BindableProperty PositionYProperty = BindableProperty.Create("PositionY", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
693 var view = (View)bindable;
694 if (newValue != null)
696 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_Y, new Tizen.NUI.PropertyValue((float)newValue));
699 defaultValueCreator:(bindable) =>
701 var view = (View)bindable;
703 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Y).Get(out temp);
706 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
707 [EditorBrowsable(EditorBrowsableState.Never)]
708 public static readonly BindableProperty PositionZProperty = BindableProperty.Create("PositionZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
710 var view = (View)bindable;
711 if (newValue != null)
713 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_Z, new Tizen.NUI.PropertyValue((float)newValue));
716 defaultValueCreator:(bindable) =>
718 var view = (View)bindable;
720 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Z).Get(out temp);
723 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
724 [EditorBrowsable(EditorBrowsableState.Never)]
725 public static readonly BindableProperty OrientationProperty = BindableProperty.Create("Orientation", typeof(Rotation), typeof(View), new Rotation(new Radian(0), Vector3.ZAxis), propertyChanged: (bindable, oldValue, newValue) =>
727 var view = (View)bindable;
728 if (newValue != null)
730 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ORIENTATION, new Tizen.NUI.PropertyValue((Rotation)newValue));
733 defaultValueCreator:(bindable) =>
735 var view = (View)bindable;
736 Rotation temp = new Rotation();
737 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ORIENTATION).Get(temp);
740 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
741 [EditorBrowsable(EditorBrowsableState.Never)]
742 public static readonly BindableProperty ScaleProperty = BindableProperty.Create("Scale", typeof(Vector3), typeof(View), Vector3.Zero, propertyChanged: (bindable, oldValue, newValue) =>
744 var view = (View)bindable;
745 if (newValue != null)
747 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE, new Tizen.NUI.PropertyValue((Vector3)newValue));
750 defaultValueCreator:(bindable) =>
752 var view = (View)bindable;
753 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
754 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE).Get(temp);
757 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
758 [EditorBrowsable(EditorBrowsableState.Never)]
759 public static readonly BindableProperty ScaleXProperty = BindableProperty.Create("ScaleX", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
761 var view = (View)bindable;
762 if (newValue != null)
764 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_X, new Tizen.NUI.PropertyValue((float)newValue));
767 defaultValueCreator:(bindable) =>
769 var view = (View)bindable;
771 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_X).Get(out temp);
774 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
775 [EditorBrowsable(EditorBrowsableState.Never)]
776 public static readonly BindableProperty ScaleYProperty = BindableProperty.Create("ScaleY", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
778 var view = (View)bindable;
779 if (newValue != null)
781 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_Y, new Tizen.NUI.PropertyValue((float)newValue));
784 defaultValueCreator:(bindable) =>
786 var view = (View)bindable;
788 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Y).Get(out temp);
791 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
792 [EditorBrowsable(EditorBrowsableState.Never)]
793 public static readonly BindableProperty ScaleZProperty = BindableProperty.Create("ScaleZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
795 var view = (View)bindable;
796 if (newValue != null)
798 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_Z, new Tizen.NUI.PropertyValue((float)newValue));
801 defaultValueCreator:(bindable) =>
803 var view = (View)bindable;
805 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Z).Get(out temp);
808 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
809 [EditorBrowsable(EditorBrowsableState.Never)]
810 public static readonly BindableProperty NameProperty = BindableProperty.Create("Name", typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
812 var view = (View)bindable;
813 if (newValue != null)
815 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.NAME, new Tizen.NUI.PropertyValue((string)newValue));
818 defaultValueCreator:(bindable) =>
820 var view = (View)bindable;
822 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.NAME).Get(out temp);
825 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
826 [EditorBrowsable(EditorBrowsableState.Never)]
827 public static readonly BindableProperty SensitiveProperty = BindableProperty.Create("Sensitive", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
829 var view = (View)bindable;
830 if (newValue != null)
832 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SENSITIVE, new Tizen.NUI.PropertyValue((bool)newValue));
835 defaultValueCreator:(bindable) =>
837 var view = (View)bindable;
839 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SENSITIVE).Get(out temp);
842 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
843 [EditorBrowsable(EditorBrowsableState.Never)]
844 public static readonly BindableProperty LeaveRequiredProperty = BindableProperty.Create("LeaveRequired", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
846 var view = (View)bindable;
847 if (newValue != null)
849 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue((bool)newValue));
852 defaultValueCreator:(bindable) =>
854 var view = (View)bindable;
856 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LEAVE_REQUIRED).Get(out temp);
859 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
860 [EditorBrowsable(EditorBrowsableState.Never)]
861 public static readonly BindableProperty InheritOrientationProperty = BindableProperty.Create("InheritOrientation", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
863 var view = (View)bindable;
864 if (newValue != null)
866 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue((bool)newValue));
869 defaultValueCreator:(bindable) =>
871 var view = (View)bindable;
873 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_ORIENTATION).Get(out temp);
876 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
877 [EditorBrowsable(EditorBrowsableState.Never)]
878 public static readonly BindableProperty InheritScaleProperty = BindableProperty.Create("InheritScale", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
880 var view = (View)bindable;
881 if (newValue != null)
883 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue((bool)newValue));
886 defaultValueCreator:(bindable) =>
888 var view = (View)bindable;
890 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_SCALE).Get(out temp);
893 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
894 [EditorBrowsable(EditorBrowsableState.Never)]
895 public static readonly BindableProperty DrawModeProperty = BindableProperty.Create("DrawMode", typeof(DrawModeType), typeof(View), DrawModeType.Normal, propertyChanged: (bindable, oldValue, newValue) =>
897 var view = (View)bindable;
898 if (newValue != null)
900 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)newValue));
903 defaultValueCreator:(bindable) =>
905 var view = (View)bindable;
907 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.DRAW_MODE).Get(out temp) == false)
909 NUILog.Error("DrawMode get error!");
913 case "NORMAL": return DrawModeType.Normal;
914 case "OVERLAY_2D": return DrawModeType.Overlay2D;
915 case "STENCIL": return DrawModeType.Stencil;
916 default: return DrawModeType.Normal;
919 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
920 [EditorBrowsable(EditorBrowsableState.Never)]
921 public static readonly BindableProperty SizeModeFactorProperty = BindableProperty.Create("SizeModeFactor", typeof(Vector3), typeof(View), Vector3.Zero, propertyChanged: (bindable, oldValue, newValue) =>
923 var view = (View)bindable;
924 if (newValue != null)
926 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue((Vector3)newValue));
929 defaultValueCreator:(bindable) =>
931 var view = (View)bindable;
932 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
933 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR).Get(temp);
936 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
937 [EditorBrowsable(EditorBrowsableState.Never)]
938 public static readonly BindableProperty WidthResizePolicyProperty = BindableProperty.Create("WidthResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
940 var view = (View)bindable;
941 if (newValue != null)
943 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
946 defaultValueCreator:(bindable) =>
948 var view = (View)bindable;
950 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
952 NUILog.Error("WidthResizePolicy get error!");
956 case "FIXED": return ResizePolicyType.Fixed;
957 case "USE_NATURAL_SIZE": return ResizePolicyType.UseNaturalSize;
958 case "FILL_TO_PARENT": return ResizePolicyType.FillToParent;
959 case "SIZE_RELATIVE_TO_PARENT": return ResizePolicyType.SizeRelativeToParent;
960 case "SIZE_FIXED_OFFSET_FROM_PARENT": return ResizePolicyType.SizeFixedOffsetFromParent;
961 case "FIT_TO_CHILDREN": return ResizePolicyType.FitToChildren;
962 case "DIMENSION_DEPENDENCY": return ResizePolicyType.DimensionDependency;
963 case "USE_ASSIGNED_SIZE": return ResizePolicyType.UseAssignedSize;
964 default: return ResizePolicyType.Fixed;
967 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
968 [EditorBrowsable(EditorBrowsableState.Never)]
969 public static readonly BindableProperty HeightResizePolicyProperty = BindableProperty.Create("HeightResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
971 var view = (View)bindable;
972 if (newValue != null)
974 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
977 defaultValueCreator:(bindable) =>
979 var view = (View)bindable;
981 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
983 NUILog.Error("HeightResizePolicy get error!");
987 case "FIXED": return ResizePolicyType.Fixed;
988 case "USE_NATURAL_SIZE": return ResizePolicyType.UseNaturalSize;
989 case "FILL_TO_PARENT": return ResizePolicyType.FillToParent;
990 case "SIZE_RELATIVE_TO_PARENT": return ResizePolicyType.SizeRelativeToParent;
991 case "SIZE_FIXED_OFFSET_FROM_PARENT": return ResizePolicyType.SizeFixedOffsetFromParent;
992 case "FIT_TO_CHILDREN": return ResizePolicyType.FitToChildren;
993 case "DIMENSION_DEPENDENCY": return ResizePolicyType.DimensionDependency;
994 case "USE_ASSIGNED_SIZE": return ResizePolicyType.UseAssignedSize;
995 default: return ResizePolicyType.Fixed;
998 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
999 [EditorBrowsable(EditorBrowsableState.Never)]
1000 public static readonly BindableProperty SizeScalePolicyProperty = BindableProperty.Create("SizeScalePolicy", typeof(SizeScalePolicyType), typeof(View), SizeScalePolicyType.UseSizeSet, propertyChanged: (bindable, oldValue, newValue) =>
1002 var view = (View)bindable;
1003 string valueToString = "";
1004 if (newValue != null)
1006 switch ((SizeScalePolicyType)newValue)
1008 case SizeScalePolicyType.UseSizeSet: { valueToString = "USE_SIZE_SET"; break; }
1009 case SizeScalePolicyType.FitWithAspectRatio: { valueToString = "FIT_WITH_ASPECT_RATIO"; break; }
1010 case SizeScalePolicyType.FillWithAspectRatio: { valueToString = "FILL_WITH_ASPECT_RATIO"; break; }
1011 default: { valueToString = "USE_SIZE_SET"; break; }
1013 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
1016 defaultValueCreator:(bindable) =>
1018 var view = (View)bindable;
1020 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
1022 NUILog.Error("SizeScalePolicy get error!");
1026 case "USE_SIZE_SET": return SizeScalePolicyType.UseSizeSet;
1027 case "FIT_WITH_ASPECT_RATIO": return SizeScalePolicyType.FitWithAspectRatio;
1028 case "FILL_WITH_ASPECT_RATIO": return SizeScalePolicyType.FillWithAspectRatio;
1029 default: return SizeScalePolicyType.UseSizeSet;
1032 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1033 [EditorBrowsable(EditorBrowsableState.Never)]
1034 public static readonly BindableProperty WidthForHeightProperty = BindableProperty.Create("WidthForHeight", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1036 var view = (View)bindable;
1037 if (newValue != null)
1039 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue((bool)newValue));
1042 defaultValueCreator:(bindable) =>
1044 var view = (View)bindable;
1046 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
1049 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1050 [EditorBrowsable(EditorBrowsableState.Never)]
1051 public static readonly BindableProperty HeightForWidthProperty = BindableProperty.Create("HeightForWidth", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1053 var view = (View)bindable;
1054 if (newValue != null)
1056 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue((bool)newValue));
1059 defaultValueCreator:(bindable) =>
1061 var view = (View)bindable;
1063 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
1066 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1067 [EditorBrowsable(EditorBrowsableState.Never)]
1068 public static readonly BindableProperty PaddingProperty = BindableProperty.Create("Padding", typeof(Extents), typeof(View), new Extents(0,0,0,0), propertyChanged: (bindable, oldValue, newValue) =>
1070 var view = (View)bindable;
1071 if (newValue != null)
1073 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PADDING, new Tizen.NUI.PropertyValue((Extents)newValue));
1076 defaultValueCreator:(bindable) =>
1078 var view = (View)bindable;
1079 Extents temp = new Extents(0, 0, 0, 0);
1080 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PADDING).Get(temp);
1083 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1084 [EditorBrowsable(EditorBrowsableState.Never)]
1085 public static readonly BindableProperty SizeProperty = BindableProperty.Create("Size", typeof(Size), typeof(View), new Size(0,0,0), propertyChanged: (bindable, oldValue, newValue) =>
1087 var view = (View)bindable;
1088 if (newValue != null)
1090 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue((Size)newValue));
1093 defaultValueCreator: (bindable) => {
1094 var view = (View)bindable;
1095 Size temp = new Size(0, 0, 0);
1096 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
1099 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1100 [EditorBrowsable(EditorBrowsableState.Never)]
1101 public static readonly BindableProperty MinimumSizeProperty = BindableProperty.Create("MinimumSize", typeof(Size2D), typeof(View), new Size2D(0,0), propertyChanged: (bindable, oldValue, newValue) =>
1103 var view = (View)bindable;
1104 if (newValue != null)
1106 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue((Size2D)newValue));
1109 defaultValueCreator:(bindable) =>
1111 var view = (View)bindable;
1112 Size2D temp = new Size2D(0, 0);
1113 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE).Get(temp);
1116 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1117 [EditorBrowsable(EditorBrowsableState.Never)]
1118 public static readonly BindableProperty MaximumSizeProperty = BindableProperty.Create("MaximumSize", typeof(Size2D), typeof(View), new Size2D(0,0), propertyChanged: (bindable, oldValue, newValue) =>
1120 var view = (View)bindable;
1121 if (newValue != null)
1123 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue((Size2D)newValue));
1126 defaultValueCreator:(bindable) =>
1128 var view = (View)bindable;
1129 Size2D temp = new Size2D(0, 0);
1130 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE).Get(temp);
1133 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1134 [EditorBrowsable(EditorBrowsableState.Never)]
1135 public static readonly BindableProperty InheritPositionProperty = BindableProperty.Create("InheritPosition", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1137 var view = (View)bindable;
1138 if (newValue != null)
1140 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue((bool)newValue));
1143 defaultValueCreator:(bindable) =>
1145 var view = (View)bindable;
1147 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_POSITION).Get(out temp);
1150 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1151 [EditorBrowsable(EditorBrowsableState.Never)]
1152 public static readonly BindableProperty ClippingModeProperty = BindableProperty.Create("ClippingMode", typeof(ClippingModeType), typeof(View), ClippingModeType.Disabled, propertyChanged: (bindable, oldValue, newValue) =>
1154 var view = (View)bindable;
1155 if (newValue != null)
1157 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)newValue));
1160 defaultValueCreator:(bindable) =>
1162 var view = (View)bindable;
1164 if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.CLIPPING_MODE).Get(out temp) == false)
1166 NUILog.Error("ClippingMode get error!");
1170 case "DISABLED": return ClippingModeType.Disabled;
1171 case "CLIP_CHILDREN": return ClippingModeType.ClipChildren;
1172 case "CLIP_TO_BOUNDING_BOX": return ClippingModeType.ClipToBoundingBox;
1173 default: return ClippingModeType.Disabled;
1176 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1177 [EditorBrowsable(EditorBrowsableState.Never)]
1178 public static readonly BindableProperty InheritLayoutDirectionProperty = BindableProperty.Create("InheritLayoutDirection", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1180 var view = (View)bindable;
1181 if (newValue != null)
1183 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((bool)newValue));
1186 defaultValueCreator:(bindable) =>
1188 var view = (View)bindable;
1190 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION).Get(out temp);
1193 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1194 [EditorBrowsable(EditorBrowsableState.Never)]
1195 public static readonly BindableProperty LayoutDirectionProperty = BindableProperty.Create("LayoutDirection", typeof(ViewLayoutDirectionType), typeof(View), ViewLayoutDirectionType.LTR, propertyChanged: (bindable, oldValue, newValue) =>
1197 var view = (View)bindable;
1198 if (newValue != null)
1200 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((int)newValue));
1203 defaultValueCreator:(bindable) =>
1205 var view = (View)bindable;
1207 if (false == Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION).Get(out temp))
1209 NUILog.Error("LAYOUT_DIRECTION get error!");
1211 return (ViewLayoutDirectionType)temp;
1213 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1214 [EditorBrowsable(EditorBrowsableState.Never)]
1215 public static readonly BindableProperty MarginProperty = BindableProperty.Create("Margin", typeof(Extents), typeof(View), new Extents(0,0,0,0), propertyChanged: (bindable, oldValue, newValue) =>
1217 var view = (View)bindable;
1218 if (newValue != null)
1220 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MARGIN, new Tizen.NUI.PropertyValue((Extents)newValue));
1223 defaultValueCreator:(bindable) =>
1225 var view = (View)bindable;
1226 Extents temp = new Extents(0, 0, 0, 0);
1227 Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MARGIN).Get(temp);
1230 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1231 [EditorBrowsable(EditorBrowsableState.Never)]
1232 public static readonly BindableProperty StyleProperty = BindableProperty.Create("Style", typeof(Style), typeof(View), default(Style),
1233 propertyChanged: (bindable, oldvalue, newvalue) => ((View)bindable)._mergedStyle.Style = (Style)newvalue);
1236 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
1238 internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.View_SWIGUpcast(cPtr), cMemoryOwn)
1240 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
1243 PositionUsesPivotPoint = false;
1245 _mergedStyle = new MergedStyle(GetType(), this);
1248 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
1250 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
1254 /// Event argument passed through ChildAdded event
1256 /// <since_tizen> 5 </since_tizen>
1257 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1258 [EditorBrowsable(EditorBrowsableState.Never)]
1259 public class ChildAddedEventArgs : EventArgs
1262 /// Added child View at moment
1264 /// <since_tizen> 5 </since_tizen>
1265 public View Added { get; set; }
1269 /// Event when a child is added
1271 /// <since_tizen> 5 </since_tizen>
1272 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1273 [EditorBrowsable(EditorBrowsableState.Never)]
1274 public new event EventHandler<ChildAddedEventArgs> ChildAdded;
1276 // From Container Base class
1278 /// Adds a child view to this view.
1280 /// <seealso cref="Container.Add" />
1281 /// <since_tizen> 4 </since_tizen>
1282 public override void Add(View child)
1284 Container oldParent = child.Parent;
1285 if (oldParent != this)
1287 if (oldParent != null)
1289 oldParent.Remove(child);
1292 if (child.Layout == null)
1294 LayoutItem layoutItem = new LayoutItem();
1295 child.Layout = layoutItem;
1298 NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
1299 if (NDalicPINVOKE.SWIGPendingException.Pending)
1300 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1301 Children.Add(child);
1303 if (ChildAdded != null)
1305 ChildAddedEventArgs e = new ChildAddedEventArgs
1309 ChildAdded(this, e);
1315 /// Event argument passed through ChildRemoved event
1317 /// <since_tizen> 5 </since_tizen>
1318 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1319 [EditorBrowsable(EditorBrowsableState.Never)]
1320 public class ChildRemovedEventArgs : EventArgs
1323 /// Removed child View at moment
1325 /// <since_tizen> 5 </since_tizen>
1326 public View Removed { get; set; }
1330 /// Event when a child is removed
1332 /// <since_tizen> 5 </since_tizen>
1333 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1334 [EditorBrowsable(EditorBrowsableState.Never)]
1335 public new event EventHandler<ChildRemovedEventArgs> ChildRemoved;
1339 /// Removes a child view from this View. If the view was not a child of this view, this is a no-op.
1341 /// <seealso cref="Container.Remove" />
1342 /// <since_tizen> 4 </since_tizen>
1343 public override void Remove(View child)
1345 NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child));
1346 if (NDalicPINVOKE.SWIGPendingException.Pending)
1347 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1349 Children.Remove(child);
1351 if (ChildRemoved != null)
1353 ChildRemovedEventArgs e = new ChildRemovedEventArgs
1357 ChildRemoved(this, e);
1362 /// Retrieves a child view by index.
1364 /// <seealso cref="Container.GetChildAt" />
1365 /// <since_tizen> 4 </since_tizen>
1366 public override View GetChildAt(uint index)
1368 if (index < Children.Count)
1370 return Children[Convert.ToInt32(index)];
1379 /// Retrieves the number of children held by the view.
1381 /// <seealso cref="Container.GetChildCount" />
1382 /// <since_tizen> 4 </since_tizen>
1383 public override uint GetChildCount()
1385 return Convert.ToUInt32(Children.Count);
1389 /// Gets the views parent.
1391 /// <seealso cref="Container.GetParent()" />
1392 /// <since_tizen> 4 </since_tizen>
1393 public override Container GetParent()
1395 //to fix memory leak issue, match the handle count with native side.
1396 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
1397 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
1398 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
1399 NDalicPINVOKE.delete_BaseHandle(CPtr);
1400 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
1402 if (NDalicPINVOKE.SWIGPendingException.Pending)
1403 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1405 return basehandle as Container;
1408 internal bool IsTopLevelView()
1410 if (GetParent() is Layer)
1418 /// you can override it to clean-up your own resources.
1420 /// <param name="type">DisposeTypes</param>
1421 /// <since_tizen> 3 </since_tizen>
1422 protected override void Dispose(DisposeTypes type)
1429 if (type == DisposeTypes.Explicit)
1432 //Release your own managed resources here.
1433 //You should release all of your own disposable objects here.
1436 //Release your own unmanaged resources here.
1437 //You should not access any managed member here except static instance.
1438 //because the execution order of Finalizes is non-deterministic.
1441 DisConnectFromSignals();
1444 if (swigCPtr.Handle != global::System.IntPtr.Zero)
1448 swigCMemOwn = false;
1449 NDalicPINVOKE.delete_View(swigCPtr);
1451 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
1458 private void DisConnectFromSignals()
1460 // Save current CPtr.
1461 global::System.Runtime.InteropServices.HandleRef currentCPtr = swigCPtr;
1463 // Use BaseHandle CPtr as current might have been deleted already in derived classes.
1464 swigCPtr = GetBaseHandleCPtrHandleRef;
1466 if (_onRelayoutEventCallback != null)
1468 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
1471 if (_offWindowEventCallback != null)
1473 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
1476 if (_onWindowEventCallback != null)
1478 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
1481 if (_wheelEventCallback != null)
1483 this.WheelEventSignal().Disconnect(_wheelEventCallback);
1486 if (_hoverEventCallback != null)
1488 this.HoveredSignal().Disconnect(_hoverEventCallback);
1491 if (_touchDataCallback != null)
1493 this.TouchSignal().Disconnect(_touchDataCallback);
1496 if (_ResourcesLoadedCallback != null)
1498 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
1501 if (_offWindowEventCallback != null)
1503 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
1506 if (_onWindowEventCallback != null)
1508 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
1511 if (_wheelEventCallback != null)
1513 this.WheelEventSignal().Disconnect(_wheelEventCallback);
1516 if (_hoverEventCallback != null)
1518 this.HoveredSignal().Disconnect(_hoverEventCallback);
1521 if (_touchDataCallback != null)
1523 this.TouchSignal().Disconnect(_touchDataCallback);
1526 if (_onRelayoutEventCallback != null)
1528 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
1531 if (_keyCallback != null)
1533 this.KeyEventSignal().Disconnect(_keyCallback);
1536 if (_keyInputFocusLostCallback != null)
1538 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
1541 if (_keyInputFocusGainedCallback != null)
1543 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
1546 // BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here.
1547 // Restore current CPtr.
1548 swigCPtr = currentCPtr;
1551 private EventHandler _keyInputFocusGainedEventHandler;
1552 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1553 private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
1554 private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
1557 /// An event for the KeyInputFocusGained signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1558 /// The KeyInputFocusGained signal is emitted when the control gets the key input focus.<br />
1560 /// <since_tizen> 3 </since_tizen>
1561 public event EventHandler FocusGained
1565 if (_keyInputFocusGainedEventHandler == null)
1567 _keyInputFocusGainedCallback = OnKeyInputFocusGained;
1568 this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
1571 _keyInputFocusGainedEventHandler += value;
1576 _keyInputFocusGainedEventHandler -= value;
1578 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
1580 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
1585 private void OnKeyInputFocusGained(IntPtr view)
1587 if (_keyInputFocusGainedEventHandler != null)
1589 _keyInputFocusGainedEventHandler(this, null);
1594 private EventHandler _keyInputFocusLostEventHandler;
1595 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1596 private delegate void KeyInputFocusLostCallbackType(IntPtr control);
1597 private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
1600 /// An event for the KeyInputFocusLost signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1601 /// The KeyInputFocusLost signal is emitted when the control loses the key input focus.<br />
1603 /// <since_tizen> 3 </since_tizen>
1604 public event EventHandler FocusLost
1608 if (_keyInputFocusLostEventHandler == null)
1610 _keyInputFocusLostCallback = OnKeyInputFocusLost;
1611 this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
1614 _keyInputFocusLostEventHandler += value;
1619 _keyInputFocusLostEventHandler -= value;
1621 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
1623 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
1628 private void OnKeyInputFocusLost(IntPtr view)
1630 if (_keyInputFocusLostEventHandler != null)
1632 _keyInputFocusLostEventHandler(this, null);
1637 /// Event arguments that passed via the KeyEvent signal.
1639 /// <since_tizen> 3 </since_tizen>
1640 public class KeyEventArgs : EventArgs
1645 /// Key - is the key sent to the view.
1647 /// <since_tizen> 3 </since_tizen>
1661 private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
1662 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1663 private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
1664 private KeyCallbackType _keyCallback;
1667 /// An event for the KeyPressed signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1668 /// The KeyPressed signal is emitted when the key event is received.<br />
1670 /// <since_tizen> 3 </since_tizen>
1671 public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
1675 if (_keyEventHandler == null)
1677 _keyCallback = OnKeyEvent;
1678 this.KeyEventSignal().Connect(_keyCallback);
1681 _keyEventHandler += value;
1686 _keyEventHandler -= value;
1688 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
1690 this.KeyEventSignal().Disconnect(_keyCallback);
1695 private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
1697 if (keyEvent == global::System.IntPtr.Zero)
1699 NUILog.Error("keyEvent should not be null!");
1703 KeyEventArgs e = new KeyEventArgs();
1705 bool result = false;
1707 e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
1709 if (_keyEventHandler != null)
1711 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
1713 // Oring the result of each callback.
1714 foreach (EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList)
1716 result |= del(this, e);
1723 private EventHandler _onRelayoutEventHandler;
1724 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1725 private delegate void OnRelayoutEventCallbackType(IntPtr control);
1726 private OnRelayoutEventCallbackType _onRelayoutEventCallback;
1729 /// An event for the OnRelayout signal which can be used to subscribe or unsubscribe the event handler.<br />
1730 /// The OnRelayout signal is emitted after the size has been set on the view during relayout.<br />
1732 /// <since_tizen> 3 </since_tizen>
1733 public event EventHandler Relayout
1737 if (_onRelayoutEventHandler == null)
1739 _onRelayoutEventCallback = OnRelayout;
1740 this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
1743 _onRelayoutEventHandler += value;
1748 _onRelayoutEventHandler -= value;
1750 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
1752 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
1758 // Callback for View OnRelayout signal
1759 private void OnRelayout(IntPtr data)
1761 if (_onRelayoutEventHandler != null)
1763 _onRelayoutEventHandler(this, null);
1768 /// Event arguments that passed via the touch signal.
1770 /// <since_tizen> 3 </since_tizen>
1771 public class TouchEventArgs : EventArgs
1773 private Touch _touch;
1776 /// Touch - contains the information of touch points.
1778 /// <since_tizen> 3 </since_tizen>
1792 private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
1793 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1794 private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
1795 private TouchDataCallbackType _touchDataCallback;
1798 /// An event for the touched signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1799 /// The touched signal is emitted when the touch input is received.<br />
1801 /// <since_tizen> 3 </since_tizen>
1802 public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
1806 if (_touchDataEventHandler == null)
1808 _touchDataCallback = OnTouch;
1809 this.TouchSignal().Connect(_touchDataCallback);
1812 _touchDataEventHandler += value;
1817 _touchDataEventHandler -= value;
1819 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
1821 this.TouchSignal().Disconnect(_touchDataCallback);
1827 // Callback for View TouchSignal
1828 private bool OnTouch(IntPtr view, IntPtr touchData)
1830 if (touchData == global::System.IntPtr.Zero)
1832 NUILog.Error("touchData should not be null!");
1836 TouchEventArgs e = new TouchEventArgs();
1838 e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
1840 if (_touchDataEventHandler != null)
1842 return _touchDataEventHandler(this, e);
1849 /// Event arguments that passed via the hover signal.
1851 /// <since_tizen> 3 </since_tizen>
1852 public class HoverEventArgs : EventArgs
1854 private Hover _hover;
1857 /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
1859 /// <since_tizen> 3 </since_tizen>
1873 private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
1874 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1875 private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
1876 private HoverEventCallbackType _hoverEventCallback;
1879 /// An event for the hovered signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1880 /// The hovered signal is emitted when the hover input is received.<br />
1882 /// <since_tizen> 3 </since_tizen>
1883 public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
1887 if (_hoverEventHandler == null)
1889 _hoverEventCallback = OnHoverEvent;
1890 this.HoveredSignal().Connect(_hoverEventCallback);
1893 _hoverEventHandler += value;
1898 _hoverEventHandler -= value;
1900 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
1902 this.HoveredSignal().Disconnect(_hoverEventCallback);
1908 // Callback for View Hover signal
1909 private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
1911 if (hoverEvent == global::System.IntPtr.Zero)
1913 NUILog.Error("hoverEvent should not be null!");
1917 HoverEventArgs e = new HoverEventArgs();
1919 e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
1921 if (_hoverEventHandler != null)
1923 return _hoverEventHandler(this, e);
1930 /// Event arguments that passed via the wheel signal.
1932 /// <since_tizen> 3 </since_tizen>
1933 public class WheelEventArgs : EventArgs
1935 private Wheel _wheel;
1938 /// WheelEvent - store a wheel rolling type: MOUSE_WHEEL or CUSTOM_WHEEL.
1940 /// <since_tizen> 3 </since_tizen>
1954 private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
1955 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1956 private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
1957 private WheelEventCallbackType _wheelEventCallback;
1960 /// An event for the WheelMoved signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1961 /// The WheelMoved signal is emitted when the wheel event is received.<br />
1963 /// <since_tizen> 3 </since_tizen>
1964 public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
1968 if (_wheelEventHandler == null)
1970 _wheelEventCallback = OnWheelEvent;
1971 this.WheelEventSignal().Connect(_wheelEventCallback);
1974 _wheelEventHandler += value;
1979 _wheelEventHandler -= value;
1981 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
1983 this.WheelEventSignal().Disconnect(_wheelEventCallback);
1989 // Callback for View Wheel signal
1990 private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
1992 if (wheelEvent == global::System.IntPtr.Zero)
1994 NUILog.Error("wheelEvent should not be null!");
1998 WheelEventArgs e = new WheelEventArgs();
2000 e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
2002 if (_wheelEventHandler != null)
2004 return _wheelEventHandler(this, e);
2010 private EventHandler _onWindowEventHandler;
2011 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2012 private delegate void OnWindowEventCallbackType(IntPtr control);
2013 private OnWindowEventCallbackType _onWindowEventCallback;
2016 /// An event for the OnWindow signal which can be used to subscribe or unsubscribe the event handler.<br />
2017 /// The OnWindow signal is emitted after the view has been connected to the window.<br />
2019 /// <since_tizen> 3 </since_tizen>
2020 public event EventHandler AddedToWindow
2024 if (_onWindowEventHandler == null)
2026 _onWindowEventCallback = OnWindow;
2027 this.OnWindowSignal().Connect(_onWindowEventCallback);
2030 _onWindowEventHandler += value;
2035 _onWindowEventHandler -= value;
2037 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
2039 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
2044 // Callback for View OnWindow signal
2045 private void OnWindow(IntPtr data)
2047 if (_onWindowEventHandler != null)
2049 _onWindowEventHandler(this, null);
2054 private EventHandler _offWindowEventHandler;
2055 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2056 private delegate void OffWindowEventCallbackType(IntPtr control);
2057 private OffWindowEventCallbackType _offWindowEventCallback;
2060 /// An event for the OffWindow signal, which can be used to subscribe or unsubscribe the event handler.<br />
2061 /// OffWindow signal is emitted after the view has been disconnected from the window.<br />
2063 /// <since_tizen> 3 </since_tizen>
2064 public event EventHandler RemovedFromWindow
2068 if (_offWindowEventHandler == null)
2070 _offWindowEventCallback = OffWindow;
2071 this.OffWindowSignal().Connect(_offWindowEventCallback);
2074 _offWindowEventHandler += value;
2079 _offWindowEventHandler -= value;
2081 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
2083 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
2088 // Callback for View OffWindow signal
2089 private void OffWindow(IntPtr data)
2091 if (_offWindowEventHandler != null)
2093 _offWindowEventHandler(this, null);
2098 /// Event arguments of visibility changed.
2100 /// <since_tizen> 3 </since_tizen>
2101 public class VisibilityChangedEventArgs : EventArgs
2104 private bool _visibility;
2105 private VisibilityChangeType _type;
2108 /// The view, or child of view, whose visibility has changed.
2110 /// <since_tizen> 3 </since_tizen>
2124 /// Whether the view is now visible or not.
2126 /// <since_tizen> 3 </since_tizen>
2127 public bool Visibility
2135 _visibility = value;
2140 /// Whether the view's visible property has changed or a parent's.
2142 /// <since_tizen> 3 </since_tizen>
2143 public VisibilityChangeType Type
2156 private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
2157 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2158 private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
2159 private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
2162 /// An event for visibility change which can be used to subscribe or unsubscribe the event handler.<br />
2163 /// This signal is emitted when the visible property of this or a parent view is changed.<br />
2165 /// <since_tizen> 3 </since_tizen>
2166 public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
2170 if (_visibilityChangedEventHandler == null)
2172 _visibilityChangedEventCallback = OnVisibilityChanged;
2173 VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
2176 _visibilityChangedEventHandler += value;
2181 _visibilityChangedEventHandler -= value;
2183 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
2185 VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
2190 // Callback for View visibility change signal
2191 private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
2193 VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
2196 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
2198 e.Visibility = visibility;
2201 if (_visibilityChangedEventHandler != null)
2203 _visibilityChangedEventHandler(this, e);
2209 /// Event arguments of layout direction changed.
2211 /// <since_tizen> 4 </since_tizen>
2212 public class LayoutDirectionChangedEventArgs : EventArgs
2215 private ViewLayoutDirectionType _type;
2218 /// The view, or child of view, whose layout direction has changed.
2220 /// <since_tizen> 4 </since_tizen>
2234 /// Whether the view's layout direction property has changed or a parent's.
2236 /// <since_tizen> 4 </since_tizen>
2237 public ViewLayoutDirectionType Type
2250 private EventHandler<LayoutDirectionChangedEventArgs> _layoutDirectionChangedEventHandler;
2251 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2252 private delegate void LayoutDirectionChangedEventCallbackType(IntPtr data, ViewLayoutDirectionType type);
2253 private LayoutDirectionChangedEventCallbackType _layoutDirectionChangedEventCallback;
2256 /// Event for layout direction change which can be used to subscribe/unsubscribe the event handler.<br />
2257 /// This signal is emitted when the layout direction property of this or a parent view is changed.<br />
2259 /// <since_tizen> 4 </since_tizen>
2260 public event EventHandler<LayoutDirectionChangedEventArgs> LayoutDirectionChanged
2264 if (_layoutDirectionChangedEventHandler == null)
2266 _layoutDirectionChangedEventCallback = OnLayoutDirectionChanged;
2267 LayoutDirectionChangedSignal(this).Connect(_layoutDirectionChangedEventCallback);
2270 _layoutDirectionChangedEventHandler += value;
2275 _layoutDirectionChangedEventHandler -= value;
2277 if (_layoutDirectionChangedEventHandler == null && LayoutDirectionChangedSignal(this).Empty() == false)
2279 LayoutDirectionChangedSignal(this).Disconnect(_layoutDirectionChangedEventCallback);
2284 // Callback for View layout direction change signal
2285 private void OnLayoutDirectionChanged(IntPtr data, ViewLayoutDirectionType type)
2287 LayoutDirectionChangedEventArgs e = new LayoutDirectionChangedEventArgs();
2290 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
2294 if (_layoutDirectionChangedEventHandler != null)
2296 _layoutDirectionChangedEventHandler(this, e);
2300 // Resource Ready Signal
2302 private EventHandler _resourcesLoadedEventHandler;
2303 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
2304 private delegate void ResourcesLoadedCallbackType(IntPtr control);
2305 private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
2308 /// An event for the ResourcesLoadedSignal signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
2309 /// This signal is emitted after all resources required by a view are loaded and ready.<br />
2311 /// <since_tizen> 3 </since_tizen>
2312 public event EventHandler ResourcesLoaded
2316 if (_resourcesLoadedEventHandler == null)
2318 _ResourcesLoadedCallback = OnResourcesLoaded;
2319 this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
2322 _resourcesLoadedEventHandler += value;
2327 _resourcesLoadedEventHandler -= value;
2329 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
2331 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
2336 private void OnResourcesLoaded(IntPtr view)
2338 if (_resourcesLoadedEventHandler != null)
2340 _resourcesLoadedEventHandler(this, null);
2344 internal IntPtr GetPtrfromView()
2346 return (IntPtr)swigCPtr;
2349 internal class Property
2351 internal static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
2352 internal static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
2353 internal static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
2354 internal static readonly int LEFT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
2355 internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
2356 internal static readonly int UP_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
2357 internal static readonly int DOWN_FOCUSABLE_VIEW_ID = NDalicManualPINVOKE.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
2358 internal static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
2359 internal static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
2360 internal static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
2361 internal static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get();
2362 internal static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get();
2363 internal static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
2364 internal static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
2365 internal static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
2366 internal static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
2367 internal static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
2368 internal static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
2369 internal static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
2370 internal static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
2371 internal static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
2372 internal static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
2373 internal static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
2374 internal static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
2375 internal static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
2376 internal static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
2377 internal static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
2378 internal static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
2379 internal static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
2380 internal static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
2381 internal static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
2382 internal static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
2383 internal static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
2384 internal static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
2385 internal static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
2386 internal static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
2387 internal static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
2388 internal static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
2389 internal static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
2390 internal static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
2391 internal static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
2392 internal static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
2393 internal static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
2394 internal static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
2395 internal static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
2396 internal static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
2397 internal static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
2398 internal static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
2399 internal static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
2400 internal static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
2401 internal static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
2402 internal static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
2403 internal static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
2404 internal static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
2405 internal static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
2406 internal static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
2407 internal static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
2408 internal static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
2409 internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
2410 internal static readonly int INHERIT_LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_INHERIT_LAYOUT_DIRECTION_get();
2411 internal static readonly int LAYOUT_DIRECTION = NDalicManualPINVOKE.Actor_Property_LAYOUT_DIRECTION_get();
2412 internal static readonly int MARGIN = NDalicPINVOKE.View_Property_MARGIN_get();
2413 internal static readonly int PADDING = NDalicPINVOKE.View_Property_PADDING_get();
2417 /// Describes the direction to move the focus towards.
2419 /// <since_tizen> 3 </since_tizen>
2420 public enum FocusDirection
2423 /// Move keyboard focus towards the left direction.
2425 /// <since_tizen> 3 </since_tizen>
2428 /// Move keyboard focus towards the right direction.
2430 /// <since_tizen> 3 </since_tizen>
2433 /// Move keyboard focus towards the up direction.
2435 /// <since_tizen> 3 </since_tizen>
2438 /// Move keyboard focus towards the down direction.
2440 /// <since_tizen> 3 </since_tizen>
2443 /// Move keyboard focus towards the previous page direction.
2445 /// <since_tizen> 3 </since_tizen>
2448 /// Move keyboard focus towards the next page direction.
2450 /// <since_tizen> 3 </since_tizen>
2454 protected void InitXamlResource()
2456 if (null != Application.Current)
2458 Application.AddResourceChangedCallback(this, OnResourcesChanged);
2463 /// Creates a new instance of a view.
2465 /// <since_tizen> 3 </since_tizen>
2466 public View() : this(NDalicPINVOKE.View_New(), true)
2469 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2471 internal View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true)
2474 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2477 private View ConvertIdToView(uint id)
2480 if (GetParent() is View)
2482 View parentView = GetParent() as View;
2483 view = parentView.FindChildById(id);
2488 view = Window.Instance.GetRootLayer().FindChildById(id);
2494 internal void SetKeyInputFocus()
2496 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
2497 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2501 /// Queries whether the view has a focus.
2503 /// <returns>True if this view has a focus.</returns>
2504 /// <since_tizen> 3 </since_tizen>
2505 public bool HasFocus()
2507 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
2508 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2512 internal void ClearKeyInputFocus()
2514 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
2515 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2518 internal PinchGestureDetector GetPinchGestureDetector()
2520 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
2521 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2525 internal PanGestureDetector GetPanGestureDetector()
2527 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
2528 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2532 internal TapGestureDetector GetTapGestureDetector()
2534 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
2535 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2539 internal LongPressGestureDetector GetLongPressGestureDetector()
2541 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
2542 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2547 /// Sets the name of the style to be applied to the view.
2549 /// <param name="styleName">A string matching a style described in a stylesheet.</param>
2550 /// <since_tizen> 3 </since_tizen>
2551 public void SetStyleName(string styleName)
2553 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
2554 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2558 /// Retrieves the name of the style to be applied to the view (if any).
2560 /// <returns>A string matching a style, or an empty string.</returns>
2561 /// <since_tizen> 3 </since_tizen>
2562 public string GetStyleName()
2564 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
2565 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2569 internal void SetBackgroundColor(Vector4 color)
2571 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
2572 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2575 internal Vector4 GetBackgroundColor()
2577 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
2578 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2582 internal void SetBackgroundImage(Image image)
2584 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
2585 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2589 /// Clears the background.
2591 /// <since_tizen> 3 </since_tizen>
2592 public void ClearBackground()
2594 NDalicPINVOKE.View_ClearBackground(swigCPtr);
2595 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2598 internal ControlKeySignal KeyEventSignal()
2600 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
2601 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2605 internal KeyInputFocusSignal KeyInputFocusGainedSignal()
2607 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
2608 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2612 internal KeyInputFocusSignal KeyInputFocusLostSignal()
2614 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
2615 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2619 internal View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
2621 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2624 internal enum PropertyRange
2626 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
2627 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
2628 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
2632 /// The StyleName, type string.
2634 /// <since_tizen> 3 </since_tizen>
2635 public string StyleName
2639 return (string)GetValue(StyleNameProperty);
2643 SetValue(StyleNameProperty, value);
2644 NotifyPropertyChanged();
2649 /// The mutually exclusive with BACKGROUND_IMAGE and BACKGROUND type Vector4.
2651 /// <since_tizen> 3 </since_tizen>
2652 public Color BackgroundColor
2656 return (Color)GetValue(BackgroundColorProperty);
2660 SetValue(BackgroundColorProperty, value);
2661 NotifyPropertyChanged();
2666 /// Creates an animation to animate the background color visual. If there is no
2667 /// background visual, creates one with transparent black as it's mixColor.
2669 /// <since_tizen> 3 </since_tizen>
2670 public Animation AnimateBackgroundColor(object destinationValue,
2673 AlphaFunction.BuiltinFunctions? alphaFunction = null,
2674 object initialValue = null)
2676 Tizen.NUI.PropertyMap background = Background;
2678 if (background.Empty())
2680 // If there is no background yet, ensure there is a transparent
2682 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
2683 background = Background;
2685 return AnimateColor("background", destinationValue, startTime, endTime, alphaFunction, initialValue);
2689 /// Creates an animation to animate the mixColor of the named visual.
2691 /// <since_tizen> 3 </since_tizen>
2692 public Animation AnimateColor(string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null)
2694 Animation animation = null;
2696 PropertyMap _animator = new PropertyMap();
2697 if (alphaFunction != null)
2699 _animator.Add("alphaFunction", new PropertyValue(AlphaFunction.BuiltinToPropertyKey(alphaFunction)));
2702 PropertyMap _timePeriod = new PropertyMap();
2703 _timePeriod.Add("duration", new PropertyValue((endTime - startTime) / 1000.0f));
2704 _timePeriod.Add("delay", new PropertyValue(startTime / 1000.0f));
2705 _animator.Add("timePeriod", new PropertyValue(_timePeriod));
2707 PropertyMap _transition = new PropertyMap();
2708 _transition.Add("animator", new PropertyValue(_animator));
2709 _transition.Add("target", new PropertyValue(targetVisual));
2710 _transition.Add("property", new PropertyValue("mixColor"));
2712 if (initialColor != null)
2714 PropertyValue initValue = PropertyValue.CreateFromObject(initialColor);
2715 _transition.Add("initialValue", initValue);
2718 PropertyValue destValue = PropertyValue.CreateFromObject(destinationColor);
2719 _transition.Add("targetValue", destValue);
2720 TransitionData _transitionData = new TransitionData(_transition);
2722 animation = new Animation(NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true);
2723 if (NDalicPINVOKE.SWIGPendingException.Pending)
2724 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2730 /// The mutually exclusive with BACKGROUND_COLOR and BACKGROUND type Map.
2732 /// <since_tizen> 3 </since_tizen>
2733 public string BackgroundImage
2737 return (string)GetValue(BackgroundImageProperty);
2741 SetValue(BackgroundImageProperty, value);
2742 NotifyPropertyChanged();
2747 /// The background of view.
2749 /// <since_tizen> 3 </since_tizen>
2750 public Tizen.NUI.PropertyMap Background
2754 return (PropertyMap)GetValue(BackgroundProperty);
2758 SetValue(BackgroundProperty, value);
2759 NotifyPropertyChanged();
2765 /// The current state of the view.
2767 /// <since_tizen> 3 </since_tizen>
2772 return (States)GetValue(StateProperty);
2776 SetValue(StateProperty, value);
2777 NotifyPropertyChanged();
2782 /// The current sub state of the view.
2784 /// <since_tizen> 3 </since_tizen>
2785 public States SubState
2789 return (States)GetValue(SubStateProperty);
2793 SetValue(SubStateProperty, value);
2794 NotifyPropertyChanged();
2799 /// Displays a tooltip
2801 /// <since_tizen> 3 </since_tizen>
2802 public Tizen.NUI.PropertyMap Tooltip
2806 return (PropertyMap)GetValue(TooltipProperty);
2810 SetValue(TooltipProperty, value);
2811 NotifyPropertyChanged();
2816 /// Displays a tooltip as a text.
2818 /// <since_tizen> 3 </since_tizen>
2819 public string TooltipText
2823 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
2824 NotifyPropertyChanged();
2828 private int LeftFocusableViewId
2833 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
2838 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
2842 private int RightFocusableViewId
2847 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
2852 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
2856 private int UpFocusableViewId
2861 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
2866 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
2870 private int DownFocusableViewId
2875 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
2880 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
2885 /// The Child property of FlexContainer.<br />
2886 /// The proportion of the free space in the container, the flex item will receive.<br />
2887 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br />
2889 /// <since_tizen> 3 </since_tizen>
2894 return (float)GetValue(FlexProperty);
2898 SetValue(FlexProperty, value);
2899 NotifyPropertyChanged();
2904 /// The Child property of FlexContainer.<br />
2905 /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br />
2907 /// <since_tizen> 3 </since_tizen>
2908 public int AlignSelf
2912 return (int)GetValue(AlignSelfProperty);
2916 SetValue(AlignSelfProperty, value);
2917 NotifyPropertyChanged();
2922 /// The Child property of FlexContainer.<br />
2923 /// The space around the flex item.<br />
2925 /// <since_tizen> 3 </since_tizen>
2926 public Vector4 FlexMargin
2930 return (Vector4)GetValue(FlexMarginProperty);
2934 SetValue(FlexMarginProperty, value);
2935 NotifyPropertyChanged();
2940 /// The top-left cell this child occupies, if not set, the first available cell is used.
2942 /// <since_tizen> 3 </since_tizen>
2943 public Vector2 CellIndex
2947 return (Vector2)GetValue(CellIndexProperty);
2951 SetValue(CellIndexProperty, value);
2952 NotifyPropertyChanged();
2957 /// The number of rows this child occupies, if not set, the default value is 1.
2959 /// <since_tizen> 3 </since_tizen>
2960 public float RowSpan
2964 return (float)GetValue(RowSpanProperty);
2968 SetValue(RowSpanProperty, value);
2969 NotifyPropertyChanged();
2974 /// The number of columns this child occupies, if not set, the default value is 1.
2976 /// <since_tizen> 3 </since_tizen>
2977 public float ColumnSpan
2981 return (float)GetValue(ColumnSpanProperty);
2985 SetValue(ColumnSpanProperty, value);
2986 NotifyPropertyChanged();
2991 /// The horizontal alignment of this child inside the cells, if not set, the default value is 'left'.
2993 /// <since_tizen> 3 </since_tizen>
2994 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
2998 return (HorizontalAlignmentType)GetValue(CellHorizontalAlignmentProperty);
3002 SetValue(CellHorizontalAlignmentProperty, value);
3003 NotifyPropertyChanged();
3008 /// The vertical alignment of this child inside the cells, if not set, the default value is 'top'.
3010 /// <since_tizen> 3 </since_tizen>
3011 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
3015 return (VerticalAlignmentType)GetValue(CellVerticalAlignmentProperty);
3019 SetValue(CellVerticalAlignmentProperty, value);
3020 NotifyPropertyChanged();
3025 /// The left focusable view.<br />
3026 /// This will return null if not set.<br />
3027 /// This will also return null if the specified left focusable view is not on a window.<br />
3029 /// <since_tizen> 3 </since_tizen>
3030 public View LeftFocusableView
3032 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
3035 return (View)GetValue(LeftFocusableViewProperty);
3039 SetValue(LeftFocusableViewProperty, value);
3040 NotifyPropertyChanged();
3045 /// The right focusable view.<br />
3046 /// This will return null if not set.<br />
3047 /// This will also return null if the specified right focusable view is not on a window.<br />
3049 /// <since_tizen> 3 </since_tizen>
3050 public View RightFocusableView
3052 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
3055 return (View)GetValue(RightFocusableViewProperty);
3059 SetValue(RightFocusableViewProperty, value);
3060 NotifyPropertyChanged();
3065 /// The up focusable view.<br />
3066 /// This will return null if not set.<br />
3067 /// This will also return null if the specified up focusable view is not on a window.<br />
3069 /// <since_tizen> 3 </since_tizen>
3070 public View UpFocusableView
3072 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
3075 return (View)GetValue(UpFocusableViewProperty);
3079 SetValue(UpFocusableViewProperty, value);
3080 NotifyPropertyChanged();
3085 /// The down focusable view.<br />
3086 /// This will return null if not set.<br />
3087 /// This will also return null if the specified down focusable view is not on a window.<br />
3089 /// <since_tizen> 3 </since_tizen>
3090 public View DownFocusableView
3092 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
3095 return (View)GetValue(DownFocusableViewProperty);
3099 SetValue(DownFocusableViewProperty, value);
3100 NotifyPropertyChanged();
3105 /// Whether the view should be focusable by keyboard navigation.
3107 /// <since_tizen> 3 </since_tizen>
3108 public bool Focusable
3112 SetValue(FocusableProperty, value);
3113 NotifyPropertyChanged();
3117 return (bool)GetValue(FocusableProperty);
3122 /// Enumeration for describing the states of the view.
3124 /// <since_tizen> 3 </since_tizen>
3128 /// The normal state.
3132 /// The focused state.
3136 /// The disabled state.
3142 /// Retrieves the position of the view.<br />
3143 /// The coordinates are relative to the view's parent.<br />
3145 /// <since_tizen> 3 </since_tizen>
3146 public Position CurrentPosition
3150 return GetCurrentPosition();
3155 /// Sets the size of a view for the width and the height.<br />
3156 /// Geometry can be scaled to fit within this area.<br />
3157 /// This does not interfere with the view's scale factor.<br />
3158 /// The views default depth is the minimum of width and height.<br />
3160 /// <since_tizen> 3 </since_tizen>
3161 public Size2D Size2D
3165 return (Size2D)GetValue(Size2DProperty);
3169 SetValue(Size2DProperty, value);
3170 NotifyPropertyChanged();
3175 /// Retrieves the size of the view.<br />
3176 /// The coordinates are relative to the view's parent.<br />
3178 /// <since_tizen> 3 </since_tizen>
3179 public Size2D CurrentSize
3183 return GetCurrentSize();
3188 /// Retrieves and sets the view's opacity.<br />
3190 /// <since_tizen> 3 </since_tizen>
3191 public float Opacity
3195 return (float)GetValue(OpacityProperty);
3199 SetValue(OpacityProperty, value);
3200 NotifyPropertyChanged();
3205 /// Sets the position of the view for X and Y.<br />
3206 /// By default, sets the position vector between the parent origin and the pivot point (default).<br />
3207 /// If the position inheritance is disabled, sets the world position.<br />
3209 /// <since_tizen> 3 </since_tizen>
3210 public Position2D Position2D
3214 return (Position2D)GetValue(Position2DProperty);
3218 SetValue(Position2DProperty, value);
3219 NotifyPropertyChanged();
3224 /// Retrieves the screen postion of the view.<br />
3226 /// <since_tizen> 3 </since_tizen>
3227 public Vector2 ScreenPosition
3231 Vector2 temp = new Vector2(0.0f, 0.0f);
3232 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
3238 /// Determines whether the pivot point should be used to determine the position of the view.
3239 /// This is true by default.
3241 /// <remarks>If false, then the top-left of the view is used for the position.
3242 /// Setting this to false will allow scaling or rotation around the anchor-point without affecting the view's position.
3244 /// <since_tizen> 3 </since_tizen>
3245 public bool PositionUsesPivotPoint
3249 return (bool)GetValue(PositionUsesPivotPointProperty);
3253 SetValue(PositionUsesPivotPointProperty, value);
3254 NotifyPropertyChanged();
3259 /// Please do not use! this will be deprecated.
3261 /// Please do not use! this will be deprecated!
3262 /// Instead please use PositionUsesPivotPoint.
3263 /// <since_tizen> 3 </since_tizen>
3264 [Obsolete("Please do not use! This will be deprecated! Please use PositionUsesPivotPoint instead! " +
3266 "View view = new View(); " +
3267 "view.PivotPoint = PivotPoint.Center; " +
3268 "view.PositionUsesPivotPoint = true;")]
3269 [EditorBrowsable(EditorBrowsableState.Never)]
3270 public bool PositionUsesAnchorPoint
3275 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
3280 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3281 NotifyPropertyChanged();
3285 internal bool FocusState
3289 return IsKeyboardFocusable();
3293 SetKeyboardFocusable(value);
3298 /// Queries whether the view is connected to the stage.<br />
3299 /// When a view is connected, it will be directly or indirectly parented to the root view.<br />
3301 /// <since_tizen> 3 </since_tizen>
3302 public bool IsOnWindow
3311 /// Gets the depth in the hierarchy for the view.
3313 /// <since_tizen> 3 </since_tizen>
3314 public int HierarchyDepth
3318 return GetHierarchyDepth();
3323 /// Sets the sibling order of the view so the depth position can be defined within the same parent.
3326 /// Note the initial value is 0. SiblingOrder should be bigger than 0 or equal to 0.
3327 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
3328 /// The values set by this property will likely change.
3330 /// <since_tizen> 3 </since_tizen>
3331 public int SiblingOrder
3335 return (int)GetValue(SiblingOrderProperty);
3339 SetValue(SiblingOrderProperty, value);
3340 NotifyPropertyChanged();
3345 /// Returns the natural size of the view.
3348 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
3350 /// /// Please do not use! this will be deprecated!
3351 /// Instead please use NaturalSize2D.
3352 /// <since_tizen> 3 </since_tizen>
3353 [Obsolete("Please do not use! This will be deprecated! Please use NaturalSize2D instead! " +
3355 "TextLabel label = new TextLabel(\"Hello World!\"); " +
3356 "Size2D size = label.NaturalSize2D;")]
3357 [EditorBrowsable(EditorBrowsableState.Never)]
3358 public Vector3 NaturalSize
3362 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
3363 if (NDalicPINVOKE.SWIGPendingException.Pending)
3364 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3370 /// Returns the natural size (Size2D) of the view.
3373 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
3375 /// <since_tizen> 4 </since_tizen>
3376 public Size2D NaturalSize2D
3380 Vector3 temp = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
3381 if (NDalicPINVOKE.SWIGPendingException.Pending)
3382 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3384 return new Size2D((int)temp.Width, (int)temp.Height);
3389 /// Set the layout on this control.
3393 /// <since_tizen> 5 </since_tizen>
3394 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
3395 [EditorBrowsable(EditorBrowsableState.Never)]
3396 public LayoutItem Layout
3400 IntPtr cPtr = Tizen.NUI.NDalicManualPINVOKE.GetLayout__SWIG_1(View.getCPtr(this));
3402 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3403 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
3404 NDalicPINVOKE.delete_BaseHandle(CPtr);
3405 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3407 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3409 return basehandle as LayoutItem;
3413 Tizen.NUI.NDalicManualPINVOKE.SetLayout__SWIG_1(View.getCPtr(this), LayoutItem.getCPtr(value));
3421 /// This is an asynchronous method.
3423 /// <since_tizen> 3 </since_tizen>
3433 /// This is an asynchronous method.
3434 /// If the view is hidden, then the view and its children will not be rendered.
3435 /// This is regardless of the individual visibility of the children, i.e., the view will only be rendered if all of its parents are shown.
3437 /// <since_tizen> 3 </since_tizen>
3443 internal void Raise()
3445 var parentChildren = GetParent()?.Children;
3447 if (parentChildren != null)
3449 int currentIndex = parentChildren.IndexOf(this);
3451 // If the view is not already the last item in the list.
3452 if (currentIndex >= 0 && currentIndex < parentChildren.Count - 1)
3454 View temp = parentChildren[currentIndex + 1];
3455 parentChildren[currentIndex + 1] = this;
3456 parentChildren[currentIndex] = temp;
3458 NDalicPINVOKE.Raise(swigCPtr);
3459 if (NDalicPINVOKE.SWIGPendingException.Pending)
3460 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3466 internal void Lower()
3468 var parentChildren = GetParent()?.Children;
3470 if (parentChildren != null)
3472 int currentIndex = parentChildren.IndexOf(this);
3474 // If the view is not already the first item in the list.
3475 if (currentIndex > 0 && currentIndex < parentChildren.Count)
3477 View temp = parentChildren[currentIndex - 1];
3478 parentChildren[currentIndex - 1] = this;
3479 parentChildren[currentIndex] = temp;
3481 NDalicPINVOKE.Lower(swigCPtr);
3482 if (NDalicPINVOKE.SWIGPendingException.Pending)
3483 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3489 /// Raises the view above all other views.
3492 /// Sibling order of views within the parent will be updated automatically.
3493 /// Once a raise or lower API is used, that view will then have an exclusive sibling order independent of insertion.
3495 /// <since_tizen> 3 </since_tizen>
3496 public void RaiseToTop()
3498 var parentChildren = GetParent()?.Children;
3500 if (parentChildren != null)
3502 parentChildren.Remove(this);
3503 parentChildren.Add(this);
3505 NDalicPINVOKE.RaiseToTop(swigCPtr);
3506 if (NDalicPINVOKE.SWIGPendingException.Pending)
3507 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3513 /// Lowers the view to the bottom of all views.
3516 /// The sibling order of views within the parent will be updated automatically.
3517 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
3519 /// <since_tizen> 3 </since_tizen>
3520 public void LowerToBottom()
3522 var parentChildren = GetParent()?.Children;
3524 if (parentChildren != null)
3526 parentChildren.Remove(this);
3527 parentChildren.Insert(0, this);
3529 NDalicPINVOKE.LowerToBottom(swigCPtr);
3530 if (NDalicPINVOKE.SWIGPendingException.Pending)
3531 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3536 /// Queries if all resources required by a view are loaded and ready.
3538 /// <remarks>Most resources are only loaded when the control is placed on the stage.
3540 /// <since_tizen> 3 </since_tizen>
3541 public bool IsResourceReady()
3543 bool ret = NDalicPINVOKE.IsResourceReady(swigCPtr);
3544 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3549 /// Raises the view to above the target view.
3551 /// <remarks>The sibling order of views within the parent will be updated automatically.
3552 /// Views on the level above the target view will still be shown above this view.
3553 /// Raising this view above views with the same sibling order as each other will raise this view above them.
3554 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
3556 /// <param name="target">Will be raised above this view.</param>
3557 internal void RaiseAbove(View target)
3559 var parentChildren = GetParent()?.Children;
3561 if (parentChildren != null)
3563 int currentIndex = parentChildren.IndexOf(this);
3564 int targetIndex = parentChildren.IndexOf(target);
3566 if (currentIndex < 0 || targetIndex < 0 ||
3567 currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
3569 NUILog.Error("index should be bigger than 0 and less than children of layer count");
3572 // If the currentIndex is less than the target index and the target has the same parent.
3573 if (currentIndex < targetIndex)
3575 parentChildren.Remove(this);
3576 parentChildren.Insert(targetIndex, this);
3578 NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
3579 if (NDalicPINVOKE.SWIGPendingException.Pending)
3580 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3587 /// Lowers the view to below the target view.
3589 /// <remarks>The sibling order of views within the parent will be updated automatically.
3590 /// Lowering this view below views with the same sibling order as each other will lower this view above them.
3591 /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
3593 /// <param name="target">Will be lowered below this view.</param>
3594 internal void LowerBelow(View target)
3596 var parentChildren = GetParent()?.Children;
3598 if (parentChildren != null)
3600 int currentIndex = parentChildren.IndexOf(this);
3601 int targetIndex = parentChildren.IndexOf(target);
3602 if (currentIndex < 0 || targetIndex < 0 ||
3603 currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
3605 NUILog.Error("index should be bigger than 0 and less than children of layer count");
3609 // If the currentIndex is not already the 0th index and the target has the same parent.
3610 if ((currentIndex != 0) && (targetIndex != -1) &&
3611 (currentIndex > targetIndex))
3613 parentChildren.Remove(this);
3614 parentChildren.Insert(targetIndex, this);
3616 NDalicPINVOKE.LowerBelow(swigCPtr, View.getCPtr(target));
3617 if (NDalicPINVOKE.SWIGPendingException.Pending)
3618 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3624 internal string GetName()
3626 string ret = NDalicPINVOKE.Actor_GetName(swigCPtr);
3627 if (NDalicPINVOKE.SWIGPendingException.Pending)
3628 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3632 internal void SetName(string name)
3634 NDalicPINVOKE.Actor_SetName(swigCPtr, name);
3635 if (NDalicPINVOKE.SWIGPendingException.Pending)
3636 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3639 internal uint GetId()
3641 uint ret = NDalicPINVOKE.Actor_GetId(swigCPtr);
3642 if (NDalicPINVOKE.SWIGPendingException.Pending)
3643 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3647 internal bool IsRoot()
3649 bool ret = NDalicPINVOKE.Actor_IsRoot(swigCPtr);
3650 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3654 internal bool OnWindow()
3656 bool ret = NDalicPINVOKE.Actor_OnStage(swigCPtr);
3657 if (NDalicPINVOKE.SWIGPendingException.Pending)
3658 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3663 /// Gets the parent layer of this view.If a view has no parent, this method does nothing.
3665 /// <pre>The view has been initialized. </pre>
3666 /// <returns>the parent layer of view </returns>
3667 /// <since_tizen> 5 </since_tizen>
3668 public Layer GetLayer()
3670 //to fix memory leak issue, match the handle count with native side.
3671 IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
3672 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3673 Layer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Layer;
3674 NDalicPINVOKE.delete_BaseHandle(CPtr);
3675 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3677 if (NDalicPINVOKE.SWIGPendingException.Pending)
3678 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3683 /// Removes a view from its parent view or layer. If a view has no parent, this method does nothing.
3685 /// <pre>The (child) view has been initialized. </pre>
3686 /// <since_tizen> 4 </since_tizen>
3687 public void Unparent()
3689 GetParent()?.Remove(this);
3693 /// Search through this view's hierarchy for a view with the given name.
3694 /// The view itself is also considered in the search.
3696 /// <pre>The view has been initialized.</pre>
3697 /// <param name="viewName">The name of the view to find.</param>
3698 /// <returns>A handle to the view if found, or an empty handle if not.</returns>
3699 /// <since_tizen> 3 </since_tizen>
3700 public View FindChildByName(string viewName)
3702 //to fix memory leak issue, match the handle count with native side.
3703 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
3704 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3705 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
3706 NDalicPINVOKE.delete_BaseHandle(CPtr);
3707 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3709 if (NDalicPINVOKE.SWIGPendingException.Pending)
3710 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3714 internal View FindChildById(uint id)
3716 //to fix memory leak issue, match the handle count with native side.
3717 IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
3718 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3719 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
3720 NDalicPINVOKE.delete_BaseHandle(CPtr);
3721 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3723 if (NDalicPINVOKE.SWIGPendingException.Pending)
3724 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3728 internal void SetParentOrigin(Vector3 origin)
3730 NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
3731 if (NDalicPINVOKE.SWIGPendingException.Pending)
3732 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3735 internal Vector3 GetCurrentParentOrigin()
3737 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentParentOrigin(swigCPtr), true);
3738 if (NDalicPINVOKE.SWIGPendingException.Pending)
3739 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3743 internal void SetAnchorPoint(Vector3 anchorPoint)
3745 NDalicPINVOKE.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
3746 if (NDalicPINVOKE.SWIGPendingException.Pending)
3747 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3750 internal Vector3 GetCurrentAnchorPoint()
3752 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentAnchorPoint(swigCPtr), true);
3753 if (NDalicPINVOKE.SWIGPendingException.Pending)
3754 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3758 internal void SetSize(float width, float height)
3760 NDalicPINVOKE.Actor_SetSize__SWIG_0(swigCPtr, width, height);
3761 if (NDalicPINVOKE.SWIGPendingException.Pending)
3762 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3765 internal void SetSize(float width, float height, float depth)
3767 NDalicPINVOKE.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
3768 if (NDalicPINVOKE.SWIGPendingException.Pending)
3769 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3772 internal void SetSize(Vector2 size)
3774 NDalicPINVOKE.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
3775 if (NDalicPINVOKE.SWIGPendingException.Pending)
3776 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3779 internal void SetSize(Vector3 size)
3781 NDalicPINVOKE.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
3782 if (NDalicPINVOKE.SWIGPendingException.Pending)
3783 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3786 internal Vector3 GetTargetSize()
3788 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetTargetSize(swigCPtr), true);
3789 if (NDalicPINVOKE.SWIGPendingException.Pending)
3790 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3794 internal Size2D GetCurrentSize()
3796 Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
3797 if (NDalicPINVOKE.SWIGPendingException.Pending)
3798 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3799 Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
3803 internal Vector3 GetNaturalSize()
3805 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
3806 if (NDalicPINVOKE.SWIGPendingException.Pending)
3807 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3811 internal void SetPosition(float x, float y)
3813 NDalicPINVOKE.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
3814 if (NDalicPINVOKE.SWIGPendingException.Pending)
3815 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3818 internal void SetPosition(float x, float y, float z)
3820 NDalicPINVOKE.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
3821 if (NDalicPINVOKE.SWIGPendingException.Pending)
3822 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3825 internal void SetPosition(Vector3 position)
3827 NDalicPINVOKE.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
3828 if (NDalicPINVOKE.SWIGPendingException.Pending)
3829 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3832 internal void SetX(float x)
3834 NDalicPINVOKE.Actor_SetX(swigCPtr, x);
3835 if (NDalicPINVOKE.SWIGPendingException.Pending)
3836 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3839 internal void SetY(float y)
3841 NDalicPINVOKE.Actor_SetY(swigCPtr, y);
3842 if (NDalicPINVOKE.SWIGPendingException.Pending)
3843 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3846 internal void SetZ(float z)
3848 NDalicPINVOKE.Actor_SetZ(swigCPtr, z);
3849 if (NDalicPINVOKE.SWIGPendingException.Pending)
3850 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3853 internal void TranslateBy(Vector3 distance)
3855 NDalicPINVOKE.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
3856 if (NDalicPINVOKE.SWIGPendingException.Pending)
3857 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3860 internal Position GetCurrentPosition()
3862 Position ret = new Position(NDalicPINVOKE.Actor_GetCurrentPosition(swigCPtr), true);
3863 if (NDalicPINVOKE.SWIGPendingException.Pending)
3864 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3868 internal Vector3 GetCurrentWorldPosition()
3870 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldPosition(swigCPtr), true);
3871 if (NDalicPINVOKE.SWIGPendingException.Pending)
3872 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3876 internal void SetInheritPosition(bool inherit)
3878 NDalicPINVOKE.Actor_SetInheritPosition(swigCPtr, inherit);
3879 if (NDalicPINVOKE.SWIGPendingException.Pending)
3880 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3883 internal bool IsPositionInherited()
3885 bool ret = NDalicPINVOKE.Actor_IsPositionInherited(swigCPtr);
3886 if (NDalicPINVOKE.SWIGPendingException.Pending)
3887 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3891 internal void SetOrientation(Degree angle, Vector3 axis)
3893 NDalicPINVOKE.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
3894 if (NDalicPINVOKE.SWIGPendingException.Pending)
3895 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3898 internal void SetOrientation(Radian angle, Vector3 axis)
3900 NDalicPINVOKE.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
3901 if (NDalicPINVOKE.SWIGPendingException.Pending)
3902 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3905 internal void SetOrientation(Rotation orientation)
3907 NDalicPINVOKE.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
3908 if (NDalicPINVOKE.SWIGPendingException.Pending)
3909 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3912 internal void RotateBy(Degree angle, Vector3 axis)
3914 NDalicPINVOKE.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
3915 if (NDalicPINVOKE.SWIGPendingException.Pending)
3916 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3919 internal void RotateBy(Radian angle, Vector3 axis)
3921 NDalicPINVOKE.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
3922 if (NDalicPINVOKE.SWIGPendingException.Pending)
3923 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3926 internal void RotateBy(Rotation relativeRotation)
3928 NDalicPINVOKE.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
3929 if (NDalicPINVOKE.SWIGPendingException.Pending)
3930 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3933 internal Rotation GetCurrentOrientation()
3935 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentOrientation(swigCPtr), true);
3936 if (NDalicPINVOKE.SWIGPendingException.Pending)
3937 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3941 internal void SetInheritOrientation(bool inherit)
3943 NDalicPINVOKE.Actor_SetInheritOrientation(swigCPtr, inherit);
3944 if (NDalicPINVOKE.SWIGPendingException.Pending)
3945 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3948 internal bool IsOrientationInherited()
3950 bool ret = NDalicPINVOKE.Actor_IsOrientationInherited(swigCPtr);
3951 if (NDalicPINVOKE.SWIGPendingException.Pending)
3952 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3956 internal Rotation GetCurrentWorldOrientation()
3958 Rotation ret = new Rotation(NDalicPINVOKE.Actor_GetCurrentWorldOrientation(swigCPtr), true);
3959 if (NDalicPINVOKE.SWIGPendingException.Pending)
3960 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3964 internal void SetScale(float scale)
3966 NDalicPINVOKE.Actor_SetScale__SWIG_0(swigCPtr, scale);
3967 if (NDalicPINVOKE.SWIGPendingException.Pending)
3968 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3971 internal void SetScale(float scaleX, float scaleY, float scaleZ)
3973 NDalicPINVOKE.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
3974 if (NDalicPINVOKE.SWIGPendingException.Pending)
3975 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3978 internal void SetScale(Vector3 scale)
3980 NDalicPINVOKE.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
3981 if (NDalicPINVOKE.SWIGPendingException.Pending)
3982 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3985 internal void ScaleBy(Vector3 relativeScale)
3987 NDalicPINVOKE.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
3988 if (NDalicPINVOKE.SWIGPendingException.Pending)
3989 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3992 internal Vector3 GetCurrentScale()
3994 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentScale(swigCPtr), true);
3995 if (NDalicPINVOKE.SWIGPendingException.Pending)
3996 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4000 internal Vector3 GetCurrentWorldScale()
4002 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetCurrentWorldScale(swigCPtr), true);
4003 if (NDalicPINVOKE.SWIGPendingException.Pending)
4004 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4008 internal void SetInheritScale(bool inherit)
4010 NDalicPINVOKE.Actor_SetInheritScale(swigCPtr, inherit);
4011 if (NDalicPINVOKE.SWIGPendingException.Pending)
4012 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4015 internal bool IsScaleInherited()
4017 bool ret = NDalicPINVOKE.Actor_IsScaleInherited(swigCPtr);
4018 if (NDalicPINVOKE.SWIGPendingException.Pending)
4019 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4023 internal Matrix GetCurrentWorldMatrix()
4025 Matrix ret = new Matrix(NDalicPINVOKE.Actor_GetCurrentWorldMatrix(swigCPtr), true);
4026 if (NDalicPINVOKE.SWIGPendingException.Pending)
4027 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4031 internal void SetVisible(bool visible)
4033 NDalicPINVOKE.Actor_SetVisible(swigCPtr, visible);
4034 if (NDalicPINVOKE.SWIGPendingException.Pending)
4035 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4038 internal bool IsVisible()
4040 bool ret = NDalicPINVOKE.Actor_IsVisible(swigCPtr);
4041 if (NDalicPINVOKE.SWIGPendingException.Pending)
4042 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4046 internal void SetOpacity(float opacity)
4048 NDalicPINVOKE.Actor_SetOpacity(swigCPtr, opacity);
4049 if (NDalicPINVOKE.SWIGPendingException.Pending)
4050 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4053 internal float GetCurrentOpacity()
4055 float ret = NDalicPINVOKE.Actor_GetCurrentOpacity(swigCPtr);
4056 if (NDalicPINVOKE.SWIGPendingException.Pending)
4057 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4061 internal void SetColor(Vector4 color)
4063 NDalicPINVOKE.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
4064 if (NDalicPINVOKE.SWIGPendingException.Pending)
4065 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4068 internal Vector4 GetCurrentColor()
4070 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentColor(swigCPtr), true);
4071 if (NDalicPINVOKE.SWIGPendingException.Pending)
4072 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4076 internal void SetColorMode(ColorMode colorMode)
4078 NDalicPINVOKE.Actor_SetColorMode(swigCPtr, (int)colorMode);
4079 if (NDalicPINVOKE.SWIGPendingException.Pending)
4080 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4083 internal ColorMode GetColorMode()
4085 ColorMode ret = (ColorMode)NDalicPINVOKE.Actor_GetColorMode(swigCPtr);
4086 if (NDalicPINVOKE.SWIGPendingException.Pending)
4087 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4091 internal Vector4 GetCurrentWorldColor()
4093 Vector4 ret = new Vector4(NDalicPINVOKE.Actor_GetCurrentWorldColor(swigCPtr), true);
4094 if (NDalicPINVOKE.SWIGPendingException.Pending)
4095 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4099 internal void SetDrawMode(DrawModeType drawMode)
4101 NDalicPINVOKE.Actor_SetDrawMode(swigCPtr, (int)drawMode);
4102 if (NDalicPINVOKE.SWIGPendingException.Pending)
4103 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4106 internal DrawModeType GetDrawMode()
4108 DrawModeType ret = (DrawModeType)NDalicPINVOKE.Actor_GetDrawMode(swigCPtr);
4109 if (NDalicPINVOKE.SWIGPendingException.Pending)
4110 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4115 /// Converts screen coordinates into the view's coordinate system using the default camera.
4117 /// <pre>The view has been initialized.</pre>
4118 /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5).</remarks>
4119 /// <param name="localX">On return, the X-coordinate relative to the view.</param>
4120 /// <param name="localY">On return, the Y-coordinate relative to the view.</param>
4121 /// <param name="screenX">The screen X-coordinate.</param>
4122 /// <param name="screenY">The screen Y-coordinate.</param>
4123 /// <returns>True if the conversion succeeded.</returns>
4124 /// <since_tizen> 3 </since_tizen>
4125 public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
4127 bool ret = NDalicPINVOKE.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
4128 if (NDalicPINVOKE.SWIGPendingException.Pending)
4129 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4133 internal void SetKeyboardFocusable(bool focusable)
4135 NDalicPINVOKE.Actor_SetKeyboardFocusable(swigCPtr, focusable);
4136 if (NDalicPINVOKE.SWIGPendingException.Pending)
4137 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4140 internal bool IsKeyboardFocusable()
4142 bool ret = NDalicPINVOKE.Actor_IsKeyboardFocusable(swigCPtr);
4143 if (NDalicPINVOKE.SWIGPendingException.Pending)
4144 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4148 internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
4150 NDalicPINVOKE.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
4151 if (NDalicPINVOKE.SWIGPendingException.Pending)
4152 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4155 internal ResizePolicyType GetResizePolicy(DimensionType dimension)
4157 ResizePolicyType ret = (ResizePolicyType)NDalicPINVOKE.Actor_GetResizePolicy(swigCPtr, (int)dimension);
4158 if (NDalicPINVOKE.SWIGPendingException.Pending)
4159 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4164 /// Sets the relative to parent size factor of the view.<br />
4165 /// This factor is only used when ResizePolicy is set to either:
4166 /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br />
4167 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br />
4169 /// <pre>The view has been initialized.</pre>
4170 /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis.</param>
4171 /// <since_tizen> 3 </since_tizen>
4172 public void SetSizeModeFactor(Vector3 factor)
4174 NDalicPINVOKE.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
4175 if (NDalicPINVOKE.SWIGPendingException.Pending)
4176 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4179 internal Vector3 GetSizeModeFactor()
4181 Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetSizeModeFactor(swigCPtr), true);
4182 if (NDalicPINVOKE.SWIGPendingException.Pending)
4183 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4188 /// Calculates the height of the view given a width.<br />
4189 /// The natural size is used for default calculation.<br />
4190 /// Size 0 is treated as aspect ratio 1:1.<br />
4192 /// <param name="width">The width to use.</param>
4193 /// <returns>The height based on the width.</returns>
4194 /// <since_tizen> 3 </since_tizen>
4195 public float GetHeightForWidth(float width)
4197 float ret = NDalicPINVOKE.Actor_GetHeightForWidth(swigCPtr, width);
4198 if (NDalicPINVOKE.SWIGPendingException.Pending)
4199 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4204 /// Calculates the width of the view given a height.<br />
4205 /// The natural size is used for default calculation.<br />
4206 /// Size 0 is treated as aspect ratio 1:1.<br />
4208 /// <param name="height">The height to use.</param>
4209 /// <returns>The width based on the height.</returns>
4210 /// <since_tizen> 3 </since_tizen>
4211 public float GetWidthForHeight(float height)
4213 float ret = NDalicPINVOKE.Actor_GetWidthForHeight(swigCPtr, height);
4214 if (NDalicPINVOKE.SWIGPendingException.Pending)
4215 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4220 /// Return the amount of size allocated for relayout.
4222 /// <param name="dimension">The dimension to retrieve.</param>
4223 /// <returns>Return the size.</returns>
4224 /// <since_tizen> 3 </since_tizen>
4225 public float GetRelayoutSize(DimensionType dimension)
4227 float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
4228 if (NDalicPINVOKE.SWIGPendingException.Pending)
4229 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4234 /// Set the padding for the view.
4236 /// <param name="padding">Padding for the view.</param>
4237 /// <since_tizen> 3 </since_tizen>
4238 public void SetPadding(PaddingType padding)
4240 NDalicPINVOKE.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
4241 if (NDalicPINVOKE.SWIGPendingException.Pending)
4242 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4246 /// Return the value of padding for the view.
4248 /// <param name="paddingOut">the value of padding for the view</param>
4249 /// <since_tizen> 3 </since_tizen>
4250 public void GetPadding(PaddingType paddingOut)
4252 NDalicPINVOKE.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
4253 if (NDalicPINVOKE.SWIGPendingException.Pending)
4254 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4257 internal void SetMinimumSize(Vector2 size)
4259 NDalicPINVOKE.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
4260 if (NDalicPINVOKE.SWIGPendingException.Pending)
4261 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4264 internal Vector2 GetMinimumSize()
4266 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMinimumSize(swigCPtr), true);
4267 if (NDalicPINVOKE.SWIGPendingException.Pending)
4268 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4272 internal void SetMaximumSize(Vector2 size)
4274 NDalicPINVOKE.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
4275 if (NDalicPINVOKE.SWIGPendingException.Pending)
4276 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4279 internal Vector2 GetMaximumSize()
4281 Vector2 ret = new Vector2(NDalicPINVOKE.Actor_GetMaximumSize(swigCPtr), true);
4282 if (NDalicPINVOKE.SWIGPendingException.Pending)
4283 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4287 internal int GetHierarchyDepth()
4289 int ret = NDalicPINVOKE.Actor_GetHierarchyDepth(swigCPtr);
4290 if (NDalicPINVOKE.SWIGPendingException.Pending)
4291 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4295 /// <since_tizen> 3 </since_tizen>
4296 public uint AddRenderer(Renderer renderer)
4298 uint ret = NDalicPINVOKE.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
4299 if (NDalicPINVOKE.SWIGPendingException.Pending)
4300 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4304 internal uint GetRendererCount()
4306 uint ret = NDalicPINVOKE.Actor_GetRendererCount(swigCPtr);
4307 if (NDalicPINVOKE.SWIGPendingException.Pending)
4308 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4312 /// <since_tizen> 3 </since_tizen>
4313 public Renderer GetRendererAt(uint index)
4315 //to fix memory leak issue, match the handle count with native side.
4316 IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
4317 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4318 Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Renderer;
4319 NDalicPINVOKE.delete_BaseHandle(CPtr);
4320 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4322 if (NDalicPINVOKE.SWIGPendingException.Pending)
4323 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4327 /// <since_tizen> 3 </since_tizen>
4328 public void RemoveRenderer(Renderer renderer)
4330 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
4331 if (NDalicPINVOKE.SWIGPendingException.Pending)
4332 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4335 /// <since_tizen> 3 </since_tizen>
4336 public void RemoveRenderer(uint index)
4338 NDalicPINVOKE.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
4339 if (NDalicPINVOKE.SWIGPendingException.Pending)
4340 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4343 internal TouchDataSignal TouchSignal()
4345 TouchDataSignal ret = new TouchDataSignal(NDalicPINVOKE.Actor_TouchSignal(swigCPtr), false);
4346 if (NDalicPINVOKE.SWIGPendingException.Pending)
4347 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4351 internal HoverSignal HoveredSignal()
4353 HoverSignal ret = new HoverSignal(NDalicPINVOKE.Actor_HoveredSignal(swigCPtr), false);
4354 if (NDalicPINVOKE.SWIGPendingException.Pending)
4355 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4359 internal WheelSignal WheelEventSignal()
4361 WheelSignal ret = new WheelSignal(NDalicPINVOKE.Actor_WheelEventSignal(swigCPtr), false);
4362 if (NDalicPINVOKE.SWIGPendingException.Pending)
4363 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4367 internal ViewSignal OnWindowSignal()
4369 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnStageSignal(swigCPtr), false);
4370 if (NDalicPINVOKE.SWIGPendingException.Pending)
4371 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4375 internal ViewSignal OffWindowSignal()
4377 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OffStageSignal(swigCPtr), false);
4378 if (NDalicPINVOKE.SWIGPendingException.Pending)
4379 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4383 internal ViewSignal OnRelayoutSignal()
4385 ViewSignal ret = new ViewSignal(NDalicPINVOKE.Actor_OnRelayoutSignal(swigCPtr), false);
4386 if (NDalicPINVOKE.SWIGPendingException.Pending)
4387 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4391 internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view)
4393 ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
4394 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4399 internal ViewLayoutDirectionChangedSignal LayoutDirectionChangedSignal(View view)
4401 ViewLayoutDirectionChangedSignal ret = new ViewLayoutDirectionChangedSignal(NDalicManualPINVOKE.LayoutDirectionChangedSignal(View.getCPtr(view)), false);
4402 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4407 internal ViewSignal ResourcesLoadedSignal()
4409 ViewSignal ret = new ViewSignal(NDalicPINVOKE.ResourceReadySignal(swigCPtr), false);
4410 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4415 /// Gets or sets the origin of a view within its parent's area.<br />
4416 /// This is expressed in unit coordinates, such that (0.0, 0.0, 0.5) is the top-left corner of the parent, and (1.0, 1.0, 0.5) is the bottom-right corner.<br />
4417 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br />
4418 /// A view's position is the distance between this origin and the view's anchor-point.<br />
4420 /// <pre>The view has been initialized.</pre>
4421 /// <since_tizen> 3 </since_tizen>
4422 public Position ParentOrigin
4426 return (Position)GetValue(ParentOriginProperty);
4430 SetValue(ParentOriginProperty, value);
4431 NotifyPropertyChanged();
4435 internal float ParentOriginX
4440 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
4445 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
4446 NotifyPropertyChanged();
4450 internal float ParentOriginY
4455 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
4460 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
4461 NotifyPropertyChanged();
4465 internal float ParentOriginZ
4470 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
4475 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
4476 NotifyPropertyChanged();
4481 /// Gets or sets the anchor-point of a view.<br />
4482 /// This is expressed in unit coordinates, such that (0.0, 0.0, 0.5) is the top-left corner of the view, and (1.0, 1.0, 0.5) is the bottom-right corner.<br />
4483 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br />
4484 /// A view position is the distance between its parent-origin and this anchor-point.<br />
4485 /// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br />
4486 /// <pre>The view has been initialized.</pre>
4488 /// <since_tizen> 3 </since_tizen>
4489 public Position PivotPoint
4493 return (Position)GetValue(PivotPointProperty);
4497 SetValue(PivotPointProperty, value);
4498 NotifyPropertyChanged();
4502 internal float PivotPointX
4507 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
4512 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
4516 internal float PivotPointY
4521 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
4526 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
4530 internal float PivotPointZ
4535 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
4540 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
4545 /// Gets or sets the size width of the view.
4547 /// <since_tizen> 3 </since_tizen>
4548 public float SizeWidth
4552 return (float)GetValue(SizeWidthProperty);
4556 SetValue(SizeWidthProperty, value);
4557 NotifyPropertyChanged();
4562 /// Gets or sets the size height of the view.
4564 /// <since_tizen> 3 </since_tizen>
4565 public float SizeHeight
4569 return (float)GetValue(SizeHeightProperty);
4573 SetValue(SizeHeightProperty, value);
4574 NotifyPropertyChanged();
4579 /// Gets or sets the position of the view.<br />
4580 /// By default, sets the position vector between the parent origin and pivot point (default).<br />
4581 /// If the position inheritance is disabled, sets the world position.<br />
4583 /// <since_tizen> 3 </since_tizen>
4584 public Position Position
4588 return (Position)GetValue(PositionProperty);
4592 SetValue(PositionProperty, value);
4593 NotifyPropertyChanged();
4598 /// Gets or sets the position X of the view.
4600 /// <since_tizen> 3 </since_tizen>
4601 public float PositionX
4605 return (float)GetValue(PositionXProperty);
4609 SetValue(PositionXProperty, value);
4610 NotifyPropertyChanged();
4615 /// Gets or sets the position Y of the view.
4617 /// <since_tizen> 3 </since_tizen>
4618 public float PositionY
4622 return (float)GetValue(PositionYProperty);
4626 SetValue(PositionYProperty, value);
4627 NotifyPropertyChanged();
4632 /// Gets or sets the position Z of the view.
4634 /// <since_tizen> 3 </since_tizen>
4635 public float PositionZ
4639 return (float)GetValue(PositionZProperty);
4643 SetValue(PositionZProperty, value);
4644 NotifyPropertyChanged();
4649 /// Gets or sets the world position of the view.
4651 /// <since_tizen> 3 </since_tizen>
4652 public Vector3 WorldPosition
4656 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
4657 GetProperty(View.Property.WORLD_POSITION).Get(temp);
4662 internal float WorldPositionX
4667 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
4672 internal float WorldPositionY
4677 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
4682 internal float WorldPositionZ
4687 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
4693 /// Gets or sets the orientation of the view.<br />
4694 /// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br />
4696 /// <remarks>This is an asynchronous method.</remarks>
4697 /// <since_tizen> 3 </since_tizen>
4698 public Rotation Orientation
4702 return (Rotation)GetValue(OrientationProperty);
4706 SetValue(OrientationProperty, value);
4707 NotifyPropertyChanged();
4712 /// Gets or sets the world orientation of the view.<br />
4714 /// <since_tizen> 3 </since_tizen>
4715 public Rotation WorldOrientation
4719 Rotation temp = new Rotation();
4720 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
4726 /// Gets or sets the scale factor applied to the view.<br />
4728 /// <since_tizen> 3 </since_tizen>
4729 public Vector3 Scale
4733 return (Vector3)GetValue(ScaleProperty);
4737 SetValue(ScaleProperty, value);
4738 NotifyPropertyChanged();
4743 /// Gets or sets the scale X factor applied to the view.
4745 /// <since_tizen> 3 </since_tizen>
4750 return (float)GetValue(ScaleXProperty);
4754 SetValue(ScaleXProperty, value);
4755 NotifyPropertyChanged();
4760 /// Gets or sets the scale Y factor applied to the view.
4762 /// <since_tizen> 3 </since_tizen>
4767 return (float)GetValue(ScaleYProperty);
4771 SetValue(ScaleYProperty, value);
4772 NotifyPropertyChanged();
4777 /// Gets or sets the scale Z factor applied to the view.
4779 /// <since_tizen> 3 </since_tizen>
4784 return (float)GetValue(ScaleZProperty);
4788 SetValue(ScaleZProperty, value);
4789 NotifyPropertyChanged();
4794 /// Gets the world scale of the view.
4796 /// <since_tizen> 3 </since_tizen>
4797 public Vector3 WorldScale
4801 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
4802 GetProperty(View.Property.WORLD_SCALE).Get(temp);
4808 /// Retrieves the visibility flag of the view.
4811 /// If the view is not visible, then the view and its children will not be rendered.
4812 /// This is regardless of the individual visibility values of the children, i.e., the view will only be rendered if all of its parents have visibility set to true.
4814 /// <since_tizen> 3 </since_tizen>
4815 public bool Visibility
4820 GetProperty(View.Property.VISIBLE).Get(out temp);
4826 /// Gets the view's world color.
4828 /// <since_tizen> 3 </since_tizen>
4829 public Vector4 WorldColor
4833 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
4834 GetProperty(View.Property.WORLD_COLOR).Get(temp);
4839 internal Matrix WorldMatrix
4843 Matrix temp = new Matrix();
4844 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
4850 /// Gets or sets the view's name.
4852 /// <since_tizen> 3 </since_tizen>
4857 return (string)GetValue(NameProperty);
4861 SetValue(NameProperty, value);
4862 NotifyPropertyChanged();
4867 /// Get the number of children held by the view.
4869 /// <since_tizen> 3 </since_tizen>
4870 public new uint ChildCount
4874 return GetChildCount();
4879 /// Gets the view's ID.
4882 /// <since_tizen> 3 </since_tizen>
4892 /// Gets or sets the status of whether the view should emit touch or hover signals.
4894 /// <since_tizen> 3 </since_tizen>
4895 public bool Sensitive
4899 return (bool)GetValue(SensitiveProperty);
4903 SetValue(SensitiveProperty, value);
4904 NotifyPropertyChanged();
4909 /// Gets or sets the status of whether the view should receive a notification when touch or hover motion events leave the boundary of the view.
4911 /// <since_tizen> 3 </since_tizen>
4912 public bool LeaveRequired
4916 return (bool)GetValue(LeaveRequiredProperty);
4920 SetValue(LeaveRequiredProperty, value);
4921 NotifyPropertyChanged();
4926 /// Gets or sets the status of whether a child view inherits it's parent's orientation.
4928 /// <since_tizen> 3 </since_tizen>
4929 public bool InheritOrientation
4933 return (bool)GetValue(InheritOrientationProperty);
4937 SetValue(InheritOrientationProperty, value);
4938 NotifyPropertyChanged();
4943 /// Gets or sets the status of whether a child view inherits it's parent's scale.
4945 /// <since_tizen> 3 </since_tizen>
4946 public bool InheritScale
4950 return (bool)GetValue(InheritScaleProperty);
4954 SetValue(InheritScaleProperty, value);
4955 NotifyPropertyChanged();
4960 /// Gets or sets the status of how the view and its children should be drawn.<br />
4961 /// Not all views are renderable, but DrawMode can be inherited from any view.<br />
4962 /// If an object is in a 3D layer, it will be depth-tested against other objects in the world, i.e., it may be obscured if other objects are in front.<br />
4963 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br />
4964 /// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.<br />
4965 /// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.<br />
4967 /// <since_tizen> 3 </since_tizen>
4968 public DrawModeType DrawMode
4972 return (DrawModeType)GetValue(DrawModeProperty);
4976 SetValue(DrawModeProperty, value);
4977 NotifyPropertyChanged();
4982 /// Gets or sets the relative to parent size factor of the view.<br />
4983 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br />
4984 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br />
4986 /// <since_tizen> 3 </since_tizen>
4987 public Vector3 SizeModeFactor
4991 return (Vector3)GetValue(SizeModeFactorProperty);
4995 SetValue(SizeModeFactorProperty, value);
4996 NotifyPropertyChanged();
5001 /// Gets or sets the width resize policy to be used.
5003 /// <since_tizen> 3 </since_tizen>
5004 public ResizePolicyType WidthResizePolicy
5008 return (ResizePolicyType)GetValue(WidthResizePolicyProperty);
5012 SetValue(WidthResizePolicyProperty, value);
5013 NotifyPropertyChanged();
5018 /// Gets or sets the height resize policy to be used.
5020 /// <since_tizen> 3 </since_tizen>
5021 public ResizePolicyType HeightResizePolicy
5025 return (ResizePolicyType)GetValue(HeightResizePolicyProperty);
5029 SetValue(HeightResizePolicyProperty, value);
5030 NotifyPropertyChanged();
5035 /// Gets or sets the policy to use when setting size with size negotiation.<br />
5036 /// Defaults to SizeScalePolicyType.UseSizeSet.<br />
5038 /// <since_tizen> 3 </since_tizen>
5039 public SizeScalePolicyType SizeScalePolicy
5043 return (SizeScalePolicyType)GetValue(SizeScalePolicyProperty);
5047 SetValue(SizeScalePolicyProperty, value);
5048 NotifyPropertyChanged();
5053 /// Gets or sets the status of whether the width size is dependent on the height size.
5055 /// <since_tizen> 3 </since_tizen>
5056 public bool WidthForHeight
5060 return (bool)GetValue(WidthForHeightProperty);
5064 SetValue(WidthForHeightProperty, value);
5065 NotifyPropertyChanged();
5070 /// Gets or sets the status of whether the height size is dependent on the width size.
5072 /// <since_tizen> 3 </since_tizen>
5073 public bool HeightForWidth
5077 return (bool)GetValue(HeightForWidthProperty);
5081 SetValue(HeightForWidthProperty, value);
5082 NotifyPropertyChanged();
5087 /// Gets or sets the padding for use in layout.
5089 /// <since_tizen> 5 </since_tizen>
5090 public Extents Padding
5094 return (Extents)GetValue(PaddingProperty);
5098 SetValue(PaddingProperty, value);
5099 NotifyPropertyChanged();
5104 /// Gets or sets the minimum size the view can be assigned in size negotiation.
5106 /// <since_tizen> 3 </since_tizen>
5107 public Size2D MinimumSize
5111 return (Size2D)GetValue(MinimumSizeProperty);
5115 SetValue(MinimumSizeProperty, value);
5116 NotifyPropertyChanged();
5121 /// Gets or sets the maximum size the view can be assigned in size negotiation.
5123 /// <since_tizen> 3 </since_tizen>
5124 public Size2D MaximumSize
5128 return (Size2D)GetValue(MaximumSizeProperty);
5132 SetValue(MaximumSizeProperty, value);
5133 NotifyPropertyChanged();
5138 /// Gets or sets whether a child view inherits it's parent's position.<br />
5139 /// Default is to inherit.<br />
5140 /// Switching this off means that using position sets the view's world position, i.e., translates from the world origin (0,0,0) to the pivot point of the view.<br />
5142 /// <since_tizen> 3 </since_tizen>
5143 public bool InheritPosition
5147 return (bool)GetValue(InheritPositionProperty);
5151 SetValue(InheritPositionProperty, value);
5152 NotifyPropertyChanged();
5157 /// Gets or sets the clipping behavior (mode) of it's children.
5159 /// <since_tizen> 3 </since_tizen>
5160 public ClippingModeType ClippingMode
5164 return (ClippingModeType)GetValue(ClippingModeProperty);
5168 SetValue(ClippingModeProperty, value);
5169 NotifyPropertyChanged();
5174 /// Gets the number of renderers held by the view.
5176 /// <since_tizen> 3 </since_tizen>
5177 public uint RendererCount
5181 return GetRendererCount();
5186 /// [Obsolete("Please do not use! this will be deprecated")]
5188 /// <since_tizen> 3 </since_tizen>
5189 /// Please do not use! this will be deprecated!
5190 /// Instead please use PivotPoint.
5191 [Obsolete("Please do not use! This will be deprecated! Please use PivotPoint instead! " +
5193 "View view = new View(); " +
5194 "view.PivotPoint = PivotPoint.Center; " +
5195 "view.PositionUsesPivotPoint = true;")]
5196 [EditorBrowsable(EditorBrowsableState.Never)]
5197 public Position AnchorPoint
5201 Position temp = new Position(0.0f, 0.0f, 0.0f);
5202 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
5207 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
5208 NotifyPropertyChanged();
5213 /// [Obsolete("Please do not use! this will be deprecated")]
5215 /// <since_tizen> 3 </since_tizen>
5216 [Obsolete("Please do not use! This will be deprecated! Please use Size2D instead! " +
5218 "View view = new View(); " +
5219 "view.Size2D = new Size2D(100, 100);")]
5220 [EditorBrowsable(EditorBrowsableState.Never)]
5225 return (Size)GetValue(SizeProperty);
5229 SetValue(SizeProperty, value);
5230 NotifyPropertyChanged();
5235 /// "Please DO NOT use! This will be deprecated! Please use 'Container GetParent() for derived class' instead!"
5237 /// <since_tizen> 3 </since_tizen>
5238 [Obsolete("Please do not use! This will be deprecated! Please use 'Container GetParent() for derived class' instead! " +
5240 "Container parent = view.GetParent(); " +
5241 "View view = parent as View;")]
5242 [EditorBrowsable(EditorBrowsableState.Never)]
5243 public new View Parent
5248 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
5249 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
5250 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
5252 if (basehandle is Layer layer)
5254 ret = new View(Layer.getCPtr(layer).Handle, false);
5255 NUILog.Error("This Parent property is deprecated, shoud do not be used");
5259 ret = basehandle as View;
5262 NDalicPINVOKE.delete_BaseHandle(CPtr);
5263 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
5265 if (NDalicPINVOKE.SWIGPendingException.Pending)
5266 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5272 /// Gets/Sets whether inherit parent's the layout Direction.
5274 /// <since_tizen> 4 </since_tizen>
5275 public bool InheritLayoutDirection
5279 return (bool)GetValue(InheritLayoutDirectionProperty);
5283 SetValue(InheritLayoutDirectionProperty, value);
5284 NotifyPropertyChanged();
5289 /// Gets/Sets the layout Direction.
5291 /// <since_tizen> 4 </since_tizen>
5292 public ViewLayoutDirectionType LayoutDirection
5296 return (ViewLayoutDirectionType)GetValue(LayoutDirectionProperty);
5300 SetValue(LayoutDirectionProperty, value);
5301 NotifyPropertyChanged();
5306 /// Gets or sets the Margin for use in layout.
5308 /// <since_tizen> 4 </since_tizen>
5309 public Extents Margin
5313 return (Extents)GetValue(MarginProperty);
5317 SetValue(MarginProperty, value);
5318 NotifyPropertyChanged();
5322 internal Style Style
5326 return (Style)GetValue(StyleProperty);
5330 SetValue(StyleProperty, value);
5335 /// [Obsolete("Please do not use! this will be deprecated")]
5337 /// Please do not use! this will be deprecated!
5338 /// Instead please use Padding.
5339 /// <since_tizen> 4 </since_tizen>
5340 [Obsolete("Please do not use! this will be deprecated, instead please use Padding.")]
5341 [EditorBrowsable(EditorBrowsableState.Never)]
5342 public Extents PaddingEX
5346 Extents temp = new Extents(0, 0, 0, 0);
5347 GetProperty(View.Property.PADDING).Get(temp);
5352 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
5353 NotifyPropertyChanged();
5358 /// Perform an action on a visual registered to this view. <br />
5359 /// Visuals will have actions, this API is used to perform one of these actions with the given attributes.
5361 /// <param name="propertyIndexOfVisual">The Property index of the visual.</param>
5362 /// <param name="propertyIndexOfActionId">The action to perform. See Visual to find supported actions.</param>
5363 /// <param name="attributes">Optional attributes for the action.</param>
5364 /// <since_tizen> 5 </since_tizen>
5365 public void DoAction(int propertyIndexOfVisual, int propertyIndexOfActionId, PropertyValue attributes)
5367 NDalicManualPINVOKE.View_DoAction(swigCPtr, propertyIndexOfVisual, propertyIndexOfActionId, PropertyValue.getCPtr(attributes));
5368 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5371 internal readonly MergedStyle _mergedStyle;
5373 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
5374 [EditorBrowsable(EditorBrowsableState.Never)]
5375 public int WidthSpecificationFixed
5380 if (GetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION).Get(out tmp) == false)
5382 NUILog.Error("WidthSpecificationFixed get error!");
5388 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
5392 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
5393 [EditorBrowsable(EditorBrowsableState.Never)]
5394 public int HeightSpecificationFixed
5399 if (GetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION).Get(out tmp) == false)
5401 NUILog.Error("HeightSpecificationFixed get error!");
5407 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value));
5411 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
5412 [EditorBrowsable(EditorBrowsableState.Never)]
5413 public ChildLayoutData WidthSpecification
5418 if (GetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION).Get(out tmp) == false)
5420 NUILog.Error("WidthSpecificationFixed get error!");
5422 return (ChildLayoutData)tmp;
5426 SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue((int)value));
5430 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
5431 [EditorBrowsable(EditorBrowsableState.Never)]
5432 public ChildLayoutData HeightSpecification
5437 if (GetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION).Get(out tmp) == false)
5439 NUILog.Error("HeightSpecificationFixed get error!");
5441 return (ChildLayoutData)tmp;
5445 SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue((int)value));
5456 /// The View layout Direction type.
5458 /// <since_tizen> 4 </since_tizen>
5459 public enum ViewLayoutDirectionType
5464 /// <since_tizen> 4 </since_tizen>
5469 /// <since_tizen> 4 </since_tizen>
5473 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
5474 [EditorBrowsable(EditorBrowsableState.Never)]
5475 public enum ChildLayoutData