Windows Phone 7 StackPanel
The only con for this type of layout control is that you can only have one control per column or row, depending on the Orientation you set the StackPanel control to.
To begin, let’s create a new project for today’s example. Once we have done so we can add a StackPanel control to our XAML file from the ToolBox.
Yes, it is possible to find a good web host. Sometimes it takes a while to find one you are comfortable with. After trying several, we went with Server Intellect and have been very happy thus far. They are by far the most professional, customer service friendly and technically knowledgeable host we’ve found so far.
<StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
</StackPanel>
<StackPanel Height="217" HorizontalAlignment="Left" Margin="12,0,0,0" Name="stackPanel1" VerticalAlignment="Top" Width="456" Grid.Row="1">
<Button Content="Button" Height="71" Name="button1" Width="160" />
<Button Content="Button" Height="71" Name="button2" Width="160" />
<Button Content="Button" Height="71" Name="button3" Width="160" />
</StackPanel>
<StackPanel Height="194" HorizontalAlignment="Left" Margin="12,223,0,0" Name="stackPanel2" VerticalAlignment="Top" Width="456" Grid.Row="1">
<Button Content="Button" Height="71" Name="button4" Width="160" HorizontalAlignment="Left" />
<Button Content="Button" Height="71" Name="button5" Width="160" />
<Button Content="Button" Height="71" Name="button6" Width="160" HorizontalAlignment="Right" />
</StackPanel>
We stand behind Server Intellect and their support team. They offer dedicated servers, and they are now offering cloud hosting!
<StackPanel Height="172" HorizontalAlignment="Left" Margin="12,423,0,0" Name="stackPanel3" VerticalAlignment="Top" Width="456" Grid.Row="1" Orientation="Horizontal">
<Button Content="Button" Height="71" Name="button7" Width="160" />
<Button Content="Button" Height="71" Name="button8" Width="160" />
<Button Content="Button" Height="71" Name="button9" Width="160" />
</StackPanel>
And there you have it; we have just covered a few of the different ways to use the StackPanel control in Silverlight for the Windows Phone 7 platform using Microsoft Visual Studio 2010. If you have any other questions or concerns and have not yet downloaded the source code for this project, I strongly suggest doing so. Seeing it in its entirety can help clear up many of your questions. Thank you for your time and I hope this has been helpful, take care.
We used over 10 web hosting companies before we found Server Intellect. They offer dedicated servers, and they now offer cloud hosting!
WP7StackPanelTut.zip