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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

.NET intellisense

Thread ID:

Created:

Updated:

Platform:

Replies:

74310 Jun 6,2008 10:14 AM UTC Jun 10,2008 10:15 AM UTC Windows Forms 1
loading
Tags: EditControl
Eric de la Rue
Asked On June 6, 2008 10:14 AM UTC

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.


Fathima Shalini P [Syncfusion]
Replied On 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



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;