Share rendered XAML content with Share contract and RenderTargetBitmap

A new feature of Windows 8.1 is that developers can render the XAML tree to a bitmap. This can be useful in exposing a screenshot of a part of an application with the image Share contract. Note that Windows 8.1 supports sharing a screenshot of any app through a new Share charm option. This is…

1

PDF Viewing Components for Windows Store apps (WinRT) (XAML/C#)

Updated 4/7/2014 to reflect Windows 8.1 PDF API capabilities and new SDK samples Microsoft released a componentized, high-performing PDF viewing component for XAML/C# applications on 4/2/2014. Woohoo! This serves as a good reference sample of how this needs to be done (C# front-end with a C++ back-end). If you want more bells and whistles, a…

9

Unzipping files with a progress bar in Windows Store applications (XAML/C#)

Here’s a method for unzipping a Zip file in a Windows Store application. ZipArchive is part of System.IO.Compression. private async Task UnzipWithProgress(StorageFolder outFolder, Stream zipFileStream, ProgressBar pb) { bool bDelete = false; using (var archive = new ZipArchive(zipFileStream)) { try { // Ensure the UI update part runs in the UI thread var ignore =…

0