---
title: "What is MainPage.xaml?"  
description: "What is MainPage.xaml?"  
author: "AVADHESH PATEL"  
published: 2012-11-17  
updated: 2020-09-23  
canonical: https://www.mindstick.com/interview/1574/what-is-mainpage-xaml  
category: "wpf"  
tags: ["wpf"]  
reading_time: 1 minute  

---

# What is MainPage.xaml?

When you create a Silverlight project **using Visual Studio**, it creates a default XAML file called "MainPage.xaml". This is just a dummy start page created by Visual Studio, and it does not contain any visible UI elements. The default contents of the MainPage.xaml file looks like this:\
Collapse\
\
<UserControl x:Class="SilverlightApplication1.MainPage"\
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" \
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" \
Width="400" Height="300">\
<Grid x:Name="LayoutRoot" Background="White">\
</Grid>\
</UserControl>

## Answers

### Answer by AVADHESH PATEL

When you create a Silverlight project **using Visual Studio**, it creates a default XAML file called "MainPage.xaml". This is just a dummy start page created by Visual Studio, and it does not contain any visible UI elements. The default contents of the MainPage.xaml file looks like this:\
Collapse\
\
<UserControl x:Class="SilverlightApplication1.MainPage"\
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" \
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" \
Width="400" Height="300">\
<Grid x:Name="LayoutRoot" Background="White">\
</Grid>\
</UserControl>


---

Original Source: https://www.mindstick.com/interview/1574/what-is-mainpage-xaml

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
