C# UserControl Visible Property Not Changing

后端 未结 3 1342
臣服心动
臣服心动 2020-12-17 10:57
Debug.WriteLine(ucFollow.Visible);
ucFollow.Visible = true;
Debug.WriteLine(ucFollow.Visible);

ucFollow is a custom UserControl, nothing fancy. The

3条回答
  •  我在风中等你
    2020-12-17 11:23

    the culprit is that controls Visible property is actually a property ( with get; set;) and the set will assign to internal m_Visible member but the get will look through all parent controls and will only return true if all of them have m_Visible == true

提交回复
热议问题