I developed a control that uses the PDA's InputPanel
to interact with the user. The relevant part of the code is below:
namespace MyNamespace
{
// ...
using Microsoft.WindowsCE.Forms;
// ...
public class MyControl
{
// ...
public InputPanel MyPanel { get; set; }
// ...
}
}
Whenever I try to drag the Control
to a Form
, I get the following error:
System.IO.FileNotFoundException: Could not load file or assembly ‘Microsoft.WindowsCE.Forms, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=969db8053d3322ac’ or one of its dependencies. The system cannot find the file specified. File name: ‘Microsoft.WindowsCE.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=969db8053d3322ac’
If I remove the InputPanel
line from MyControl
I can add it to the Form
without any problems. Once the Control
is added I can add the line again and the whole program compiles and works fine.
As soon as the form with the Control
is viewed in the Designer, it crashes with a similar error as written above and I can't add it to any other Form
again.
I am using Visual Studio 2008 SP1 with the Windows Mobile 6 SDK.
So my questions is: Has anyone experienced a similar problem or found a workaround?
EDIT: Gave up and used the parent form as a property. The form implements IInputPanel which is basically an interface with an InputPanel getter. Nevertheless ctake's answer was really insightful and introduced me to XMTA.