Designer in compact framework

G

Guest

Hi,

I have created a custom textbox control (masked edit) for compact framework
2.0. Now I need the control to display the mask ( string property ) at design
time. I know how to do this in CF1, but don't know how to do this in CF2.

I found some examples regarding designers, (the mooseworks example and links
thereof) but have no idea how to override the Text property so I can display
the Mask.

Any clues anybody ?
 
P

Peter Foot [MVP]

Check out Xin Yan's blog (http://blogs.msdn.com/xinyan/) and webcast, IIRC
the code includes a custom drawn designer which is what you'll need to build
if you want to display the mask on the design surface. If you merely want to
add the property to the property pane you will get the textbox designer
functionality "for free" because your class derives from it. You'll need to
create a design time attributes file (.xmta) to specify how your Mask
property behaves - category etc

Peter
 
G

Guest

Hi, I looked at his example, and have successfully created a designer.
However I have no clue as to how to get the value of the mask property into
the text property.
Basically I need the vs2005 equivalent of

#if NETCFDESIGNTIME
this.Disp( _sMask );
#else
this.Disp( _Text );
#endif

So i need to be able to access and modify the contents of a property at
design-time.
 
G

Guest

Please, can anybody help me ? I really need this to work and I can't seem to
find anything that points me in the right direction ?
 

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