コード例 #1
0
        public async Task ExecuteHeaderCommand()
        {
            if (IsHeaderBusy)
            {
                return;
            }

            IsHeaderBusy = true;

            try
            {
                HeaderPosts.Clear();
                await getHeaderArticleData().ConfigureAwait(false);
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
                MessagingCenter.Send(new MessagingCenterAlert
                {
                    Title   = "Error",
                    Message = "Unable to load items.",
                    Cancel  = "OK"
                }, "message");
            }
            finally
            {
                IsHeaderBusy = false;
            }
        }