windows-phone-7

Windows phone 7 native code support

老子叫甜甜 提交于 2020-01-24 02:14:31
问题 2 questions: Can someone tell me if unmanaged c++ code will be supported in future versions of Phone 7 OS for all developers? What are MS reasons for not supporting unmanaged c++ code? 回答1: This answer is purely speculative, but I feel that most others who have answered this question miss the point by a long shot. Let's for a moment assume that this is not a vindictive decision by Microsoft, but instead actually a very well thought out engineering decision that has absolutely nothing to do

SkyDrive API - accessing documents

孤者浪人 提交于 2020-01-23 18:18:37
问题 Not a long time that SkyDrive API is available. The scopes to access are here. But how to access documents on SkyDrive? What scope to use? 回答1: This blog post about Windows 8 and Skydrive contains some information about wl.skydrive for accessing and wl.skydrive_update for uploading data. Also the SkyPad application uses these, so it might be worth a try: <live:SignInButton x:Name="signInBtn" Scopes="wl.signin wl.skydrive_update" Margin="0,0,0,0" /> 来源: https://stackoverflow.com/questions

SkyDrive API - accessing documents

自作多情 提交于 2020-01-23 18:18:06
问题 Not a long time that SkyDrive API is available. The scopes to access are here. But how to access documents on SkyDrive? What scope to use? 回答1: This blog post about Windows 8 and Skydrive contains some information about wl.skydrive for accessing and wl.skydrive_update for uploading data. Also the SkyPad application uses these, so it might be worth a try: <live:SignInButton x:Name="signInBtn" Scopes="wl.signin wl.skydrive_update" Margin="0,0,0,0" /> 来源: https://stackoverflow.com/questions

Code in Application_Activated not running when phone wakes up

余生颓废 提交于 2020-01-23 17:29:08
问题 I've done some reseach on the life cycle of Windows Phone apps and I've gathered that when the phone is locked whilst an app is still running, and you unlock the phone the 'Application_Activated' function is called in the App.xaml.cs file. // Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void Application_Activated(object sender, ActivatedEventArgs e) { //Code to run MessageBox.Show("Hello

Set a background image to Listbox item

↘锁芯ラ 提交于 2020-01-23 17:02:13
问题 I'm able to set an image to Listbox using the background property. But how do I set a desirable image as a background to items of the listbox? Thanks. 回答1: You'll have to redefine the ItemTemplate property of the ListBox. If you're not confident with XAML, you should try using Expression Blend. Here is an example of how you're XAML could look like. I created a new application using the Pivot Template application. <ListBox x:Name="FirstListBox" Margin="0,0,-12,0" ItemsSource="{Binding Items}">

Allowing only letters for input

三世轮回 提交于 2020-01-23 16:08:22
问题 How to filter non-letter keys from the virtual keyboard? The following method works just for latin alphabet, for unfortune: public static bool IsLetter(int val) { return InRange(val, 65, 90) || InRange(val, 97, 122) || InRange(val, 192, 687) || InRange(val, 900, 1159) || InRange(val, 1162, 1315) || InRange(val, 1329, 1366) || InRange(val, 1377, 1415) || InRange(val, 1425, 1610); } public static bool InRange(int value, int min, int max) { return (value <= max) & (value >= min); } 回答1: I think

Allowing only letters for input

十年热恋 提交于 2020-01-23 16:06:51
问题 How to filter non-letter keys from the virtual keyboard? The following method works just for latin alphabet, for unfortune: public static bool IsLetter(int val) { return InRange(val, 65, 90) || InRange(val, 97, 122) || InRange(val, 192, 687) || InRange(val, 900, 1159) || InRange(val, 1162, 1315) || InRange(val, 1329, 1366) || InRange(val, 1377, 1415) || InRange(val, 1425, 1610); } public static bool InRange(int value, int min, int max) { return (value <= max) & (value >= min); } 回答1: I think

Use JSON in WP7 instead of SOAP

旧时模样 提交于 2020-01-23 12:42:31
问题 I have an app for Windows Phone 7 (written in C# using Visual Studio 2010 + Windows Phone developer tools) that uses data from a web service. In the past, I have used SOAP which was pretty straightforward (added as a service reference and I was basically ready to go) but now I would like to use JSON instead. The API offers both a SOAP and a RESTful JSON endpoint and both endpoints provide the same data. Now my questions: 1) My main motivation to switch from SOAP to JSON is that JSON is

IsolatedStorageFileStream exception is throw when file is opened?

你离开我真会死。 提交于 2020-01-23 06:27:31
问题 when I attempt to open a file in a WP7 app: IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication(); IsolatedStorageFileStream nameXmlFile = new IsolatedStorageFileStream("Names.xml", System.IO.FileMode.Open, isf); I recieve the following error: Operation not permitted on IsolatedStorageFileStream. I'm not sure why it isn't opening because I used the exact code somewhere else in my app and it works fine. Any leads as to why this is happening? EDIT I used the following code

IsolatedStorageFileStream exception is throw when file is opened?

半世苍凉 提交于 2020-01-23 06:27:06
问题 when I attempt to open a file in a WP7 app: IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication(); IsolatedStorageFileStream nameXmlFile = new IsolatedStorageFileStream("Names.xml", System.IO.FileMode.Open, isf); I recieve the following error: Operation not permitted on IsolatedStorageFileStream. I'm not sure why it isn't opening because I used the exact code somewhere else in my app and it works fine. Any leads as to why this is happening? EDIT I used the following code