CF component for FF

L

Leif Eirik Olsen

Hi,

Once again a question about sharing code between CF and the full framwork:)
Beeing new to both .net and the enviroment I'm struggling a bit with this as
you may understand.

To (hopefully) at least ask the right questions what I did was to 'develop'
and install a simple graph component for CF according to the Msdn ex:

http://msdn.microsoft.com/library/d...ngcustomcontrolforsmartdeviceapplications.asp

My question: what will be the next step(s) to go to make this component
available (designtime) for the full framework?

Any hints or suggestions greatly appriciated.

Thanks again,
Leo
 
L

Leif Eirik Olsen

Tim Wilson said:
See if the information at the link below helps you.
http://www.google.ca/groups?hl=en&lr=&[email protected]

Hi again,

I'm still not able to add the component to FF.
After successfully building and installing the mentioned graph control for
CF, I start a new FF user control project. When first opened I delete/remove
the automatically added usercontrol1 component file. Then I add a reference
(Link) to my CF Graphcontrol.cs file. Then: Save - Build - Exit, goto
commandline and build the designtime version of the dll. Move the new dll to
the //Designer directory (overwriting the CF one). Correct so far?

After that I start VS Studio and add the new FF component to the palette ->
the component is added but disabled :(

Any ideas what I'm doing wrong ?

regards,
Leo
 
T

Tim Wilson

The control will be disabled because when you build against the CF designer
assemblies, the Control class, you pick up some attributes that state that
your controls are only interesting to CF projects. Thus, when you add it to
the ToolBox for a FF project it appears disabled. When you build your
control against the FF, assuming that you're not using anything CF specific,
you should just need to indicate that the "RuntimeAssemblyAttribute" is not
necessary. This is where the "ifdefs" come in handy. In the source code
place an "ifdef" around the "RuntimeAssemblyAttribute" inclusion to indicate
that this should be "overlooked" during the build process for your FF
project. Of course, you'll need to define this constant in your FF project.
The FF knows all about the design attributes that the CF run-time assemblies
do not know about. This is why when you build a CF design-time assembly you
need to use special designer assemblies. This process is not necessary when
building against the FF. Nor is it necessary to copy the FF control assembly
to either of those special directories.
 
L

Leif Eirik Olsen

Tim Wilson said:
The control will be disabled because when you build against the CF designer
assemblies, the Control class, you pick up some attributes that state that
your controls are only interesting to CF projects. Thus, when you add it to
the ToolBox for a FF project it appears disabled. When you build your
...................

Finally it works!!

Thanks alot for your help.

I addition to the stuff you mentioned I had some trouble when using the csc
to build the designtime versions of the dll's. I didn't notice that the way
I was using the csc (an example copied form msdn) there was some .../r
System.CF....... and so on :)

Thanks again,
Leo
 

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