public ITypeContainer CreateNewContainer(object ContainedObject)
        {
            if (ContainedObject == null)
            {
                return(null);
            }

            Type           type = ContainedObject.GetType();
            ITypeContainer obj  = null;

            var vs = GetValueSerializerByCache(type);

            try
            {
                {
                    obj = CreateAValueSerializerContainerGeneric(type, vs.ConvertToString(ContainedObject, null));
                }
            }
            catch (Exception e)
            {
                Log.WriteLine(e.Message);
            }
            if (obj == null)
            {
                Log.WriteLine(string.Format(
                                  ErrorMessagesWPF.GetText(2)      //"The type '{0}' uses {1} as ValueSerializer, but it was not transcoded correctly. Please investigate or contact the author."
                                  , type.FullName, vs.GetType().FullName));
            }

            return(obj);
        }
        public object Deserialize()
        {
            var dp = DependencyPropertyContainer.GetStaticDependencyProperty(
                this.Name, this.OwnerType, this.PropertyType);

            if (dp == null)
            {
                throw new Exception(string.Format(
                                        ErrorMessagesWPF.GetText(1),// "No public static field DependencyProperty {0} of type {1} found in type {2}.",
                                        this.Name, this.PropertyType, this.OwnerType));
            }
            return(dp);
        }