public static ColorFactory FromBaseObject(BaseObject baseObj)
                    {
                        if (baseObj == null || baseObj.NativeObject == IntPtr.Zero)
                        {
                            return(null);
                        }
                        ColorFactory obj = baseObj as  ColorFactory;

                        if (object.Equals(obj, null))
                        {
                            obj = new ColorFactory(CreatedWhenConstruct.CWC_NotToCreate);
                            obj.BindNativeObject(baseObj.NativeObject, "CColorFactory");
                            obj.IncreaseCast();
                        }

                        return(obj);
                    }