What's new in 2.1

Wisej 2.1 consolidates several new features from 2.0, while adding several new controls (including a powerful new DataRepeater) and reaches a high level of stability.

DataRepeater

The new DataRepeater container is a sort of a custom data grid. Instead of rows it repeats a template panel containing child controls in any layout. Child controls are automatically data-bound to the current record.

The infrastructure is virtual, which means that the DataRepeater only creates the visible panels and updates the controls as the user scrolls them into view, allowing the management of an unlimited numbers of records.

It can scroll its items vertically or horizontally, supports touch scrolling, can hide the scrollbar, and it can adapt to the user's device layout. You can use the DataRepeater to build data-bound lists of any kind for mobile or desktop devices.

Labels

All editors have a new Label property. It adds a responsive, localizable and themeable label next to the editor.

The Label supports 5 positions: top, left, bottom, right and inside (this is the material style that shrinks the label when there is content).

The size of the inner label and the inner editor can be set to proportional, fixed, or auto-sized. All the properties can automatically change according to the device profile (e.g. the label can be on top for mobile devices, and on the left for the desktop). Supports mnemonics focus, colors, and many other features.

TimeUpDown Editor

This is a new simple time editor, based on the UpDownBase class.

This is a new editor similar to the existing DomainUpDown and NumericUpDown. Handles a TimeSpan value in different localized formats. Supports minimum and maximum values, it’s bindable, nullable, and supports the quick increase of the time part under the cursor using the arrow keys.

Shape Control

It is an all-purpose shape control that can represent simple shapes with different styles.

Use the Shape control to frame content, including images, and to handle the four borders of a plain DIV tag. It lets you rotate the item, display circles, ovals, rectangles, and triangles using a simple data-bindable all-purpose control.

You can place it behind the controls to frame, or use it as a container and place the controls inside.

TabOrderManager

This new extender component (drop it on a design surface to use it) adds a new property TabOrder to all containers. If your page or form contains other containers (i.e. Panel, GroupBox) each one can manage the tab order of its children independently.

Supports 3 options: Default, AcrossFirst and DownFirst. Once set, the TabIndex of all the children is set automatically, and it’s updated automatically when adding or removing children.

Weak Events

We have changed all the static events exposed by the Application class to weak events. This new approach (also present in the WPF platform) prevents the source of the static event from holding on the instance handler. It will prevent applications from accidentally leaking memory when attaching to static events exposed by Wisej.

Virtual Prefetch

All controls that supports the VirtualScroll mode (TreeView, ComboBox, ListBox, ListView and DataRepeater) now have a new PrefetchItems property allowing the pre-loading of a items outside of the visible area to support smoother scrolling.

Infinite Sessions

This is a new configuration option in Default.json (sessionStorage: "local" | "session", the default is "session"). It allows the Wisej application to select the browser's local storage ("local") to store the session id. When coupled with a longer or unlimited session timeout allows a user to reopen the browser, or the Wisej desktop executable, and find their work exactly where they left it.

Impersonation

This is a new configuration option in Default.json. When set to true, it allows the server application to impersonate the user's Windows credentials on the server (e.g. access the DataBase, the File System, other services, etc.).

Sounds

We have added a simple new feature to play system and custom sounds.

// System sounds.
Application.Play(MessageBoxIcon.Error);

// Custom sounds.
Application.Play("sounds/invoice-saved.wav");
Application.Play("data:audio/wav;base64,//uQRAAA....");

Writable Themes

This new feature allows your application to modify any Wisej theme at runtime by code. You can create themes on the fly for each specific user, or modify the global theme (shared by all users).

Example: Create a new there only for the current user by cloning the current theme and changing the background color of buttons.

var myTheme = new ClientTheme("MyTheme", Application.Theme);
myTheme.Colors.buttonFace = "red";
Application.Theme = myTheme;

Example: Modify the current theme. If it is a shared theme (from the /Themes folder), the change will affect all users.

// Notice that when a member name that is also a keyword you can prefix it with @.
Application.Theme.Appearances.button.states.@default.properties.textColor = "red";

// Member names that cannot be used in C# or VB.NET can be addressed using them as strings.
Application.Theme.Appearances["button-info"].states["default"].properties.textColor = "red";

You may also save the newly created theme to /Themes to make it available to all users through Application.LoadTheme(name).

var myTheme = new ClientTheme("MyTheme", Application.Theme);
myTheme.Colors.buttonFace = "red";

File.WriteAllText(Application.MapPath("Themes\\MyTheme.theme"), myTheme.ToJSON());

Last updated