Monday, October 27, 2014

Okra App Framework v0.9.8

For those of you following the Okra App Framework, I can announce that v0.9.8 has been released today. This release is mainly aimed at converging on a stable API for v1.0, although a small number of new features have also been included.

Details of how to obtain the latest version of the framework are available here. In the approach to v1.0 I’d be very interested in any feedback and bug reports, which you can post in the Okra.Core issues tracker.

New Features in v0.9.8

  • You can now navigate back multiple pages in the navigation stack, for example directly to the application home page from deep in the navigation hierarchy. This is supported by an INavigationStack.GoBackTo(…) method and associated extension methods.
  • Built in support for keyboard back navigation.
  • Built in support for mouse back button navigation.
  • Support for variable-sized settings panes has been reintroduced. The width can be set using a SettingsPaneInfo.Width property in your XAML.
  • A number of minor bug fixes.

Code Changes When Updating From v0.9.7

In readiness for a v1.0 release, a number of breaking changes have been made,

  • Any methods that return or consume the WinRT ‘NavigationMode’ enumeration now use an Okra specific ‘PageNavigationMode’ enumeration.
  • Sharing support (for both share targets and share sources) has been moved into a new ‘Okra.Sharing’ namespace along with a number of changes to the API surface. This removes dependencies to WinRT types and allows sharing code to be included in portable class libraries.
  • The INavigationTarget.NavigateTo(…) method now takes an associated INavigationBase as a second parameter.
  • The FlyoutPane class and FlyoutEdge enumeration have been marked as obsolete and will be removed prior to v1.0. If you still require this control then feel free to include the source code directly in your solution (FlyoutPane code, FlyoutEdge code).

Sunday, August 10, 2014

New Website for the Okra Framework

In addition to moving to GitHub I would like to announce that the Okra Framework has a new website. Find us at,

This website is the new location for information about the framework and all official documentation. Since it is hosted using GitHub Pages you can also contribute to the documentation by submitting a pull request to the website repository.

Look forward to seeing you all there…

Okra Framework is now on GitHub

Anyone who has been following the Okra App Framework (an MVVM framework designed for creating great Windows 8 apps) will know that up until now the project has been hosted on CodePlex. From this point onwards all further development will be based on GitHub. The new url is,

On the new GitHub site you will find,

  • All the source code for Okra.Core and Okra.Data
  • All releases from v0.9.7 going forward
  • A new issue tracker for managing bug reports and feature requests (I have migrated all open issues from CodePlex)
  • Okra feature samples as part of the Okra-Samples repository

Contributing to the Okra Framework

As part of the move to GitHub I am aiming to be more proactive in accepting any community contributions to the project. The first thing I would welcome is the continued submission of bug reports and feature requests to the Okra.Core issue tracker and the Okra.Data issue tracker. I’m always interested in hearing in how users are using the framework and any problems they encounter.

If you would like to contribute any code to the project then I’d be really happy to accept pull requests (no matter how small). Try to keep these focused on one issue per pull request (this helps me get an overview of the changes before I merge them) and for anything but small bug fixes open an issue in the issue tracker first (so we can discuss the best way to approach it). Some simple contribution guidelines are available in the file at the root of each project.

Monday, July 07, 2014

Windows Store MVVM Development with the Okra App Framework v0.9.7

After a bit of hiatus, the latest version of the Okra App Framework has been released. The v0.9.7 release of the Windows Store centric MVVM framework targets Windows 8.1, and focuses on tidying up some of the API surface prior to an upcoming v1.0 release.

How to Get The Okra App Framework

You can download the latest version of the Okra App Framework,

  • From NuGet: For the complete MVVM framework add the “Okra App Framework” NuGet package to your project.
  • Using the Visual Studio Extension: The official Okra App Framework Visual Studio extension has been updated for the latest release with all new project and item templates targeting Windows 8.1. Look for the “Windows Store MVVM Templates for the Okra App Framework” extension in the Visual Studio gallery or directly from the Extensions and Updates manager in Visual Studio.

New Features in This Release

  • The big change with this update is that the Okra App Framework is now targeting Windows 8.1 development. The framework makes the most of the recent improvements in the underlying operating system, with a number of changes reflecting the new API surface. Note however that this release no longer supports Windows 8.0 projects, which should continue to use v0.9.6.
  • All new Windows 8.1 project and item templates for Visual Studio. These are based upon the Visual Studio 2013 templates, but rewritten to take advantage of the MVVM pattern.
  • The Okra Data Framework is now available as a separate download (see the “Okra App Framework (Data Framework)” package in NuGet) so you can choose to use this independently of the core framework if desired.

Code Changes When Updating From v0.9.6

In readiness for a v1.0 release, a number of breaking changes have been made,

  • To simplify page activation the IActivatable interface in no longer generic. Instead of directly passing the page arguments and state, a PageInfo object is used instead.
  • // Old code using the Okra App Framework v0.9.6
    public class MyViewModel : ViewModelBase, IActivatable<string, string>
        public void Activate(string arguments, string state)
            this.Photo = GetPhoto(arguments);
            this.State = state;
        public string SaveState()
            return this.State;
    // New code using the Okra App Framework v.0.9.7
    public class MyViewModel : ViewModelBase, IActivatable
        public void Activate(PageInfo pageInfo)
            string arguments = pageInfo.GetArguments<string>();
            this.Photo = GetPhoto(arguments);
            this.State = pageInfo.GetState<string>("MyState");
        public void SaveState(PageInfo pageInfo)
            pageInfo.SetState<string>("MyState", this.State);
  • To allow more flexible navigation patterns a number of properties and methods have been moved from INavigationBase to INavigationStack (accessible from any INavigationBase via the NavigationStack property).
  • Since the Windows 8.1 update includes a system provided SettingsFlyout control, you no longer need to wrap any settings pages in a SettingsChrome control.