1.控件的Properties属性-Mask-EditMask设置为######0.000
2.Properties属性-Mask-MaskType设置为Numeric
3.Properties属性-Mask-UseMaskAsDisplayFormat设置为true
后台代码设置:
this.txtEdit1.Properties.Mask.EditMask = "######0.000";//#代表位数
this.txtEdit1.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric;
this.txtEdit1.Properties.Mask.UseMaskAsDisplayFormat = true;