c# - 检测对另一个 userControl 的点击而不是当前的点击
问题描述
我为一个项目创建了一个会话选择器。会话由 userControl 表示,其动态定位在面板中
I would like that when I press a UserControl of a session, this one changes it backColor into a color and that when another userControl than this one is selected that the color is removed on the current userControl and put on the new one
我不知道这是否很清楚,但这是我试图做的:
private void UserControl_Seance_Click(object sender, EventArgs e)
{
isClicked = true;
this.BackColor = Color.Blue;
}
但是代码停在那里,因为我不知道如何检测对另一个用户控件的点击而不是这个
有没有人有解决方案来检测对另一个 userControl 的点击而不是当前的?谢谢你。
解决方案
推荐阅读
- javascript - Bot 框架范围 beginDialogAction
- html - 覆盖 * scss 页面中的 CSS 属性
- reactjs - 实施redux-persist后反应本机应用程序保持空白?
- java - 现有 Camel REST 端点的 OAuth2
- c# - 在 XXX 上没有可以接受消息的端点监听。这通常是由不正确的地址或 SOAP 操作引起的
- java - 无法更新摆动中的文本区域
- python-3.x - Python3.6 - TypeError:'int'对象不可下标
- java - rxjava:平面图和地图之间的区别
- ruby-on-rails - 表格/网格中的表格
- javascript - 在 Vue 中获取 ajax 响应后如何更改/触发 HTML DOM