Class ListView
FormsDragNDropListView List view.
Inheritance
Implements
Inherited Members
Namespace: Forms9Patch
Assembly: Forms9Patch.dll
Syntax
public class ListView : Frame, INotifyPropertyChanged, IDynamicResourceHandler, IElement, INameScope, INavigationProxy, IStyleSelectable, IAnimatable, IResourcesProvider, IStyleElement, IFlowDirectionController, IPropertyPropagationController, IVisualController, ITabStopElement, IStylable, IViewController, IVisualElementController, IElementController, IGestureController, IGestureRecognizers, ILayout, ILayoutController, IPaddingElement, IControlTemplated, ILayout, IBackground, IShape, IDisposable, IElement
Constructors
ListView()
Initializes a new instance of the ListView class.
Declaration
public ListView()
ListView(ListViewCachingStrategy)
Initializes a new instance of the ListView class.
Declaration
public ListView(ListViewCachingStrategy cachingStrategy)
Parameters
Type | Name | Description |
---|---|---|
ListViewCachingStrategy | cachingStrategy | Caching strategy. |
Fields
ContentProperty
There is nothing to see here. Move on.
Declaration
[Obsolete("Invalid property", true)]
public static readonly BindableProperty ContentProperty
Field Value
Type | Description |
---|---|
BindableProperty |
EditableProperty
The editable property backing store.
Declaration
public static readonly BindableProperty EditableProperty
Field Value
Type | Description |
---|---|
BindableProperty |
FooterProperty
backing store for Footer property
Declaration
public static readonly BindableProperty FooterProperty
Field Value
Type | Description |
---|---|
BindableProperty |
FooterTemplateProperty
backing store for FooterTemplate property
Declaration
public static readonly BindableProperty FooterTemplateProperty
Field Value
Type | Description |
---|---|
BindableProperty |
GroupHeaderBackgroundColorProperty
The group header background color property backing store
Declaration
public static readonly BindableProperty GroupHeaderBackgroundColorProperty
Field Value
Type | Description |
---|---|
BindableProperty |
GroupHeaderRowHeightProperty
backing store for GroupHeaderRowHeight property
Declaration
public static readonly BindableProperty GroupHeaderRowHeightProperty
Field Value
Type | Description |
---|---|
BindableProperty |
GroupHeaderTemplateProperty
backing store for GroupHeaderTemplate property
Declaration
public static readonly BindableProperty GroupHeaderTemplateProperty
Field Value
Type | Description |
---|---|
BindableProperty |
GroupToggleBehaviorProperty
The backing store for the ListViews's GroupToggleBehavior property.
Declaration
public static readonly BindableProperty GroupToggleBehaviorProperty
Field Value
Type | Description |
---|---|
BindableProperty |
HeaderProperty
backing store for Header property
Declaration
public static readonly BindableProperty HeaderProperty
Field Value
Type | Description |
---|---|
BindableProperty |
HeaderTemplateProperty
backing store for HeaderTemplate property
Declaration
public static readonly BindableProperty HeaderTemplateProperty
Field Value
Type | Description |
---|---|
BindableProperty |
IsGroupingEnabledProperty
backing store for IsGroupingEnabled property
Declaration
public static readonly BindableProperty IsGroupingEnabledProperty
Field Value
Type | Description |
---|---|
BindableProperty |
ItemsSourceProperty
backing store for ItemsSource property
Declaration
public static readonly BindableProperty ItemsSourceProperty
Field Value
Type | Description |
---|---|
BindableProperty |
ItemTemplatesProperty
backing store for ItemTemplates property
Declaration
public static readonly BindableProperty ItemTemplatesProperty
Field Value
Type | Description |
---|---|
BindableProperty |
RowHeightProperty
backing store for RowHeight property
Declaration
public static readonly BindableProperty RowHeightProperty
Field Value
Type | Description |
---|---|
BindableProperty |
SelectedCellBackgroundColorProperty
The selected cell background color property.
Declaration
public static readonly BindableProperty SelectedCellBackgroundColorProperty
Field Value
Type | Description |
---|---|
BindableProperty |
SelectedItemProperty
backing store for SelectedItem property
Declaration
public static readonly BindableProperty SelectedItemProperty
Field Value
Type | Description |
---|---|
BindableProperty |
SelectedItemsPropertyKey
The selected items property.
Declaration
public static readonly BindablePropertyKey SelectedItemsPropertyKey
Field Value
Type | Description |
---|---|
BindablePropertyKey |
SeparatorColorProperty
backing store for SeparatorColor property
Declaration
public static readonly BindableProperty SeparatorColorProperty
Field Value
Type | Description |
---|---|
BindableProperty |
SeparatorHeightProperty
backing store for SeparatorHeight property
Declaration
public static readonly BindableProperty SeparatorHeightProperty
Field Value
Type | Description |
---|---|
BindableProperty |
SeparatorLeftIndentProperty
backing store for SeparatorLeftIndent property
Declaration
public static readonly BindableProperty SeparatorLeftIndentProperty
Field Value
Type | Description |
---|---|
BindableProperty |
SeparatorRightIndentProperty
backing store for SeparatorRightIndent property
Declaration
public static readonly BindableProperty SeparatorRightIndentProperty
Field Value
Type | Description |
---|---|
BindableProperty |
SeparatorVisibilityProperty
backing store for SeparatorVisibility property
Declaration
public static readonly BindableProperty SeparatorVisibilityProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Properties
Content
There is nothing to see here. Move on.
Declaration
[Obsolete("Invalid property", true)]
public View Content { get; set; }
Property Value
Type | Description |
---|---|
View | The content. |
Editable
Gets or sets a value indicating whether this ListView is editable - cells may be moved or deleted based upon the response from the CanDrag CanDrop CanDelete delegate methods.
Declaration
public bool Editable { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
|
Footer
Gets/Sets the Footer property
Declaration
public object Footer { get; set; }
Property Value
Type | Description |
---|---|
Object |
FooterTemplate
Gets/Sets the FooterTemplate property
Declaration
public DataTemplate FooterTemplate { get; set; }
Property Value
Type | Description |
---|---|
DataTemplate |
GroupHeaderBackgroundColor
Gets or sets the color of the group header background.
Declaration
public Color GroupHeaderBackgroundColor { get; set; }
Property Value
Type | Description |
---|---|
Color | The color of the group header background. |
GroupHeaderRowHeight
Gets/Sets the GroupHeaderRowHeight property
Declaration
public double GroupHeaderRowHeight { get; set; }
Property Value
Type | Description |
---|---|
Double |
GroupHeaderTemplate
Gets/Sets the GroupHeaderTemplate property
Declaration
public GroupHeaderTemplate GroupHeaderTemplate { get; set; }
Property Value
Type | Description |
---|---|
GroupHeaderTemplate |
GroupToggleBehavior
Gets or sets the ListViews's GroupToggle behavior.
Declaration
public GroupToggleBehavior GroupToggleBehavior { get; set; }
Property Value
Type | Description |
---|---|
GroupToggleBehavior | The Toggle behavior (None, Radio, Multiselect). |
Header
Gets/Sets the Header property
Declaration
public object Header { get; set; }
Property Value
Type | Description |
---|---|
Object |
HeaderTemplate
Gets or sets the header template.
Declaration
public DataTemplate HeaderTemplate { get; set; }
Property Value
Type | Description |
---|---|
DataTemplate | The header template. |
IsGroupingEnabled
Gets/Sets the IsGroupingEnabled property
Declaration
public bool IsGroupingEnabled { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
IsScrollEnabled
Gets or sets a value indicating whether this ListView is scroll enabled.
Declaration
public bool IsScrollEnabled { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
|
IsScrolling
Gets a value indicating whether this ListView is actively scrolling.
Declaration
public bool IsScrolling { get; }
Property Value
Type | Description |
---|---|
Boolean |
|
ItemsSource
Gets/Sets the ItemsSource property
Declaration
public IEnumerable ItemsSource { get; set; }
Property Value
Type | Description |
---|---|
IEnumerable |
ItemTemplates
Gets/Sets the ItemTemplates property
Declaration
public DataTemplateSelector ItemTemplates { get; set; }
Property Value
Type | Description |
---|---|
DataTemplateSelector |
RowHeight
Gets/Sets the RowHeight property
Declaration
public int RowHeight { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
ScrollOffset
Gets the scroll offset (current position) of ListView.
Declaration
public double ScrollOffset { get; }
Property Value
Type | Description |
---|---|
Double | The scroll offset. |
SelectedCellBackgroundColor
Gets or sets the color of the selected cell background.
Declaration
public Color SelectedCellBackgroundColor { get; set; }
Property Value
Type | Description |
---|---|
Color | The color of the selected cell background. |
SelectedItem
Gets/Sets the SelectedItem property
Declaration
public object SelectedItem { get; set; }
Property Value
Type | Description |
---|---|
Object |
SelectedItems
Gets the selected items.
Declaration
public ObservableCollection<object> SelectedItems { get; }
Property Value
Type | Description |
---|---|
ObservableCollection<Object> | The selected items. |
SeparatorColor
Gets/Sets the SeparatorColor property
Declaration
public Color SeparatorColor { get; set; }
Property Value
Type | Description |
---|---|
Color |
SeparatorHeight
Gets/Sets the SeparatorHeight property
Declaration
public double SeparatorHeight { get; set; }
Property Value
Type | Description |
---|---|
Double |
SeparatorLeftIndent
Gets/Sets the SeparatorLeftIndent property
Declaration
public double SeparatorLeftIndent { get; set; }
Property Value
Type | Description |
---|---|
Double |
SeparatorRightIndent
Gets/Sets the SeparatorRightIndent property
Declaration
public double SeparatorRightIndent { get; set; }
Property Value
Type | Description |
---|---|
Double |
SeparatorVisibility
Gets/Sets the SeparatorVisibility property
Declaration
public SeparatorVisibility SeparatorVisibility { get; set; }
Property Value
Type | Description |
---|---|
SeparatorVisibility |
VisibleIndexes
Gets a list of the ListView's visible indexes.
Declaration
public List<int[]> VisibleIndexes { get; }
Property Value
Type | Description |
---|---|
List<Int32[]> | The visible indexes. |
VisibleItems
Gets a list of the ListView's visible items.
Declaration
public List<object> VisibleItems { get; }
Property Value
Type | Description |
---|---|
List<Object> | The visible items. |
Methods
Dispose(Boolean)
Dispose this ListView and its children
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
Boolean | disposing |
Overrides
LayoutChildren(Double, Double, Double, Double)
Layouts the children.
Declaration
protected override void LayoutChildren(double x, double y, double width, double height)
Parameters
Type | Name | Description |
---|---|---|
Double | x | The x coordinate. |
Double | y | The y coordinate. |
Double | width | Width. |
Double | height | Height. |
Overrides
OnPropertyChanged(String)
Trigged with a property has changed
Declaration
protected override void OnPropertyChanged(string propertyName = null)
Parameters
Type | Name | Description |
---|---|---|
String | propertyName | Property name. |
Overrides
OnPropertyChanging(String)
Ons the property changing.
Declaration
protected override void OnPropertyChanging(string propertyName = null)
Parameters
Type | Name | Description |
---|---|---|
String | propertyName | Property name. |
Overrides
ScrollBy(Double, Boolean)
Scrolls the ListView by delta pixels.
Declaration
public bool ScrollBy(double delta, bool animated = true)
Parameters
Type | Name | Description |
---|---|---|
Double | delta | Delta to move list relative to current position |
Boolean | animated | If set to |
Returns
Type | Description |
---|---|
Boolean |
|
ScrollTo(Double, Boolean)
Scrolls ListView to a position (offset) in pixels from the start
Declaration
public bool ScrollTo(double offset, bool animiated = true)
Parameters
Type | Name | Description |
---|---|---|
Double | offset | Offset (position) to scroll to. |
Boolean | animiated | If set to |
Returns
Type | Description |
---|---|
Boolean |
|
ScrollTo(Int32[], ScrollToPosition, Boolean)
Scrolls to item at index
Declaration
public bool ScrollTo(int[] index, ScrollToPosition position, bool animated = true)
Parameters
Type | Name | Description |
---|---|---|
Int32[] | index | |
ScrollToPosition | position | |
Boolean | animated |
Returns
Type | Description |
---|---|
Boolean |
ScrollTo(Object, Object, ScrollToPosition, Boolean)
Scrolls to item in group
Declaration
public bool ScrollTo(object item, object group, ScrollToPosition position, bool animated = true)
Parameters
Type | Name | Description |
---|---|---|
Object | item | Item. |
Object | group | Group. |
ScrollToPosition | position | Position. |
Boolean | animated | If set to |
Returns
Type | Description |
---|---|
Boolean |
ScrollTo(Object, ScrollToPosition, Boolean)
Scrolls to item
Declaration
public bool ScrollTo(object item, ScrollToPosition position, bool animated = true)
Parameters
Type | Name | Description |
---|---|---|
Object | item | Item. |
ScrollToPosition | position | Position. |
Boolean | animated | If set to |
Returns
Type | Description |
---|---|
Boolean |
TapItem(Object)
Taps the item.
Declaration
public void TapItem(object item)
Parameters
Type | Name | Description |
---|---|---|
Object | item | Item. |
TapItemAtPoint(Point)
Simulates a tap of the item at point in this ListView.
Declaration
public void TapItemAtPoint(Point p)
Parameters
Type | Name | Description |
---|---|---|
Point | p | P. |
Events
Appeared
Occures when the ListView has appeared
Declaration
public event EventHandler Appeared
Event Type
Type | Description |
---|---|
EventHandler |
ItemAppearing
Occurs when item is appearing.
Declaration
public event EventHandler<ItemVisibilityEventArgs> ItemAppearing
Event Type
Type | Description |
---|---|
EventHandler<ItemVisibilityEventArgs> |
ItemDisappearing
Occurs when item is disappearing.
Declaration
public event EventHandler<ItemVisibilityEventArgs> ItemDisappearing
Event Type
Type | Description |
---|---|
EventHandler<ItemVisibilityEventArgs> |
ItemPropertyChanged
Occurs when property of a ListViewItem has changed.
Declaration
public event PropertyChangedEventHandler ItemPropertyChanged
Event Type
Type | Description |
---|---|
PropertyChangedEventHandler |
ItemPropertyChanging
Occurs when a property of a ListViewItem is about to change.
Declaration
public event PropertyChangingEventHandler ItemPropertyChanging
Event Type
Type | Description |
---|---|
PropertyChangingEventHandler |
ItemSelected
Occurs when cell is selected.
Declaration
public event EventHandler<SelectedItemChangedEventArgs> ItemSelected
Event Type
Type | Description |
---|---|
EventHandler<SelectedItemChangedEventArgs> |
ItemsSourceSet
Occurs when ItemsSource setting has completed.
Declaration
public event EventHandler ItemsSourceSet
Event Type
Type | Description |
---|---|
EventHandler |
ItemTapped
Occurs when cell is tapped.
Declaration
public event EventHandler<ItemTappedEventArgs> ItemTapped
Event Type
Type | Description |
---|---|
EventHandler<ItemTappedEventArgs> |
SwipeMenuItemTapped
Occurs when a swipe menu item has been tapped.
Declaration
public event EventHandler<SwipeMenuItemTappedArgs> SwipeMenuItemTapped
Event Type
Type | Description |
---|---|
EventHandler<SwipeMenuItemTappedArgs> |