Home All Groups Group Topic Archive Search About

Custom Control Properties

Author
23 Mar 2006 5:37 PM
Rick Mogstad
I have a control that I need to remove some properties from.  I have marked
them obsolete so that the rest of the dev team can continue to work,
however, if they delete them, it automatically regenerates them in the auto
generated code.  Is there a way to mark them so they dont re-generate those
properties?

I dont want to just remove them, because I dont want everyone to have
compile errors until they are fixed.

Thanks,

Rick

Author
23 Mar 2006 6:27 PM
Armin Zingler
"Rick Mogstad" <Rick.Mogstad@GMail.NOSPAM.com> schrieb
> I have a control that I need to remove some properties from.  I have
> marked them obsolete so that the rest of the dev team can continue
> to work, however, if they delete them, it automatically regenerates
> them in the auto generated code.  Is there a way to mark them so
> they dont re-generate those properties?
>
> I dont want to just remove them, because I dont want everyone to
> have compile errors until they are fixed.


Apply the System.ComponentModel.DesignerSerializationVisibilityAttribute to
the property.


Armin
Author
23 Mar 2006 6:33 PM
Scott Swigart
If you use the Browsable(False) attribute on the control, it will no longer
show up in the properties window, and the designer won't generate code for it.

Show quoteHide quote
"Rick Mogstad" wrote:

> I have a control that I need to remove some properties from.  I have marked
> them obsolete so that the rest of the dev team can continue to work,
> however, if they delete them, it automatically regenerates them in the auto
> generated code.  Is there a way to mark them so they dont re-generate those
> properties?
>
> I dont want to just remove them, because I dont want everyone to have
> compile errors until they are fixed.
>
> Thanks,
>
> Rick
>
>
>
Author
24 Mar 2006 3:31 PM
Rick Mogstad
I have Browsable(False) already (And EditorBrowsable too), but it still
shows up.


Show quoteHide quote
"Scott Swigart" <sc***@swigartconsulting.com> wrote in message
news:96D00D35-0E59-4DAB-B6C0-614213300D08@microsoft.com...
> If you use the Browsable(False) attribute on the control, it will no
> longer
> show up in the properties window, and the designer won't generate code for
> it.
>
> "Rick Mogstad" wrote:
>
>> I have a control that I need to remove some properties from.  I have
>> marked
>> them obsolete so that the rest of the dev team can continue to work,
>> however, if they delete them, it automatically regenerates them in the
>> auto
>> generated code.  Is there a way to mark them so they dont re-generate
>> those
>> properties?
>>
>> I dont want to just remove them, because I dont want everyone to have
>> compile errors until they are fixed.
>>
>> Thanks,
>>
>> Rick
>>
>>
>>
Author
27 Mar 2006 3:16 PM
Claes Bergefall
How about the DesignerSerializationVisibility attribute (set to Hidden)

   /claes

Show quoteHide quote
"Rick Mogstad" <Rick.Mogstad@GMail.NOSPAM.com> wrote in message
news:eHlQ6f1TGHA.1728@TK2MSFTNGP11.phx.gbl...
>I have Browsable(False) already (And EditorBrowsable too), but it still
>shows up.
>
>
> "Scott Swigart" <sc***@swigartconsulting.com> wrote in message
> news:96D00D35-0E59-4DAB-B6C0-614213300D08@microsoft.com...
>> If you use the Browsable(False) attribute on the control, it will no
>> longer
>> show up in the properties window, and the designer won't generate code
>> for it.
>>
>> "Rick Mogstad" wrote:
>>
>>> I have a control that I need to remove some properties from.  I have
>>> marked
>>> them obsolete so that the rest of the dev team can continue to work,
>>> however, if they delete them, it automatically regenerates them in the
>>> auto
>>> generated code.  Is there a way to mark them so they dont re-generate
>>> those
>>> properties?
>>>
>>> I dont want to just remove them, because I dont want everyone to have
>>> compile errors until they are fixed.
>>>
>>> Thanks,
>>>
>>> Rick
>>>
>>>
>>>
>
>