我正在尝试使用WPF转换XPS.
想法是这些图像可以加载silverlight 4,为此我使用以下代码:
// XPS Document
XpsDocument xpsDoc = new XpsDocument(xpsFileName, System.IO.FileAccess.Read);
FixedDocumentSequence docSeq = xpsDoc.GetFixedDocumentSequence();
// The number of pages
PageCount = docSeq.References[0].GetDocument(false).Pages.Count;
DocumentPage sizePage = docSeq.DocumentPaginator.GetPage(0);
PageHeight = sizePage.Size.Height;
PageWidth = sizePage.Size.Width;
// Scale dimensions from 96 dpi to 600 dpi.
double scale = 300/ 96;
// Convert a XPS page to a PNG file
for (int pageNum = 0; pageNum < PageCount; pageNum++)
{
DocumentPage docPage = docSeq.DocumentPaginator.GetPage(pageNum);
BitmapImage bitmap = new BitmapImage();
RenderTargetBitmap renderTarget =
new …
Run Code Online (Sandbox Code Playgroud) 有人使用过Windows Azure Access Control和WPF客户端吗?我喜欢使用Live ID验证Zune客户端.
我需要在我的WPF应用程序中使用Windows Live ID进行身份验证.
我有一个与Windows Azure Acces Control一起使用的网站,我在我的网站中使用Roles的声明,但我需要知道,如果它可能使用WPF应用程序的声明.
我找不到任何关于WPF和Windows Azure Access Control的内容,仅适用于ASP.NET
非常感谢.!