コード例 #1
0
        public override void DrawObject(ObjectInfoArgs e)
        {
            base.DrawObject(e);
            TabbedGroupViewInfo vi = e as TabbedGroupViewInfo;

            DevExpress.XtraLayout.Tab.LayoutTab tab = vi.BorderInfo.Tab;
            SkinTabControlViewInfo tabViewInfo      = tab.ViewInfo as SkinTabControlViewInfo;
            Rectangle bounds = ((BaseTabControlViewInfo)tabViewInfo).HeaderInfo.AllPages.LastPage.Bounds;

            bounds.Width += bounds.X;
            bounds.X      = 0;
            if (_Lc.TabGroupItems.ContainsKey(vi.Owner))
            {
                InplaceEditorInfo[] infos = _Lc.TabGroupItems[vi.Owner];
                foreach (InplaceEditorInfo info in infos)
                {
                    Rectangle checkBounds = GetItemBounds(vi.BoundsRelativeToControl, info.ItemSize, info.RightIndent);
                    info.Bounds = checkBounds;
                    if (bounds.IntersectsWith(info.Bounds))
                    {
                        return;
                    }
                    DrawEditorHelper.DrawEdit(e.Graphics, info.Edit, info.Bounds, info.EditValue);
                }
            }
        }
        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);
        }