Problem with Browsable Properties

M

mzwilli

Hi, Thanks in advance for looking at this issue!

I am having a Problem with Browsable Properties, as follows:
1. I have an ancestor user control with browsable properties.
2. I create a descendant object and set the properties through the
designer, as expected.
3. I place an instance of the descendant object on a container object
as a control.

Sometimes the browsable properties on the descendent control get set
to null by the container object.

I really do not want the browsable properties to be modified or even
assessible by the container form.

Any Advice?
 
M

Marc Gravell

You could try marking the property with [ReadOnly(true)] - as far as
most bindings are concerned this will make it read-only, but you can
still set the value via code.
 
M

Marc Zwillinger

Thanks for the information - I tried it - but I want to be able to set the
attributes from the designer.

Essentially, I'd the property should be browsable in descendent objects but
not overriden when placing a descendent object on a container object.

Currently the browsable attributes are sometimes auto-overriden and set to
null.
 
M

Marc Gravell

OK - I'm struggling to understand what you are describing - is it
possible to post something that demonstrates this?

Marc
 
M

Marc Zwillinger

Hi and Thanks for looking.

The problem is periodic thus difficult to debug or reproduce.

Essentially I've created browsable attributes on an object. The idea is to
create descendant objects then set the attributes using the designer (not
code).

When the objects are ultimately placed in a container object (drag over from
the toolbox) these browsable attributes are sometimes overridden with null
(generated code).

This ends up causing problems down-stream...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top