private void HyperlinkViewDocument_Click(object sender, RoutedEventArgs e)
        {
            Hyperlink hyperLink = (Hyperlink)sender;

            YellowstonePathology.YpiConnect.Contract.RemoteFile remoteFile = (YellowstonePathology.YpiConnect.Contract.RemoteFile)hyperLink.Tag;

            if (remoteFile.IsDownloaded == false)
            {
                YellowstonePathology.YpiConnect.Proxy.FileTransferServiceProxy fileTransferServiceProxy = new Proxy.FileTransferServiceProxy();
                fileTransferServiceProxy.Download(ref remoteFile, YellowstonePathology.YpiConnect.Contract.Identity.ApplicationIdentity.Instance.WebServiceAccount);
            }

            if (remoteFile.Extension == ".XPS")
            {
                XpsDocument       xpsDocument       = XpsDocumentHelper.FromMemoryStream(remoteFile.MemoryStream);
                XpsDocumentViewer xpsDocumentViewer = new XpsDocumentViewer();
                xpsDocumentViewer.LoadDocument(xpsDocument);
                xpsDocumentViewer.ShowDialog();
            }

            if (remoteFile.Extension == ".TIF")
            {
                TifDocumentViewer tifDocumentViewer = new TifDocumentViewer();
                tifDocumentViewer.Load(remoteFile.MemoryStream);
                tifDocumentViewer.ShowDialog();
            }
        }
        private void HyperlinkViewDocument_Click(object sender, RoutedEventArgs e)
        {
            Hyperlink hyperLink = (Hyperlink)sender;
            YellowstonePathology.YpiConnect.Contract.RemoteFile remoteFile = (YellowstonePathology.YpiConnect.Contract.RemoteFile)hyperLink.Tag;

            if (remoteFile.IsDownloaded == false)
            {
                YellowstonePathology.YpiConnect.Proxy.FileTransferServiceProxy fileTransferServiceProxy = new Proxy.FileTransferServiceProxy();
                fileTransferServiceProxy.Download(ref remoteFile, YellowstonePathology.YpiConnect.Contract.Identity.ApplicationIdentity.Instance.WebServiceAccount);
            }

            if (remoteFile.Extension == ".XPS")
            {
                XpsDocument xpsDocument = XpsDocumentHelper.FromMemoryStream(remoteFile.MemoryStream);
                XpsDocumentViewer xpsDocumentViewer = new XpsDocumentViewer();
                xpsDocumentViewer.LoadDocument(xpsDocument);
                xpsDocumentViewer.ShowDialog();
            }

            if (remoteFile.Extension == ".TIF")
            {
                TifDocumentViewer tifDocumentViewer = new TifDocumentViewer();
                tifDocumentViewer.Load(remoteFile.MemoryStream);
                tifDocumentViewer.ShowDialog();
            }
        }