We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

.NET intellisense

Hi,

How can I fill the intellisense with default .NET classes. It means when I write "System." it shows me all classes/namespaces under "System".

Thanks.


1 Reply

FS Fathima Shalini P Syncfusion Team June 10, 2008 10:15 AM UTC

Hi RCaroline,

Thank you for your interest in Syncfusion Products.

To retrieve the details like classes, methods and properties of a dll, we need to use Reflection to retrieve the details and display the ContextChoice in Edit control.

Please refer the below code snippet that illustrates this:


private void editControl1_ContextChoiceOpen(Syncfusion.Windows.Forms.Edit.Interfaces.IContextChoiceController controller)
{
String strPrefixForPath = @"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\";

string[] arAssemblyPath =
{
strPrefixForPath + str +"dll"
};
foreach (string str1 in arAssemblyPath)
{
try
{
objAssembly = System.Reflection.Assembly.LoadFrom(str1);
arOfTypes = objAssembly.GetTypes();

foreach (Type t in arOfTypes)
{

try
{
MethodInfo[] mInfo = t.GetMethods();

foreach (MethodInfo m in mInfo)
{
controller.Items.Add(m.ToString());
}
}
catch (Exception e)
{

controller.Items.Add(e.ToString());
}

}
}

catch (Exception e)
{

}
}

arOfTypes = null;
objAssembly = null;
}


Please refer the below sample for more details:

http://websamples.syncfusion.com/samples/Edit/F74310/main.htm

Note: As we are retrieving data using Reflection and adding to ContextChoiceList, it takes some time to populate the values in ContextChoiceList.

Please let me know if any concerns.

Regards,
Fathima



Loader.
Live Chat Icon For mobile
Up arrow icon