Dev 控件 常用属性设置
<一> PanelControl : 乳白色,半透明背景
#region =============背景:panelControl1 乳白色,半透明背景============= panelControl1.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder; //设置背景为乳白色; panelControl1.BackColor = Color.FromArgb(100, 255, 251, 240); #endregion =============背景:panelControl1 乳白色,半透明背景=============
<二> SearchControl 输入框
List<string> list = new List<string>() { "","Janurary","February", "March" ,"April ","May","June","July","August" , "September", "October", "November", "December","张三","张三丰","小张","丰田太郎", "三林油田","李四张三","张冠李戴", "Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday" }; foreach (var item in list) { searchControl1.Properties.Items.Add(item); }
/*--------------------------------------------- DevExpress.Data.Filtering.FilterCondition.Contains:包含; DevExpress.Data.Filtering.FilterCondition.Equals;等于; DevExpress.Data.Filtering.FilterCondition.Like;相似; DevExpress.Data.Filtering.FilterCondition.StartsWith,以...开头 DevExpress.Data.Filtering.FilterCondition.Default; ---------------------------------------------*/ //设置自动筛选的方式 searchControl1.Properties.FilterCondition = DevExpress.Data.Filtering.FilterCondition.Contains; //具体删除按钮 没有多大用途 searchControl1.Properties.ShowClearButton = true; //双击编辑框 显示下拉列表 searchControl1.Properties.ShowDropDown = DevExpress.XtraEditors.Controls.ShowDropDown.DoubleClick; searchControl1.Properties.ShowMRUButton = false;//下拉框按钮: true 显示下拉框按钮;false 隐藏下拉框按钮 //是否具有删除 绑定的数据源功能 searchControl1.Properties.AllowRemoveMRUItems = true;//删除数据源功能:下拉框右侧删除按钮,点击删除按钮后就会删除一项; //具体搜索图标 searchControl1.Properties.ShowSearchButton = false;//搜索图标:false隐藏,true显示; searchControl1.Properties.DropDownRows = 12; searchControl1.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard; searchControl1.Properties.NullValuePrompt = "--请输入账号--";//设置提示字符