CustomDisplayText
private void Edit_CustomDisplayText(object sender, DevExpress.XtraEditors.Controls.CustomDisplayTextEventArgs e) { TextEdit edit; edit = (TextEdit)sender; if (e.Value == null) { e.DisplayText = edit.Properties.NullText; //edit.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; edit.Properties.Appearance.ForeColor = Color.Gray; } else { //edit.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Near; edit.Properties.Appearance.ForeColor = Color.Black; } }
this.buttonEdit1.Properties.Mask.EditMask = "(\w|[\.\-])+@(\w|[\-]+\.)*(\w|[\-]){2,63}\.[a-zA-Z]{2,4}"; this.buttonEdit1.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.RegEx;
SkinElement element = SkinManager.GetSkinElement(SkinProductId.Form, DevExpress.LookAndFeel.UserLookAndFeel.Default, "FormCaption"); Image img = element.Image.Image; using(Graphics g = Graphics.FromImage(img)) g.FillRectangle(Brushes.DodgerBlue, new Rectangle(Point.Empty, img.Size)); element.SetActualImage(img,false); LookAndFeelHelper.ForceDefaultLookAndFeelChanged();
SkinElement element = SkinManager.GetSkinElement(SkinProductId.Ribbon, DevExpress.LookAndFeel.UserLookAndFeel.Default, "FormCaption");
Image anImage = element.Image.Image;
string lskin = ""; SkinContainerCollection skins = SkinManager.Default.Skins; for (int i = 0; i < skins.Count; i++) { lskin += String.Format("{0}{1}", skins[i].SkinName, Environment.NewLine); }
Transparent
panelControl1.Text = "Transparent"; panelControl1.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder; panelControl1.LookAndFeel.Style = DevExpress.LookAndFeel.LookAndFeelStyle.Flat; panelControl1.LookAndFeel.UseDefaultLookAndFeel = false; panelControl1.BackColor = Color.Transparent; panelControl1.Parent = tabFormControl; //panelControl1.Visible = false;
popupMenu
this.Btn_Debug.DropDownControl = popupMenu
this.Btn_Debug.DropDownControl = this.popupMenu_debug;
MSG
public static void Show(string Caption, string Text) { XtraMessageBoxArgs xargs = new XtraMessageBoxArgs(); xargs.Icon = HiClient.Lib.Res.ico(); xargs.Caption = Caption; xargs.Text = Text; UserLookAndFeel lookAndFeel = UserLookAndFeel.Default; lookAndFeel.UseWindowsXPTheme = false; lookAndFeel.Style = LookAndFeelStyle.Skin; xargs.LookAndFeel = lookAndFeel; lookAndFeel.SkinName = "Office 2010 Blue"; XtraMessageBox.Show(xargs); } public static void Show(string Text) { Show("", Text); } public static bool ShowYesNo(string Caption, string Text) { XtraMessageBoxArgs xargs = new XtraMessageBoxArgs(); xargs.Icon = HiClient.Lib.Res.ico(); xargs.Buttons = new DialogResult[2] { DialogResult.Yes, DialogResult.No }; xargs.Caption = Caption; xargs.Text = Text; UserLookAndFeel lookAndFeel = UserLookAndFeel.Default; lookAndFeel.UseWindowsXPTheme = false; lookAndFeel.Style = LookAndFeelStyle.Skin; xargs.LookAndFeel = lookAndFeel; lookAndFeel.SkinName = "Office 2010 Blue"; if (XtraMessageBox.Show(xargs) == DialogResult.Yes) { return true; } return false; } public static bool ShowYesNo(string Text) { return ShowYesNo("", Text); } } public class Msg { public static void Show(string Caption, string Text) { XtraMessageBoxArgs xargs = new XtraMessageBoxArgs(); xargs.Icon = HiClient.Lib.Res.ico(); xargs.Caption = Caption; xargs.Text = Text; XtraMessageBox.Show(xargs); } public static void Show(string Text) { Show("", Text); } public static bool ShowYesNo(string Caption, string Text) { XtraMessageBoxArgs xargs = new XtraMessageBoxArgs(); xargs.Icon = HiClient.Lib.Res.ico(); xargs.Caption = Caption; xargs.Text = Text; if (XtraMessageBox.Show(xargs) == DialogResult.Yes) { return true; } return false; } }