By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,052 Members | 1,235 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,052 IT Pros & Developers. It's quick & easy.

Dynamic Property Array in Form Designer

P: n/a
I'm using C# 2.0. I have a UserControl-based class that contains a set
of controls that are TextBox-based. The number of controls defaults to
1, but it is a browsable property (NumFields) in the form designer and
can be changed.

I expose a FieldText property in the form designer without exposing the
TextBox-based class. I'm using an array of strings as the FieldText
property. However the FieldText property as displayed in form designer
'Properties' pane does not change as I change the NumFields property,
even though I change the underlying string array when the number of
fields changes.

Is there a way to trigger the 'Properties' pane in the form designer to
update a property when another property has changed?

By the way, I get a CA1819 warning because I'm exposing an array as a
property, but this is the only method that behaves the way I want in
the form designer. If there's a better way to expose an indexed
property, but still have it appear as a tree node in the 'Properties'
pane, please let me know.

Jun 16 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I figured it out. Just needed "[RefreshProperties(
RefreshProperties.All )]" for my NumFields property.

Jun 16 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.