private Constraint widthConstraint = null;
private Constraint heightConstraint = null;
- private Size2D internalMaximumSize = null;
- private Size2D internalMinimumSize = null;
- private Extents internalMargin = null;
- private Extents internalPadding = null;
- private Vector3 internalSizeModeFactor = null;
- private Vector2 internalCellIndex = null;
- private Color internalBackgroundColor = null;
- private Color internalColor = null;
- private Position internalPivotPoint = null;
- private Position internalPosition = null;
- private Position2D internalPosition2D = null;
- private Vector3 internalScale = null;
- private Size internalSize = null;
private Size2D internalSize2D = null;
static View()
/// </summary>
/// <remarks>
/// <para>
- /// The property cascade chaining set is not recommended.
+ /// The property cascade chaining set is possible. For example, this (view.BackgroundColor.X = 0.1f;) is possible.
/// </para>
/// <para>
/// Animatable - This property can be animated using <c>Animation</c> class.
/// </code>
/// </para>
/// </remarks>
- /// <example>
- /// This way is recommended for setting the property
- /// <code>
- /// var view = new View();
- /// view.BackgroundColor = new Color(0.5f, 0.1f, 0, 1);
- /// </code>
- /// This way to set the property is prohibited
- /// <code>
- /// view.BackgroundColor.R = 0.5f; //This does not guarantee a proper operation
- /// </code>
- /// </example>
/// <since_tizen> 3 </since_tizen>
public Color BackgroundColor
{
get
{
- return (Color)GetValue(BackgroundColorProperty);
+ Color temp = (Color)GetValue(BackgroundColorProperty);
+ return new Color(OnBackgroundColorChanged, temp.R, temp.G, temp.B, temp.A);
}
set
{
/// The top-left cell this child occupies, if not set, the first available cell is used.
/// </summary>
/// <remarks>
- /// The property cascade chaining set is not recommended.
+ /// The property cascade chaining set is possible. For example, this (view.CellIndex.X = 0.1f;) is possible.
/// Also, this property is for <see cref="TableView"/> class. Please use the property for the child position of <see cref="TableView"/>.
/// </remarks>
- /// <example>
- /// This way is recommended for setting the property
- /// <code>
- /// var view = new View();
- /// view.CellIndex = new Vector2(1, 3);
- /// </code>
- /// This way to set the property is prohibited
- /// <code>
- /// view.CellIndex.X = 1; //This does not guarantee a proper operation
- /// </code>
- /// </example>
/// <since_tizen> 3 </since_tizen>
public Vector2 CellIndex
{
get
{
- return (Vector2)GetValue(CellIndexProperty);
+ Vector2 temp = (Vector2)GetValue(CellIndexProperty);
+ return new Vector2(OnCellIndexChanged, temp.X, temp.Y);
}
set
{
/// The views default depth is the minimum of width and height.<br />
/// </summary>
/// <remarks>
- /// The property cascade chaining set is not recommended.
+ /// This NUI object (Size2D) typed property can be configured by multiple cascade setting. <br />
+ /// For example, this code ( view.Size2D.Width = 100; view.Size2D.Height = 100; ) is equivalent to this ( view.Size2D = new Size2D(100, 100); ). <br />
/// </remarks>
- /// <example>
- /// This way is recommended for setting the property
- /// <code>
- /// var view = new View();
- /// view.Size2D = new Size2D(100, 200);
- /// </code>
- /// This way to set the property is prohibited
- /// <code>
- /// view.Size2D.Width = 100; //This does not guarantee a proper operation
- /// </code>
- /// </example>
/// <since_tizen> 3 </since_tizen>
public Size2D Size2D
{
/// If the position inheritance is disabled, sets the world position.<br />
/// </summary>
/// <remarks>
- /// The property cascade chaining set is not recommended.
- ///</remarks>
- /// <example>
- /// This way is recommended for setting the property
- /// <code>
- /// var view = new View();
- /// view.Position2D = new Position2D(100, 200);
- /// </code>
- /// This way to set the property is prohibited
- /// <code>
- /// view.Position2D.X = 100; //This does not guarantee a proper operation
- /// </code>
- /// </example>
+ /// This NUI object (Position2D) typed property can be configured by multiple cascade setting. <br />
+ /// For example, this code ( view.Position2D.X = 100; view.Position2D.Y = 100; ) is equivalent to this ( view.Position2D = new Position2D(100, 100); ). <br />
+ /// </remarks>
/// <since_tizen> 3 </since_tizen>
public Position2D Position2D
{
get
{
- return (Position2D)GetValue(Position2DProperty);
+ Position2D temp = (Position2D)GetValue(Position2DProperty);
+ return new Position2D(OnPosition2DChanged, temp.X, temp.Y);
}
set
{
/// <pre>The view has been initialized.</pre>
/// </summary>
/// <remarks>
- /// The property cascade chaining set is not recommended.
- ///</remarks>
- /// <example>
- /// This way is recommended for setting the property
- /// <code>
- /// var view = new View();
- /// view.PivotPoint = PivotPoint.Center;
- /// </code>
- /// This way to set the property is prohibited
- /// <code>
- /// view.PivotPoint.X = 0.5f; //This does not guarantee a proper operation
- /// </code>
- /// </example>
+ /// The property cascade chaining set is possible. For example, this (view.PivotPoint.X = 0.1f;) is possible.
+ /// </remarks>
/// <since_tizen> 3 </since_tizen>
public Position PivotPoint
{
get
{
- return (Position)GetValue(PivotPointProperty);
+ Position tmp = (Position)GetValue(PivotPointProperty);
+ return new Position(OnPivotPointChanged, tmp.X, tmp.Y, tmp.Z);
}
set
{
/// animation.AnimateTo(view, "Position", new Position(50, 0));
/// </code>
/// </para>
- /// The property cascade chaining set is not recommended.
+ /// The property cascade chaining set is possible. For example, this (view.Position.X = 1.0f;) is possible.
/// </remarks>
- /// <example>
- /// This way is recommended for setting the property
- /// <code>
- /// var view = new View();
- /// view.Position = new Position(100, 200.5f, 0);
- /// </code>
- /// This way to set the property is prohibited
- /// <code>
- /// view.Position.Y = 200.5f; //This does not guarantee a proper operation
- /// </code>
- /// </example>
/// <since_tizen> 3 </since_tizen>
public Position Position
{
get
{
- return (Position)GetValue(PositionProperty);
+ Position tmp = (Position)GetValue(PositionProperty);
+ return new Position(OnPositionChanged, tmp.X, tmp.Y, tmp.Z);
}
set
{
/// animation.AnimateTo(view, "Scale", new Vector3(1.5f, 1.5f, 1.0f));
/// </code>
/// </para>
- /// The property cascade chaining set is not recommended.
+ /// The property cascade chaining set is possible. For example, this (view.Scale.X = 0.1f;) is possible.
/// </remarks>
- /// <example>
- /// This way is recommended for setting the property
- /// <code>
- /// var view = new View();
- /// view.Scale = new Vector3(1.5f, 2.0f, 1.0f);
- /// </code>
- /// This way to set the property is prohibited
- /// <code>
- /// view.Scale.Width = 1.5f; //This does not guarantee a proper operation
- /// </code>
- /// </example>
/// <since_tizen> 3 </since_tizen>
public Vector3 Scale
{
get
{
- return (Vector3)GetValue(ScaleProperty);
+ Vector3 temp = (Vector3)GetValue(ScaleProperty);
+ return new Vector3(OnScaleChanged, temp.X, temp.Y, temp.Z);
}
set
{
/// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br />
/// </summary>
/// <remarks>
- /// The property cascade chaining set is not recommended.
+ /// The property cascade chaining set is possible. For example, this (view.DecorationBoundingBox.X = 0.1f;) is possible.
/// </remarks>
- /// <example>
- /// This way is recommended for setting the property
- /// <code>
- /// var text = new TextField();
- /// text.SizeModeFactor = new Vector3(1.0f, 0.45f, 1.0f);
- /// </code>
- /// This way to set the property is prohibited
- /// <code>
- /// text.SizeModeFactor.Width = 1.0f; //This does not guarantee a proper operation
- /// </code>
- /// </example>
/// <since_tizen> 3 </since_tizen>
public Vector3 SizeModeFactor
{
get
{
- return (Vector3)GetValue(SizeModeFactorProperty);
+ Vector3 temp = (Vector3)GetValue(SizeModeFactorProperty);
+ return new Vector3(OnSizeModeFactorChanged, temp.X, temp.Y, temp.Z);
}
set
{
/// Gets or sets the padding for use in layout.
/// </summary>
/// <remarks>
- /// The property cascade chaining set is not recommended.
+ /// The property cascade chaining set is possible. For example, this (view.Padding.X = 0.1f;) is possible.
/// </remarks>
- /// <example>
- /// This way is recommended for setting the property
- /// <code>
- /// var view = new View();
- /// view.Padding = new Extents(5, 5, 5, 5);
- /// </code>
- /// This way to set the property is prohibited
- /// <code>
- /// view.Padding.Start = 5; //This does not guarantee a proper operation
- /// </code>
- /// </example>
/// <since_tizen> 5 </since_tizen>
public Extents Padding
{
}
else
{
- return (Extents)GetValue(PaddingProperty);
+ Extents temp = (Extents)GetValue(PaddingProperty);
+ return new Extents(OnPaddingChanged, temp.Start, temp.End, temp.Top, temp.Bottom);
}
// Two return points to prevent creating a zeroed Extent native object before assignment
}
/// </summary>
/// <exception cref="ArgumentNullException"> Thrown when value is null. </exception>
/// <remarks>
- /// The property cascade chaining set is not recommended.
+ /// The property cascade chaining set is possible. For example, this (view.MinimumSize.Width = 1;) is possible.
/// </remarks>
- /// <example>
- /// This way is recommended for setting the property
- /// <code>
- /// var view = new View();
- /// view.MinimumSize = new Size2D(100, 200);
- /// </code>
- /// This way to set the property is prohibited
- /// <code>
- /// view.MinimumSize.Width = 100; //This does not guarantee a proper operation
- /// </code>
- /// </example>
/// <since_tizen> 3 </since_tizen>
public Size2D MinimumSize
{
get
{
- return (Size2D)GetValue(MinimumSizeProperty);
+ Size2D tmp = (Size2D)GetValue(MinimumSizeProperty);
+ return new Size2D(OnMinimumSizeChanged, tmp.Width, tmp.Height);
}
set
{
/// <summary>
/// Gets or sets the maximum size the view can be assigned in size negotiation.
/// </summary>
- /// <example>
- /// This way is recommended for setting the property
- /// <code>
- /// var view = new View();
- /// view.MaximumSize = new Size2D(100, 200);
- /// </code>
- /// This way to set the property is prohibited
- /// <code>
- /// view.MaximumSize.Height = 200; //This does not guarantee a proper operation
- /// </code>
- /// </example>
+ /// <remarks>
+ /// The property cascade chaining set is possible. For example, this (view.MaximumSize.Width = 1;) is possible.
+ /// </remarks>
/// <since_tizen> 3 </since_tizen>
public Size2D MaximumSize
{
get
{
- return (Size2D)GetValue(MaximumSizeProperty);
+ Size2D tmp = (Size2D)GetValue(MaximumSizeProperty);
+ return new Size2D(OnMaximumSizeChanged, tmp.Width, tmp.Height);
}
set
{
/// animation.AnimateTo(view, "Size", new Size(100, 100));
/// </code>
/// </para>
- /// The property cascade chaining set is not recommended.
+ /// The property cascade chaining set is possible. For example, this (view.Size.Width = 1.0f;) is possible.
/// </remarks>
- /// <example>
- /// This way is recommended for setting the property
- /// <code>
- /// var view = new View();
- /// view.Size = new Size(100.5f, 200, 0);
- /// </code>
- /// This way to set the property is prohibited
- /// <code>
- /// view.Size.Width = 100.5f; //This does not guarantee a proper operation
- /// </code>
- /// </example>
/// <since_tizen> 5 </since_tizen>
public Size Size
{
get
{
- return (Size)GetValue(SizeProperty);
+ Size tmp = (Size)GetValue(SizeProperty);
+ return new Size(OnSizeChanged, tmp.Width, tmp.Height, tmp.Depth);
}
set
{
/// <remarks>
/// Margin property is supported by Layout algorithms and containers.
/// Please Set Layout if you want to use Margin property.
- /// The property cascade chaining set is not recommended.
+ /// The property cascade chaining set is possible. For example, this (view.Margin.X = 0.1f;) is possible.
/// </remarks>
- /// <example>
- /// This way is recommended for setting the property
- /// <code>
- /// var view = new View();
- /// view.Margin = new Extents(10, 5, 15, 20);
- /// </code>
- /// This way to set the property is prohibited
- /// <code>
- /// view.Margin.Top = 15; //This does not guarantee a proper operation
- /// </code>
- /// </example>
/// <since_tizen> 4 </since_tizen>
public Extents Margin
{
else
{
// If Layout not set then return margin stored in View.
- return (Extents)GetValue(MarginProperty);
+ Extents temp = (Extents)GetValue(MarginProperty);
+ return new Extents(OnMarginChanged, temp.Start, temp.End, temp.Top, temp.Bottom);
}
// Two return points to prevent creating a zeroed Extent native object before assignment
}
/// <para>
/// Animatable - This property can be animated using <c>Animation</c> class.
/// </para>
- /// The property cascade chaining set is not recommended.
+ /// The property cascade chaining set is possible. For example, this (view.Color.X = 0.1f;) is possible.
/// </remarks>
- /// <example>
- /// This way is recommended for setting the property
- /// <code>
- /// var view = new View();
- /// view.Color = new Color(0.5f, 0.2f, 0.1f, 0.5f);
- /// </code>
- /// This way to set the property is prohibited
- /// <code>
- /// view.Color.A = 0.5f; //This does not guarantee a proper operation
- /// </code>
- /// </example>
+ /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
public Color Color
{
get
{
- return (Color)GetValue(ColorProperty);
+ Color temp = (Color)GetValue(ColorProperty);
+ return new Color(OnColorChanged, temp.R, temp.G, temp.B, temp.A);
}
set
{
*
*/
-using global::System;
using System.ComponentModel;
using Tizen.NUI.Binding;
/// BackgroundColorProperty
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty BackgroundColorProperty = BindableProperty.Create(nameof(BackgroundColor), typeof(Color), typeof(View), null,
- propertyChanged: (bindable, oldValue, newValue) =>
- {
- var view = (View)bindable;
+ public static readonly BindableProperty BackgroundColorProperty = BindableProperty.Create(nameof(BackgroundColor), typeof(Color), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
- view.themeData?.selectorData?.ClearBackground(view);
+ view.themeData?.selectorData?.ClearBackground(view);
- if (newValue is Selector<Color> selector)
- {
- if (selector.HasAll()) view.SetBackgroundColor(selector.All);
- else view.EnsureSelectorData().BackgroundColor = new TriggerableSelector<Color>(view, selector, view.SetBackgroundColor, true);
- }
- else
- {
- view.SetBackgroundColor((Color)newValue);
- }
- },
- defaultValueCreator: (bindable) =>
+ if (newValue is Selector<Color> selector)
{
- var view = (View)bindable;
-
- if (view.internalBackgroundColor == null)
- {
- view.internalBackgroundColor = new Color(view.OnBackgroundColorChanged, 0, 0, 0, 0);
- }
-
- PropertyMap background = view.Background;
- int visualType = 0;
- background.Find(Visual.Property.Type)?.Get(out visualType);
- if (visualType == (int)Visual.Type.Color)
- {
- background.Find(ColorVisualProperty.MixColor)?.Get(view.internalBackgroundColor);
- }
-
- background?.Dispose();
- background = null;
+ if (selector.HasAll()) view.SetBackgroundColor(selector.All);
+ else view.EnsureSelectorData().BackgroundColor = new TriggerableSelector<Color>(view, selector, view.SetBackgroundColor, true);
+ }
+ else
+ {
+ view.SetBackgroundColor((Color)newValue);
+ }
+ }),
+ defaultValueCreator: (bindable) =>
+ {
+ var view = (View)bindable;
+ Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
- return view.internalBackgroundColor;
+ Tizen.NUI.PropertyMap background = view.Background;
+ int visualType = 0;
+ background.Find(Visual.Property.Type)?.Get(out visualType);
+ if (visualType == (int)Visual.Type.Color)
+ {
+ background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
}
- );
+
+ return backgroundColor;
+ });
/// <summary>
/// ColorProperty
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty ColorProperty = BindableProperty.Create(nameof(Color), typeof(Color), typeof(View), null,
- propertyChanged: (bindable, oldValue, newValue) =>
- {
- var view = (View)bindable;
+ public static readonly BindableProperty ColorProperty = BindableProperty.Create(nameof(Color), typeof(Color), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
- view.themeData?.selectorData?.Color?.Reset(view);
+ view.themeData?.selectorData?.Color?.Reset(view);
- if (newValue is Selector<Color> selector)
- {
- if (selector.HasAll()) view.SetColor(selector.All);
- else view.EnsureSelectorData().Color = new TriggerableSelector<Color>(view, selector, view.SetColor, true);
- }
- else
- {
- view.SetColor((Color)newValue);
- }
- },
- defaultValueCreator: (bindable) =>
+ if (newValue is Selector<Color> selector)
{
- var view = (View)bindable;
- var tmpProperty = view.GetProperty(Interop.ActorProperty.ColorGet());
-
- if (view.internalColor == null)
- {
- view.internalColor = new Color(view.OnColorChanged, 0, 0, 0, 0);
- }
-
- tmpProperty?.Get(view.internalColor);
- tmpProperty?.Dispose();
-
- return view.internalColor;
+ if (selector.HasAll()) view.SetColor(selector.All);
+ else view.EnsureSelectorData().Color = new TriggerableSelector<Color>(view, selector, view.SetColor, true);
}
- );
-
+ else
+ {
+ view.SetColor((Color)newValue);
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var view = (View)bindable;
+ Color color = new Color(0.0f, 0.0f, 0.0f, 0.0f);
+ view.GetProperty(Interop.ActorProperty.ColorGet()).Get(color);
+ return color;
+ });
/// <summary> BackgroundImageProperty </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty BackgroundImageProperty = BindableProperty.Create(nameof(BackgroundImage), typeof(string), typeof(View), default(string),
- propertyChanged: (bindable, oldValue, newValue) =>
- {
- var view = (View)bindable;
-
- if (view.themeData?.selectorData != null)
- {
- view.themeData.selectorData.BackgroundColor?.Reset(view);
- view.themeData.selectorData.BackgroundImage?.Reset(view);
- }
+ public static readonly BindableProperty BackgroundImageProperty = BindableProperty.Create(nameof(BackgroundImage), typeof(string), typeof(View), default(string), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
- if (newValue is Selector<string> selector)
- {
- if (selector.HasAll()) view.SetBackgroundImage(selector.All);
- else view.EnsureSelectorData().BackgroundImage = new TriggerableSelector<string>(view, selector, view.SetBackgroundImage, true);
- }
- else
- {
- view.SetBackgroundImage((string)newValue);
- }
- },
- defaultValueCreator: (bindable) =>
+ if (view.themeData?.selectorData != null)
{
- var view = (View)bindable;
- string backgroundImage = "";
-
- PropertyMap background = view.Background;
- background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
-
- background?.Dispose();
- background = null;
+ view.themeData.selectorData.BackgroundColor?.Reset(view);
+ view.themeData.selectorData.BackgroundImage?.Reset(view);
+ }
- return backgroundImage;
+ if (newValue is Selector<string> selector)
+ {
+ if (selector.HasAll()) view.SetBackgroundImage(selector.All);
+ else view.EnsureSelectorData().BackgroundImage = new TriggerableSelector<string>(view, selector, view.SetBackgroundImage, true);
}
- );
+ else
+ {
+ view.SetBackgroundImage((string)newValue);
+ }
+ }),
+ defaultValueCreator: (bindable) =>
+ {
+ var view = (View)bindable;
+ string backgroundImage = "";
+ Tizen.NUI.PropertyMap background = view.Background;
+ background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
+ return backgroundImage;
+ });
/// <summary>BackgroundImageBorderProperty</summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public static readonly BindableProperty BackgroundImageBorderProperty = BindableProperty.Create(nameof(BackgroundImageBorder), typeof(Rectangle), typeof(View), default(Rectangle), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
return view.backgroundExtraData?.BackgroundImageBorder;
});
-
/// <summary>
/// BackgroundProperty
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty BackgroundProperty = BindableProperty.Create(nameof(Background), typeof(PropertyMap), typeof(View), null,
- propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty BackgroundProperty = BindableProperty.Create(nameof(Background), typeof(PropertyMap), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
+ if (newValue != null)
{
- var view = (View)bindable;
- if (newValue != null)
- {
- var propertyValue = new PropertyValue((PropertyMap)newValue);
- Object.SetProperty(view.SwigCPtr, Property.BACKGROUND, propertyValue);
-
- view.backgroundExtraData = null;
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
- propertyValue.Dispose();
- propertyValue = null;
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var view = (View)bindable;
- PropertyMap tmp = new PropertyMap();
- var propertyValue = Object.GetProperty(view.SwigCPtr, Property.BACKGROUND);
- propertyValue.Get(tmp);
- propertyValue.Dispose();
- propertyValue = null;
- return tmp;
+ view.backgroundExtraData = null;
}
- );
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ var view = (View)bindable;
+ Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.BACKGROUND).Get(temp);
+ return temp;
+ }));
/// <summary>
/// StateProperty
/// CellIndexProperty
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty CellIndexProperty = BindableProperty.Create(nameof(CellIndex), typeof(Vector2), typeof(View), null,
- propertyChanged: (bindable, oldValue, newValue) =>
- {
- var view = (View)bindable;
- if (newValue != null)
- {
- var tmp = new PropertyValue((Vector2)newValue);
- Object.SetProperty(view.SwigCPtr, TableView.ChildProperty.CellIndex, tmp);
- tmp.Dispose();
- }
- },
- defaultValueCreator: (bindable) =>
+ public static readonly BindableProperty CellIndexProperty = BindableProperty.Create(nameof(CellIndex), typeof(Vector2), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
+ if (newValue != null)
{
- var view = (View)bindable;
- if (view.internalCellIndex == null)
- {
- view.internalCellIndex = new Vector2(view.OnCellIndexChanged, 0, 0);
- }
-
- var tmp = Object.GetProperty(view.SwigCPtr, TableView.ChildProperty.CellIndex);
- tmp?.Get(view.internalCellIndex);
- tmp?.Dispose();
-
- return view.internalCellIndex;
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, TableView.ChildProperty.CellIndex, new Tizen.NUI.PropertyValue((Vector2)newValue));
}
- );
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ var view = (View)bindable;
+ Vector2 temp = new Vector2(0.0f, 0.0f);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, TableView.ChildProperty.CellIndex).Get(temp);
+ return temp;
+ }));
/// <summary>
/// RowSpanProperty
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public static readonly BindableProperty Size2DProperty = BindableProperty.Create(nameof(Size2D), typeof(Size2D), typeof(View), null,
- propertyChanged: (bindable, oldValue, newValue) =>
+ propertyChanged: ((bindable, oldValue, newValue) =>
{
- var view = (View)bindable;
+ View view = (View)bindable;
if (newValue != null)
{
view.SetSize(((Size2D)newValue).Width, ((Size2D)newValue).Height, 0);
view.layout?.RequestLayout();
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: ((bindable) =>
{
- var view = (View)bindable;
+ View view = (View)bindable;
var tmp = new Size(0, 0, 0);
- var tmpProperty = Object.GetProperty(view.SwigCPtr, Property.SIZE);
- tmpProperty?.Get(tmp);
+ Object.GetProperty(view.SwigCPtr, Property.SIZE).Get(tmp);
+
+ int tmpWidth = (int)tmp?.Width;
+ int tmpHeight = (int)tmp?.Height;
+ tmp?.Dispose();
+ tmp = null;
if (view.internalSize2D == null)
{
- view.internalSize2D = new Size2D(view.OnSize2DChanged, (int)tmp?.Width, (int)tmp?.Height);
+ view.internalSize2D = new Size2D(view.OnSize2DChanged, tmpWidth, tmpHeight);
}
else
{
- if (view.internalSize2D.SwigCPtr.Handle != global::System.IntPtr.Zero)
- {
- Interop.Vector2.WidthSet(view.internalSize2D.SwigCPtr, (float)tmp?.Width);
- Interop.Vector2.HeightSet(view.internalSize2D.SwigCPtr, (float)tmp?.Height);
- }
+ if (view.internalSize2D.Width != tmpWidth) { view.internalSize2D.Width = tmpWidth; }
+ if (view.internalSize2D.Height != tmpHeight) { view.internalSize2D.Height = tmpHeight; }
}
-
- tmpProperty?.Dispose();
- tmp?.Dispose();
-
return view.internalSize2D;
- }
+ })
);
/// <summary>
/// Position2DProperty
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty Position2DProperty = BindableProperty.Create(nameof(Position2D), typeof(Position2D), typeof(View), null,
- propertyChanged: (bindable, oldValue, newValue) =>
- {
- var view = (View)bindable;
- if (newValue != null)
- {
- view.SetPosition(((Position2D)newValue).X, ((Position2D)newValue).Y, 0);
- }
- },
- defaultValueCreator: (bindable) =>
+ public static readonly BindableProperty Position2DProperty = BindableProperty.Create(nameof(Position2D), typeof(Position2D), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
+ if (newValue != null)
{
- var view = (View)bindable;
- var tmp = new Position(0, 0, 0);
- var tmpProperty = Object.GetProperty(view.SwigCPtr, Property.POSITION);
- tmpProperty?.Get(tmp);
-
- if (view.internalPosition2D == null)
- {
- view.internalPosition2D = new Position2D(view.OnPosition2DChanged, (int)tmp?.X, (int)tmp?.Y);
- }
- else
- {
- if (view.internalPosition2D.SwigCPtr.Handle != IntPtr.Zero)
- {
- Interop.Vector2.XSet(view.internalPosition2D.SwigCPtr, (float)tmp?.X);
- Interop.Vector2.YSet(view.internalPosition2D.SwigCPtr, (float)tmp?.Y);
- }
- }
-
- tmpProperty?.Dispose();
- tmp?.Dispose();
-
- return view.internalPosition2D;
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position((Position2D)newValue)));
}
- );
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ var view = (View)bindable;
+ Position temp = new Position(0.0f, 0.0f, 0.0f);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.POSITION).Get(temp);
+ return new Position2D(temp);
+ }));
/// <summary>
/// PositionUsesPivotPointProperty
/// PivotPointProperty
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty PivotPointProperty = BindableProperty.Create(nameof(PivotPoint), typeof(Position), typeof(View), null,
- propertyChanged: (bindable, oldValue, newValue) =>
- {
- var view = (View)bindable;
- if (newValue != null)
- {
- view.SetAnchorPoint((Position)newValue);
- }
- },
- defaultValueCreator: (bindable) =>
+ public static readonly BindableProperty PivotPointProperty = BindableProperty.Create(nameof(PivotPoint), typeof(Position), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
+ if (newValue != null)
{
- var view = (View)bindable;
- if (view.internalPivotPoint == null)
- {
- view.internalPivotPoint = new Position(view.OnPivotPointChanged, 0, 0, 0);
- }
- var tmp = Object.GetProperty(view.SwigCPtr, Property.AnchorPoint);
- tmp?.Get(view.internalPivotPoint);
- tmp?.Dispose();
-
- return view.internalPivotPoint;
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AnchorPoint, new Tizen.NUI.PropertyValue((Position)newValue));
}
- );
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ var view = (View)bindable;
+ Position temp = new Position(0.0f, 0.0f, 0.0f);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AnchorPoint).Get(temp);
+ return temp;
+ }));
/// <summary>
/// SizeWidthProperty
/// PositionProperty
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty PositionProperty = BindableProperty.Create(nameof(Position), typeof(Position), typeof(View), null,
- propertyChanged: (bindable, oldValue, newValue) =>
- {
- var view = (View)bindable;
- if (newValue != null)
- {
- view.SetPosition(((Position)newValue).X, ((Position)newValue).Y, ((Position)newValue).Z);
- }
- },
- defaultValueCreator: (bindable) =>
+ public static readonly BindableProperty PositionProperty = BindableProperty.Create(nameof(Position), typeof(Position), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
+ if (newValue != null)
{
- var view = (View)bindable;
- var tmpProperty = Object.GetProperty(view.SwigCPtr, Property.POSITION);
-
- if (view.internalPosition == null)
- {
- view.internalPosition = new Position(view.OnPositionChanged, 0, 0, 0);
- }
- tmpProperty?.Get(view.internalPosition);
- tmpProperty?.Dispose();
-
- return view.internalPosition;
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue((Position)newValue));
}
- );
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ var view = (View)bindable;
+ Position temp = new Position(0.0f, 0.0f, 0.0f);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.POSITION).Get(temp);
+ return temp;
+ }));
/// <summary>
/// PositionXProperty
/// ScaleProperty
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty ScaleProperty = BindableProperty.Create(nameof(Scale), typeof(Vector3), typeof(View), null,
- propertyChanged: (bindable, oldValue, newValue) =>
- {
- var view = (View)bindable;
- if (newValue != null)
- {
- view.SetScale((Vector3)newValue);
- }
- },
- defaultValueCreator: (bindable) =>
+ public static readonly BindableProperty ScaleProperty = BindableProperty.Create(nameof(Scale), typeof(Vector3), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
+ if (newValue != null)
{
- var view = (View)bindable;
- if (view.internalScale == null)
- {
- view.internalScale = new Vector3(view.OnScaleChanged, 0, 0, 0);
- }
-
- var tmpPropery = Object.GetProperty(view.SwigCPtr, Property.SCALE);
- tmpPropery?.Get(view.internalScale);
- tmpPropery?.Dispose();
-
- return view.internalScale;
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SCALE, new Tizen.NUI.PropertyValue((Vector3)newValue));
}
- );
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ var view = (View)bindable;
+ Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SCALE).Get(temp);
+ return temp;
+ }));
/// <summary>
/// ScaleXProperty
/// NameProperty
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty NameProperty = BindableProperty.Create(nameof(Name), typeof(string), typeof(View), string.Empty,
- propertyChanged: (bindable, oldValue, newValue) =>
- {
- var view = (View)bindable;
- if (newValue != null)
- {
- view.SetName((string)newValue);
- }
- },
- defaultValueCreator: (bindable) =>
+ public static readonly BindableProperty NameProperty = BindableProperty.Create(nameof(Name), typeof(string), typeof(View), string.Empty, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
+ if (newValue != null)
{
- var view = (View)bindable;
- string temp;
- temp = view.GetName();
- return temp;
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.NAME, new Tizen.NUI.PropertyValue((string)newValue));
}
- );
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ var view = (View)bindable;
+ string temp;
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.NAME).Get(out temp);
+ return temp;
+ }));
/// <summary>
/// SensitiveProperty
/// SizeModeFactorProperty
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty SizeModeFactorProperty = BindableProperty.Create(nameof(SizeModeFactor), typeof(Vector3), typeof(View), null,
- propertyChanged: (bindable, oldValue, newValue) =>
- {
- var view = (View)bindable;
- if (newValue != null)
- {
- var tmp = new PropertyValue((Vector3)newValue);
- Object.SetProperty(view.SwigCPtr, Property.SizeModeFactor, tmp);
- tmp?.Dispose();
- }
- },
- defaultValueCreator: (bindable) =>
+ public static readonly BindableProperty SizeModeFactorProperty = BindableProperty.Create(nameof(SizeModeFactor), typeof(Vector3), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
+ if (newValue != null)
{
- var view = (View)bindable;
- if (view.internalSizeModeFactor == null)
- {
- view.internalSizeModeFactor = new Vector3(view.OnSizeModeFactorChanged, 0, 0, 0);
- }
- var tmp = Object.GetProperty(view.SwigCPtr, Property.SizeModeFactor);
- tmp?.Get(view.internalSizeModeFactor);
- tmp?.Dispose();
-
- return view.internalSizeModeFactor;
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeModeFactor, new Tizen.NUI.PropertyValue((Vector3)newValue));
}
- );
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ var view = (View)bindable;
+ Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeModeFactor).Get(temp);
+ return temp;
+ }));
/// <summary>
/// WidthResizePolicyProperty
/// PaddingProperty
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty PaddingProperty = BindableProperty.Create(nameof(Padding), typeof(Extents), typeof(View), null,
- propertyChanged: (bindable, oldValue, newValue) =>
- {
- var view = (View)bindable;
- if (newValue != null)
- {
- var tmp = new PropertyValue((Extents)newValue);
- Object.SetProperty(view.SwigCPtr, View.Property.PADDING, tmp);
- tmp?.Dispose();
- }
- },
- defaultValueCreator: (bindable) =>
+ public static readonly BindableProperty PaddingProperty = BindableProperty.Create(nameof(Padding), typeof(Extents), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
+ if (newValue != null)
{
- var view = (View)bindable;
- if (view.internalPadding == null)
- {
- view.internalPadding = new Extents(view.OnPaddingChanged, 0, 0, 0, 0);
- }
-
- var tmp = Object.GetProperty(view.SwigCPtr, Property.PADDING);
- tmp?.Get(view.internalPadding);
- tmp?.Dispose();
-
- return view.internalPadding;
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.PADDING, new Tizen.NUI.PropertyValue((Extents)newValue));
}
- );
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ var view = (View)bindable;
+ Extents temp = new Extents(0, 0, 0, 0);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.PADDING).Get(temp);
+ return temp;
+ }));
/// <summary>
/// SizeProperty
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty SizeProperty = BindableProperty.Create(nameof(Size), typeof(Size), typeof(View), null,
- propertyChanged: (bindable, oldValue, newValue) =>
- {
- var view = (View)bindable;
- if (newValue != null)
- {
- // Set Specification so when layouts measure this View it matches the value set here.
- // All Views are currently Layouts.
- view.WidthSpecification = (int)System.Math.Ceiling(((Size)newValue).Width);
- view.HeightSpecification = (int)System.Math.Ceiling(((Size)newValue).Height);
-
- view.SetSize(((Size)newValue).Width, ((Size)newValue).Height, ((Size)newValue).Depth);
- }
- },
- defaultValueCreator: (bindable) =>
+ public static readonly BindableProperty SizeProperty = BindableProperty.Create(nameof(Size), typeof(Size), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
+ if (newValue != null)
{
- var view = (View)bindable;
-
- var tmpProperty = Object.GetProperty(view.SwigCPtr, Property.SIZE);
- if (view.internalSize == null)
- {
- view.internalSize = new Size(view.OnSizeChanged, 0, 0, 0);
- }
- tmpProperty?.Get(view.internalSize);
- tmpProperty?.Dispose();
-
- return view.internalSize;
+ Size size = (Size)newValue;
+ // Set Specification so when layouts measure this View it matches the value set here.
+ // All Views are currently Layouts.
+ view.WidthSpecification = (int)System.Math.Ceiling(size.Width);
+ view.HeightSpecification = (int)System.Math.Ceiling(size.Height);
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue(size));
}
- );
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ var view = (View)bindable;
+ Size temp = new Size(0, 0, 0);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SIZE).Get(temp);
+ return temp;
+ }));
/// <summary>
/// MinimumSizeProperty
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty MinimumSizeProperty = BindableProperty.Create(nameof(MinimumSize), typeof(Size2D), typeof(View), null,
- propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty MinimumSizeProperty = BindableProperty.Create(nameof(MinimumSize), typeof(Size2D), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
+ Size2D temp = newValue as Size2D;
+ if (temp != null)
{
- var view = (View)bindable;
- if (newValue != null)
- {
- view.SetMinimumSize((Size2D)newValue);
- }
- },
- defaultValueCreator: (bindable) =>
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.MinimumSize, new Tizen.NUI.PropertyValue(temp));
+ }
+ else
{
- var view = (View)bindable;
- if (view.internalMinimumSize == null)
- {
- view.internalMinimumSize = new Size2D(view.OnMinimumSizeChanged, 0, 0);
- }
- var tmp = Object.GetProperty(view.SwigCPtr, Property.MinimumSize);
- tmp?.Get(view.internalMinimumSize);
- tmp?.Dispose();
-
- return view.internalMinimumSize;
+ Tizen.Log.Fatal("NUI", $"[ERROR] can't set MinimumSizeProperty!");
}
- );
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ var view = (View)bindable;
+ Size2D temp = new Size2D(0, 0);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.MinimumSize).Get(temp);
+ return temp;
+ }));
/// <summary>
/// MaximumSizeProperty
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty MaximumSizeProperty = BindableProperty.Create(nameof(MaximumSize), typeof(Size2D), typeof(View), null,
- propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty MaximumSizeProperty = BindableProperty.Create(nameof(MaximumSize), typeof(Size2D), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
+ Size2D temp = newValue as Size2D;
+ if (temp != null)
{
- var view = (View)bindable;
- if (newValue != null)
- {
- view.SetMaximumSize((Size2D)newValue);
- }
- },
- defaultValueCreator: (bindable) =>
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.MaximumSize, new Tizen.NUI.PropertyValue(temp));
+ }
+ else
{
- var view = (View)bindable;
- if (view.internalMaximumSize == null)
- {
- view.internalMaximumSize = new Size2D(view.OnMaximumSizeChanged, 0, 0);
- }
- var tmp = Object.GetProperty(view.SwigCPtr, Property.MaximumSize);
- tmp?.Get(view.internalMaximumSize);
- tmp?.Dispose();
-
- return view.internalMaximumSize;
+ Tizen.Log.Fatal("NUI", $"[ERROR] can't set MaximumSizeProperty!");
}
- );
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ var view = (View)bindable;
+ Size2D temp = new Size2D(0, 0);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.MaximumSize).Get(temp);
+ return temp;
+ }));
/// <summary>
/// InheritPositionProperty
/// MarginProperty
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty MarginProperty = BindableProperty.Create(nameof(Margin), typeof(Extents), typeof(View), null,
- propertyChanged: (bindable, oldValue, newValue) =>
- {
- var view = (View)bindable;
- if (newValue != null)
- {
- var tmp = new PropertyValue((Extents)newValue);
- Object.SetProperty(view.SwigCPtr, Property.MARGIN, tmp);
- tmp?.Dispose();
- }
- },
- defaultValueCreator: (bindable) =>
+ public static readonly BindableProperty MarginProperty = BindableProperty.Create(nameof(Margin), typeof(Extents), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
+ if (newValue != null)
{
- var view = (View)bindable;
- if (view.internalMargin == null)
- {
- view.internalMargin = new Extents(view.OnMarginChanged, 0, 0, 0, 0);
- }
- var tmp = Object.GetProperty(view.SwigCPtr, Property.MARGIN);
- tmp?.Get(view.internalMargin);
- tmp?.Dispose();
-
- return view.internalMargin;
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.MARGIN, new Tizen.NUI.PropertyValue((Extents)newValue));
}
- );
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ var view = (View)bindable;
+ Extents temp = new Extents(0, 0, 0, 0);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.MARGIN).Get(temp);
+ return temp;
+ }));
/// <summary>
/// UpdateSizeHintProperty
{
if (string.IsNullOrEmpty(value))
{
- var empty = new PropertyValue();
// Clear background
- Object.SetProperty(SwigCPtr, Property.BACKGROUND, empty);
- empty.Dispose();
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, View.Property.BACKGROUND, new PropertyValue());
return;
}
if (backgroundExtraData == null)
{
- var propertyValue = new PropertyValue(value);
- Object.SetProperty(SwigCPtr, Property.BACKGROUND, propertyValue);
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, View.Property.BACKGROUND, new PropertyValue(value));
BackgroundImageSynchronousLoading = backgroundImageSynchronousLoading;
- propertyValue?.Dispose();
+
return;
}
- var map = new PropertyMap();
- var url = new PropertyValue(value);
- var cornerRadiusValue = backgroundExtraData.CornerRadius == null ? new PropertyValue() : new PropertyValue(backgroundExtraData.CornerRadius);
- var cornerRadius = new PropertyValue(cornerRadiusValue);
- var cornerRadiusPolicy = new PropertyValue((int)(backgroundExtraData.CornerRadiusPolicy));
- var borderlineWidth = new PropertyValue(backgroundExtraData.BorderlineWidth);
- var borderlineColorValue = backgroundExtraData.BorderlineColor == null ? new PropertyValue(Color.Black) : new PropertyValue(backgroundExtraData.BorderlineColor);
- var borderlineColor = new PropertyValue(borderlineColorValue);
- var borderlineOffset = new PropertyValue(backgroundExtraData.BorderlineOffset);
- var synchronousLoading = new PropertyValue(backgroundImageSynchronousLoading);
- var npatchType = new PropertyValue((int)Visual.Type.NPatch);
- var border = new PropertyValue(backgroundExtraData.BackgroundImageBorder);
- var imageType = new PropertyValue((int)Visual.Type.Image);
-
- map.Add(ImageVisualProperty.URL, url)
- .Add(Visual.Property.CornerRadius, cornerRadius)
- .Add(Visual.Property.CornerRadiusPolicy, cornerRadiusPolicy)
- .Add(Visual.Property.BorderlineWidth, borderlineWidth)
- .Add(Visual.Property.BorderlineColor, borderlineColor)
- .Add(Visual.Property.BorderlineOffset, borderlineOffset)
- .Add(ImageVisualProperty.SynchronousLoading, synchronousLoading);
+ PropertyMap map = new PropertyMap();
+
+ map.Add(ImageVisualProperty.URL, new PropertyValue(value))
+ .Add(Visual.Property.CornerRadius, new PropertyValue(backgroundExtraData.CornerRadius == null ? new PropertyValue() : new PropertyValue(backgroundExtraData.CornerRadius)))
+ .Add(Visual.Property.CornerRadiusPolicy, new PropertyValue((int)(backgroundExtraData.CornerRadiusPolicy)))
+ .Add(Visual.Property.BorderlineWidth, new PropertyValue(backgroundExtraData.BorderlineWidth))
+ .Add(Visual.Property.BorderlineColor, new PropertyValue(backgroundExtraData.BorderlineColor == null ? new PropertyValue(Color.Black) : new PropertyValue(backgroundExtraData.BorderlineColor)))
+ .Add(Visual.Property.BorderlineOffset, new PropertyValue(backgroundExtraData.BorderlineOffset))
+ .Add(ImageVisualProperty.SynchronousLoading, new PropertyValue(backgroundImageSynchronousLoading));
if (backgroundExtraData.BackgroundImageBorder != null)
{
- map.Add(Visual.Property.Type, npatchType)
- .Add(NpatchImageVisualProperty.Border, border);
+ map.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.NPatch))
+ .Add(NpatchImageVisualProperty.Border, new PropertyValue(backgroundExtraData.BackgroundImageBorder));
}
else
{
- map.Add(Visual.Property.Type, imageType);
- }
-
- var mapValue = new PropertyValue(map);
- Object.SetProperty(SwigCPtr, Property.BACKGROUND, mapValue);
-
- imageType?.Dispose();
- border?.Dispose();
- npatchType?.Dispose();
- synchronousLoading?.Dispose();
- borderlineOffset?.Dispose();
- borderlineColor?.Dispose();
- borderlineColorValue?.Dispose();
- borderlineWidth?.Dispose();
- cornerRadiusPolicy?.Dispose();
- cornerRadius?.Dispose();
- cornerRadiusValue?.Dispose();
- url?.Dispose();
- map?.Dispose();
- mapValue?.Dispose();
+ map.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Image));
+ }
+
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, View.Property.BACKGROUND, new PropertyValue(map));
}
private void SetBackgroundImageBorder(Rectangle value)
if (backgroundExtraData == null)
{
- var background = new PropertyValue(value);
- Object.SetProperty(SwigCPtr, Property.BACKGROUND, background);
- background?.Dispose();
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, View.Property.BACKGROUND, new PropertyValue(value));
return;
}
- var map = new PropertyMap();
- var colorType = new PropertyValue((int)Visual.Type.Color);
- var mixColor = new PropertyValue(value);
- var cornerRadiusValue = backgroundExtraData.CornerRadius == null ? new PropertyValue() : new PropertyValue(backgroundExtraData.CornerRadius);
- var cornerRadius = new PropertyValue(cornerRadiusValue);
- var cornerRadiusPolicy = new PropertyValue((int)(backgroundExtraData.CornerRadiusPolicy));
- var borderlineWidth = new PropertyValue(backgroundExtraData.BorderlineWidth);
- var borderlineColorValue = backgroundExtraData.BorderlineColor == null ? new PropertyValue(Color.Black) : new PropertyValue(backgroundExtraData.BorderlineColor);
- var borderlineColor = new PropertyValue(borderlineColorValue);
- var borderlineOffset = new PropertyValue(backgroundExtraData.BorderlineOffset);
-
- map.Add(Visual.Property.Type, colorType)
- .Add(ColorVisualProperty.MixColor, mixColor)
- .Add(Visual.Property.CornerRadius, cornerRadius)
- .Add(Visual.Property.CornerRadiusPolicy, cornerRadiusPolicy)
- .Add(Visual.Property.BorderlineWidth, borderlineWidth)
- .Add(Visual.Property.BorderlineColor, borderlineColor)
- .Add(Visual.Property.BorderlineOffset, borderlineOffset);
-
- var mapValue = new PropertyValue(map);
- Object.SetProperty(SwigCPtr, Property.BACKGROUND, mapValue);
-
- borderlineOffset?.Dispose();
- borderlineColor?.Dispose();
- borderlineColorValue?.Dispose();
- borderlineWidth?.Dispose();
- cornerRadiusPolicy?.Dispose();
- cornerRadius?.Dispose();
- cornerRadiusValue?.Dispose();
- mixColor?.Dispose();
- colorType?.Dispose();
- map?.Dispose();
- mapValue?.Dispose();
+ PropertyMap map = new PropertyMap();
+
+ map.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Color))
+ .Add(ColorVisualProperty.MixColor, new PropertyValue(value))
+ .Add(Visual.Property.CornerRadius, new PropertyValue(new PropertyValue(backgroundExtraData.CornerRadius == null ? new PropertyValue() : new PropertyValue(backgroundExtraData.CornerRadius))))
+ .Add(Visual.Property.CornerRadiusPolicy, new PropertyValue((int)(backgroundExtraData.CornerRadiusPolicy)))
+ .Add(Visual.Property.BorderlineWidth, new PropertyValue(backgroundExtraData.BorderlineWidth))
+ .Add(Visual.Property.BorderlineColor, new PropertyValue(backgroundExtraData.BorderlineColor == null ? new PropertyValue(Color.Black) : new PropertyValue(backgroundExtraData.BorderlineColor)))
+ .Add(Visual.Property.BorderlineOffset, new PropertyValue(backgroundExtraData.BorderlineOffset));
+
+
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, View.Property.BACKGROUND, new PropertyValue(map));
}
private void SetColor(Color value)