public override IRawElementProviderFragment GetFocus ()
{
foreach (Control control in form.Controls) {
if (control.Focused) {
// TODO: Necessary to delve into child control
// for focused element?
if (componentProviders.ContainsKey (control)) {
IRawElementProviderSimple provider =
componentProviders [control];
IRawElementProviderFragment providerFragment =
provider as IRawElementProviderFragment;
if (providerFragment != null)
return providerFragment;
}
}
}
return null;
}