Wednesday, November 16, 2011

Check whether the Network is available in Windows Phone 7

If you want to check whether network is available, just use this
using System.Net.NetworkInformation;

bool netAvail = NetworkInterface.GetIsNetworkAvailable();
Note: It always return "true" in emulator, but return actual value in device.

Tuesday, November 8, 2011

Facebook Auth Logout for Windows Phone 7

In some situations, you may want to allow user to change their account, it is easy to do that.
The Doc of  facebook refers to

Logout
You can log a user out of their Facebook session by directing them to the following URL:
https://www.facebook.com/logout.php?next=YOUR_URL&access_token=ACCESS_TOKEN
Note: YOUR_URL must be a URL in your site domain, as defined in the Developer App.

According to this, you can make your request Url be following form:
https://www.facebook.com/logout.php?next=YOUR_URL&access_token=ACCESS_TOKEN

But the major question is what YOUR_URL should be?

Monday, October 31, 2011

Debug without dormant

如果你想要測試你的儲存狀態機制,其實有一個設定  "Tombstone upon deactivation while debugging"。
將滑鼠游標移動到你想Debug的專案上,按右鍵選擇屬性 > 選擇Debug,你將會看到它。

     If you want to debug your saving state mechanism, there is an useful setting "Tombstone upon deactivation while debugging".
     Move mouse on the target project in solution explorer, and right-click, then select "Properties". In the "Debug" tab, you can find a check box for it. With the check box selected, your application will be tombstoned immediately after you press start button.

Tuesday, October 18, 2011

Noun explanation

Deployment Class:
Provides application part and localization in the application manifest when deploying a Silverlight-based application.

Tuesday, August 9, 2011

Language processes during app submission

     Here are some issues that I faced when I submited windows phone Apps
and some solutions I have found:

common issues :
     After 7/18 App Hub update it appears that many are having difficulty entering the right default language, especially when updating the app. Picking a wrong default language can lead to multiple issues, the most common of which are:
Error 2003: The [NeutralResourceLanguage] attribute is missing on the entry assembly.
     This error indicates that you need to add NeutralResourceLanugage attribute to your XAP, recompile and resubmit. See above for information on adding the attribute automatically through Visual Studio UI.
Error 1047: An update cannot support fewer languages than the previous app instance supported.
Error 1048: A language supported in this XAP conflicts with a language that is already supported by another app instance for this app.
     This is most often caused by selecting improper neutral language when publishing an update. The language of an update needs to match the language of the updated instance. If the parent instance was marked as “English (International)”, you need to use[NeutralResourcesLanguage(“en”)], if it was “English”, use [NeutralResourcesLanguage(“en”)], in other cases use two-letter language name.

Sunday, July 24, 2011

Image control stretch "UniformToFill" not works

     I got a situation when I set Image control's stretch to "UniformToFill", it seems to be "UniformToFill", but exactly left aligned. Finally, I found a solution, but it still confuses me.
Here is the solution:
<grid Height="limitHight" Width="limitWidth">
     <Image Horizontalalignment="Center" 
            Verticalalignment="Center" 
            Stretch="UniformToFill"/>
</grid>

     You just need to change Height and Width properties of the container. It works fine.
Maybe there is a better solution. But I still don't know.

Friday, July 8, 2011

Gift-you and Gift-me(Windows Phone / iPhone version)





Features:

-  Can be sent and received between 
    iPhone and Windows Phone
- 3D gift movie(3D gift in iPhone)
- 3D gift box movie(3D gift box in iPhone)
- On gift box greeting
- On gift greeting
- Music or custom recording with the gift
- Gift locking, allow you to control when the receiver can                      unwrap the gift box.