How to add Style property to User Control

S

Steve Trandahl

I am trying to add a simple Style property to our base User Control. Even if
I add it as a simple string type, I get the error "Operation GetValue on the
component did not succeed, generating the error code 0x80020005." in the
property window for the property. It seems to be indicating a type mismatch.
If I rename the property to something else, it works fine. Since User
Controls don't have a style property to hide or override, why am I getting
this problem?
 
A

Aamir Ghanchi

I also got into the same situation. Will appreciate if anyone has the
solution.
thanks
 
G

Gerry Polucci

Steve, did you ever find the solution to this problem? I am running into it
as well.

Thanks,
Gerry
 
S

Steve Trandahl

Unfortunately no. I ended up naming the property ControlStyle. It still
renders a style tag in the control, but I didn't figure out how to name the
property Style. :(
 

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

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top