using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Reflection; using Avalonia; using Avalonia.Controls; using Avalonia.Data; using Avalonia.Interactivity; using Avalonia.Layout; using Avalonia.Markup.Xaml; using Avalonia.Media; using Avalonia.Threading; using DynamicData; using DispenserCommon.Atrributes; using DispenserCommon.Utils; using Masuit.Tools; namespace DispenserUI.Views.Controls; public partial class Table : UserControl { public static readonly StyledProperty ItemsProperty = AvaloniaProperty.Register(nameof(Items)); public static readonly StyledProperty TotalProperty = AvaloniaProperty.Register(nameof(Total)); public static readonly StyledProperty PageSizeProperty = AvaloniaProperty.Register(nameof(PageSize)); public static readonly StyledProperty CurrentPageProperty = AvaloniaProperty.Register(nameof(CurrentPage)); public static readonly StyledProperty PagesProperty = AvaloniaProperty.Register(nameof(Pages)); public static readonly StyledProperty ShowIndexProperty = AvaloniaProperty.Register(nameof(ShowIndex), true); public static readonly StyledProperty MaxDisplayPagesProperty = AvaloniaProperty.Register(nameof(MaxDisplayPages), 10); public event EventHandler NextPage; public event EventHandler PreviousPage; public event EventHandler PageChanged; public Table() { InitializeComponent(); TableContent = this.FindControl("TableContent"); PrePageBtn = this.FindControl