Suggestion - Padding

4 posts, 0 answers
  1. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 25 Jun 2011 Link to this post

    Hi,

    I'm using a WrapPanel in a JumpList as group selector.
    For some reasons I want to "dim" the background so I gave the WrapPanel a background brush.
    Setting a margin helps to place my Items where I want them (a bit away from the screen border), but - this also brings "undimmed" borders.

    And (the first idea) to surround the WrapPanel with a border / grid didn't work since the jump list searches an itemspanel in the templates root.
    Next Idea - change the wrappanel style - no success it has no style :)
    So I ended with styling the JumpList.

    For this (and I guess also for other situations) a Padding property could help a lot.
    And (maybe someone needs this) if you implement this by using a container - you could use a border - which would allow to set a border stroke also - not important for me (I thinks WP7 design is "borderless" :)) - but who knows...

    Regards
    Manfred

  2. Deyan
    Admin
    Deyan avatar
    2039 posts

    Posted 30 Jun 2011 Link to this post

    Hi Manniat,

    I would like to kindly ask you to send us a sample project that we can use to reproduce the undesired behavior you experience and try to workaround it for you. You will have to open a new support ticket to attach your files.

    Thanks for your time.

    Regards,
    Deyan
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  3. DevCraft banner
  4. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 30 Jun 2011 Link to this post

    Hi,

    you can check this out with the app I sent you (about JumpList last week) - I simply "fixed" the problem by modifying the JumpList Template.

    To reproduce it - use WrapPanel in a JumpList Group template.
    Add "smaller elements" (quadratic in my case - so to have all lines on one screen i reduce width.

    The result - a panel which (let's say) looks like this:
    ppppppppsssss
    ppppppppsssss
    ppppppppsssss
    So it is less wide than the screen.
    Now you can fix this by adding a margin. which results in
    sssppppppppsss
    sssppppppppsss
    sssppppppppsss
    Fine so far - but now add a background to it.
    The "free space (ssss)" will not get a color - since it is margin.
    Which means that the underlying screen is visible on both sides of the panel.
    If you try to place the WrapPanel in a border (or grid or another container) JumpList will argue about "I need a panel control as root".

    Since space consumed by padding would get the elements background color - a padding property could fix the problem.

    Manfred


  5. Deyan
    Admin
    Deyan avatar
    2039 posts

    Posted 06 Jul 2011 Link to this post

    Hello Manniat,

    Thanks for writing back.

    In general, in these cases adding a specialized property is not a good idea. The better approach is to modify the template by applying a new style that contains the required setters or modifying the control's tempate (as you already did).

    We can consider exposing a GroupPickerStyle property which allows for directly setting a style for the popup though.

    Kind regards,
    Deyan
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Back to Top