Skip to main content
Home Forums Silverlight Programming Silverlight Controls and Silverlight Toolkit How to write <br/> for silverlight
3 replies. Latest Post by TomBeeby on July 2, 2009.
(0)
slen
Member
10 points
59 Posts
07-02-2009 10:08 PM |
As title, I would like to go to next line between controls. Does anyone know how ...
Thanks
TomBeeby
Participant
1151 points
188 Posts
07-02-2009 11:14 PM |
Typically you arrange controls relative to one another by putting them inside a panel of a specific type.
StackPanel arranges vertically or horizontally; grid arranges in a grid pattern etc; wrappanel wraps
here are some samples of getting a newline in text
<StackPanel> <TextBlock Text="First Line" /> <TextBlock Text="Scond Line" /> <TextBlock> <Run Text="This is a line of text" /> <LineBreak /> <Run Text="This ia another line of text" /> </TextBlock> </StackPanel>
But if you are trying to arrange 2 controls vertically, use a StackPanel
07-02-2009 11:43 PM |
Actually, what I am trying to accomplish here is to have some gaps between 2 controls vertically.
It is good to know there is <LineBreak> to break text into 2 lines.
07-02-2009 11:53 PM |
You could use a StackPanel with orientation = vertical (the default)
Then specify an amount for Margin of the two objects.