コード例 #1
0
ファイル: frmHinhAnh.cs プロジェクト: toantranit/QuanLyTaiSan
 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;
 }
コード例 #2
0
        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;
            }
        }
コード例 #3
0
 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));
     }
 }
コード例 #4
0
        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;
        }
コード例 #5
0
 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;
 }
コード例 #6
0
ファイル: PLWord.cs プロジェクト: khanhdtn/my-office-manager
 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;
 }
コード例 #7
0
ファイル: PLWord.cs プロジェクト: khanhdtn/my-office-manager
 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;
     }
 }