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!
Showing posts with label Windows Phone 7. Show all posts
Showing posts with label Windows Phone 7. Show all posts

Tuesday, August 30, 2011

SketchFlow for Windows Phone 7


Many of you might have used SketchFlow for your various applications.
Now that there’s a Sketchflow template for Windows Phone applications, you can (and should) prototype any projects. The time you spend prototyping and working out any issues and finding ambiguities in requirements will be well worth it.


Read more of this post

Introduction to Gestures in Windows Phone 7


A Windows Phone 7 device touch input in the form of gestures. In Windows Phone OS, a touch gesture involves tapping or swiping one or more fingers on a touch screen.
A Windows Phone 7 Application can use the following gestures:
Single-touch gestures
  • Tap
  • Double Tap
  • Pan
  • Flick
  • Touch and Hold
Multi-touch gestures
  • Pinch and Stretch

Wednesday, August 10, 2011

Theme dependent panorama background

Windows Phone 7 provides various theme based resource which change automatically depending on the currently selected theme i.e. dark or light.

You can use these resources for all controls except the case of a panorama background. In such a case you can use a Brush property in your view model to change the panorama background depending on the currently selected theme.


public ImageBrush PanoramaBackgroundImage
{
  get
  {
    var lightThemeEnabled = (Visibility)Application.Current.Resources
["PhoneLightThemeVisibility"] == Visibility.Visible

    var url = lightThemeEnabled ? "/Images/PanoramaBackground_light.jpg"
                             : "/Images/PanoramaBackground_dark.jpg";

    var brush = new ImageBrush
    {
        ImageSource = new BitmapImage(new Uri(url, UriKind.RelativeOrAbsolute))
    };
    return brush;
  }
}

The only thing left is to bind the background of the panorama to this property. You may also need to add a design time value to this field for design time rendering purposes.

Related Links

Tuesday, August 9, 2011

Page Transitions in Windows Phone 7 – Part 2

Previously, I have published some information about page transitions available in Windows Phone 7. I would recommend to read this post to get a summary of what has already been discussed. As I have mentioned before, there are many transitions available from the Silverlight toolkit:
  • Turnstile Transition
  • Swivel Transition
  • Slide Transition
  • Roll Transition
  • Rotate Transition
Lets take a look at all of these transitions in detail.

Turnstile Transition


This transition is similar to turning a page from one corner. A turnstile transitions is the most common and simplest to use.
It has four modes BackwardIn, ForwardIn, BackwardOut and ForwardOut. Like the name suggests these modes are applicable for while navigating in and navigating out.

    <toolkit:TransitionService.NavigationInTransition>
        <toolkit:NavigationInTransition>
            <toolkit:NavigationInTransition.Backward>
                <toolkit:TurnstileTransition Mode="BackwardIn"/>
            </toolkit:NavigationInTransition.Backward>
            <toolkit:NavigationInTransition.Forward>
                <toolkit:TurnstileTransition Mode="ForwardIn"/>
            </toolkit:NavigationInTransition.Forward>
        </toolkit:NavigationInTransition>
    </toolkit:TransitionService.NavigationInTransition>
    <toolkit:TransitionService.NavigationOutTransition>
        <toolkit:NavigationOutTransition>
            <toolkit:NavigationOutTransition.Backward>
                <toolkit:TurnstileTransition Mode="BackwardOut"/>
            </toolkit:NavigationOutTransition.Backward>
            <toolkit:NavigationOutTransition.Forward>
                <toolkit:TurnstileTransition Mode="ForwardOut"/>
            </toolkit:NavigationOutTransition.Forward>
        </toolkit:NavigationOutTransition>
    </toolkit:TransitionService.NavigationOutTransition>


Swivel Transition

A Swivel Transition is exactly similar to a turnstile transition from a developers point of view. When this transition is applied it appears as if the page comes to the front or from the back vertically.

Sunday, July 24, 2011

Windows Phone 7 Profiler


The Windows Phone Profiling Tool lets developers measure, evaluate, and target performance-related issues in their code. These tools are fully integrated into the Visual Studio IDE to provide a seamless and approachable user experience.
Profiling a phone application is straightforward. You begin by creating a new performance session. After a performance session ends, data gathered during profiling is saved in file with the extension .sap that you can view inside the IDE. These provide views on the different levels of your application structure from source code lines to processes, and program execution data from the calling and called functions of a specific function to the call tree of the entire application.

Read more at MSDN

The Windows Phone Profiler, "In Progress"


Windows Phone Profiler, with highlighted timeline


Related Links

Designing Icons for Windows Phone 7


