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.htmNote: 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