public override void setAttachmentState(Attachment.AttachmentState attachmentState) { this.FileAttachment.FileState = attachmentState; Deployment.Current.Dispatcher.BeginInvoke(() => { var currentPage = ((App)Application.Current).RootFrame.Content as NewChatThread; if (currentPage != null) { ContextMenu contextMenu = currentPage.createAttachmentContextMenu(attachmentState, true, false); ContextMenuService.SetContextMenu(this, contextMenu); switch (attachmentState) { case Attachment.AttachmentState.CANCELED: uploadOrDownloadCanceled(); MessagesTableUtils.removeUploadingOrDownloadingMessage(this.MessageId); break; case Attachment.AttachmentState.FAILED_OR_NOT_STARTED: uploadOrDownloadCanceled(); MessagesTableUtils.removeUploadingOrDownloadingMessage(this.MessageId); break; case Attachment.AttachmentState.COMPLETED: uploadOrDownloadCompleted(); MessagesTableUtils.removeUploadingOrDownloadingMessage(this.MessageId); break; case Attachment.AttachmentState.STARTED: uploadOrDownloadStarted(); MessagesTableUtils.addUploadingOrDownloadingMessage(this.MessageId, this); break; } } }); }
public virtual void setAttachmentState(Attachment.AttachmentState attachmentState) { }