set height of header area in stack / outlook mode

4 posts, 0 answers
  1. erwin
    erwin avatar
    358 posts
    Member since:
    Dec 2006

    Posted 21 Dec 2010 Link to this post

    Is there a way to set the height of the header area in (that displays the Page Title and Icon) in Outlook or Stack mode in the designer or at runtime.
    In my case the default size is a bit too much. The control shows ok in the designer, but at runtime, the header height is about twice as much as in the designer.

    Regards
    Erwin
  2. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 21 Dec 2010 Link to this post

    Hi Erwin,

    How are you?
    Can you tell me how you are setting this at the moment? I'd like to give it a try with your code.
    thanks
    Richard
  3. UI for WinForms is Visual Studio 2017 Ready
  4. erwin
    erwin avatar
    358 posts
    Member since:
    Dec 2006

    Posted 21 Dec 2010 Link to this post

    Hello Richard,

    I do not set anything in code yet, but I would like to have the header / title region of the pages smaller than the default and I could not find a setting in the designer.

    Regards
    Erwin
  5. Ivan Todorov
    Admin
    Ivan Todorov avatar
    688 posts

    Posted 27 Dec 2010 Link to this post

    Hello erwin,

    Please follow these steps in the designer:

    1. Select the page view you want to edit..
    2. In the property grid expand the ViewElement property.
    3. Expand the Header property of the ViewElement.
    4. Modify the MaxSize and Font properties of the Header to match your needs.

    This can be also achieved using the following code:

    RadPageViewOutlookElement viewElement = radPageView1.ViewElement as RadPageViewOutlookElement;
    if (viewElement != null)
    {
        viewElement.Header.MaxSize = new Size(0, 20);
        viewElement.Header.Font = new Font("Segoe UI", 8, FontStyle.Bold, GraphicsUnit.Point);
    }

    Hope this helps. Should you have any further questions, do not hesitate to ask.

    Best wishes,
    Ivan Todorov
    the Telerik team
    Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
Back to Top