Nested PageView has 3px margin I can't get rid of

7 posts, 1 answers
  1. Paul
    Paul avatar
    3 posts
    Member since:
    Jun 2012

    Posted 08 Feb 2011 Link to this post

    I've got a form has the following
    PageView with 2 Pages (Let's call them A and B)
    On Page B, I will have another PageView with n pages (Generated at run-time).

    The problem that I'm having is that there is a margin inside the PageView (top [3px] and left [5px] - bottom and right have no margin) in such that I cannot get a nice flush finish. See screenshot attached. I've verified that all the properties for both Margin and Padding are set to 0.

    I also noticed that in the location must be set at -5,-3 in order to line up with the edges correctly - which is the same amount that this additional margin is adding.

    In fact, I wanted to change the margin to say 10 just to try going the other way (so I knew I was adjusting the correct margin property), but it only worked for the bottom margin, no others.

    If someone could provide an example of what I am doing wrong, or how to nest 2 pageviews with no margin, please let me know.

    Thanks



  2. Paul
    Paul avatar
    3 posts
    Member since:
    Jun 2012

    Posted 10 Feb 2011 Link to this post

    Anyone? It's been well over 36 hrs already. Do I need to provide more information? Is it confusing? Source?
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 10 Feb 2011 Link to this post

    Hi David,

    The Telerik target response time on forum posts is actually 72 hours, but in the meantime, if I can help, I will. If you could post a small sample that shows what you have so far (just the form designer file + form vb/cs file, that may save some time and I'll see if I can get rid of it for you.
    thanks
    Richard
  5. Answer
    Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 10 Feb 2011 Link to this post

    Hi again David,

    Actually, since writing I've put together what I think you have and believe I have located the padding. Please can you try setting the following

    CType(Me.RadPageView1.RootElement.Children(0).Children(0), RadPageViewContentAreaElement).Padding = New Padding(0)

    Hope that helps, but please let me know if it's not what you need
    Richard
  6. Paul
    Paul avatar
    3 posts
    Member since:
    Jun 2012

    Posted 10 Feb 2011 Link to this post

    My appologies. I didn't realize the wait time was 72 hrs.

    I'm utilizing C#. I've tried setting all of the paddings and margins to 0 in designer. (Padding is 0 by default, margin is 3).

    However, I tried using the following code:

     

    radPageView1.RootElement.Children[0].Children[0].Margin = new Padding(-1, 1, -1, 1);
    radPageView1.RootElement.Children[0].Children[0].Padding = new Padding(0);

    And it worked!

  7. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 10 Feb 2011 Link to this post

    Excellent! - glad that helped David. Please remember to mark as answer and if you have further questions, just let me know
    Richard
  8. Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 11 Feb 2011 Link to this post

    Hi David,

    Thank you for contacting us.

    You can achieve this look by setting the padding of the RadPageViewContentAreaElement (Page B) which is hosting the inner RadPageView. You need to open the smart tag of the outer RadPageView and select Edit UI Elements then navigate in the Control Element Structure to the RadPageViewContentAreaElement which you want to edit, then you find the Padding property in the Selected element properties and set it to "0,0,0,0". I have attached a screen shot which indicates where you can find this property.

    I hope this will help. If you have further questions I would be glad to help.

    Greetings,
    Ivan Petrov
    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
UI for WinForms is Visual Studio 2017 Ready