TextEdit 回车事件

  <dxe:TextEdit Name="txtSearchPatientName" 
                                      KeyDown="txtSearchPatientName_KeyDown_1"/>
        private void txtSearchPatientName_KeyDown_1(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.Enter)
            {
                string searchStr = txtSearchPatientName.EditValue as string;
                if (searchStr != null)
                {
                    SearchPatientDemographics(searchStr);
                }
                else
                {
                    GUtil.ShowErrorMessageBox("ResSearchError");
                }
            }
        }

 

你可能感兴趣的:(text)