[NUI] Fix the issue that size receives 2 parameters from xaml (#1594)
authorXianbing Teng <xb.teng@samsung.com>
Tue, 12 May 2020 04:30:04 +0000 (12:30 +0800)
committerGitHub <noreply@github.com>
Tue, 12 May 2020 04:30:04 +0000 (13:30 +0900)
src/Tizen.NUI/src/public/XamlBinding/SizeTypeConverter.cs

index d3a8c0d..007a392 100755 (executable)
@@ -28,6 +28,12 @@ namespace Tizen.NUI.Binding
                     int z = (int)GraphicsTypeManager.Instance.ConvertScriptToPixel(parts[2].Trim());
                     return new Size(x, y, z);
                 }
+                else if (parts.Length == 2)
+                {
+                    int x = (int)GraphicsTypeManager.Instance.ConvertScriptToPixel(parts[0].Trim());
+                    int y = (int)GraphicsTypeManager.Instance.ConvertScriptToPixel(parts[1].Trim());
+                    return new Size(x, y);
+                }
             }
 
             throw new InvalidOperationException($"Cannot convert \"{value}\" into {typeof(Size)}");