In this step you'll begin in Visual Studio to create a Silverlight application using Gauges for Silverlight and add StackPanel panels to customize the layout of the controls you'll be adding to the application.
To set up your project, complete the following steps:
XAML |
Copy Code
|
---|---|
<UserControl xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml" x:Class="C1Gauges.MainPage" xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480"> <Grid x:Name="LayoutRoot"> <StackPanel></StackPanel> </Grid> |
XAML |
Copy Code
|
---|---|
<StackPanel x:Name="sp1" Width="Auto" Height="Auto" Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center"></StackPanel> |
Elements in the panel will now appear centered and vertically positioned.
XAML |
Copy Code
|
---|---|
<StackPanel x:Name="sp2" Width="Auto" Height="Auto" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center"></StackPanel> |
Elements in the panel will now appear centered and horizontally positioned.
You've successfully created a new Silverlight project and set up your application. In the next step you'll added Gauges for Silverlight controls to the application and customize those controls.