Reputation: 3279
I'm using StackPanels in Silverlight 5 (VS2012), how can I center them in screen? is there any property (horizontalalignemt & verticalalignment do nothing), or should I center them using code?
Upvotes: 0
Views: 119
Reputation: 516
You have to put stack panel in a container like Grid control then horizontal and vertical alignment properties should work.
<Grid x:Name="LayoutRoot" Background="White">
<StackPanel Width="50" HorizontalAlignment="Right"> </StackPanel>
</Grid>
Upvotes: 1