In Silverlight TV #78, Corrina continues the Design Tips miniseries by sharing her insights on how to create tiles and splash screens for Windows Phone applications. She walks through the process of creating an icon in Expression Design and how to make tiles look good and quickly mesh with Metro. Corrina then shows how to create a splash screen and gives some good tips on how to make the splash screen provide a better user experience. Finally, she walks through some tips to help with working with gradients. This video is packed with tips from Corrina, including some great keyboard shortcuts she uses when working with Expression Design.





The main topics Corrina covers are:
  • Importing photos and using them as a stencil for icons
  • Creating a good splash screen that meshes with your app
  • Simple gradient color solutions
Related Links

Page Transitions in Windows Phone 7

If you see any in-built application on Windows Phone 7, you would notice nice transition effects when navigating from one page to another. These transitions certainly improves the overall user experience of the application.


When you create a new Windows Phone 7 Application using Visual Studio 2010 or Blend, you do not get theses nice transitions in your application.


For this, you would need to add a reference to the Microsoft.Phone.Controls.Toolkit.dll in your project. Once this is done, you would need to use the Transition Service in every page that you want to have the transition effect.



<toolkit:TransitionService.NavigationInTransition>
    <toolkit:NavigationInTransition>
        <toolkit:NavigationInTransition.Backward>
            <toolkit:TurnstileTransition Mode="BackwardIn"/>
        </toolkit:NavigationInTransition.Backward>
        <toolkit:NavigationInTransition.Forward>
            <toolkit:TurnstileTransition Mode="ForwardIn"/>
        </toolkit:NavigationInTransition.Forward>
    </toolkit:NavigationInTransition>
</toolkit:TransitionService.NavigationInTransition>
<toolkit:TransitionService.NavigationOutTransition>
    <toolkit:NavigationOutTransition>
        <toolkit:NavigationOutTransition.Backward>
            <toolkit:TurnstileTransition Mode="BackwardOut"/>
        </toolkit:NavigationOutTransition.Backward>
        <toolkit:NavigationOutTransition.Forward>
            <toolkit:TurnstileTransition Mode="ForwardOut"/>
        </toolkit:NavigationOutTransition.Forward>
    </toolkit:NavigationOutTransition>
</toolkit:TransitionService.NavigationOutTransition>

Copy the above XAML and paste it in your Page, preferebly at the end.


This would enable the tranitions for this page.  Now if you would like thses transitions to work automatically,

Friday, July 15, 2011

Building Mobile-Ready Content and Layout

Smart phones and tablets have changed people's web experience dramatically. If you are a web developer, you would probably require a mobile ready website.

There are two options one create two different sites one for the large screen devices and other for mobile devices.
Managing two different websites and become a difficult task after some time.The solution, build a mobile ready website which can change its appearance depending on the device you are viewing your site.


For this purpose, one must:
  • Focus on creating semantic markup – use CSS and JavaScript for appearance and behavior

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

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.

Wednesday, April 20, 2011

Windows Phone 7 - Understanding Push Notifications


Push Notifications? What are Push Notifications? Does Windows Phone 7 support Push Notifications?


Microsoft Push Notification (MPN) service is used by Windows Phone 7 for sending notifications to Windows Phone 7 handsets.


There are three types of push notifications that a  can be used for sending information to an application,

  • Tile notifications
  • Toast notifications
  • Raw notifications


Tile notifications
Every application has one assigned 'Tile' – a visual, dynamic representation of the application or its content. A Tile displays in the Start screen if the end-user has pinned it.


Toast notifications
Toast notifications are system-wide notifications that do not disrupt the user workflow or require intervention to resolve. They are displayed at the top of the screen for ten seconds before disappearing. If the toast notification is tapped, the application that sent the toast notification will launch. A toast notification can be dismissed with a flick.


Raw notifications
If you do not wish to update the Tile or send a toast notification, you can instead send raw information to your application using a raw notification. If your application is not running currently, the raw notification is discarded on the Microsoft Push Notification Service and is not delivered to the device. The payload of a raw notification has a maximum size of 1 KB.




If you would like to know more about Microsoft Push Notification  service, I recommend reading the following posts:
Now that you know how the Push Notification works, it is time to put this knowledge to some use.

For beginners, the MSDN article How to: Send a Push Notification for Windows Phone provides some sample codes.


If you are a little above the beginner level, Using Push Notification from Your Windows Phone Application post on the Windows Phone Developer Blog gives enough detailed information.



Related Links

Monday, March 28, 2011

News reader: Windows Phone 7 Panorama App


