I have created a windows phone 7 custom class library, in that I have created App.xaml and App.xaml.cs files also(I have renamed them as MiEngineApp.xaml, MiEngineApp.xaml.c
You also have to change the App.xaml file. So this will be your MiEngine.xaml
<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="MiEngine.MiEngineApp"
>
<Application.Resources>
</Application.Resources>
</Application>
and MiEngine.xaml.cs:
namespace MiEngine
{
public partial class MiEngineApp : Application
{
public MiEngineApp()
{
This will be the App.xaml that inherits from (extends) MiEngine.xaml:
<z:MiEngineApp xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="SilverlightApplication6.App"
xmlns:z="clr-namespace:MiEngine;assembly=MiEngine"
>
<z:MiEngineApp.Resources>
</z:MiEngineApp.Resources>
</z:MiEngineApp>
Note the use of the z
namespace so that i can reference the base class.
And the codebehind for that:
namespace SilverlightApplication6
{
public partial class App : MiEngineApp
{
public App()
{