When the flag isCreateByXaml is true, the BindableObject.SetValue is comparing types strictly.
But some bindable properties, such as BackgroundColor, are designed to allow both types: Color and Selector<Color>.
Hence this patch allows BindableObject.SetValue to take both types.
Signed-off-by: Jiyun Yang <ji.yang@samsung.com>
Type valueType = value.GetType();
Type type = ReturnType;
+ // TODO This is temporary fix before deleting CreateByXaml flag in BindableProperty.
+ if (valueType.IsGenericType && valueType.GetGenericTypeDefinition() == typeof(Tizen.NUI.BaseComponents.Selector<>) && valueType.GetGenericArguments()[0] == ReturnType)
+ {
+ return true;
+ }
+
// Dont support arbitrary IConvertible by limiting which types can use this
Type[] convertableTo;
TypeConverter typeConverterTo;