Introducing Phone Form Page
Creating astounding data forms in Windows Phone with Crosslight is easier than ever. With just a single declaration of code, you can create data forms that presents a decent layout rendering with rich editing controls. Introducing PhoneFormPage Class, the class that will automatically reads the form metadata defined from the shared application layer. The following example shows the usage of PhoneFormPage Class.
The code behind:
Crosslight Windows Phone Form Builder Features
In general, Crosslight Form Builder for Windows Phone includes the following key features:
- Versatile data editing form based on list view user interface pattern.
- Conforms to the Microsoft design standards and guidelines.
- Supports both plain and grouped style.
- Include pre-built layouts such as left detail, right detail, and row detail.
- Advanced composite section style rendered in pixel-perfect fashion, supports image and fields to be positioned side-by-side.
- Automatic rotation handling.
- Thoughtfully-designed user experiences, for instance, opened picker will be re-opened after rotation – all in smooth animation.
- Includes a sophisticated image picker supporting take photo from camera, choosing from existing library, image editing (move, scale and crop), as well as delete photo which binds directly to the model.
- High performance and memory-efficient image processing allows you to obtain both full size thumbnail image in the ViewModel.
- Supports advanced image picker features that let you add your own custom commands and intercept the image results in the ViewModel.
- Supports runtime interactivity such as expanding/hiding and enabling/disabling certain controls based on certain conditions.
For details, see the following illustration.
Keep in mind that the editors and their behaviors are not controlled in the Windows Phone application layer. Instead, they are defined in the form metadata at the shared application layer which enable other platforms such as iOS and Android to consume the same metadata.
For more information about form metadata, see Form Builder Overview
For more information about data validation, see Validating Data
Customizing Editor Features Programmatically
In the previous sections, you have learnt about Crosslight Form Builder and how it enables you to build beautiful, fully-functional data form in minutes with the form metadata attributes. The form metadata is specifically designed for cross-platform compatibility in mind. In general, it does not focus on the platform-specific features.
Crosslight lets you elegantly customize the platform-specific features and behaviors for every editor generated by the Form Builder. In Windows Phone, you can access the generated editor views from the Form property provided in PhoneFormPage, then invoke the GetProperties method to get all property definitions across all sections defined in the form definition.
The Following code example shows to access the Quantity property definition, and then customize the background color of the content view. Note that the View conforms to IComponentView interface.