windows-runtime

Read and Write to and from folder on Hard Disk without File Pickers?

蓝咒 提交于 2019-12-25 16:57:51
问题 I've released several Windows Store apps over the last 2 years. And while they're moderately successful, they're all Productivity apps. And a Microsoft employee has confirmed (to me) that they do not allow "generic access to the DocumentsLibrary". What this means (in the context that we were speaking in), is that even if I held a Company account with the Windows Store, I/We are still not allowed to gain automatic access to files contained within the Documents Library and we are not allowed to

Getting Actual Placement of a Flyout

杀马特。学长 韩版系。学妹 提交于 2019-12-25 16:23:10
问题 I have a flyout that appears near the cursor when a particular user input is triggered. According to the docs, the Flyout.Placement property is only a preference and does not necessarily reflect the position of the flyout. I expect the framework to call GetFlyoutPlacement to determine the actual placement. I want to know what the actual placement is so that I can add a little arrow pointing at the cursor position, something like shown in the following: Is my only option to make the call to

How do you publish an App Store application in mulitple languages?

≡放荡痞女 提交于 2019-12-25 12:55:24
问题 I've got an Windows 8.1 (Modern UI) Application that has support for French and Spanish. If I set the OS language to French or Spanish and run my application in the debugger, the application appears to find the correct language resource dlls and runs in the desired language. I've recently published my application (in English only) to the App Store. When I go to my test machine, change the language to Spanish, download the application from the store, I get English. Same thing happens if I set

Windows 8.1 App - HttpWebRequest working only once

扶醉桌前 提交于 2019-12-25 12:20:30
问题 I've a problem with my simple windows store app. I'm connecting to SharePoint and query his REST services to get the information I need. Actually I'd like to create a sort of "SharePoint Browser" so that a user can navigate the List structure of SharePoint browsing with the APP. Actually I get the security token from SharePoint and use it in all the calls without any problem. My call is something like: var bldr = new UriBuilder(_uri.ToString()); bldr.Path += _listDataSvc + (String

How to share an address using StreamSocket?

我只是一个虾纸丫 提交于 2019-12-25 11:57:35
问题 I'm able to pass a text, and it works like a charm! StreamSocketListener streamSocketListener = new StreamSocketListener(); streamSocketListener.ConnectionReceived += streamSocketListener_ConnectionReceived; await streamSocketListener.BindEndpointAsync(hostName, port); It shows the link in the other device's browser. 回答1: Pseudo code: IStorageFile fileToSend = await KnownFolders.PicturesLibrary.GetFileAsync("foo.jpg"); BasicProperties basicProperties = await fileToSend.GetBasicPropertiesAsync

In UWP StreamSocket, can I read data with timeout and leave the connection open if timeout elapses

回眸只為那壹抹淺笑 提交于 2019-12-25 09:05:54
问题 As I couldn't find any way to peek for data (read data without consuming the buffer) as asked at How to peek StreamSocket for data in UWP apps I'm now trying to make my own "peek" but still no luck. I don't see how I can read data from StreamSocket in the manner which will let me use timeouts and leave the connection usable in case if timeout elapses. In the end, the problem is as follows. In my, let's say, IMAP client, I get response from a server and if this response is negative, I need to

LiveConect Auth (for SkyDrive) NullReferenceException (WTH)?

雨燕双飞 提交于 2019-12-25 07:47:46
问题 I followed a 43 minute video tutorial on the Channel 9 site and read the LiveConnect page where it shows code and I don't see what I'm doing wrong. It keeps giving me a NullReferenceException error and it doesn't even bring up the "Do you want to allow app X to access skydrive" thing, it just breaks immediately. I've set breakpoints everywhere but there is nothing. Just null, null everywhere. OnNavigatedTo event: LoadProfile(); private async void LoadProfile() { try { LiveAuthClient auth =

Using WinRT on the Desktop with LockScreen API

让人想犯罪 __ 提交于 2019-12-25 07:47:09
问题 I'm writing a toy desktop app that interacts the LockScreen API, which is part of WinRT and uses async/await . After following the instructions here, I've enabled support for WinRT and added the following references: System.Runtime.dll System.Runtime.WindowsRuntime.dll System.Runtime.InteropServices.WindowsRuntime.dll However I still get this error while building: 'System.Runtime.CompilerServices.TaskAwaiter' does not contain a definition for 'IsCompleted' The error is associated with the

xaml WebView: How to catch a “OnNavigation” event @Windows Store App

ε祈祈猫儿з 提交于 2019-12-25 07:29:08
问题 I am developing Windows Store Apps with C#/xaml. How do I notice if a link in my WebView gets klicked? There is no Event for that afaik. I've already looked into this and that but it doesn't provide me with a suitable solution. May I give an example: I am embedding the stream of a facebook page in my WebView via iFrame. I want to block all links that might be in that iFrame. 回答1: You can call InvokeScript with some of your own Javascript to set up a listener for when the user navigates away

How to add items to XAML/WINRT Grid from Code

一曲冷凌霜 提交于 2019-12-25 07:16:55
问题 So, I am trying to create a grid that can be dynamically populated by 0 to X items depending on when the Frame is open. I read the MSDN article on how to create a grid and add to it in code: http://msdn.microsoft.com/en-us/library/ms752271.aspx Howeverm I want to create the Grid in the XAML and add to it in the code. Something like this: XAML: <Grid x:Name="ManagePhotosContent" Grid.Row="1" Visibility="Visible"> <!-- to be filled in by code --> </Grid> In C# code i am doing something like