diff --git a/Source/SharpDX.Direct2D1/PropertyBinding.cs b/Source/SharpDX.Direct2D1/PropertyBinding.cs index 0f8ca30bf..5ebf8ddd8 100644 --- a/Source/SharpDX.Direct2D1/PropertyBinding.cs +++ b/Source/SharpDX.Direct2D1/PropertyBinding.cs @@ -81,7 +81,7 @@ public static PropertyBinding Get(Type customEffectType, PropertyInfo propertyIn binding.nativeGetSet = new NativeGetSetValue(customEffectType, propertyInfo); effectPropType = PropertyType.Bool; } - else if (propTypeName.Contains("Vector2")) + else if (propTypeName.Contains("Vector2")) // Use string property name to allow external types (Mathematics, System Numerics...etc.) { binding.nativeGetSet = new NativeGetSetValue(customEffectType, propertyInfo); effectPropType = PropertyType.Vector2; @@ -111,11 +111,6 @@ public static PropertyBinding Get(Type customEffectType, PropertyInfo propertyIn binding.nativeGetSet = new NativeGetSetValue(customEffectType, propertyInfo); effectPropType = PropertyType.Vector4; } - else if(propTypeName.Contains("Matrix")) - { - binding.nativeGetSet = new NativeGetSetValue(customEffectType, propertyInfo); - effectPropType = PropertyType.Matrix4x4; - } else if(propTypeName.Contains("Matrix3x2")) { binding.nativeGetSet = new NativeGetSetValue(customEffectType, propertyInfo); @@ -126,7 +121,12 @@ public static PropertyBinding Get(Type customEffectType, PropertyInfo propertyIn binding.nativeGetSet = new NativeGetSetValue(customEffectType, propertyInfo); effectPropType = PropertyType.Matrix5x4; } - else if(Utilities.IsEnum(propType)) + else if (propTypeName.Contains("Matrix")) + { + binding.nativeGetSet = new NativeGetSetValue(customEffectType, propertyInfo); + effectPropType = PropertyType.Matrix4x4; + } + else if (Utilities.IsEnum(propType)) { // For enum, we are using int as a transient value binding.nativeGetSet = new NativeGetSetValue(customEffectType, propertyInfo);