This is a migrated thread and some comments may be shown as answers.

Suggestion - Padding

3 Answers 47 Views
WrapPanel
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
ManniAT
Top achievements
Rank 2
ManniAT asked on 26 Jun 2011, 01:01 AM
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

3 Answers, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 30 Jun 2011, 08:42 AM
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>>
0
ManniAT
Top achievements
Rank 2
answered on 30 Jun 2011, 08:53 PM
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


0
Deyan
Telerik team
answered on 06 Jul 2011, 03:31 PM
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!

Tags
WrapPanel
Asked by
ManniAT
Top achievements
Rank 2
Answers by
Deyan
Telerik team
ManniAT
Top achievements
Rank 2
Share this question
or