コード例 #1
0
            private void SetState(IVirtualList list, QueuedBackgroundWorkerState loadingState)
            {
                if (list == List && loadingState == LoadingState)
                {
                    return;
                }

                List         = list;
                LoadingState = loadingState;
                VirtualListLoadingIndicator loadingIndicator = LoadingIndicator;
                bool oldIsVisible = loadingIndicator != null;
                bool newIsVisible = LoadingState != QueuedBackgroundWorkerState.Standby;

                if (oldIsVisible == newIsVisible)
                {
                    if (newIsVisible)
                    {
                        loadingIndicator.SetState(List, LoadingState);
                    }
                }
                else if (newIsVisible)
                {
                    AdornerManager.SetAdorner(_itemsControl, new VirtualListLoadingIndicator(List, LoadingState));
                }
                else
                {
                    AdornerManager.SetAdorner(_itemsControl, null);
                }
            }
コード例 #2
0
        private static void CanExecuteRetryCommand(object sender, CanExecuteRoutedEventArgs e)
        {
            VirtualListLoadingIndicator control = (VirtualListLoadingIndicator)sender;

            e.CanExecute = control.HasError;
        }