Мне нужно получить TableView с автоматическими c высотой строки, я пытался установить высоту строки автоматически, как в закомментированном коде, но таким образом данные не загружаются
Код:
public partial class ViewController : NSViewController
{
public ViewController(IntPtr handle) : base(handle)
{
}
public override void ViewDidLoad()
{
base.ViewDidLoad();
var DataSource = new ProductTableDataSource();
DataSource.Products.Add(new Product("Xamarin.iOS Allows you to develop native iOS Applications in C#"));
DataSource.Products.Add(new Product("Xamarin.Android Allows you to develop native Android Applications in C#"));
DataSource.Products.Add(new Product("Xamarin.Mac Allows you to develop Mac native Applications in C#"));
DataSource.Products.Add(new Product("Xamarin.tvOS Allows you to develop Apple TV native Applications in C#"));
DataSource.Products.Add(new Product("Xamarin Studio Community A free, full-featured IDE for Mac users to create Android and iOS apps using Xamarin."));
DataSource.Products.Add(new Product("Visual Studio Community A free, full-featured and extensible IDE for Windows users to create Android and iOS apps with Xamarin, as well as Windows apps, web apps, and cloud services."));
DataSource.Products.Add(new Product("Visual Studio Professional Professional developer tools and services for individual developers or small teams."));
DataSource.Products.Add(new Product("Visual Studio Enterprise End-to-end solution for teams of any size with demanding quality and scale needs"));
DataSource.Products.Add(new Product("Xamarin Test Cloud Automatically test your app on thousands of mobile devices."));
DataSource.Products.Add(new Product("HockyApp Bring Mobile DevOps to your apps and reliability to your users."));
DataSource.Products.Add(new Product("Xamarin University Take your mobile strategy and apps to the next level."));
//Populate the Product Table
Tabella.DataSource = DataSource;
Tabella.Delegate = new ProductTableDelegate (this, DataSource);
//Tabella.UsesAutomaticRowHeights = true;
}
public override NSObject RepresentedObject
{
get
{
return base.RepresentedObject;
}
set
{
base.RepresentedObject = value;
// Update the view, if already loaded.
}
}
}
Как узнать высоту строки, которая обновляется при изменении ширины TableView?
Я загрузил пример по этой ссылке .
Заранее спасибо.