csharp System.Windows.Forms.Control.ForeColor类(方法)实例源码

下面列出了csharp System.Windows.Forms.Control.ForeColor 类(方法)源码代码实例,从而了解它的用法。

作者:.NET开发    项目:System.Windows.Form   
// Reset all the controls to the user's default Control color. 
private void ResetAllControlsBackColor(Control control)
{
   control.BackColor = SystemColors.Control;
   control.ForeColor = SystemColors.ControlText;
   if(control.HasChildren)
   {
      // Recursively call this method for each child control.
      foreach(Control childControl in control.Controls)
      {
         ResetAllControlsBackColor(childControl);
      }
   }
}


问题


面经


文章

微信
公众号

扫码关注公众号