private void tileView1_ContextButtonCustomize(object sender, DevExpress.XtraGrid.Views.Tile.TileViewContextButtonCustomizeEventArgs e) { int status = Convert.ToInt32(this.tileView1.GetRowCellValue(e.RowHandle, "status")); int isdefault = Convert.ToInt32(this.tileView1.GetRowCellValue(e.RowHandle, "isdefault")); if (e.Item.Name == "contextButton1") { if (status == 1) { e.Item.ImageOptions.Image = global::DianDianClient.Properties.Resources.stopshiyong; e.Item.Tag = "stop"; } else { e.Item.ImageOptions.Image = global::DianDianClient.Properties.Resources.kaishishiyong; e.Item.Tag = "star"; } } if (e.Item.Name == "contextButton3") { if (isdefault == 0 && status == 1) { e.Item.ImageOptions.Image = global::DianDianClient.Properties.Resources.isdefault; } else { e.Item.ImageOptions.Image = null; } } }
private void tileView1_ContextButtonCustomize(object sender, DevExpress.XtraGrid.Views.Tile.TileViewContextButtonCustomizeEventArgs e) { string _payway = tileView1.GetRowCellValue(e.RowHandle, "payway").ToString(); string _shopid = (tileView1.GetRowCellValue(e.RowHandle, "shopid") == null)?"":tileView1.GetRowCellValue(e.RowHandle, "shopid").ToString(); if (e.Item.Name == "contextButton1" && (_shopid == "" || _payway == "添加收银方式")) { e.Item.Visibility = ContextItemVisibility.Hidden; } }
private void tileView1_ContextButtonCustomize(object sender, DevExpress.XtraGrid.Views.Tile.TileViewContextButtonCustomizeEventArgs e) { if (e.Item.Name == "contextButton1" && this.tileView1.IsRowSelected(e.RowHandle)) { DevExpress.Utils.ContextButton contextButton = e.Item as DevExpress.Utils.ContextButton; contextButton.Caption = "呼叫"; contextButton.AppearanceNormal.Font = new Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); contextButton.AppearanceHover.Font = new Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); // contextButton.AppearanceNormal.ForeColor = Color.Red; //// this.tileView1.ContextButtonOptions.FarPanelColor = Color.FromArgb(250,180,116); //contextButton.AppearanceHover.BackColor= Color.FromArgb(250, 180, 116); //contextButton.AppearanceNormal.BackColor = Color.FromArgb(250, 180, 116); } }
private void tileView1_ContextButtonCustomize(object sender, DevExpress.XtraGrid.Views.Tile.TileViewContextButtonCustomizeEventArgs e) { // tileView1.ContextButtons["contextButton3"].ImageOptions.Image.Tag = true; // this.conte }