Category Archives: Silverlight

Redirecting the aspx file from Silverlight

Code for redirecting the ASPX file from Silverlight is as below

string url = “”;
HtmlPage.Window.Navigate(new Uri(url, UriKind.Absolute), “_blank”);



HtmlPage.Window.Navigate(new Uri(“ “));


HtmlPage.Window.Eval(““”, ‘_self)”);



How to redirect the XAML file in silverlight

Here is the code to redirect with in silverlight(XAML) file .

public static void Navigate(UserControl newPage)        {

            UserControl oldPage = root.Children[0] as UserControl;




Add the above method in App.xaml file . Then modify the Application_Startup method as below code.

private void Application_Startup(object sender, StartupEventArgs e)        {

            root = new Grid();

            root.Children.Add(new MainPage());

            this.RootVisual =root;


Then you can add the below code line in the page as want for example you can put it inside the button click event

App.Navigate(new MarketCenter());


%d bloggers like this: