Hi
I start to port a control I have created from standard .net 20 to .net compact framework usinf SD 2.2.1 xxxxx using a new project with target of NET compact framework 2.0.
This control compile fine whit .net 20, but when I compile in compact framework 2.0 I got an error at this bolded line :
using Microsoft.WindowsCE.Forms;
using System;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.ComponentModel.Design.Serialization;
using System.Collections;
using System.Collections.Specialized;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Design;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.Globalization;
using System.IO;
using System.Reflection;
using System.Threading;
using System.Windows.Forms;
using System.Windows.Forms.Design;
....
.....
public class ToggleColumnHeaderConverter: TypeConverter
{
public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, Type destinationType)
{
if (destinationType == typeof(InstanceDescriptor))
{
return true;
}
return base.CanConvertTo(context, destinationType);
}
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
{
if (destinationType == typeof(InstanceDescriptor) && value is ToggleColumnHeader)
{
ToggleColumnHeader lvi = (ToggleColumnHeader)value;
ConstructorInfo ci = typeof(ToggleColumnHeader).GetConstructor(new Type[ {});
if (ci != null)
{
return new InstanceDescriptor(ci, null, false);
}
}
return base.ConvertTo(context, culture, value, destinationType);
}
}
the error says :
The type or namespace name 'ITypeDescriptorContext' does not exist in the namespace 'System.ComponentModel' (are you missing an assembly reference?) (CS0234) - D:\Progetti_C#\Controls\ExtendedListPPC\ContainerListView.cs:3257,59
Wath's wrong ? . Is this class not supported in Compact framework ? or what other else ??
Can you help me please ?
JossGP