Adding the Okra App Framework to an Existing Project

If you wish to add the Okra App Framework to an existing Windows Store project then the steps required are,

  1. Download the Okra App Framework and add the references to your project ([downloading via NuGet is recommended](getting_started_downloading.html#bookmark-nuget))
  2. Add a new 'AppBootstrapper.cs' file to your project with the following code,
  3. public class AppBootstrapper : OkraBootstrapper
    {
    }
  4. Clean up your 'App.xaml.cs' file so that it looks like,
  5. using Okra;
    
    namespace MyOkraProject
    {
        sealed partial class App : OkraApplication
        {
            public App()
                : base(new AppBootstrapper())
            {
                this.InitializeComponent();
            }
        }
    }
  6. Change the 'App.xaml' definition to derive from OkraApplication (note that you can keep any existing resources and namespace definitions if desired),
  7. <okra:OkraApplication
        ...
        xmlns:okra="using:Okra">
    
        ...
    
    </okra:OkraApplication>