Skip to end of metadata
Go to start of metadata

The following sections will guide you through the process of building Windows Store apps with Crosslight, particularly focusing on the data binding, MVVM pattern, and discussing the key features available in Crosslight for Windows Store.

Understanding Crosslight Windows Store Apps Building Block

The easiest way to get started with a new Crosslight for Windows Store project is through the Crosslight Project Wizard which automatically adds the references and add the necessary building blocks to the project. For more information, see Using Intersoft Crosslight Project Wizard.

On this page:

The components of a typical Crosslight for Windows Store project can be seen in the following illustration.



One thing that you must remember, your Windows Store apps should have an application initializer implementation which typically contained in the AppInitializer.cs file under the Infrastructure folder. The application initializer class should implement the IApplicationInitializer Interface which is automatically discovered by Crosslight at runtime.

The AppInitializer class provides methods that connect the apps to the core services in the shared application layer and prepares the necessary configuration for your apps during startup. It looks like the following sample.

The most ideal place to initialize application-related configuration is in the InitializeApplication method, for instance, setting up the IoC container and other required registration. The other two methods are suitable for registering and initializing custom components and additional services required in the apps.

Right now, your Windows Store project should be ready, now you can start adding specific functionalities to your app.

Handling Navigation

Crosslight simplify ways to navigate between page inside application. By using attached property to put inside control for example ListView. Specify DetailNavigationTarget for target ViewModel that you want to use and Crosslight will handle the navigation. Look for code below for more information.

Binding UpdateSourceTrigger

Unfortunately binding in Windows Store apps not include UpdateSourceTrigger in its option, but Intersoft have ways to handle this. The following sample will show how to use it on text box

MultiSelect binding 

In Windows Store Apps, for such control like ListView, you cannot directly set it SelectedItems. But now you can use it, with the following code.

 

But you need to inherit MultiSelectBehavior with Type of ListBoxItem, in this case its Category.