That's a pretty straightforward question isn't it?
I'm just after a flat list of those controls that implement ICommandSource,..thought it would be useful and no doubt someone has that kind of info.
Thanks in advance
That's a pretty straightforward question isn't it?
I'm just after a flat list of those controls that implement ICommandSource,..thought it would be useful and no doubt someone has that kind of info.
Thanks in advance
According to reflector: ButtonBase
, MenuItem
, Hyperlink
and InputBinding
(which is not a control).
HTH, Kent
Try this code snippet:
Assembly assem = Assembly.LoadFrom(@"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.0\PresentationFramework.dll");
foreach (Type t in assem.GetTypes())
{
Type interfaceType = t.GetInterface("ICommandSource");
if (interfaceType != null)
Console.WriteLine(t.ToString());
}