+ /// <summary>
+ /// UI control rendering mode (default mode).
+ /// This mode is designed for UI controls that can overlap. In this
+ /// mode renderer order will be respective to the tree hierarchy of
+ /// Actors.<br />
+ /// The rendering order is depth first, so for the following actor tree,
+ /// A will be drawn first, then B, D, E, then C, F. This ensures that
+ /// overlapping actors are drawn as expected (whereas, with breadth first
+ /// traversal, the actors would interleave).<br />
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ LayerUI,
+
+ /// <summary>
+ /// UI control rendering mode.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ Layer2D = LayerUI,
+
+ /// <summary>
+ /// Layer will use depth test.
+ /// This mode is designed for a 3 dimensional scene where actors in front
+ /// of other actors will obscure them, i.e. the actors are sorted by the
+ /// distance from the camera.<br />
+ /// When using this mode, a depth test will be used. A depth clear will
+ /// happen for each layer, which means actors in a layer "above" other
+ /// layers will be rendered in front of actors in those layers regardless
+ /// of their Z positions (see Layer::Raise() and Layer::Lower()).<br />
+ /// Opaque renderers are drawn first and write to the depth buffer. Then
+ /// transparent renderers are drawn with depth test enabled but depth
+ /// write switched off. Transparent renderers are drawn based on their
+ /// distance from the camera. A renderer's DEPTH_INDEX property is used to
+ /// offset the distance to the camera when ordering transparent renderers.
+ /// This is useful if you want to define the draw order of two or more
+ /// transparent renderers that are equal distance from the camera. Unlike
+ /// LAYER_UI, parent-child relationship does not affect rendering order at
+ /// all.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ Layer3D
+ }
+
+ internal enum TreeDepthMultiplier
+ {
+ TREE_DEPTH_MULTIPLIER = 10000
+ }
+
+ /// <summary>
+ /// Layer behavior, type String (Layer.LayerBehavior).
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public Layer.LayerBehavior Behavior
+ {
+ get
+ {
+ return GetBehavior();
+ }
+ set
+ {
+ SetBehavior(value);
+ }
+ }
+
+ /// <summary>
+ /// Sets the viewport (in window coordinates), type rectangle.
+ /// The contents of the layer will not be visible outside this box, when ViewportEnabled is true.
+ /// </summary>
+ /// <since_tizen> 4 </since_tizen>
+ public Rectangle Viewport
+ {
+ get
+ {
+ if (ClippingEnabled)
+ {
+ Rectangle ret = new Rectangle(Interop.Layer.Layer_GetClippingBox(swigCPtr), true);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+ else
+ {
+ // Clipping not enabled so return the window size
+ Size2D windowSize = window?.Size;
+ Rectangle ret = new Rectangle(0, 0, windowSize.Width, windowSize.Height);
+ return ret;
+ }
+ }
+ set
+ {
+ Interop.Layer.Layer_SetClippingBox__SWIG_1(swigCPtr, Rectangle.getCPtr(value));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ ClippingEnabled = true;
+ }
+ }
+
+ /// <summary>
+ /// Retrieves and sets the layer's opacity.<br />
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public float Opacity
+ {
+ get
+ {
+ float temp = 0.0f;
+ GetProperty(View.Property.OPACITY).Get(out temp);
+ return temp;
+ }
+ set
+ {
+ SetProperty(View.Property.OPACITY, new Tizen.NUI.PropertyValue(value));
+ }
+ }
+
+ /// <summary>
+ /// Retrieves and sets the layer's visibility.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public bool Visibility
+ {
+ get
+ {
+ bool temp = false;
+ GetProperty(View.Property.VISIBLE).Get(out temp);
+ return temp;
+ }
+ set
+ {
+ SetProperty(View.Property.VISIBLE, new Tizen.NUI.PropertyValue(value));
+ }
+ }
+
+ /// <summary>
+ /// Get the number of children held by the layer.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public new uint ChildCount
+ {
+ get
+ {
+ return Convert.ToUInt32(Children.Count);
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets the layer's name.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public string Name
+ {
+ get
+ {
+ return GetName();
+ }
+ set
+ {
+ SetName(value);
+ }
+ }
+
+ /// <summary>
+ /// Queries the depth of the layer.<br />
+ /// 0 is the bottommost layer, higher number is on the top.<br />
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public uint Depth
+ {
+ get
+ {
+ return GetDepth();
+ }
+ }
+
+ /// <summary>
+ /// Internal only property to enable or disable clipping, type boolean.
+ /// By default, this is false, i.e., the viewport of the layer is the entire window.
+ /// </summary>
+ internal bool ClippingEnabled
+ {
+ get
+ {
+ bool ret = Interop.Layer.Layer_IsClipping(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+ set
+ {
+ Interop.Layer.Layer_SetClipping(swigCPtr, value);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+
+ /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public ResourceDictionary XamlResources
+ {
+ get
+ {
+ return Application.Current.XamlResources;
+ }
+ set
+ {
+ Application.Current.XamlResources = value;
+ }