136 references to ListView
Microsoft.Maui.Controls (136)
Cells\Cell.cs (7)
143 var list = RealParent as ListView; 166 if ((Parent as ListView)?.HasUnevenRows == true || (Parent as TableView)?.HasUnevenRows == true) 230 var container = RealParent as ListView; 240 var container = RealParent as ListView;
Compatibility\Handlers\ListView\iOS\ContextActionCell.cs (7)
129 var parentListView = cell.RealParent as ListView; 441 var recycling = _cell.RealParent is ListView parentListView && 451 var parentListView = _cell?.RealParent as ListView; 463 var parentListView = _cell.RealParent as ListView;
Compatibility\Handlers\ListView\iOS\ListViewRenderer.cs (50)
23 public class ListViewRenderer : ViewRenderer<ListView, UITableView> 25 public static PropertyMapper<ListView, ListViewRenderer> Mapper = 26 new PropertyMapper<ListView, ListViewRenderer>(VisualElementRendererMapper); 28 public static CommandMapper<ListView, ListViewRenderer> CommandMapper = 29 new CommandMapper<ListView, ListViewRenderer>(VisualElementRendererCommandMapper); 42 ListView ListView => Element; 200 protected override void OnElementChanged(ElementChangedEventArgs<ListView> e) 206 var listView = e.OldElement; 248 var listView = e.NewElement; 282 if (e.PropertyName == Microsoft.Maui.Controls.ListView.RowHeightProperty.PropertyName) 284 else if (e.PropertyName == Microsoft.Maui.Controls.ListView.IsGroupingEnabledProperty.PropertyName) 286 else if (e.PropertyName == Microsoft.Maui.Controls.ListView.HasUnevenRowsProperty.PropertyName) 291 else if (e.PropertyName == Microsoft.Maui.Controls.ListView.IsPullToRefreshEnabledProperty.PropertyName) 293 else if (e.PropertyName == Microsoft.Maui.Controls.ListView.IsRefreshingProperty.PropertyName) 295 else if (e.PropertyName == Microsoft.Maui.Controls.ListView.SeparatorColorProperty.PropertyName) 297 else if (e.PropertyName == Microsoft.Maui.Controls.ListView.SeparatorVisibilityProperty.PropertyName) 305 else if (e.PropertyName == Microsoft.Maui.Controls.ListView.SelectionModeProperty.PropertyName) 307 else if (e.PropertyName == Microsoft.Maui.Controls.ListView.RefreshControlColorProperty.PropertyName) 807 public UnevenListViewDataSource(ListView list, FormsUITableViewController uiTableViewController) : base(list, uiTableViewController) 817 if (!_list.TryGetTarget(out var list)) 878 if (!_list.TryGetTarget(out var list)) 915 if (_list.TryGetTarget(out var list) && list.RowHeight == -1 && cell.Height == -1 && cell is ViewCell) 988 protected readonly WeakReference<ListView> _list; 1009 public ListViewDataSource(ListView list, FormsUITableViewController uiTableViewController) 1069 if (!_list.TryGetTarget(out var list)) 1121 if (!_list.TryGetTarget(out var list)) 1138 if (!_list.TryGetTarget(out var list)) 1163 if (!_list.TryGetTarget(out var list) || !list.IsGroupingEnabled) 1175 if (_list.TryGetTarget(out var list) && list.IsGroupingEnabled) 1189 if (!_list.TryGetTarget(out var list)) 1236 if (!_list.TryGetTarget(out var list)) 1270 if (!_list.TryGetTarget(out var list)) 1289 if (_list.TryGetTarget(out var list)) 1312 if (!_list.TryGetTarget(out var list)) 1333 if (!_list.TryGetTarget(out var list)) 1357 if (!_list.TryGetTarget(out var list)) 1374 if (!_list.TryGetTarget(out var list)) 1408 if (!_list.TryGetTarget(out var list)) 1426 if (!_list.TryGetTarget(out var list)) 1449 if (!_list.TryGetTarget(out var list)) 1456 if (!_list.TryGetTarget(out var list)) 1485 if (!_list.TryGetTarget(out var list)) 1498 if (!_list.TryGetTarget(out var list)) 1562 readonly WeakReference<ListView> _list; 1571 public FormsUITableViewController(ListView element, bool usingLargeTitles) 1626 if (_list.TryGetTarget(out var list) && !list.IsPullToRefreshEnabled) 1673 if (!_list.TryGetTarget(out var list)) 1687 if (!_list.TryGetTarget(out var list)) 1701 if (!_list.TryGetTarget(out var list)) 1753 if (_refresh.Refreshing && _list.TryGetTarget(out var list))
Compatibility\Handlers\Shell\iOS\ShellFlyoutLayoutManager.cs (1)
92 else if (Content is ListView lv)
Compatibility\iOS\Extensions\CellExtensions.cs (1)
17 if (self.RealParent is ListView)
DataTemplateSelector.cs (2)
15 var listView = container as ListView;
Element\Element.cs (1)
32 /// <description> Cells are elements meant to be added to <see cref="ListView"/> or <see cref="TableView"/>.</description>
Hosting\AppHostBuilderExtensions.cs (1)
120 handlersCollection.AddHandler(typeof(ListView), typeof(Handlers.Compatibility.ListViewRenderer));
ListView\ListView.cs (41)
19 public class ListView : ItemsView<Cell>, IListViewController, IElementConfiguration<ListView>, IVisualTreeElement 28 public static readonly BindableProperty IsPullToRefreshEnabledProperty = BindableProperty.Create(nameof(IsPullToRefreshEnabled), typeof(bool), typeof(ListView), false); 31 public static readonly BindableProperty IsRefreshingProperty = BindableProperty.Create(nameof(IsRefreshing), typeof(bool), typeof(ListView), false, BindingMode.TwoWay); 34 public static readonly BindableProperty RefreshCommandProperty = BindableProperty.Create(nameof(RefreshCommand), typeof(ICommand), typeof(ListView), null, propertyChanged: OnRefreshCommandChanged); 37 public static readonly BindableProperty HeaderProperty = BindableProperty.Create(nameof(Header), typeof(object), typeof(ListView), null, propertyChanged: OnHeaderChanged); 40 public static readonly BindableProperty HeaderTemplateProperty = BindableProperty.Create(nameof(HeaderTemplate), typeof(DataTemplate), typeof(ListView), null, propertyChanged: OnHeaderTemplateChanged, 44 public static readonly BindableProperty FooterProperty = BindableProperty.Create(nameof(Footer), typeof(object), typeof(ListView), null, propertyChanged: OnFooterChanged); 47 public static readonly BindableProperty FooterTemplateProperty = BindableProperty.Create(nameof(FooterTemplate), typeof(DataTemplate), typeof(ListView), null, propertyChanged: OnFooterTemplateChanged, 51 public static readonly BindableProperty SelectedItemProperty = BindableProperty.Create(nameof(SelectedItem), typeof(object), typeof(ListView), null, BindingMode.OneWayToSource, 55 public static readonly BindableProperty SelectionModeProperty = BindableProperty.Create(nameof(SelectionMode), typeof(ListViewSelectionMode), typeof(ListView), ListViewSelectionMode.Single); 58 public static readonly BindableProperty HasUnevenRowsProperty = BindableProperty.Create(nameof(HasUnevenRows), typeof(bool), typeof(ListView), false); 61 public static readonly BindableProperty RowHeightProperty = BindableProperty.Create(nameof(RowHeight), typeof(int), typeof(ListView), -1); 64 public static readonly BindableProperty GroupHeaderTemplateProperty = BindableProperty.Create(nameof(GroupHeaderTemplate), typeof(DataTemplate), typeof(ListView), null, 68 public static readonly BindableProperty IsGroupingEnabledProperty = BindableProperty.Create(nameof(IsGroupingEnabled), typeof(bool), typeof(ListView), false); 71 public static readonly BindableProperty SeparatorVisibilityProperty = BindableProperty.Create(nameof(SeparatorVisibility), typeof(SeparatorVisibility), typeof(ListView), SeparatorVisibility.Default); 74 public static readonly BindableProperty SeparatorColorProperty = BindableProperty.Create(nameof(SeparatorColor), typeof(Color), typeof(ListView), null); 77 public static readonly BindableProperty RefreshControlColorProperty = BindableProperty.Create(nameof(RefreshControlColor), typeof(Color), typeof(ListView), null); 80 public static readonly BindableProperty HorizontalScrollBarVisibilityProperty = BindableProperty.Create(nameof(HorizontalScrollBarVisibility), typeof(ScrollBarVisibility), typeof(ListView), ScrollBarVisibility.Default); 83 public static readonly BindableProperty VerticalScrollBarVisibilityProperty = BindableProperty.Create(nameof(VerticalScrollBarVisibility), typeof(ScrollBarVisibility), typeof(ListView), ScrollBarVisibility.Default); 87 readonly Lazy<PlatformConfigurationRegistry<ListView>> _platformConfigurationRegistry; 113 _platformConfigurationRegistry = new Lazy<PlatformConfigurationRegistry<ListView>>(() => new PlatformConfigurationRegistry<ListView>(this)); 622 var lv = (ListView)bindable; 628 var lv = (ListView)bindable; 634 var lv = (ListView)bindable; 638 Application.Current?.FindMauiContext()?.CreateLogger<ListView>()?.LogWarning("GroupHeaderTemplate and GroupDisplayBinding cannot be set at the same time, setting GroupHeaderTemplate to null"); 644 var lv = (ListView)bindable; 648 Application.Current?.FindMauiContext()?.CreateLogger<ListView>()?.LogWarning("GroupHeaderTemplate and GroupDisplayBinding cannot be set at the same time, setting GroupDisplayBinding to null"); 654 var lv = (ListView)bindable; 702 var lv = (ListView)bindable; 708 var lv = (ListView)bindable; 740 => ((ListView)bindable).ItemSelected?.Invoke(bindable, new SelectedItemChangedEventArgs(newValue, ((ListView)bindable).TemplatedItems.GetGlobalIndexOfItem(newValue))); 751 public IPlatformElementConfiguration<T, ListView> On<T>() where T : IConfigPlatform
PlatformConfiguration\AndroidSpecific\ListView.cs (4)
4 using FormsElement = Maui.Controls.ListView; 25 public static bool IsFastScrollEnabled(this IPlatformElementConfiguration<Android, FormsElement> config) 31 public static IPlatformElementConfiguration<Android, FormsElement> SetIsFastScrollEnabled(this IPlatformElementConfiguration<Android, FormsElement> config, bool value)
PlatformConfiguration\iOSSpecific\ListView.cs (12)
4 using FormsElement = Maui.Controls.ListView; 10 public static readonly BindableProperty SeparatorStyleProperty = BindableProperty.Create(nameof(SeparatorStyle), typeof(SeparatorStyle), typeof(FormsElement), SeparatorStyle.Default); 25 public static SeparatorStyle GetSeparatorStyle(this IPlatformElementConfiguration<iOS, FormsElement> config) 31 public static IPlatformElementConfiguration<iOS, FormsElement> SetSeparatorStyle(this IPlatformElementConfiguration<iOS, FormsElement> config, SeparatorStyle value) 38 public static readonly BindableProperty GroupHeaderStyleProperty = BindableProperty.Create(nameof(GroupHeaderStyle), typeof(GroupHeaderStyle), typeof(FormsElement), GroupHeaderStyle.Plain); 53 public static GroupHeaderStyle GetGroupHeaderStyle(this IPlatformElementConfiguration<iOS, FormsElement> config) 59 public static IPlatformElementConfiguration<iOS, FormsElement> SetGroupHeaderStyle(this IPlatformElementConfiguration<iOS, FormsElement> config, GroupHeaderStyle value) 81 public static IPlatformElementConfiguration<iOS, FormsElement> SetRowAnimationsEnabled(this IPlatformElementConfiguration<iOS, FormsElement> config, bool value) 88 public static bool RowAnimationsEnabled(this IPlatformElementConfiguration<iOS, FormsElement> config)
PlatformConfiguration\WindowsSpecific\ListView.cs (4)
6 using FormsElement = Maui.Controls.ListView; 31 public static ListViewSelectionMode GetSelectionMode(this IPlatformElementConfiguration<Windows, FormsElement> config) 37 public static IPlatformElementConfiguration<Windows, FormsElement> SetSelectionMode( 38 this IPlatformElementConfiguration<Windows, FormsElement> config, ListViewSelectionMode value)
SwipeView\SwipeView.cs (3)
295 if (_scrollParent is ListView listView) 321 _scrollParent = this.FindParentOfType<ListView>(); 323 if (_scrollParent is ListView listView)
TemplatedItemsList.cs (2)
192 var listView = _itemsView as ListView;