namespace DXApplication1
{
public partial class Form1 : DevExpress.XtraEditors.XtraForm
{
public Form1()
{
InitializeComponent();
// 修改barButtonItem1的Caption
barButtonItem1.Caption = "测试";
// 添加事件处理
barButtonItem1.ItemClick += barButtonItem1_ItemClick;
}
void barButtonItem1_ItemClick(object sender,
DevExpress.XtraBars.ItemClickEventArgs e)
{
XtraMessageBox.Show("测试按钮被点击!");
}
}
}