public override void OnContextReady() { var list = GetValue(); var property = GetProperty(); if (property.IsReadOnly && list.IsReadOnly) { m_Size.SetEnabledSmart(false); m_AddItemButton.SetEnabledSmart(false); } UsesPagination = HasAttribute <PaginationAttribute>(); if (!UsesPagination) { m_PaginationElement.Enabled = false; } var pagination = GetAttribute <PaginationAttribute>(); if (null == pagination) { return; } m_PaginationElement.OnChanged += () => { UiPersistentState.SetPaginationState(Root.GetTargetType(), Path, m_PaginationElement.PaginationSize, m_PaginationElement.CurrentPage); Reload(); }; m_PaginationElement.SetPaginationSizes(pagination.Sizes); m_PaginationElement.AutoHide = pagination.AutoHide; var paginationData = UiPersistentState.GetPaginationState(Root.GetTargetType(), Path); if (!paginationData.Equals(default(UiPersistentState.PaginationData))) { m_PaginationElement.TotalCount = GetValue()?.Count ?? 0; m_PaginationElement.SetPaginationSize(paginationData.PaginationSize); m_PaginationElement.GoToPage(paginationData.CurrentPage); } }