protected override void DrawHeaderPage(TabDrawArgs e, BaseTabRowViewInfo row, BaseTabPageViewInfo pInfo) { base.DrawHeaderPage(e, row, pInfo); BaseTabPageViewInfoDescendant pInfodes = pInfo as BaseTabPageViewInfoDescendant; DrawHeaderPageButtons(e, pInfodes); }
protected override void DrawHeader(TabDrawArgs e) { base.DrawHeader(e); if (((MyXtraTabbedMdiManager)e.ViewInfo.Properties).HeaderLocation != TabHeaderLocation.Top || e.ViewInfo.IsMultiLine || !e.ViewInfo.IsShowHeader) { return; } string textToDraw = "Sample text, sample text, sample text"; Font drawFont = e.ViewInfo.PaintAppearance.GetFont(); Brush drawBrush = e.ViewInfo.PaintAppearance.GetForeBrush(e.Cache); Rectangle emptySpaceBounds = e.Bounds; if (e.ViewInfo.HeaderInfo.AllPages.Count > 0) { emptySpaceBounds.X = e.ViewInfo.HeaderInfo.AllPages.LastPage.Bounds.Right; } emptySpaceBounds.Width -= emptySpaceBounds.X + e.ViewInfo.HeaderInfo.ButtonsBounds.Width; emptySpaceBounds.Height -= e.ViewInfo.PageBounds.Height; emptySpaceBounds.Inflate(-1, -1); StringFormat format = new StringFormat(StringFormatFlags.NoWrap); format.Alignment = StringAlignment.Far; format.LineAlignment = StringAlignment.Center; format.Trimming = StringTrimming.EllipsisCharacter; e.Cache.DrawString(textToDraw, drawFont, drawBrush, emptySpaceBounds, format); }
protected override void DrawHeaderPage(TabDrawArgs e, DevExpress.XtraTab.ViewInfo.BaseTabRowViewInfo row, DevExpress.XtraTab.ViewInfo.BaseTabPageViewInfo pInfo) { if (((MyXtraTabPage)pInfo.Page).HidePageHeader) { return; } base.DrawHeaderPage(e, row, pInfo); }
protected override void DrawHeaderPage(TabDrawArgs e, DevExpress.XtraTab.ViewInfo.BaseTabRowViewInfo row, DevExpress.XtraTab.ViewInfo.BaseTabPageViewInfo pInfo) { base.DrawHeaderPage(e, row, pInfo); Rectangle rect = pInfo.Bounds; rect.Height = 2; e.Graphics.FillRectangle(Brushes.Red, rect); e.Graphics.FillRectangle(new SolidBrush(pInfo.Page.Appearance.Header.BackColor2), rect); }
protected override void DrawHeaderPageImage(TabDrawArgs e, BaseTabPageViewInfo pInfo) { XtraTabPage page = pInfo.Page as XtraTabPage; page.Tag = pInfo.Image; bool value = false; (page.TabControl.Tag as Dictionary <XtraTabPage, bool>).TryGetValue(page, out value); DrawEditorHelper.DrawEdit(e.Graphics, HeaderEdit, pInfo.Image, value); }
protected override void DrawHeader(TabDrawArgs e) { base.DrawHeader(e); Rectangle bounds = e.Bounds; string headerText = "----------------------- Custom draw header -----------------------"; e.Graphics.DrawString(headerText, new Font(AppearanceObject.DefaultFont.FontFamily, 14, FontStyle.Bold), Brushes.Black, bounds); bounds.Offset(-2, -2); e.Graphics.DrawString(headerText, new Font(AppearanceObject.DefaultFont.FontFamily, 14, FontStyle.Bold), Brushes.White, bounds); foreach (BaseTabRowViewInfo rowInfo in e.ViewInfo.HeaderInfo.Rows) { for (int i = 0; i < rowInfo.Pages.Count; i++) { Rectangle pageBounds = rowInfo.Pages[i].Bounds; pageBounds.Offset(0, 20); e.Graphics.DrawString(Environment.NewLine + "Custom draw", AppearanceObject.DefaultFont, Brushes.Black, pageBounds); pageBounds.Offset(-1, -1); e.Graphics.DrawString(Environment.NewLine + "Custom draw", AppearanceObject.DefaultFont, Brushes.Yellow, pageBounds); } } }
protected override void DrawHeaderPage(TabDrawArgs e, BaseTabRowViewInfo row, BaseTabPageViewInfo pInfo) { base.DrawHeaderPage(e, row, pInfo); XtraTabProgressPage page = pInfo.Page as XtraTabProgressPage; if (page == null) { return; } if (page.Progress == 0) { return; } Rectangle bounds = pInfo.Bounds; bounds.Inflate(-2, -2); bounds.X += 2; bounds.Width = bounds.Width * page.Progress / 100; Color progressColor = Color.FromArgb(0xB1, 0x21, 0xC9, 0x00); e.Graphics.FillRectangle(new SolidBrush(progressColor), bounds); }
protected override void DrawHeaderPageText(TabDrawArgs e, DevExpress.XtraTab.ViewInfo.BaseTabPageViewInfo pInfo) { //base.DrawHeaderPageText(e, pInfo); // int angle = 0; if (e.ViewInfo.HeaderInfo.RealPageOrientation == TabOrientation.Vertical) { angle = 270; if (e.ViewInfo.HeaderInfo.IsLeftLocation || e.ViewInfo.HeaderInfo.IsTopLocation) { angle = 270; } } AppearanceObject a = pInfo.PaintAppearance; System.Drawing.Text.HotkeyPrefix?hotKeyPrefixOverride = (a.TextOptions.HotkeyPrefix == HKeyPrefix.Default) || pInfo.UseHotkeyPrefixDrawModeOverride ? new System.Drawing.Text.HotkeyPrefix?(pInfo.HotkeyPrefixDrawModeOverride) : null; //default for Brusher.Green was e.Cache.GetSolidBrush(CheckHeaderPageForeColor(e, pInfo)) DrawVString(e.Cache, pInfo.Page.Text, a.GetFont(), Brushes.Green, a.GetStringFormat(), pInfo.Text, angle, hotKeyPrefixOverride); }
protected virtual void DrawHeaderPageButtons(TabDrawArgs e, BaseTabPageViewInfoDescendant pInfo) { pInfo.PagePanel.Draw(e.Cache); }