DesignerSerializationVisibility

R

Rick

I've written a number of custom controls for the compact framework.
When I use one of these controls on my forms, it generates a line
like: "this.SelectedItem = null". This causes my code to go nuts and
I'd like to suppress this code generation for the "SelectedItem"
property. I though the attribute
"System.ComponentModel.DesignerSerializationVisibility" woud take are
of it, but that's doesn't seem to be available in the compact
framework.

Please advise.

Rick
 
P

Peter Foot [MVP]

In the Compact Framework you can specify the attributes you normally apply
directly to a control on the desktop in a separate XMTA file. Select Project
Add New Item and select Design-Time Attribute File. You then create the
XML to describe the attributes to provide to each control/class, in this
file or use the tools with the Class Diagram editor which can apply the
appropriate xml for you.

Peter
 

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