winrt-async

Disable body of mail in WINRT application

依然范特西╮ 提交于 2019-12-02 17:36:58
问题 I have a date picker and time picker in my app and I'm trying to send mail as described here which contains the date as well as the time in the body of the mail. So, Now my question is how to disable the body part of the email as the user shouldn't edit the date or time once it is selected from app. What's the point of security in this ? Code: var mailto = new Uri("mailto:?to=me@mysite.com&subject=Date Selected :+datepicker.value+"); await Windows.System.Launcher.LaunchUriAsync(mailto); 回答1:

Disable body of mail in WINRT application

怎甘沉沦 提交于 2019-12-02 10:05:18
I have a date picker and time picker in my app and I'm trying to send mail as described here which contains the date as well as the time in the body of the mail. So, Now my question is how to disable the body part of the email as the user shouldn't edit the date or time once it is selected from app. What's the point of security in this ? Code: var mailto = new Uri("mailto:?to=me@mysite.com&subject=Date Selected :+datepicker.value+"); await Windows.System.Launcher.LaunchUriAsync(mailto); Damir Arh The way you decided to generate the email, you don't have any control over the email client from

How to await for QueryCompleted event?

半腔热情 提交于 2019-11-28 11:46:28
问题 I created a small test application to get the Longitude and Latitude and to convert it to the actual address: using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; using System.Device.Location; using System.Linq; using System.Net; using System.Threading; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Navigation; using Microsoft.Phone.Controls; using Microsoft.Phone.Maps.Services;

How to await a method in a Linq query

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-28 10:53:10
Trying to use the await keyword in a LINQ query and I get this: The 'await' operator may only be used in a query expression within the first collection expression of the initial 'from' clause or within the collection expression of a 'join' clause Sample Code: var data = (from id in ids let d = await LoadDataAsync(id) select d); Is it not possible to await something in a LINQ query, or does it need to be structured a different way? Stephen Cleary LINQ has very limited support for async / await . For LINQ-to-objects, the only really useful operation I know of is to do a Select with an async

How to allow for multiple popups at once in WinRT?

匆匆过客 提交于 2019-11-28 08:50:51
If you call the ShowAsync command on a MessageDialog object when another MessageDialog object has already been displayed to the user but not dismissed (i.e. you show a popup when another one is already up), an UnauthorizedAccessException is thrown. This can make things difficult when you have multiple threads attempting to alert the user at the same time. My current (stopgap) solution is merely to surround the ShowAsync call with a try/catch block and swallow the exception. This undesirably leads to the user missing out on subsequent notifications. The only other way around this that I can

How can I efficiently update the UI from an async method?

核能气质少年 提交于 2019-11-28 01:47:02
问题 I'm using a ProgressBar with binding to show the progress when receiving a file from a remote device. <ProgressBar Width="500" Height="50" Value="{Binding ProgressFileReceive}"/> ProgressFileReceive is a property ( double ) in my View Model which has the percentage completion. So to update the Progress Bar, I add to this number. The problem is I have the file transfer method in a different async method, and so to access this property I must use the following code : await CoreApplication

How do I send an email from a WinRT/Windows Store application?

你离开我真会死。 提交于 2019-11-27 21:29:00
I am developing a Windows Store Application (Windows 8). I have a need to send emails based on data and address stored in the application data and without the need of the user to type it the data or the address. What would be the right/easy way to implement it? EitanB The correct way would be to use Sharing. Your app should create an HTML document or Text and share it. The user would select Mail from the Share charm and the HTML/Text would become the body of the email. See here for more info... http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh973055.aspx You can try with var mailto

How to await a method in a Linq query

别来无恙 提交于 2019-11-27 03:52:59
问题 Trying to use the await keyword in a LINQ query and I get this: The 'await' operator may only be used in a query expression within the first collection expression of the initial 'from' clause or within the collection expression of a 'join' clause Sample Code: var data = (from id in ids let d = await LoadDataAsync(id) select d); Is it not possible to await something in a LINQ query, or does it need to be structured a different way? 回答1: LINQ has very limited support for async / await . For

How to allow for multiple popups at once in WinRT?

孤街浪徒 提交于 2019-11-27 02:27:58
问题 If you call the ShowAsync command on a MessageDialog object when another MessageDialog object has already been displayed to the user but not dismissed (i.e. you show a popup when another one is already up), an UnauthorizedAccessException is thrown. This can make things difficult when you have multiple threads attempting to alert the user at the same time. My current (stopgap) solution is merely to surround the ShowAsync call with a try/catch block and swallow the exception. This undesirably

How do I send an email from a WinRT/Windows Store application?

ぃ、小莉子 提交于 2019-11-26 20:39:46
问题 I am developing a Windows Store Application (Windows 8). I have a need to send emails based on data and address stored in the application data and without the need of the user to type it the data or the address. What would be the right/easy way to implement it? EitanB 回答1: The correct way would be to use Sharing. Your app should create an HTML document or Text and share it. The user would select Mail from the Share charm and the HTML/Text would become the body of the email. See here for more