windows-store-apps

Return null in boolean to checkbox state converter in XAML

风流意气都作罢 提交于 2020-01-05 02:14:18
问题 I have a TaskStatus to Boolean converter that implements the IValueConverter interface in XAML for Windows Store Apps (universal apps). I have three task states and I enabled the indeterminate state in a checkbox using IsThreeState="true". Now although the IsChecked property seems to be a Boolean?, the converter always gets System.Boolean as target type. Whatever I return (null for example) always converts to false and therefore I can't get the third state in my checkbox. Is there a way to

(C#) Azure - Null Reference Exception during Live Authentication

≡放荡痞女 提交于 2020-01-04 13:47:04
问题 I followed the Live Authentication tutorial on the Azure Mobile Services page (http://www.windowsazure.com/en-us/develop/mobile/tutorials/single-sign-on-windows-8-dotnet/) and when I run this line of code LiveLoginResult result = await liveIDClient.LoginAsync(new[] { "wl.basic" }); I get a "NullReferenceException" no matter what I do. I tried changing "wl.basic" to "wl.signin" and that didn't work either. I am signed into my Microsoft Account, I get the pop-up to allow it to login, the app is

StreamSocket.InputStreamOptions.ReadAsync hangs when using Wait()

落爺英雄遲暮 提交于 2020-01-04 06:32:32
问题 This is the smallest possible scenario, I was able to prepare: This code connects to imap.gmail.com Reads the initial server greeting (using Read method) Sends NOOP command (NO Operation) Reads NOOP command response (again using Read method) The problem is that the second Read hangs . It works perfectly if 'await ReadAsync' is used. When I break the program I can see the Call Stack starts at task.Wait() and ends on System.Threading.Monitor.Wait(). If I debug this step by step, it does not

StreamSocket.InputStreamOptions.ReadAsync hangs when using Wait()

我只是一个虾纸丫 提交于 2020-01-04 06:31:06
问题 This is the smallest possible scenario, I was able to prepare: This code connects to imap.gmail.com Reads the initial server greeting (using Read method) Sends NOOP command (NO Operation) Reads NOOP command response (again using Read method) The problem is that the second Read hangs . It works perfectly if 'await ReadAsync' is used. When I break the program I can see the Call Stack starts at task.Wait() and ends on System.Threading.Monitor.Wait(). If I debug this step by step, it does not

How can I open a file I've added to my Windows Store App project programatically?

﹥>﹥吖頭↗ 提交于 2020-01-04 02:32:51
问题 I want to load a PDF file in response to a Tapped event. I added the file to my project (Add > Existing Item), set "Build Action" to "Content" and "Copy to Output Directory" to "Copy if newer" I'm thinking the code I need may be something like this: async Task LoadTutorial() { await Launcher.LaunchUriAsync(new Uri("what should be here to access the output folder?")); } If I'm right, what do I need to pass as the Uri? Otherwise, how is this accomplished? UPDATE On a related note, to add an

Replacing or recreating a file in Windows 8 RT keeps the old DateCreated value

时光怂恿深爱的人放手 提交于 2020-01-03 19:06:17
问题 I'm attempting to cache data in a file for a Windows Store app, and using the DateCreated value to determine if it is out of date. I first tried doing this: var file = await rootFolder.CreateFileAsync(filename, Windows.Storage.CreationCollisionOption.ReplaceExisting); FileIO.WriteTextAsync(file, contents); but when it saves the file only the DateModified value is changed, even though the comments for the ReplaceExisting option clearly state that it recreates the file and replaces an existing

DataTriggerBehavior Doesn't Work With Enum?

落花浮王杯 提交于 2020-01-03 16:01:47
问题 I'm trying to use a DataTriggerBehavior from the Behaviors SDK. But it doesn't seem to work with enums... or else I'm doing something wrong. You can assume that the DataContext for these examples is something like this ( INotifyPropertyChanged is implemented, but I'm not going to show it here): public class MyDataClass { public MyEnum ItemCommand { get; set; } public string ItemCommandString { get; set; } } public enum MyEnum { EnumValue1 } _Button.DataContext = new MyDataClass() {

DataTriggerBehavior Doesn't Work With Enum?

点点圈 提交于 2020-01-03 16:01:12
问题 I'm trying to use a DataTriggerBehavior from the Behaviors SDK. But it doesn't seem to work with enums... or else I'm doing something wrong. You can assume that the DataContext for these examples is something like this ( INotifyPropertyChanged is implemented, but I'm not going to show it here): public class MyDataClass { public MyEnum ItemCommand { get; set; } public string ItemCommandString { get; set; } } public enum MyEnum { EnumValue1 } _Button.DataContext = new MyDataClass() {

How to programmatically maximize a window using LaunchUriAsync in Windows 8?

时光怂恿深爱的人放手 提交于 2020-01-03 05:47:20
问题 How do I maximize/minimize launching/current windows store applications programmatically using LaunchUriAsync in Windows 8? private async void Button_Click(object sender, RoutedEventArgs e) { var options = new Windows.System.LauncherOptions(); options.TreatAsUntrusted = false; options.DisplayApplicationPicker = false; Uri target = new Uri("ms-mail:"); bool isSucceed = await Windows.System.Launcher.LaunchUriAsync(target, options); } 回答1: There isn't a way to do this in Windows 8, but Windows 8

Desktop App Converter -PackageName Error

百般思念 提交于 2020-01-03 04:58:09
问题 I am trying to convert my app for the windows store using Desktop App Converter. If I set the -PackageName option to the Package/Identity/Name given in the dashboard, Desktop App Converter stops with a write error for -PackageName. But if I put -PackageName to the display name that I want, when I submit the appx file to the windows store I get: Invalid package identity name: and Invalid package family name: *update My Pakage/Identity/name takes the form 1234MyApp.MyApp. If I leave out the