MarkLight 2.1.0 is released!

April 27, 2016
MarkLight 2.1.0 is a major evolution of the framework and it brings a lot of new features. Here are a few of the highlights:

  1. Larger Scope - The framework is no longer limited to creating user interfaces. You can now build entire scenes in MarkLight.

  2. Improved Data Binding
    • Multi binding:
      <Label Text="$Sum({Value1}, {Value2})" />
    • Binding to properties
    • Local, one-way and negated bindings
    • More dynamic handling of value propagation, e.g. changes in an object affects bindings to nested fields
    • More information here

  3. Dependency Fields - wraps SetValue calls. Use by adding underscore _ to the type name:

        public _string Text;

    Now you can assign values through a Value property:

        Text.Value = "New text";

    More information here

  4. Field Mapping - create abbreviated and descriptive view fields that maps and refer to view fields in another view or unity component:

        public _string Text;

    More information here

  5. State Fields - Simplifies creating views that can have different states. You can create various field states by prefixing the field path with a state name followed by a dash:

    <Button BackgroundColor="#7d7d7d" 
            Pressed-BackgroundColor="#ef706a" />
    You can switch between view states by calling SetState(stateName).

  6. State Animations - Animation between states can be defined using the new StateAnimation view:
    <StateAnimation From="Any" To="Highlighted">
        <Animate Field="BackgroundColor" Duration="0.05" />
    <StateAnimation From="Highlighted" To="Default">
        <Animate Field="BackgroundColor" Duration="0.5" />

  7. Better Dynamic Lists - Creating, working with and binding to lists has been improved through the ObservableList<T> class. More information on how to work with list data here.

Migrating from MarkUX? Read the migration guide

Change Log

  • Added selection and replace logic to ObservableList
  • ListItems can be set in Disabled state through IsDisabled field
  • Moved source code into /Plugins directory so framework isn't recompiled when project code changes
  • Intellisense in XUML now possible through simple configuration. XSD schema can be updated by clicking a button on the view presenter
  • View switcher can pass along custom data to the view switched to through the SwitchTo method and Activated view action
  • Action handlers can now take any custom data as parameter
  • Default state of views is now stored in serializable format and view state can be changed during compile time
  • Fixed bug with programmatically loaded view XUML missing when reloading the scene
  • Fixed bug where local bindings propagated in the wrong order
  • Added ShowTemplateInEditor to List so template can be made visible while working with it in the editor
  • Added mechanism to update bound list item data through ObservableList methods: ItemModified and ItemsModified.
  • Added Activated/Deactivated view action to View that gets triggered once after view is initialized and every time the view is activated/deactivated
  • Added DeselectAfterSelect and SelectOnMouseUp fields to List
  • BaseDirectory can now be specified on views (inherited by children). Default value can be set on view presenter
  • Added UnitSize a user-defined scalable element size unit (postfix "ux", "uy" and "uz"). Can specified on views (inherited by children) and the default value can be set on the view presenter
  • Added option on view presenter to disable automatic reloading of views when XUML changes
  • Added view actions for dragging to ScrollRect and Panel
  • Added DisableInteractionScrollDelta to ScrollRect so user interaction with child views can be disabled while scrolling
  • Dependency fields functionality added and all views have been converted to utilize dependency fields
  • Replaced AlwaysBlockRaycast with RaycastBlockMode enum and fixed bug where setting was ignored when Alpha was set to 0
  • Fixed bug in tab panel were dynamically created tabs wasn't deactivated by default
  • Fixed bug where list didn't notify parents of layout change when list is rebuilt
  • Bigger scope. The framework is no longer limited to UI. Any element in the scene can be created with the framework
  • Binding to properties as well as fields
  • Multi-binding through binding transformations or format strings
  • New binding operators for creating local bindings, one-way bindings, and negated bindings
  • More dynamic handling of value propagation and binding dependency checks
  • Dynamic loading of view XUML. View XUML can be loaded during run-time
  • View fields (i.e. both fields and properties) can be mapped through class attributes
  • State-management. Simplified handling of views having different states. You no longer need separate fields for different states, e.g. PressedButtonColor, HighlightedButtonColor, etc. You only need one field and storing the various states is handled by the framework
  • Animation between states are defined using a new StateAnimation view. Overall handling different states and animation between them requires much less code
  • New ObservableList class that is a generic list that can be bound to views such as the List, FlowList, DataGrid, ComboBox and TabPanel. Any changes to the list (add, remove) will be automatically propagated to the views that it's bound to
  • List-views respond to changes in their data better (no longer rebuilds entire list on changes)
  • TabPanel can be bound to dynamic list for dynamic tab creation
  • Multiple themes in the same scene. No longer restricted to one default theme. Themes can also be specified for individual views
  • AdjustToText fields on Button and ListItem
  • for adjusting its size to text
  • Disabled button styles added to the themes
  • Base directory of the framework can be changed and be put in any folder
  • Events and view actions added to animation views
  • The framework now provides means to access all of the unity component fields even if mappings doesn't exist
  • Fixed Panel bug where breadth of scrollbars where assumed to be 20px
  • Add disabled Button styles to CheckBox and RadioButton
  • Added OverrideWidth and OverrideHeight fields to UIView
  • Added IsVisible field that when set to false still renders the view but with alpha = 0
  • Local state field can be changed on views by using the "--" notation
  • Added Content view to base view that references the view that contains the contents of the view (usually the view itself unless a ContentPlaceholder is used)
  • The fields Theme and Style are now inherited and applied to children that haven't set their styles
  • Added Next/Previous method and ActiveView to ViewSwitcher
  • ListItem size can be adjusted with AdjustToText field. If set the ListItems will adjust their width/height to the text. Useful mainly if you want to create horizontal lists where each item is adjusted to the length of the text
  • Dynamic data is no longer removed upone clean up so dynamic data can be visible even though the scene isn't running
  • IsAlive property added to View
  • View actions can be disabled so even when triggered no action handlers are invoked
  • More flexible binding system, we can bind to uninitialized data, example: SelectedItem on the List.
  • Sprites and fonts can be loaded dynamically by using path strings provided they've been loaded once in the scene before the scene is run
  • Set-fields no longer required, View.IsSet(viewpath) can be used to see if a view field has been set

Join the Announcement List

Be notified when new themes, views, tutorials and updates are available