1.定义一个继承ControlDesigner 的类

public class MyControlDesigner:System.Windows.Forms.Design.ControlDesigner 
{
    protected override void PreFilterProperties(IDictionary properties)
    {
        // TODO:  添加 MyTextBoxDesigner.PreFilterProperties 实现
        base.PreFilterProperties (properties);
        properties.Remove("AccessibleDescription");
        properties.Remove("Anchor");
    }
}        

 

2.重写PreFilterProperties

[System.ComponentModel.Designer(typeof(MyControlDesigner))] 
public class MyTextBox : System.Windows.Forms.TextBox 
{
     ...
}

 

相关文章:

  • 2021-08-21
  • 2021-07-14
  • 2021-04-08
  • 2022-01-22
  • 2022-01-03
  • 2021-05-09
  • 2021-05-20
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-22
  • 2022-01-20
  • 2021-09-04
  • 2021-11-27
相关资源
相似解决方案