Navigating to an MCML page from a dialog button
Posted: Tue Nov 19, 2013 4:31 am
I have a dialog box with a few buttons. When I click on a button, I'd like to navigate to a MCML page. Unfortunately, it tells me I need to be on the application thread. Is it possible to get back to it?
I'm using a callback, which I think is not run on the application thread. I'm trying to navigate back to the MCML page from within the callback when I get the error.
Here's some of the code.
The callback:
The code I'm using to try to get to the page:
I'm using a callback, which I think is not run on the application thread. I'm trying to navigate back to the MCML page from within the callback when I get the error.
Here's some of the code.
The callback:
Code: Select all
public void ScrollItemDialogCallback(Microsoft.MediaCenter.DialogResult result)
{
switch (result.ToString().ToUpper())
{
case "100":
this.GoToPage();
break;
case "101":
this.Remove();
break;
default:
break;
}
}
Code: Select all
public void GoToPage()
{
Dictionary<string, object> properties = new Dictionary<string, object>();
properties["Application"] = this;
if (session != null)
{
session.GoToPage("resx://addin/addin.Resources/Page", properties);
}
else
{
Debug.WriteLine("GoToPage");
}
}