Xamarin.iOS + MvvmCross - Notes about how to use Mvx TableViewSource

澹台庆
2023-12-01


The available v3 table sources are:

Abstract classes

  • MvxBaseTableViewSource
    • base functionality only
    • no ItemsSource - generally not used directly
  • MvxTableViewSource.cs
    • inherits from the basetable and addes ItemsSource for data-binding
    • inheriting classes need only to implement protected abstract UITableViewCell GetOrCreateCellFor(UITableView tableView, NSIndexPath indexPath, object item);

Concrete classes

  • MvxStandardTableViewSource.cs
    • inherits from MvxTableViewSource
    • provides the 'standard iPhone cell types' via UITableViewCellStyle
    • within these you can bind TitleText, DetailText, ImageUrl and (with some teasing) Accessory
  • MvxSimpleTableViewSource.cs
    • inherits from MvxTableViewSource
    • provides a single cell type for all items in the collection - via string nibName in the ctor
    • within these cells you can bind what you like - see videos (later)
  • MvxActionBasedTableViewSource.cs - provides some Func<>style hooks to allow you to implement GetOrCreateCellFor without inheriting a new class from

 类似资料: