Tizen.NUI.PropertyMap background = Background;
int visualType = 0;
- background.Find(Visual.Property.Type).Get(out visualType);
+ background.Find(Visual.Property.Type)?.Get(out visualType);
if (visualType == (int)Visual.Type.Color)
{
- background.Find(ColorVisualProperty.MixColor).Get(backgroundColor);
+ background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
}
return backgroundColor;
Tizen.NUI.PropertyMap background = Background;
int visualType = 0;
- background.Find(Visual.Property.Type).Get(out visualType);
+ background.Find(Visual.Property.Type)?.Get(out visualType);
if (visualType == (int)Visual.Type.Image)
{
- background.Find(ImageVisualProperty.URL).Get(out backgroundImage);
+ background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
}
return backgroundImage;
{
Size temp = new Size(0.0f, 0.0f, 0.0f);
GetProperty(View.Property.SIZE).Get(temp);
- return new Size2D(temp);
+ Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
+ return size;
}
set
{
/// Retrieves the size of the View.<br>
/// The coordinates are relative to the View's parent.<br>
/// </summary>
- public Size CurrentSize
+ public Size2D CurrentSize
{
get
{
/// </summary>
/// <pre>The View has been initialized.</pre>
/// <returns>The number of children</returns>
- public uint GetChildCount()
+ internal uint GetChildCount()
{
uint ret = NDalicPINVOKE.Actor_GetChildCount(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending)
return ret;
}
- internal Size GetCurrentSize()
+ internal Size2D GetCurrentSize()
{
Size ret = new Size(NDalicPINVOKE.Actor_GetCurrentSize(swigCPtr), true);
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
+ Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
+ return size;
}
internal Vector3 GetNaturalSize()
{
SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
}
- }
-
- /// <summary>
- /// Gets/Sets the size of an view.<br>
- /// Geometry can be scaled to fit within this area.<br>
- /// This does not interfere with the views scale factor.<br>
- /// </summary>
- public Size Size
- {
- get
- {
- Size temp = new Size(0.0f, 0.0f, 0.0f);
- GetProperty(View.Property.SIZE).Get(temp);
- return temp;
- }
- set
- {
- SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(value));
- }
}
/// <summary>
}
/// <summary>
+ /// Get the number of children held by the view.
+ /// </summary>
+ public uint ChildCount
+ {
+ get
+ {
+ return GetChildCount();
+ }
+ }
+
+ /// <summary>
/// Gets/Sets the status of whether an view should emit touch or hover signals.
/// </summary>
public bool Sensitive
// Create a text field
_textField = new TextField();
- _textField.PivotPoint = Tizen.NUI.AnchorPoint.Center;
+ _textField.PivotPoint = Tizen.NUI.PivotPoint.Center;
_textField.WidthResizePolicy = ResizePolicyType.SizeRelativeToParent;
_textField.HeightResizePolicy = ResizePolicyType.SizeRelativeToParent;
_textField.SizeModeFactor = new Vector3(1.0f, 0.45f, 1.0f);
/// Return the natural size of the actor.<br>
/// </summary>
/// <returns> Natural size of this Spin itself</returns>
- public override Size GetNaturalSize()
+ public override Size2D GetNaturalSize()
{
- return new Size(150.0f, 150.0f, 0.0f);
+ return new Size2D(150, 150);
}
/// <summary>