private void galleryControlGallery_CustomDrawItemImage(object sender, GalleryItemCustomDrawEventArgs e) { //if (!MarkedItems.Contains(e.Item)) return; //e.Cache.Graphics.DrawImage(e.Item.Image, ((GalleryItemViewInfo)e.ItemInfo).ImageContentBounds); //DrawMarkedIcon(e.Cache, ((GalleryItemViewInfo)e.ItemInfo).ImageContentBounds); //e.Handled = true; }
private void gddFontColor_Gallery_CustomDrawItemImage(object sender, GalleryItemCustomDrawEventArgs e) { Color clr = (Color)e.Item.Tag; using (Brush brush = new SolidBrush(clr)) { e.Cache.FillRectangle(brush, e.Bounds); e.Handled = true; } }
private void OnCustomDrawItemText(object sender, GalleryItemCustomDrawEventArgs e) { if (e.Item == targetHighlightItem) { Point newPoint = new Point(e.Bounds.X, e.Bounds.Bottom); e.Cache.Graphics.DrawLine(SelectedPen, newPoint, new Point(e.Bounds.Right, e.Bounds.Bottom)); } }
private void gddFont_Gallery_CustomDrawItemText(object sender, GalleryItemCustomDrawEventArgs e) { DevExpress.XtraBars.Ribbon.ViewInfo.GalleryItemViewInfo itemInfo = e.ItemInfo as DevExpress.XtraBars.Ribbon.ViewInfo.GalleryItemViewInfo; itemInfo.PaintAppearance.ItemDescription.DrawString(e.Cache, e.Item.Description, itemInfo.DescriptionBounds); AppearanceObject app = itemInfo.PaintAppearance.ItemCaption.Clone() as AppearanceObject; app.Font = (Font)e.Item.Tag; try { e.Cache.Graphics.DrawString(e.Item.Caption, app.Font, app.GetForeBrush(e.Cache), itemInfo.CaptionBounds); } catch { } e.Handled = true; }
private void gddFont_Gallery_CustomDrawItemText(object sender , GalleryItemCustomDrawEventArgs e) { DevExpress.XtraBars.Ribbon.ViewInfo.GalleryItemViewInfo itemInfo = e.ItemInfo as DevExpress.XtraBars.Ribbon.ViewInfo.GalleryItemViewInfo; itemInfo.PaintAppearance.ItemDescription.DrawString(e.Cache , e.Item.Description , itemInfo.DescriptionBounds); AppearanceObject app = itemInfo.PaintAppearance.ItemCaption.Clone() as AppearanceObject; app.Font = (Font)e.Item.Tag; e.Cache.Graphics.DrawString(e.Item.Caption , app.Font , app.GetForeBrush(e.Cache) , itemInfo.CaptionBounds); e.Handled = true; }
private void gddFontColor_Gallery_CustomDrawItemImage(object sender , GalleryItemCustomDrawEventArgs e) { Color clr = (Color)e.Item.Tag; using (Brush brush = new SolidBrush(clr)) { e.Cache.FillRectangle(brush , e.Bounds); e.Handled = true; } }