Monday, September 2, 2013

MainPage on a class library throws an AccessViolationException

Hi, Vinicius


It is possible to let the MainPage on a different assembly. When you using a page from a different assembly in a solution, you must add the assembly to the solution’s reference folder. And then you can directly use the page, change the code in your project like this:



if (!rootFrame.Navigate(typeof(BlankPage1), args.Arguments))
{
throw new Exception("Failed to create initial page");
}



Best Wishes!


<THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>

Thanks

MSDN Community Support



Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


No comments:

Post a Comment