windows-runtime

listview visual state manager in item template (WinRT, Metro, XAML)

亡梦爱人 提交于 2019-12-12 08:55:02
问题 I am trying to get a listview to display a list of items made up of textblocks... when the listview item is clicked i would like to show instead a list made up of textboxes... Below is what i have come up with, it does not work. I have two grids within the templates and was hoping to simply show and hide the grids depending on if the listview item is selected. Where have i gone wrong? I ripped these visual states from the listview's template itself but i must admit im not sure how they work,

Can WinRT application use obfuscation?

天涯浪子 提交于 2019-12-12 08:47:51
问题 All Metro applications must be inspected before distribution through Windows 8 AppStore. Does this mean it will not be allowed to use code obfuscation? Or it is still possible, and only some specific aspects are going to be monitored during such inspection? 回答1: Here are some facts: Marketplace for WP7 allows C# apps be obfuscated (even MS he advises doing so) and I don't see any reason why Windows AppStore would ban such apps. It is almost certain that some vendors will provide compatible C+

How do I get crash logs and stack traces from WinRT apps written in C#?

Deadly 提交于 2019-12-12 08:44:10
问题 I have just started working on a Windows Store App written in C#, it has not yet been published to the Windows Store. When I give a debug build of the app being developed to my testing team and it crashes where can they find the crash log and stack trace? Do I need to do anything when building my application? I'm looking for the standard solution, not a third party library or something that sends me reports from end-users. I'm coming from an Android world where the ADB logcat always contains

Better way to show error messages in async methods

岁酱吖の 提交于 2019-12-12 08:23:42
问题 The fact that we can't use the await keyword in catch blocks makes it quite awkward to show error messages from async methods in WinRT, since the MessageDialog API is asynchronous. Ideally I would like be able to write this: private async Task DoSomethingAsync() { try { // Some code that can throw an exception ... } catch (Exception ex) { var dialog = new MessageDialog("Something went wrong!"); await dialog.ShowAsync(); } } But instead I have to write it like this: private async Task

Accepting invalid SSL certificates using WinRT

吃可爱长大的小学妹 提交于 2019-12-12 08:02:57
问题 There are scenarios where you want your application to accept invalid SSL certificates (testing environment/ self signed certificates etc). In the .NET world one would use the ServerCertificateValidationCallback class to do so. Unfortunately the class doesn't exist in a WinRT context. I need to consume a Web API using WinRT which is hosted on a server without a valid ssl certificate. How do you accept invalid ssl certificates in WinRT using the HttpClient class or any other appropriate class.

Choosing between XAML's ListView and GridView in WinRT

喜你入骨 提交于 2019-12-12 07:39:44
问题 The GridView and the ListView in XAML seem to be the same control. How does a developer choose between the two? 回答1: The GridView control typically scrolls horizontally. Also, you will see some native spacing between items that is greater than that in the ListView. This spacing is there because of the intent for how the controls will be used in Windows Store apps. (read on) Like the ListView it inherits from ItemsControl. Like the ListView groups using GroupStyle. Like the ListView it

Bundle WCF service along with Universal Windows App

…衆ロ難τιáo~ 提交于 2019-12-12 06:45:41
问题 I realize that we cannot directly access SQL Server database from a UWP app, and have to use a WCF service as a mediator for this. (Which is totally stupid, since even competitors like MySQL provides API for Microsoft's runtime, while Microsoft's own RDBMS does not!) I don't have any experience with WCF, but after going through some tutorials, I believe I can make a WCF service to communicate with my SQL Server (although I do not like making my simple application use a 3-tier architecture,

Why is my text box contained in a FlipView obscured by the soft keyboard when it pops up?

我是研究僧i 提交于 2019-12-12 06:35:25
问题 Please consider the following XAML: <Page x:Class="InputControlsInScrollViewer.WindowsStoreApp.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:l="using:InputControlsInScrollViewer.WindowsStoreApp" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"> <Page.Resources> <Style x:Key="FlipViewItemStyle" TargetType=

How to create a dialog like CameraCaptureUI.CaptureFileAsync?

那年仲夏 提交于 2019-12-12 06:30:10
问题 I would like to create a library behaving like the CaptureFileAsync method, i.e. on a method call it would open up a full screen page with standard back navigation and return result to the caller. I want to be able to call it the same way CaptureFileAsync is called: var dialog = new Library.Dialog(); var result = await dialog.Show(); In the Show method I'm currently navigating to my own page and returning a Task which can be awaited by the caller: public Task<string> Show() { var task = new

Prevent WinRT App from entering suspend state in a Line-of-Business app

只愿长相守 提交于 2019-12-12 06:19:18
问题 I'm developing a line of business app for Windows 8.1, that is, I am not deploying through the Windows Store and will be able to control all of the features of both the OS and hardware this app is being deployed on. Because this app is working as the UI in a real-time situation I would prefer if I could ignore the life-cycle events and not have the app suspend or terminate at the whim of Windows 8. Does anyone know of a way to do this? I have seen some older answers, such as this one and this