I have the following code
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
namespace SilverlightApplication1
{
public partial class MainPage : UserControl
{
public MainPage()
{
// Required to initialize variables
InitializeComponent();
}
}
}
where do I find the code for this InitializeComponent(); I have no idea what its doing. thanks
InitializeComponentis implemented on the other side of your partial class. It is auto-generated code, and determines the components and controls used on your page, it’s positions, etc.If you want to look at the implementation you can put your cursor on it’s name and hit F12 (only works on VisualStudio 🙂
Also, you can check the official documentation here or this nice answer