Fleet Mobile
Search Results for

    Show / Hide Table of Contents

    Class SearchingPage<T>

    列表类页面的基础类

    Inheritance
    object
    BindableObject
    Element
    StyleableElement
    NavigableElement
    VisualElement
    Page
    TemplatedPage
    ContentPage
    BasePage
    SearchingPage<T>
    Implements
    INotifyPropertyChanged
    IVisualTreeElement
    IEffectControlProvider
    IToolTipElement
    IContextFlyoutElement
    IAnimatable
    ILayout
    IPageController
    IVisualElementController
    IElementController
    IElementConfiguration<TElement>
    ISafeAreaView
    ITitledElement
    IToolbarElement
    IContentView
    IPadding
    ICrossPlatformLayout
    IHotReloadableView
    IView
    IElement
    ITransform
    IReplaceableView
    ILoading
    INetworkIndicator
    Inherited Members
    BasePage.serializerOptions
    BasePage.DelayedTime
    BasePage.IsLoadingProperty
    BasePage.IsNetworkFailedProperty
    BasePage.SafeAreaThicknessProperty
    BasePage.isBusy
    BasePage.OnAppearing()
    BasePage.OnDisappearing()
    BasePage.OnNetworkChanged(bool)
    BasePage.GetTitleHeaderView()
    BasePage.AddToolbarItem(ToolbarItem)
    BasePage.RemoveToolbarItem(ToolbarItem)
    BasePage.GetToolbarItem<T>(string, bool, Func<T, bool>, string, T, bool, EventHandler, Command)
    BasePage.AddTextToolbarItem<T>(string, Func<T, bool>, string, T, bool, EventHandler, Command)
    BasePage.AddIconToolbarItem<T>(string, Func<T, bool>, string, T, bool, EventHandler, Command)
    BasePage.AddTextToolbarItem(string, EventHandler, Command)
    BasePage.AddIconToolbarItem(string, EventHandler, Command)
    BasePage.OnNavigatedFrom(NavigatedFromEventArgs)
    BasePage.OnPageNavigated()
    BasePage.OnPageLoaded()
    BasePage.OnPageUnloaded()
    BasePage.Throttle(Action<CancellationToken>, int, bool)
    BasePage.Debounce(Action<CancellationToken>, int, bool)
    BasePage.InvokeDelayed(Action, TimeSpan, bool, bool, string)
    BasePage.Tap(Action)
    BasePage.Tap(Func<Task>)
    BasePage.CancelSource(CancellationTokenSource)
    BasePage.OnBackButtonPressed()
    BasePage.OnBackInternalAsync(bool)
    BasePage.OnTitleTapped()
    BasePage.TriggerLoadingItem<T>(object, Action<T>, bool, Action)
    BasePage.TriggerLoadingItem<T>(object, Func<T, Task>)
    BasePage.CreateProperty<T, V>(string, T, BindingMode, Action<V, T>)
    BasePage.StartWatch()
    BasePage.R(string, string)
    BasePage.IsLoading
    BasePage.IsNetworkFailed
    BasePage.SafeAreaThickness
    BasePage.BackCommand
    BasePage.TitleTapCommand
    BasePage.IsAutoRotateAllowed
    BasePage.IsBackButtonVisible
    BasePage.IsFleetBotVisible
    BasePage.CustomHandlerViews
    BasePage.MainCollectionView
    BasePage.IsClosableWhenLoading
    BasePage.SafeAreaInsets
    ContentPage.ContentProperty
    ContentPage.HideSoftInputOnTappedProperty
    ContentPage.OnBindingContextChanged()
    ContentPage.MeasureOverride(double, double)
    ContentPage.LayoutChildren(double, double, double, double)
    ContentPage.ArrangeOverride(Rect)
    ContentPage.InvalidateMeasureOverride()
    ContentPage.Content
    ContentPage.HideSoftInputOnTapped
    TemplatedPage.ControlTemplateProperty
    TemplatedPage.OnApplyTemplate()
    TemplatedPage.OnChildRemoved(Element, int)
    TemplatedPage.GetTemplateChild(string)
    TemplatedPage.ControlTemplate
    Page.BusySetSignalName
    Page.AlertSignalName
    Page.PromptSignalName
    Page.ActionSheetSignalName
    Page.BackgroundImageSourceProperty
    Page.IsBusyProperty
    Page.PaddingProperty
    Page.TitleProperty
    Page.IconImageSourceProperty
    Page.DisplayActionSheet(string, string, string, params string[])
    Page.DisplayActionSheet(string, string, string, FlowDirection, params string[])
    Page.DisplayAlert(string, string, string)
    Page.DisplayAlert(string, string, string, string)
    Page.DisplayAlert(string, string, string, FlowDirection)
    Page.DisplayAlert(string, string, string, string, FlowDirection)
    Page.DisplayPromptAsync(string, string, string, string, string, int, Keyboard, string)
    Page.ForceLayout()
    Page.SendBackButtonPressed()
    Page.OnChildMeasureInvalidated(object, EventArgs)
    Page.OnParentSet()
    Page.OnSizeAllocated(double, double)
    Page.UpdateChildrenLayout()
    Page.On<T>()
    Page.OnNavigatingFrom(NavigatingFromEventArgs)
    Page.GetParentWindow()
    Page.BackgroundImageSource
    Page.IconImageSource
    Page.IsBusy
    Page.Padding
    Page.Title
    Page.ToolbarItems
    Page.MenuBarItems
    Page.LayoutChanged
    Page.Appearing
    Page.Disappearing
    Page.NavigatedTo
    Page.NavigatingFrom
    Page.NavigatedFrom
    VisualElement.NavigationProperty
    VisualElement.StyleProperty
    VisualElement.InputTransparentProperty
    VisualElement.IsEnabledProperty
    VisualElement.XProperty
    VisualElement.YProperty
    VisualElement.AnchorXProperty
    VisualElement.AnchorYProperty
    VisualElement.TranslationXProperty
    VisualElement.TranslationYProperty
    VisualElement.WidthProperty
    VisualElement.HeightProperty
    VisualElement.RotationProperty
    VisualElement.RotationXProperty
    VisualElement.RotationYProperty
    VisualElement.ScaleProperty
    VisualElement.ScaleXProperty
    VisualElement.ScaleYProperty
    VisualElement.ClipProperty
    VisualElement.VisualProperty
    VisualElement.IsVisibleProperty
    VisualElement.OpacityProperty
    VisualElement.BackgroundColorProperty
    VisualElement.BackgroundProperty
    VisualElement.BehaviorsProperty
    VisualElement.TriggersProperty
    VisualElement.WidthRequestProperty
    VisualElement.HeightRequestProperty
    VisualElement.MinimumWidthRequestProperty
    VisualElement.MinimumHeightRequestProperty
    VisualElement.MaximumWidthRequestProperty
    VisualElement.MaximumHeightRequestProperty
    VisualElement.IsFocusedProperty
    VisualElement.FlowDirectionProperty
    VisualElement.WindowProperty
    VisualElement.ShadowProperty
    VisualElement.ZIndexProperty
    VisualElement.BatchBegin()
    VisualElement.BatchCommit()
    VisualElement.Focus()
    VisualElement.Measure(double, double)
    VisualElement.Measure(double, double, MeasureFlags)
    VisualElement.Unfocus()
    VisualElement.InvalidateMeasure()
    VisualElement.OnChildAdded(Element)
    VisualElement.OnChildrenReordered()
    VisualElement.OnMeasure(double, double)
    VisualElement.SizeAllocated(double, double)
    VisualElement.ChangeVisualState()
    VisualElement.RefreshIsEnabledProperty()
    VisualElement.Arrange(Rect)
    VisualElement.Layout(Rect)
    VisualElement.MapBackgroundColor(IViewHandler, IView)
    VisualElement.MapBackgroundImageSource(IViewHandler, IView)
    VisualElement.Visual
    VisualElement.FlowDirection
    VisualElement.Window
    VisualElement.AnchorX
    VisualElement.AnchorY
    VisualElement.BackgroundColor
    VisualElement.Background
    VisualElement.Behaviors
    VisualElement.Bounds
    VisualElement.Height
    VisualElement.HeightRequest
    VisualElement.InputTransparent
    VisualElement.IsEnabled
    VisualElement.IsEnabledCore
    VisualElement.IsFocused
    VisualElement.IsVisible
    VisualElement.MinimumHeightRequest
    VisualElement.MinimumWidthRequest
    VisualElement.MaximumHeightRequest
    VisualElement.MaximumWidthRequest
    VisualElement.Opacity
    VisualElement.Rotation
    VisualElement.RotationX
    VisualElement.RotationY
    VisualElement.Scale
    VisualElement.ScaleX
    VisualElement.ScaleY
    VisualElement.TranslationX
    VisualElement.TranslationY
    VisualElement.Triggers
    VisualElement.Width
    VisualElement.WidthRequest
    VisualElement.X
    VisualElement.Y
    VisualElement.Clip
    VisualElement.Resources
    VisualElement.Frame
    VisualElement.Handler
    VisualElement.Shadow
    VisualElement.ZIndex
    VisualElement.DesiredSize
    VisualElement.IsLoaded
    VisualElement.ChildrenReordered
    VisualElement.Focused
    VisualElement.MeasureInvalidated
    VisualElement.SizeChanged
    VisualElement.Unfocused
    VisualElement.Loaded
    VisualElement.Unloaded
    NavigableElement.Navigation
    StyleableElement.Style
    StyleableElement.StyleClass
    StyleableElement.class
    Element.AutomationIdProperty
    Element.ClassIdProperty
    Element.InsertLogicalChild(int, Element)
    Element.AddLogicalChild(Element)
    Element.RemoveLogicalChild(Element)
    Element.ClearLogicalChildren()
    Element.FindByName(string)
    Element.RemoveDynamicResource(BindableProperty)
    Element.SetDynamicResource(BindableProperty, string)
    Element.OnPropertyChanged(string)
    Element.OnParentChanging(ParentChangingEventArgs)
    Element.OnParentChanged()
    Element.OnHandlerChanging(HandlerChangingEventArgs)
    Element.OnHandlerChanged()
    Element.MapAutomationPropertiesIsInAccessibleTree(IElementHandler, Element)
    Element.MapAutomationPropertiesExcludedWithChildren(IElementHandler, Element)
    Element.AutomationId
    Element.ClassId
    Element.Effects
    Element.Id
    Element.StyleId
    Element.Parent
    Element.ChildAdded
    Element.ChildRemoved
    Element.DescendantAdded
    Element.DescendantRemoved
    Element.ParentChanging
    Element.ParentChanged
    Element.HandlerChanging
    Element.HandlerChanged
    BindableObject.BindingContextProperty
    BindableObject.ClearValue(BindableProperty)
    BindableObject.ClearValue(BindablePropertyKey)
    BindableObject.GetValue(BindableProperty)
    BindableObject.IsSet(BindableProperty)
    BindableObject.RemoveBinding(BindableProperty)
    BindableObject.SetBinding(BindableProperty, BindingBase)
    BindableObject.ApplyBindings()
    BindableObject.OnPropertyChanging(string)
    BindableObject.UnapplyBindings()
    BindableObject.SetValue(BindableProperty, object)
    BindableObject.SetValue(BindablePropertyKey, object)
    BindableObject.CoerceValue(BindableProperty)
    BindableObject.CoerceValue(BindablePropertyKey)
    BindableObject.Dispatcher
    BindableObject.BindingContext
    BindableObject.PropertyChanged
    BindableObject.PropertyChanging
    BindableObject.BindingContextChanged
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Extension Methods
    UIExtensions.AppThemeBinding<T, K>(T, BindableProperty, K, K)
    UIExtensions.BackgroundColorBinding<T, TSource, TProperty>(T, Func<TSource, TProperty>, string, IValueConverter, object, string, TSource)
    UIExtensions.Binding<T>(T, BindableProperty, BindingBase)
    UIExtensions.Binding<T, TSource, TProperty>(T, BindableProperty, Func<TSource, TProperty>, string, Action<TSource, TProperty>, BindingMode?, IValueConverter, object, string, TSource)
    UIExtensions.EnabledBinding<T, TSource, TProperty>(T, Func<TSource, TProperty>, string, IValueConverter, object, string, TSource)
    UIExtensions.GridColumnSpan<T>(T, int)
    UIExtensions.GridColumn<T>(T, int)
    UIExtensions.GridRowSpan<T>(T, int)
    UIExtensions.GridRow<T>(T, int)
    UIExtensions.TranslationXBinding<T, TSource, TProperty>(T, Func<TSource, TProperty>, string, IValueConverter, object, string, TSource)
    UIExtensions.VisibleBinding<T, TSource, TProperty>(T, Func<TSource, TProperty>, string, IValueConverter, object, string, TSource)
    UIExtensions.WidthRequestBinding<T, TSource, TProperty>(T, Func<TSource, TProperty>, string, IValueConverter, object, string, TSource)
    ExceptionExtensions.ShowExceptionAsync(INetworkIndicator, Exception, string, bool, bool)
    ExceptionExtensions.StartSafeTask(INetworkIndicator, Action, string, Action<bool>, bool)
    ExceptionExtensions.StartSafeTaskAsync(INetworkIndicator, Func<CancellationToken, Task>, string, Action<bool>, bool, CancellationToken)
    ExceptionExtensions.StartSafeTaskAsync<T>(INetworkIndicator, Func<CancellationToken, Task<T>>, string, Action<bool, T>, bool, CancellationToken)
    Namespace: Fleet.Mobile.Containers
    Assembly: FleetMobile.dll
    Syntax
    public abstract class SearchingPage<T> : BasePage, INotifyPropertyChanged, IVisualTreeElement, IEffectControlProvider, IToolTipElement, IContextFlyoutElement, IAnimatable, ILayout, IPageController, IVisualElementController, IElementController, IElementConfiguration<Page>, ISafeAreaView, ITitledElement, IToolbarElement, IContentView, IPadding, ICrossPlatformLayout, IHotReloadableView, IView, IElement, ITransform, IReplaceableView, ILoading, INetworkIndicator
    Type Parameters
    T

    列表元素类型

    Constructors

    SearchingPage()

    Declaration
    public SearchingPage()

    Fields

    DataProperty

    Declaration
    public static readonly BindableProperty DataProperty
    Field Value
    BindableProperty

    GroupDataProperty

    Declaration
    public static readonly BindableProperty GroupDataProperty
    Field Value
    BindableProperty

    ItemTapCommandProperty

    Declaration
    public static readonly BindableProperty ItemTapCommandProperty
    Field Value
    BindableProperty

    SearchTextProperty

    Declaration
    public static readonly BindableProperty SearchTextProperty
    Field Value
    BindableProperty

    cts

    列表刷新的取消令牌

    Declaration
    protected CancellationTokenSource cts
    Field Value
    CancellationTokenSource

    data

    所有数据

    Declaration
    protected T[] data
    Field Value
    T[]

    unloaded

    是否已卸载

    Declaration
    protected bool unloaded
    Field Value
    bool

    Properties

    CostTime

    获取刷新最低耗时,默认为 500ms

    Declaration
    protected virtual int CostTime { get; }
    Property Value
    int

    Data

    获取或设置列表数据

    Declaration
    public IEnumerable<T> Data { get; set; }
    Property Value
    IEnumerable<T>

    FilterHeight

    获取过滤面板高度,默认为 0

    Declaration
    protected virtual double FilterHeight { get; }
    Property Value
    double

    FilterMask

    获取过滤遮罩层元素,默认为 null

    Declaration
    protected virtual VisualElement FilterMask { get; }
    Property Value
    VisualElement

    FilterPanel

    获取过滤面板元素,默认为 null

    Declaration
    protected virtual VisualElement FilterPanel { get; }
    Property Value
    VisualElement

    FullData

    获取未过滤的所有数据

    Declaration
    public T[] FullData { get; }
    Property Value
    T[]

    GroupData

    获取或设置分组数据

    Declaration
    public IEnumerable<IGrouping<string, T>> GroupData { get; set; }
    Property Value
    IEnumerable<IGrouping<string, T>>

    IgnoreSearchKey

    获取是否忽略搜索字符串,默认为 false

    Declaration
    protected virtual bool IgnoreSearchKey { get; }
    Property Value
    bool

    IsGrouped

    获取数据是否分组显示,默认为 false

    Declaration
    protected virtual bool IsGrouped { get; }
    Property Value
    bool

    ItemTapCommand

    获取或设置列表项单击的指令

    Declaration
    public Command ItemTapCommand { get; set; }
    Property Value
    Command

    ItemsReachedComand

    获取列表数据加载指令

    Declaration
    public Command ItemsReachedComand { get; }
    Property Value
    Command

    PageItemsCount

    获取一页显示的数据量,默认为 30

    Declaration
    protected virtual int PageItemsCount { get; }
    Property Value
    int

    RefreshCommand

    获取刷新指令

    Declaration
    public Command RefreshCommand { get; }
    Property Value
    Command

    RefreshForce

    获取是否支持强刷,默认为 true

    Declaration
    protected virtual bool RefreshForce { get; }
    Property Value
    bool

    SearchText

    获取或设置搜索文本

    Declaration
    public string SearchText { get; set; }
    Property Value
    string

    SearchTextChangedCommand

    获取搜索框文本变化时的指令

    Declaration
    public Command SearchTextChangedCommand { get; }
    Property Value
    Command

    SearchedCommand

    获取搜索框点击搜索时的指令

    Declaration
    public Command SearchedCommand { get; }
    Property Value
    Command

    Methods

    DoGetDataAsync(bool, CancellationToken)

    异步获取数据源。

    Declaration
    protected abstract Task<IEnumerable<T>> DoGetDataAsync(bool force, CancellationToken token)
    Parameters
    bool force

    是否强制刷新

    CancellationToken token

    取消令牌信号

    Returns
    Task<IEnumerable<T>>

    返回数据源

    DoGroup(IEnumerable<T>)

    分组数据源。

    Declaration
    protected virtual IEnumerable<IGrouping<string, T>> DoGroup(IEnumerable<T> data)
    Parameters
    IEnumerable<T> data

    待分组的数据源

    Returns
    IEnumerable<IGrouping<string, T>>

    返回已分组的数据源

    DoSearch(IEnumerable<T>, string)

    根据搜索字符串过滤数据源。

    Declaration
    protected virtual IEnumerable<T> DoSearch(IEnumerable<T> data, string searchKey)
    Parameters
    IEnumerable<T> data

    待搜索的数据源

    string searchKey

    搜索字符串

    Returns
    IEnumerable<T>

    返回已过滤的数据源

    DoSort(IEnumerable<T>)

    排序数据源。

    Declaration
    protected virtual IEnumerable<T> DoSort(IEnumerable<T> data)
    Parameters
    IEnumerable<T> data

    待排序的数据源

    Returns
    IEnumerable<T>

    返回已排序的数据源

    OnBackAsync()

    子类重写时可自定义返回指令的行为,默认先判断是否可在加载时关闭,堆栈有页面时返回上一页,否则返回主路由。

    Declaration
    protected override Task OnBackAsync()
    Returns
    Task

    Overrides
    BasePage.OnBackAsync()

    OnNavigatedTo(NavigatedToEventArgs)

    When overridden in a derived class, allows application developers to customize behavior immediately after the page was navigated to.

    Declaration
    protected override void OnNavigatedTo(NavigatedToEventArgs args)
    Parameters
    NavigatedToEventArgs args

    The event arguments.

    Overrides
    BasePage.OnNavigatedTo(NavigatedToEventArgs)

    OnRefreshInternal(bool)

    内部刷新数据,根据参数确定是否强刷。

    Declaration
    protected void OnRefreshInternal(bool force = false)
    Parameters
    bool force

    是否强制刷新,默认 false

    OnSearchInternal(string)

    内部搜索数据。

    Declaration
    protected void OnSearchInternal(string searchKey = null)
    Parameters
    string searchKey

    搜索文本,默认取 SearchText

    OnSearched()

    Declaration
    protected virtual void OnSearched()

    OnSortInternal()

    内部排序数据。

    Declaration
    protected void OnSortInternal()

    TriggerRefresh()

    强制触发刷新。

    Declaration
    protected void TriggerRefresh()

    UpdateFilter(bool?)

    切换过滤面板是否显示。

    Declaration
    protected void UpdateFilter(bool? visible = null)
    Parameters
    bool? visible

    是否显示,默认为 null 自动切换状态

    In this article
    Back to top Generated by DocFX