X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2FTizen.NUI%2Fsrc%2Fpublic%2FBaseComponents%2FView.cs;h=97636f294d82102f9bbe7437c9f3937bef541048;hb=0226b5fe6db87e5c5d55e6b53b1ed29b103a2c25;hp=5c5b5c3522956f6c262f12002c3dbf8e07ba4ac7;hpb=b76a4fad3dc67dca5a3711ab0a7cd8a3977d0a10;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git diff --git a/src/Tizen.NUI/src/public/BaseComponents/View.cs b/src/Tizen.NUI/src/public/BaseComponents/View.cs index 5c5b5c3..97636f2 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/View.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/View.cs @@ -61,7 +61,7 @@ namespace Tizen.NUI.BaseComponents Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue((string)newValue)); } }, - defaultValueCreator:(bindable) => + defaultValueCreator:(bindable) => { var view = (View)bindable; string temp; @@ -3157,12 +3157,21 @@ namespace Tizen.NUI.BaseComponents /// This does not interfere with the view's scale factor.
/// The views default depth is the minimum of width and height.
/// + /// + /// This NUI object (Size2D) typed property can be configured by multiple cascade setting.
+ /// For example, this code ( view.Size2D.Width = 100; view.Size2D.Height = 100; ) is equivalent to this ( view.Size2D = new Size2D(100, 100); ).
+ /// Please note that this multi-cascade setting is especially possible for this NUI object (Size2D).
+ /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters.
+ /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f);
+ /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f;
+ ///
/// 3 public Size2D Size2D { get { - return (Size2D)GetValue(Size2DProperty); + Size2D temp = (Size2D)GetValue(Size2DProperty); + return new Size2D(OnSize2DChanged, temp.Width, temp.Height); } set { @@ -3171,6 +3180,11 @@ namespace Tizen.NUI.BaseComponents } } + private void OnSize2DChanged(int width, int height) + { + Size2D = new Size2D(width, height); + } + /// /// Retrieves the size of the view.
/// The coordinates are relative to the view's parent.
@@ -3206,12 +3220,21 @@ namespace Tizen.NUI.BaseComponents /// By default, sets the position vector between the parent origin and the pivot point (default).
/// If the position inheritance is disabled, sets the world position.
///
+ /// + /// This NUI object (Position2D) typed property can be configured by multiple cascade setting.
+ /// For example, this code ( view.Position2D.X = 100; view.Position2D.Y = 100; ) is equivalent to this ( view.Position2D = new Position2D(100, 100); ).
+ /// Please note that this multi-cascade setting is especially possible for this NUI object (Position2D).
+ /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters.
+ /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f);
+ /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f;
+ ///
/// 3 public Position2D Position2D { get { - return (Position2D)GetValue(Position2DProperty); + Position2D temp = (Position2D)GetValue(Position2DProperty); + return new Position2D(OnPosition2DChanged, temp.X, temp.Y); } set { @@ -3220,6 +3243,11 @@ namespace Tizen.NUI.BaseComponents } } + private void OnPosition2DChanged(int x, int y) + { + Position2D = new Position2D(x, y); + } + /// /// Retrieves the screen postion of the view.
///
@@ -3337,7 +3365,7 @@ namespace Tizen.NUI.BaseComponents set { SetValue(SiblingOrderProperty, value); - NotifyPropertyChanged(); + NotifyPropertyChanged(); } }