如何获得目前专注的TextBox?

如何获取当前关注的TextBox的ID? 如果没有聚焦,则应返回空值。

注意:它应该只检查文本框。

 TextBox focusedTxt = Controls.OfType().FirstOrDefault(x => x.Focused);