Add an element tag to your XAML page:
<stackpanel horizontalalignment="Left" x:name="Stack1">
</stackpanel>
In the code-behind set the Background property by creating a SolidColorBrush and selecting a color:
public MainPage()
{
InitializeComponent();
Stack1.Background = new SolidColorBrush(Colors.Yellow);
}