Hi everyone,
i am stuck in a fairly simply thing :puzzle: but im really new in programming!
i would really appreciate if someone could help me understand it.
i have a Silverlight 4 out-of-browser application and I want to set a minimum width and height for it.
Lets assume i have the following code:
namespace test
{
public partial class MainPage : UserControl
{
public MainPage()
{
InitializeComponent();
this.SizeChanged +=new System.Windows.SizeChangedEventHandler(MainPage_SizeChanged);
}
private void MainPage_SizeChanged(object sender, System.Windows.SizeChangedEventArgs e)
{
if (MainPage.**MainWindow**.Width <240)
MainPage.**MainWindow**.Width =240;
if (MainPage.**MainWindow**.Height <480)
MainPage.**MainWindow**.Height =480;
}
}
}
what is my **MainWindow **and how do i find it?