Archive for 'Windows Phone'

Difference between silverligt and wpf

Silverlight and Windows Presentation Foundation (WPF) are two different products from Microsoft, but have lot of overlap. Silverlight is a subset of WPF in terms of features and functionality.

Silverlight is a Microsoft technology, competing with Adobe’s Flash, and is meant for developing rich browser based internet applications.

WPF is a Microsoft technology meant for developing enhanced graphics applications for the desktop platform. In addition, WPF applications can be hosted on web browsers which offer rich graphics features for web applications. Web Browser Applications (WBA) developed on the WPF technology uses XAML to host user interfaces for browser applications. XAML stands for eXtended Application Markup Language, which is a new declarative programming model from Microsoft. XAML files are hosted as discrete files in the Web server, but are downloaded to the browsers and converted to a user interface by the .NET runtime in the client browsers.

WPF runs on the .NET runtime, and developers can take advantage of the rich .NET Framework and WPF libraries to build really cool Windows applications. WPF supports 3-D graphics, complex animations, hardware acceleration etc.

Silverlight uses a particular implementation of a XAML parser, with that parser being part of the Silverlight core installation. In some cases, the parsing behavior differs from the parsing behavior in Windows Presentation Foundation (WPF), which also has a particular implementation.

In table format:

  Silverlight WPF
Definition Silverlight is Microsoft’s latest development platform for building next-generation Web client applications. Windows Presentation Foundation (WPF) is Microsoft’s latest development platform for building next-generation Windows client applications.
Subset of Silverlight is generally considered to be a subset of WPF, and is a XAML-based technology that runs within the sandbox of a browser plug-in. WPF is generally considered to be a subset of .NET Framework, and is a XAML based technology.
GUI Silverlight will be used in the development of  Rich Internet Applications (RIA) for web client users. WPF will be used in the development of Rich Windows Graphical User Interfaces (GUI) for Windows client users.
Support Cross OS, cross browser, cross device. Windows only.
Software Required Silverlight is the add-on mechanism available for most browsers; in order to run Silverlight applications at client machines, we need to install Silverlight software on the client machine once. WPF, on the other hand, does not support any plug-in mechanism; instead, we need to install a completed WPF client application in order to use the WPF application at the client place.
Framework support Silverlight has a very small, its own rich base class library to make the plug-in as small as possible. It is highly optimized for size, and is a small subset of the full .NET Framework, to be embedded within an application. WPF, on the other hand, has full access to the main .NET Framework and all its associated assemblies.
Deployment Silverlight applications are hosted within a web server and a web page. To minimize client download size, Silverlight uses a XAP archive. A XAP archive is a zip-compressed archive of the Silverlight application, plus a manifest file describing the content. Visual Studio automatically generates the XAP archive when using the Silverlight project template. WPF applications can be deployed as standalone applications, ClickOnce applications, or XAML browser applications.

IndexOf Ignoring Case


The string’s IndexOf methods are all case-sensitive. Fortunately, the Globalization namespace contains the CompareInfo class that includes a case-insensitive IndexOf method. For example:

using System.Globalization;

 

Code to Display on Console in Windows Phone

The following codes will help you to display various contents in the console.

Display a simple text in the console :

 

Display an integer in the console :

 

Display a combination of string and integer in the console :

int myNumber = 5; // Consider an integer object

Console.WriteLine("My Number is "+myNumber+".");  // This is to display a combination of string and integer in the console.

Output : My Number is 5.        // This will be the output

Microsoft recently previewed the next major release of Windows Phone. The new release, code-named Mango, delivers substantial improvements in both the software platform and developer tools. Mango features more than1,500 new APIs, 16 new languages, and hardware-accelerated support for both IE9 and HTML5. Mango also brings enticing new opportunities to Nokia developers. Updates for tools, such as enhanced debugging, emulator support with accelerometer, gesture support, and profiling will also improve developer productivity.

As part of its transition to Windows Phone, Nokia plans to develop a full portfolio of devices that address several audiences and markets, rather than simply creating one high-end device. Nokia will also work closely with Microsoft to differentiate its devices with Mango by featuring iconic hardware and services, while applying consistent design principles for a unique look and feel. In coming months, Nokia will continue to add improvements, benefits, and simplification to its developer-support offerings.
Meet Mango, watch a video demo, and get tools

Android leads market ahead of Apple

According to research data for Q1 2011, Android is leading the smart phone market for the second quarter running. Google’s OS has 35.7 million units shipped in Q1 2011 increasing its market share to 35%.

Nokia remains numero-uno in 28 countries. Despite the lukewarm success of their latest Symbian smartphones, the adoption of Windows Phone 7 and the death of MeeGo, Nokia has grown 79% in China with 8.9 million units shipped. However, they has lost the global number one spot to Android.

Android also saw a 200% growth in the largest smartphone market – USA, where it dominated with 49% market share. Apple’s share grew to 31%, a growth of over 150% year-on-year. This growth can be credited significantly to the launch of the iPhone 4 on the Verizon Wireless network, which helped boost sales.

BlackBerry maker RIM, however, saw a dip in its market share in Q1 2011. Hopefully, the arrival of the PlayBook tablet and a refreshed smartphone lineup will help BlackBerry back on its feet.

The data comes from Canalys, a research organisation with a focus on technology vendors.

Quality products provided by vendors supported Androids success. “HTC, Samsung, LG, Motorola and Sony Ericsson drove Android shipments in the first quarter, with each vendor shipping well over 3 million devices,” said Peter Cunningham, principal analyst, Canalys. “Samsung also shipped nearly 3.5 million bada operating system-based smart phones, outperforming total shipments of Windows Phone devices by more than a million units.”

