Hi there!
MainWindow.xaml.cs is most likely correct palace but some things to note:
In your case, you can just copy needed code to code-behind after the MainWindow's Constructor
private void RedlandsButton_Click(object sender, RoutedEventArgs e)
{
MessageBox.Show("You found Redlands");
}
After that you codebehind shoud look more or less like this (just writing out from my head)
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void RedlandsButton_Click(object sender, RoutedEventArgs e)
{
MessageBox.Show("You found Redlands");
}
}
In Wpf, you are using Window control instead of the UserControl so in the code behind
public partial class ElementLayer : UserControl
Here ElementLayer defines the name of the class that should be in your case MainWindow. If you are using Window as your control base, then UserControl should be Window.
I would say that follow more ArcGIS Runtime for WPF 1.0 samples that you can find from your computer after you have installed Runtime development tools:
Start -> All Programs -> ArcGIS -> Runtime SDK 1.0 for WPF ->ArcGIS Runtime WPF Samples 1.0