devexpress 元件使用研究

网络来者發表於2024-08-29

1.提示框

private void textEdit1_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == ( char)Keys.Enter)
{
AlertControl alert = new AlertControl();
alert.Show(this, "提示", textEdit1.Text, true);

}
}

image


2.典型主介面

image

frmMain : DevExpress.XtraEditors.XtraForm

frmHome : DevExpress.XtraEditors.XtraForm

DepartmentForm : DevExpress.XtraEditors.XtraForm


主窗體載入程式碼

private void frmMain_Load(object sender, EventArgs e)
{
XtraForm frm = new frmHome();
frm.MdiParent = this;
frm.Show();
}

左側 子選單程式碼

private void accordionControlElement4_Click(object sender, EventArgs e)
{
XtraForm frm = new DepartmentForm();
frm.Text = string.Format("Form {0}", formCount++);
frm.MdiParent = this;
frm.Show();
}

最終效果圖

image

相關文章