Tag: windows runtime

解析JSONObject

我试图从Web服务中获取JSON,我能够弄清楚。 BTW这是我的JSON数据 – { “X-YZ-111/AB.CD”: { “P1”: “F”, “P2”: “43.46” }, “X-YZ-112/AB.CD”: { “P1”: “F”, “P2”: “8.02” }, “X-YZ-113/AB.CD”: { “P1”: “F”, “P2”: “9066.58” }, “X-YZ-114/AB.CD”: { “P1”: “F”, “P2”: “6.00” }, “X-YZ-115/AB.CD”: { “P1”: “F”, “P2”: “6.00” }, “X-YZ-116/AB.CD”: { “P1”: “F”, “P2”: “10.00” }} Using Windows.Data.Json; private async void getJSON_click(object sender,RoutedEventArgs e) { […]

WinRT中是否有SignedCMS的替代品?

在将.NET桌面应用程序移植到Windowsapp store应用程序时,我再次陷入困境……简而言之,我有一个ZIP文件,其中包含加密和签名的XML文件以及证书。 解密工作(或多或少),但现在我必须“取消签名”XML并且我被卡住了。 在.NET App中,使用System.Security.Cryptography.Pkcs.SignedCms完成取消签名,但WinRt中不存在该类(一如既往……) WinRT还有其他选择吗? 这是.NET App中使用的一些代码: public static byte[] CheckAndRemoveSignature(byte[] data, X509Certificate2Collection certStore, out SignedCms out_signature) { SignedCms signedMessage = new SignedCms(); signedMessage.Decode(data); if ((certStore != null) && (certStore.Count > 0)) signedMessage.CheckSignature(certStore, true); else signedMessage.CheckSignature(true); out_signature = signedMessage; // return data without signature return signedMessage.ContentInfo.Content; } 我已经搜索了很多,但我发现的唯一可以帮助我的是这篇文章。 不幸的是,标记的答案没有提供任何有用的信息:( Windows 8 Metro加密 – 使用SignedCms […]

在RichEditBox中保持选择的视觉效果是不重点?

有人知道如何在RichEditBox中保持所选文本的视觉选择状态吗? 我想在我的Windows 8.1应用程序中添加一些基本的文本编辑,但每次我选择一个文本并单击应用程序中的另一个UI元素时,RichEditBox会隐藏选择。 我已经尝试注册非聚焦事件再次设置选择范围但不幸的是这没有效果。 我还试图在Text上绘制我自己的rect richEdit.Document.Selection.GetRect(PointOptions.ClientCoordinates,out selectionRect, out hitCount ); 只要选择一行中的某些文本,这就可以工作。 如果选择是多行的,我只获得所选文本的左上角和右下角。 看起来这些是鼠标位置,其中选择从哪里开始,在哪里结束。 当RichEditBox未聚焦时,还有其他方法可以保持所选文本的可见性。

从Win RT / Windows 8应用程序启动Windowsapp store列表

在Windows Phone上有一个市场审查任务。 有没有办法在WinRT应用程序中实现等效function? 我意识到Charms栏中有“率和评论”按钮,但是,这不是我需要的,因为我想在应用程序中集成一个按钮来启动评论UI。 这可能看似微不足道,但这是最重要的要求之一! 对于Windows 8 / winrt / metro风格 , 是否有相当于wp7的marketplacereviewtask? 因为提问者对Charms bar方法很满意。 谢谢

Caliburn Micro GoBack到上一页实例WinRT

我在Windows Phone 8.1(WinRT)应用程序上使用Caliburn.Micro.Core.2.0.1 我的所有ViewModel都以Screen为基础。 在我的MainView(Model)我可以使用CM的INavigationService导航到SettingsView(Model) private readonly INavigationService _navigationService; public void Navigate() { _navigationService.NavigateToViewModel(_param); } 然后使用硬件后退按钮或 public void GoBack() { _navigationService.GoBack(); } 我可以导航回MainView(模型)。 有用; 但是,它不能像我预期的那样工作或希望它能够工作。 当调用GoBack(或Back按钮)时,它会生成MainView(Model)的新实例 。 我希望它返回到从 MainView(Model) 实例导航 。 我尝试将MainViewModel注册为Singleton,这使得ViewModel成为一个单例(并引入了一些有趣的问题); 但仍然可以重新创建View 。 知道如何让导航返回到从实例导航 ?

在metro中,获取(抽象)类的所有inheritance类?

我试图在地铁中获取所有inheritance的课程时遇到困难。 WinRT API与.net框架不同,因此解决方案( solution1和solution2 )都不起作用。 任何代码或工具解决方案表示赞赏。 我还在努力。 如果成功,我会把解决方案放在这里。

通过蓝牙从winRT发送文件到android / WP设备

我正在开发一个Windows商店应用程序,并试图通过蓝牙发送文件到Android(和Windows Phone)设备。 根据MSDN的一个例子,我编写了以下代码: public async static void SendAsync(StorageFile file) { var id = RfcommDeviceService.GetDeviceSelector(RfcommServiceId.ObexObjectPush); var devices = await DeviceInformation.FindAllAsync(id); // -> Returns one windows phone and two android devices if (devices.Count > 0) { // Use the 3th device (android tablet) var service = await RfcommDeviceService.FromIdAsync(devices[2].Id); // Create a socket and connect to the target […]

MediaCapture StartPreviewAsync失败

我正在尝试从我的UWP应用程序中的相机开始video预览捕获,但StartPreviewAsync会抛出exception 示例代码: MediaCapture mc = new MediaCapture(); await mc.InitializeAsync(); await mc.StartPreviewAsync();

Windows RT App中的图像闪烁

我有一个Windows RT应用程序,我以编程方式更改Image组件中的位图。 一切都适用于XAML和下面的代码,除了我们在图像更改时看到的闪烁。 我应该改变什么才能摆脱闪烁? XAML : 码: namespace Test01 { public sealed partial class MainPage : Page { int currentSlice = 128; String axis = “ax-“; public MainPage() { this.InitializeComponent(); } public void displayImages() { BitmapImage bitmapImage = image1.Source as BitmapImage; bitmapImage.UriSource = null; image1.Source = null; BitmapImage bitmapImage2 = image2.Source as BitmapImage; bitmapImage2.UriSource = […]

在Windows 8应用程序中扩展启动后无法导航到页面

我已经按照Microsoft提供的指南创建了扩展的启动画面。 屏幕显示关闭,数据加载,但随后应用程序无法导航到登录页面。 这怎么可能? ExtendedSplash.xaml.cs public sealed partial class ExtendedSplash { public ExtendedSplash(SplashScreen splash) { this.InitializeComponent(); // Position the extended splash screen image in the same location as the splash screen image. this.extendedSplashImage.SetValue(Canvas.LeftProperty, splash.ImageLocation.X); this.extendedSplashImage.SetValue(Canvas.TopProperty, splash.ImageLocation.Y); this.extendedSplashImage.Height = splash.ImageLocation.Height; this.extendedSplashImage.Width = splash.ImageLocation.Width; // Position the extended splash screen’s progress ring. this.ProgressRing.SetValue(Canvas.TopProperty, splash.ImageLocation.Y + splash.ImageLocation.Height + 32); […]