Adding PropertyMap and PropertyArray types to SetProperty
authorDavid Steele <david.steele@samsung.com>
Fri, 21 Jul 2017 18:54:44 +0000 (19:54 +0100)
committerDavid Steele <david.steele@samsung.com>
Fri, 28 Jul 2017 16:51:04 +0000 (17:51 +0100)
commit1d53ee1dab84d9d55d867ddc716f75403a3f3e23
tree2a95966ddcbfe908648e03daa41c5a3875bc4e79
parent93b4319c826a42b27de079add63b681bdbff2a63
Adding PropertyMap and PropertyArray types to SetProperty

Fixed Visual base property map getter to actually get the property.

Enables addition of visuals via following setup in a CustomView:

private VisualBase _imageVisual;

[ScriptableProperty()]
public PropertyMap ImageVisual
{
    get
    {
        return _imageVisual.Creation;
    }
    set
    {
        _imageVisual = VisualFactory.Get().CreateVisual( value );
        RegisterVisual( GetPropertyIndex("ImageVisual", _imageVisual );
    }
}

Then in code, can use

var imageVisual = new ImageVisual();
imageVisual.URL = value;
imageVisual.AlphaMaskURL = _maskURL;
imageVisual.MaskContentScale = 1.6f;
imageVisual.CropToMask = true;

ImageVisual = imageVisual.OutputVisualMap;

Change-Id: If31703b1684db30d9ed319be62e8b091ee62cdbb
Signed-off-by: David Steele <david.steele@samsung.com>
src/Tizen.NUI/src/public/CustomViewRegistry.cs
src/Tizen.NUI/src/public/VisualBase.cs