A new home

I’ve made the move to WordPress!

You should be automatically redirected in 5 seconds. Please visit World Wide Code on Wordpress

Hope to see you there!

Wednesday, May 25, 2011

Windows Phone 7: Mango preview



Microsoft gave a preview of the upcoming "Mango" release of Windows Phone, through a series of events around the world.

Mango is set to provide 500 new features and enhance the smartphone experience dramatically.

Communications: Easier to Connect and Share
  • Threads
  • Groups
  • Deeper social network integration.
  • Linked inbox
  • Hands-free messaging
A Smarter Approach to Apps
  • App Connect
  • Improved Live Tiles
  • Multitasking
Taking the Internet Beyond the Browser
  • Internet Explorer 9.
  • Local Scout
  • Bing on Windows Phone
  • Quick Cards

Sunday, May 15, 2011

From iPhone to Windows Phone 7


In a very strange move, Microsoft is helping the iPhone developers use their skills to make a Windows Phone 7 application.

Does this mean Microsoft admits that the iPhone is superior to Windows Phone 7 or its just another marketing gimmick from Microsoft to get some attention on the WP7 platform.

Leveraging your iPhone development expertise to build Windows Phone 7 applications on the Windows Phone Developer Blog gives more insights on this topic.

The blog also has a series of “developer stories”, in which developers share on video their experience porting iPhone applications to Windows Phone and explain why and how they did it.


Windows Phone 7 Guide for iPhone Application Developers
If you have been developing iPhone applications and are interested in building your applications for Windows Phone 7, this guide is for you.
The guide will cover what you need to know to add Windows Phone 7 development to your skill set, while leveraging what you have already learned building iPhone:
Source : http://windowsphone.interoperabilitybridges.com/

You may also want to visit Jesse Liberty's tutorial: iPhone to Windows Phone 7 Tutorial.

iOS API call and its WP7 equivalent along with C# sample codes and API documentations for both platforms can be found here.

Related Links

Silverlight 5 - 3D support


The 3D Graphics API was added in the recently released Silverlight 5 Beta.

Having 3D graphics support is a major advancement in Silverlight and is expected to have a huge impact in the near future.

One area where the 3D Graphics API can be useful is 3D Graphics

3D Physics demo




There are a lot of places that you can visit to gain more knowledge about the 3D Physics.
Here are some useful links:
Another nice implementation of the 3D Graphics API is Augmented Reality.
Augmented Reality demo

Useful Links
I would have appreciated more documentation from the Silverlight Team on the 3D Graphics API.
Let's wait and see how these features are implemented by various people. (If you have a good implementation don't forget to ping me)

Sunday, May 1, 2011

What’s Coming In Mango–Reminders


Mango is the next update to Windows Phone 7. Its set to bring a lot of features with it, including something called as "Reminders"

This is what you could be able to do:



What are you waiting for, see this latest post from Jesse Liberty on his blog.

Tuesday, April 26, 2011

Implicit Templates in Silverlight 5


Silverlight 5 has added many new useful features. If you have not read about Silverlight 5's new features then read Silverlight 5: What’s New.

Implicit Templates is one of the new features included in Silverlight 5. Implicit Templates can be said to be data templates associated with a particular data type. These templates will be applied to all template-driven controls which are trying to display the specified data type.

For example, If you have two classes Manager and Employee both derived from the Person class. Now you would like to display the list of people in your company with different styling for each type of person. this is where Implicit Templates make your life easy.

Just specify two Data Templates for each of the two classes i.e. Manager and Employee.

<ListBox x:Name="PeopleList">
<ListBox.Resources>
<DataTemplate DataType="local:Manager">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Name}" FontWeight="Bold" />
<TextBlock Text="(Manager)"  FontStyle="Italic" Margin="5,0,0,0"/>
</StackPanel>
</DataTemplate>
<DataTemplate DataType="local:Employee">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Name}" />
<TextBlock Text="{Binding ManagerName, StringFormat='Managed by: {0}'}" FontStyle="Italic" Margin="5,0,0,0" Foreground="Gray" />
</StackPanel>
</DataTemplate>
</ListBox.Resources>
</ListBox>

This will display some thing like this:


Implicit Templates does allow you to easily specific unique characteristics of an object in your data template.

Another example many people use for Implicit Templates  is Twitter. See this example from Pete Brown. In his post, Pete Brown describes Implicit Templates in more detail. 



Install Silverlight

Video: Pete Brown demonstrates Implicit DataTemplates.

Related Links

Profiling Silverlight Applications


You can profile Silverlight 4 applications, however this task is not integrated within Visual Studio 2010.
Here's what you need to do: open an Visual Studio 2010 Command Prompt in administrator mode and run the following:
VSPerfClrEnv /sampleon
VSPerfCmd -start:sample -output:somefile.vsp
VSPerfCmd -globalon
VSPerfCmd -launch:"c:\Program Files (x86)\Internet Explorer\iexplore.exe" -args:""
VSPerfCmd -shutdown
VSPerfClrEnv /off
This will create a VSP (Visual Studio Profile) file in the current directory, which you can then open in Visual Studio.

Silverlight5 now supports profiling within Visual Studio 2010 SP1.

Related links

Saturday, April 23, 2011

Silverlight Trusted Applications


A new feature Silverlight 5 Beta has introduced is the ability to do some of the “trusted” features in the browser.

This brings the current functionality of trusted applications in current form to be used in the browser context without having to be installed.


This still requires the XAP to have the Elevated Permissions security setting in the manifest as it would exist with out-of-browser applications as well as the XAP being signed (and the certificate in the user’s trusted publisher store).


For example, Multiple window support has been added in Silverlight 5 Beta for Trusted OOB applications. Here's a code snippet from xamlgeek.net

Silverlight 5 supports the ability to open multiple top-level windows. It is required that the application run with elevated permissions.
clip_image001
Closing the main application window will cause all windows to close.
I would be writing more in detail about each of the new Silverlight 5 features in future posts...
For more on how to create a trusted application follow the guide below:

Request elevated trust

Check the "Require elevated trust when running outside the browser" check box in the Out-of-Browser Settings dialog box.
Out-of-Browser Settings dialog box, Require elevated trust option

When users attempt to install an application that requires elevated trust, they are shown a security warning instead of the normal install dialog box. The default warning indicates that the publisher is not verified, and does not display your application icon.

Security Warning dialog box for unsigned application requiring elevated trust

Sign your XAP

You should always sign an application that requires elevated trust to enable verification that you are the publisher. For debugging purposes, Visual Studio lets you create and use a test certificate.
Signing page, project designer

A signed application still displays the security warning at install time, but the message is milder and includes your application icon.

If you would like to know more about application signing visit this MSDN article.
Security Warning dialog box for signed application requiring elevated trust

After installation, the trusted application can access all of the out-of-browser features. Additionally, it is not subject to security restrictions such as user-consent requests and full-screen keyboard limitations.


Related links