为用户控件创建属性 [英] create properties for user control

查看:71
本文介绍了为用户控件创建属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用户控件。在用户控件中,我有一个datagridview和一些其他控件。我想为我的用户控件创建属性,正常情况下使用一个datagridview的完整属性。帮我?你非常喜欢吗?

解决方案

试试这个





< pre lang =cs> public partial class UserControl1:DataGridView
{
public UserControl1()
{
InitializeComponent();
}
}


I have a user control. In the user control, I have a datagridview and some other controls. I want to create properties for my user control with the full attributes of one datagridview as normal. Help me? Thanhk you very much?

解决方案

Try this one


public partial class UserControl1 : DataGridView
  {
      public UserControl1()
      {
          InitializeComponent();
      }
  }


这篇关于为用户控件创建属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