Every one must have header about the panorama control available for the Windows Phone 7 applications. But have you created an app using it? Let's begin creating a simple news reader app using the panorama control.
At first, create a panorama application project in Visual Studio 2010. This adds a lot of files to your project, you may choose to just modify than or add your own files. The basic structure that VS 2010 creates for you is perfect for this app. Let us first concentrate on the UI design.
The app will have two panorama screens, the first one will display the top stories, while the other will show a list of news categories for the user to choose.
Every panorama screen has a title, that identifies what the screen is about or what you can expect it to have. I would be naming my screen "top stories". You might wonder why the lower case, well that's what most of the WP7 apps have titles, all in lower case.
The content of the screen is pretty straight forward, it contains a list box display all the news stories.
<!--Panorama item one-->
<PanoramaItem Header="top stories">

<ListBox ItemsSource="{Binding TopStories}" SelectionChanged="MainListBox_SelectionChanged">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Margin="0,0,0,17" Width="432">
<TextBlock Text="{Binding Title}" TextWrapping="Wrap" Style="{StaticResource PhoneTextTitle2Style}"/>
<TextBlock Text="{Binding PublishedDate}" TextWrapping="Wrap" Margin="12,5" Style="{StaticResource PhoneTextSmallStyle}" FontStyle="Italic"/>
<TextBlock Text="{Binding Description}" TextWrapping="Wrap" Margin="12,2" Style="{StaticResource PhoneTextSubtleStyle}"/>
<!--StackPanel>-->
</DataTemplate>
<!--ListBox.ItemTemplate>-->
<!--ListBox>-->
</PanoramaItem>
When the user selects any item in the list box, the user would be redirected to the browser display the entire article.  Following code accomplishes this task for you.

Sunday, February 27, 2011

Panorama versus Pivot: Windows Phone 7


The most popular controls in the Windows Phone 7 tools are the Panorama and pivot. Their usage is somewhat similar, but both provide a different kind of experience.
Here's a link to a post from Tim Heuer's blog, Pano versus Pivot: Windows Phone Design Days content available.
The post provides good insights on the two controls and has links to some good learning videos on windows phone 7.
If you are interested in a much more detail look into the implementation of these two controls consider visiting Windows Phone 7 - Part #5: Panorama and Pivot controls

Saturday, February 26, 2011

Using Icons in Windows Phone 7 App



When using icons, you just think of a general colorful image that you have just found on Google. It might not be easy as you think, when you want to include icon in the application bar of your windows phone 7 app. Being from Microsoft, Windows phone 7 puts its own restrictions on using icons, and no they are not limited to just size.
Heres what msdn article Application Bar Best Practices for Windows Phone puts it
The following items apply to the Icon Buttons displayed by the Application Bar
  • Icon images should use a white foreground on a transparent background using an alpha channel. The Application Bar will colorize the icon according to the current style settings and colored icons can cause this effect to display unpredictably.
  • The circle displayed on each Icon Button is drawn by the Application Bar and should not be included in the source image.
  • Icon images should be 48 x 48 pixels in size. The white foreground graphic for the button should fit in a 26 x 26 area square in the center of the image so that it does not overlap the circle.
  • Do not use an Icon Button for a Back button that navigates backwards in the page stack. All Windows Phones are required to have a dedicated hardware Back button that should always be used for backward navigation.
  • Use Icon Buttons for the primary, most-used actions in your menu. Some actions are difficult to convey clearly with an icon. If this is the case, consider using a Menu Item instead.
  • Choose icons that have clear meanings when the Application Bar is rotated. The Application Bar automatically handles changes in screen orientation. When the device is in a landscape orientation, the menu is displayed vertically on the side of the screen. The icon buttons are rotated so that they appear upright to the user, but the order of the icons in the list is not changed. It is possible for icon meanings to be confused when this occurs, particularly if two of the icons are mirror images of each other along the Y axis.
In short, you need to use icons which have the icon shape in white with a transparent background and having size of 48 x 48 pixels.
By installing Windows Phone Developer Tools, various icons are installed with it. You can find them at one of the following locations:
  • C:\Program Files\Microsoft SDKs\Windows Phone\v7.0\Icons\dark
  • C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v7.0\Icons\dark
Here are some icons from that pack:
appbar.feature.camera.rest appbar.feature.email.rest appbar.feature.search.rest appbar.feature.settings.rest appbar.feature.video.rest appbar.folder.rest appbar.minus.rest appbar.new.rest appbar.next.rest appbar.questionmark.rest appbar.refresh.rest appbar.save.rest appbar.share.rest appbar.stop.rest appbar.sync.rest appbar.transport.ff.rest appbar.transport.pause.rest appbar.transport.play.rest appbar.transport.rew.rest appbar.upload.rest appbar.add.rest appbar.back.rest appbar.basecircle.rest appbar.cancel.rest appbar.check.rest appbar.close.rest appbar.delete.rest appbar.download.rest appbar.edit.rest appbar.favs.addto.rest appbar.favs.rest
Related Links