"Frank Hileman" wrote:
> Hi,
>
> The third parameter to the InstanceDescriptor constructor is a boolean
> called isComplete. Set that to false and the code generator will create a
> local variable, then use the usual DefaultValue and ShouldSerialize logic to
> determine if the property values must be serialized.
>
> Regards,
> Frank Hileman
>
> check out VG.net:
http://www.vgdotnet.com > Animated vector graphics system
> Integrated Visual Studio graphics editor
>
> "zofcentr" <zofcentr@discussions.microsoft.com> wrote in message
> news:915E9186-0134-46D8-AA9C-4E47857160DD@microsoft.com...
> > Thanks Frank,
> > This is what I was looking for.
> >
> > Do YOU know maybe how to change behavior of designer serialization.
> > Normaly serializer creates code like that :
> >
> > myComponent.CustomProperty = new CustomPropertyData(.....);
> > I would like to avoid creating complex constructor for every comlex
> > property
> > object and have a code like below :
> >
> > myComponent.CustomProperty = new CustomPropertyData();<- default
> > constructor
> > myComponent.CustomProperty.FirstName = "John";
> > myComponent.CustomProperty.LastName = "Smith";
> >
> > Thanks in advance
> > zofcentr
> >
> >
> >
> >
> >
> > "Frank Hileman" wrote:
> >
> >> Create a custom TypeConverter, and when an InstanceDescriptor type is
> >> requested, create an InstanceDescriptor describing how to serialize your
> >> object. Associate the TypeConverter with your class with an attribute.
> >> Read
> >> more here:
> >>
http://msdn.microsoft.com/library/en-us/dndotnet/html/vsnetpropbrow.asp > >>
> >>
> >> Regards,
> >> Frank Hileman
> >>
> >> check out VG.net:
http://www.vgdotnet.com > >> Animated vector graphics system
> >> Integrated Visual Studio graphics editor
> >>
> >> "zofcentr" <zofcentr@discussions.microsoft.com> wrote in message
> >> news:81772833-5D73-4BCD-8DFD-45E1CFE69A9D@microsoft.com...
> >> >I have this attribut applied to property. But this does not help. I see
> >> > property in properties window but I cannot edit it. I can't even expand
> >> > it
> >> > like font property to see object details.
> >> >
> >> >
> >> > "Frank Loizzi" wrote:
> >> >
> >> >> Am Tue, 26 Sep 2006 23:20:01 -0700 schrieb zofcentr:
> >> >>
> >> >> > Hello Frank,
> >> >> > I don't want to create Font type property but Custom type property
> >> >> > which is
> >> >> > serialized by designer like Font property or Size property.
> >> >>
> >> >> Add this above the public property:
> >> >>
> >> >> [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
> >> >>
> >> >> That's all you have to do.
> >> >>
> >> >> Bye
> >> >>
> >> >> Frank Loizzi
> >> >> Dortmund, Germany
> >> >>
> >>
> >>
> >>
>
>