I have two pages in WPF. Page A contains all of my code. Page B is meant to be like a control panel where I click buttons to operate window A.
The problem I am running into is I want to make function calls from B to A but I am getting a scope error.
In the below code I am getting the error specifically on the axFlash object.
namespace GoogleMapsFlashInWpf
{
public partial class ButtonPage : Page
{
public ButtonPage()
{
InitializeComponent();
}
private void ClearMarkersButton(object sender, RoutedEventArgs e)
{
StackTrace asdf = new StackTrace();
Console.WriteLine(asdf.GetFrame(0).GetMethod().Name.ToString() + " called from " + asdf.GetFrame(1).GetMethod().Name.ToString());
XElement call = new XElement("invoke",
new XAttribute("name", "clearMarkers"),
new XAttribute("returntype", "xml"));
try
{
axFlash.CallFunction(call.ToString(SaveOptions.DisableFormatting));
}
catch (Exception error)
{
Console.WriteLine(error.ToString());
}
}//end ClearMarkersButton
}
}