Divelements Community
Customer discussion of all Divelements products

Sample renderer

Latest post 12-20-2006 15:20 by Angel. 3 replies.
  • 09-15-2006 16:08

    Sample renderer

    Hello,

    Does anyone have, or know where I can find, a sample renderer? I've checked the forums and trial code, but didn't find anything. I'd like to do something that mimics Outlook 2007.

    Thanks!
    Jeff
  • 09-26-2006 22:16 In reply to

    • Eivind
    • Top 50 Contributor
    • Joined on 12-23-2005
    • Norway
    • Posts 18
    Actually, I have just finished a renderer with the three standard Office color schemes. It's not pixel perfect, and there's no support for Tims "system" theme, but I'm pretty happy with it.

    Usage:

    Office2007NavBarRenderer nr = new Office2007NavBarRenderer();
    nr.ColorScheme = Divelements.SandRibbon.Rendering.Office2007ColorScheme.LunaBlue;
    navigationBar1.SetActiveRenderer( nr );

    Good luck!

  • 11-22-2006 2:24 In reply to

    Re: Sample renderer

    I've meant to answer this for a long time and kept forgetting.
    I've changed a couple things that were purely personal color/path gradient preferences, but this was awesome work, and I've been using it since you posted it and until Tim releases an "official" one, many thanks to you, Eivind!!!

    Yves

  • 12-20-2006 15:20 In reply to

    • Angel
    • Top 50 Contributor
    • Joined on 08-15-2005
    • Posts 19

    Re: Sample renderer

    I'm using your renderer, if you modify your code, the header's images are displayed ...

            public override void DrawHeader( System.Drawing.Graphics graphics, System.Drawing.Rectangle bounds, string text, System.Drawing.Font font, System.Drawing.Image image, bool rtl )
            {

                ....

                if (image != null)
                {
                    Rectangle r1 = new Rectangle(bounds.Right - image.Width - 4, (bounds.Top + (bounds.Height / 2)) - (image.Height / 2), image.Width, image.Height);
                    graphics.DrawImage(image, r1);
                }

            }

     /// Angel

Page 1 of 1 (4 items) | RSS
Copyright © 2008 Divelements Limited
Powered by Community Server (Commercial Edition), by Telligent Systems