Skip to end of metadata
Go to start of metadata

At the heart of the Crosslight for iOS platform is the view components that have been enhanced to support data binding and MVVM design pattern. Crosslight enhances the view components in a way that does not require subclassing so you can continue using the controls in the same way and manner as in the common iOS development – whether designing them through Xcode or create them programmatically. As the results, Crosslight delivers the best of both worlds by extending the existing controls with new functionality in loosely-coupled fashion.

The following table lists the MVVM-enabled view components along with the supported bindable properties.

View ComponentSupported Bindable Properties
UIView
  • Opacity
  • StyleAttributes
UIBarButtonItem
  • Text
  • Command
  • CommandParameter
UIButton
  • Text
  • Command
  • CommandParameter
UICollectionView 
  • IsEditing
  • EditItemCommand
  • AddItemCommand
  • DeleteItemCommand
  • ItemsSource
  • DisplayMemberPath
  • DetailMemberPath
  • DetailNavigationTarget
  • ImageMemberPath
  • ItemTemplateBinding
  • SelectedCommand
  • SelectedItem
  • SelectedItems
UIDatePicker 
  • Value
UIImageView 
  • Image
UILabel 
  • Text
UIPickerView 
  • SelectedValue
  • SelectedItem
  • ItemTemplateBinding
  • ItemsSource
UIProgressView 
  • Value
UISegmentedButton 
  • Command
  • CommandParameter
  • ItemsSource
  • DisplayMemberPath
  • ValueMemberPath
  • ImageMemberPath
  • SelectedValue
UISlider 
  • Value
UIStepper 
  • Value
UISwitch 
  • Value
UITableView 
  • IsEditing
  • IsBatchUpdating
  • EditItemCommand
  • AddItemCommand
  • DeleteItemCommand
  • ReorderItemCommand
  • ItemsSource
  • DisplayMemberPath
  • DetailMemberPath
  • DetailNavigationTarget
  • ImageMemberPath
  • ItemTemplateBinding
  • SelectedCommand
  • SelectedItem
  • SelectedItems
  • Command
  • CommandParameter
UITextField 
  • Text
  • HideKeyboardOnReturn
UITextView 
  • Text
UIWebView 
  • Value

Since Crosslight itself was implemented in a highly extensible architecture, you can easily create your own bindable properties – or support these bindable properties in your own view components by creating your own binding adapter. The binding adapter is the mediator that communicates the data flow between the view components and the ViewModel. The binding adapter is considered an advanced topic and is not covered in the release of this guide. It will be discussed in the next update of the guide.

The explanation and usage of each bindable properties listed above is discussed individually per related section in the guide. For instance, the supported bindable properties in table view are discussed in Working with Data Components.

For more information about how bindable properties work, see Crosslight Data Binding Features. For more information about the basic concept of Crosslight and MVVM pattern, see Crosslight and MVVM at a Glance.