我有一个包含标签和PictureBox的UserControl (让我们称它为"PresentationCell
")。在另一个使用此PresentationCell
的控件中,我添加了一个事件
presentationCell.GotFocus += OnFocus;
private void OnFocus(object sender, EventArgs e)
{
if (sender is PresentationCell current)
current.BackColor = Color.Azure;
}
如果我单击/焦点在PresentationCell
中的标签或PictureBox
上,则不会触发此操作。
当PresentationCell
中只有一些东西处于焦点时,我如何才能让它触发呢?
转载请注明出处:http://www.jubohx.com/article/20230518/1172003.html