“Samsung’s own operating system development, combined with the branding and investment in its Wave smart phones at mid-tier prices, has led to good uptake in developed markets, such as France, the UK and Germany”, continued Cunningham. “This achievement shows that there is still room for multiple operating systems, and that vendors can benefit from maintaining control of device development to hit the right markets and price points.”

Canalys has also confirmed that Asia Pacific is the largest growing smartphone market with a year-on-year growth of 93%. 37.3 million units were shipped, making Asia Pacific a larger market than Europe, the Middle East and Africa for the first time since 2007. The biggest growth has come from India, China and South Korea.

source: here

Windows Phone 7 LifeCycle

Launching the Application When the user launches the application for the first time, the application receives the Application_Launching event. In order to provide fast startup response, the application should do little work in this event handler. In particular, it should avoid any web downloads or isolatedStorage (see below) data fetch operations. Once active, it can initialize the state or load any saved state.

Terminating the Application While the application is running, the user may terminate it by navigating out of the application using the back button. At this time, the application will receive the Application_Closing event. In response, the application should perform any cleanup and save the persistent application data to isolatedStorage.

Deactivating the Application and Tombstoning While the application is running, the user can hit the Start button or launch another application via launchers or choosers. The user may launch the browser by clicking on a link in the application.

Similar to an application that is closed, an application that is deactivated is also terminated. However, unlike a closed application, for a deactivated application, the OS stores a record (a tombstone) for the state of the application. This is maintained as part of the application back stack which is used to facilitate navigation using the back button.

In these cases, the application is sent an Application_Deactivated event, at which time the application should save all persistent data to isolatedStorage and all transient data, such as the values of page fields, using PhoneApplicationPage.state.

Reactivating the Application Upon completing the launcher, or the user navigating back into an application using the back button, the application will be reactivated. Upon reactivation, the application will receive the Application_Activated event. Since the application is being reactivated from a tombstone state, the application should load the persistent state data from the isolatedStorage and the transient state data from PhoneApplicationPage.state.

 

For more details see the official page

http://windowsphone.interoperabilitybridges.com/articles/chapter-6-application-lifecycle-differences-between-windows-phone-7-and-the-iphone

 

Launched on 26 April, the iPhone/iOS to Windows Phone 7 API mapping tool helps developers find their way around when they discover the Windows Phone platform.  Think of the API mapping tool as being like a translation dictionary. For example, let’s say that you’re planning a vacation to France. Since you don’t speak the language, you’ll bring a pocket travel dictionary. Having this tool will surely help you to get some idea about what you are ordering from a restaurant menu but you’ll have no idea what the actual recipe is — nor will you be able to have a conversion in French with the server! But that’s a great learning tool to make the first steps.
With this tool, iPhone developers can grab their apps, pick out the iOS API calls, and quickly look up the equivalent classes, methods and notification events in WP7. A developer can search a given iOS API call and find the equivalent WP7 along with C# sample codes and API documentations for both platforms.
The code samples allow developers to quickly migrate short blobs of iOS code to the equivalent C# code. All WP7 API documentations are pulled in from the Silverlight, C# and XNA sources on MSDN.

For more details, see the official website,

http://windowsphone.interoperabilitybridges.com/articles/api-mapping-tool-iphone-ios

Android will dominate the smartphone market

Gartner, a market research firm, has forecasted that Android will grab nearly 50% of smartphone market. Google’s Android Base phones have reportedly increased the market share of the smartphones in 2011. Samsung and HTC have clocked higher sales with Android platform that improved their compatibility and dominate the smartphone market.

According to Gartner, there were over 296 million smartphones shipped last year out of which Android secured a 22.7% share. The smartphone shipments worldwide is expected to reach 468 million units, which will help Android to grab 38.5% market share by the end of the year, followed by Apple’s iOS at 19.4%, and Symbian at 19.2% . In 2012, more than 630 million smartphones will be shipped and Android will secure 49.2% share of the market, displacing iOS, with 18.9% share. BlackBerry OS will own 12.6% share of the smartphone market, nabbing the third place. Pushing the forecast further to 2015, a whopping 1.1 billion smartphones will be shipped out of which Android will snare 48.8% market share followed by Microsoft’s Windows Phone with 19.5% and iOS at 17.2%.

Gartner expects that Android will cut the prices of smartphones considerably that by 2015, 67% of all open OS devices will have an average selling price of $300 or below

Gartner also predicted that Android’s tablet is projected to grab 38.6% of the market by 2015 with a projected 113.5 million units sold.

 

Apple App Store Tops 300,000 Apps

Apple confirmed Monday that its App Store now boasts more than 300,000 applications.

The 300,000 apps are available in 90 countries, Apple said in a statement. There are more than 40,000 native iPad apps.

Overall, customers have downloaded more than seven billion apps since the store’s inception in 2008. The 125 million iOS users all over the globe can choose from apps in 20 categories, Apple said.

Apple made the announcement as part of its iOS 4.2 release, which was made available for the iPhone, iPad, and iPod touch earlier today.

Rumors about the number of apps in the App Store have been floating around for about a month. In October, third-party application tracking service Mobiclix reported that the Apple App Store hit 300,000 apps, but Apple did not confirm that number. At the time, analytics sites 148apps.biz and AppShopper.com put the active number of App Store apps at 279,000 and 280,000, respectively. Apple later announced the 300,000 number during an earnings call.

Apple’s App Store reportedly hit 250,000 apps in August. The Android Market, meanwhile, hit 100,000 apps last month; it opened in October 2008. The Windows Phone 7 Marketplace had more than 1,000 apps three weeks after it debuted.

Extracted From :http://www.pcmag.com/article2/0,2817,2373169,00.asp