protected override void OnAppearing() { base.OnAppearing(); IListViewController listViewController = this.RecipeListView as IListViewController; if (listViewController != null) { listViewController.ScrollToRequested += ListViewControllerOnScrollToRequested; } }
void SetCell(object newContext) { var cell = newContext as Cell; if (ReferenceEquals(Cell?.BindingContext, newContext)) { return; } // If there is a ListView, load the Cell content from the ItemTemplate. // Otherwise, the given Cell is already a templated Cell from a TableView. ListView lv = _listView.Value; if (lv != null) { bool isGroupHeader = IsGroupHeader; DataTemplate template = isGroupHeader ? lv.GroupHeaderTemplate : lv.ItemTemplate; object bindingContext = newContext; if (template is DataTemplateSelector) { template = ((DataTemplateSelector)template).SelectTemplate(bindingContext, lv); } if (template != null) { cell = template.CreateContent() as Cell; } else { IListViewController listViewController = lv; if (isGroupHeader) { bindingContext = listViewController.GetDisplayTextFromGroup(bindingContext); } cell = listViewController.CreateDefaultCell(bindingContext); } // A TableView cell should already have its parent, // but we need to set the parent for a ListView cell. cell.Parent = lv; // Set inherited BindingContext after setting the Parent so it won't be wiped out BindableObject.SetInheritedBindingContext(cell, bindingContext); // This provides the Group Header styling (e.g., larger font, etc.) when the // template is loaded later. cell.SetIsGroupHeader <ItemsView <Cell>, Cell>(isGroupHeader); } Cell = cell; }
public virtual void Setup(DataType content, int index, IListViewController controller) { if (display == null) { Initialize(); } display.Setup(content); this.index = index; this.controller = controller; UpdateView(); }
void SwipeRefreshLayout.IOnRefreshListener.OnRefresh() { IListViewController controller = Element; controller.SendRefreshing(); }
public void OnRefresh() { IListViewController controller = _listViewRenderer.Element; controller.SendRefreshing(); }
public static IListViewControllerEvents Events(this IListViewController This) { return(new IListViewControllerEvents(This)); }
public IListViewControllerEvents(IListViewController This) { this.This = This; }