Wriju's BLOG

.NET, Cloud and everything

About Cloud – Windows Phone 7 Application to keep Updated

Over a period of time I was thinking of Building one Application for Community. It took sometime for me to finalize. However, I kept myself as end-user and build this application. This brings information form Blogs, Tweeter and Channel9 on Windows Azure and SQL Azure. You can download this application from http://windowsphone.com/s?appid=70a5c276-12bf-4c1a-aa45-795ff47a5b7f One single application… Read more

Windows Phone 7 Application bar Icon is not showing in Emulator

I have developed an application with Application Bar in Windows Phone 7. I have used the icon from C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v7.1\Icons. I copied them to my project’s local folder but when I am running it in Emulator is it not showing. Below is the snapshot of how it came To be able to… Read more

Azure OData and Windows Phone 7

In this post I am planning to cover the topic where we will be exposing data in SQL Azure using WCF Data Services and consume it from Windows Phone 7. We have data available in SQL Azure. So we will create one let’s say and application ASP.NET MVC and add the Entity Framework data model… Read more

Windows Phone Mango Development Jump Start available at Channel 9

Learn development in Windows Phone Mango with Rob Miles and Andy Wigley 1. Mango Jump Start (01): Building Windows Phone Apps with Visual Studio 2010 2. Mango Jump Start (02): Silverlight on Windows Phone—Introduction 3. Mango Jump Start (03): Silverlight on Windows Phone—Advanced 4. Mango Jump Start (04): Using Expression to Build Windows Phone Interfaces… Read more

Windows Phone : Using Accelerometer in Emulator

If you are building application which is dependent on Accelerometer, then the Emulator allows you to test that. The below example was demonstrated on MIX11. Let’s suppose you have image and based on the X or Y axis of your phone image will rotate. <Image Height="428" HorizontalAlignment="Left" Margin="106,96,0,0" Name="image1" Stretch="Fill" VerticalAlignment="Top" Width="233" Source="/PhoneApp3;component/Images/Phone7.png" > <Image.Projection>… Read more

Windows Phone 7 : Choosing Email Application to send email

You may choose email application to send an email from your phone. EmailComposeTask MyEmailComposer = new EmailComposeTask(); MyEmailComposer.To = "wriju@contoso.com"; MyEmailComposer.Subject = "Mango Email"; MyEmailComposer.Body = "Welcome to the Magic!!!"; MyEmailComposer.Show(); Namoskar!!!… Read more

Windows Phone 7 : Choosing Email address from the list

If you are composing a text and wanted to send it to the people listed in your contact you can choose from the list. Here is how you can do it. EmailAddressChooserTask emailAddress = new EmailAddressChooserTask(); emailAddress.Completed += new EventHandler<EmailResult>(emailAddress_Completed); emailAddress.Show(); And to capture the email address you can have this small code. void emailAddress_Completed(object… Read more

Partner Event : Windows Phone 7 Mango – Platform Overview for Application Development

I am happy to announce the upcoming event for Microsoft MPN Partner on Windows Phone 7 Mango – Platform Overview for Application Development Date & Time: Aug 29, 11 Pacific time via Office Live Meeting Registration: https://training.partner.microsoft.com/learning/app/management/LMS_ActDetails.aspx?UserMode=0&ActivityId=752004 Presenter: Wriju Ghosh, Lead Partner Technical Consultant, Microsoft. Abstract: This session will walk you through the windows Phone… Read more

Windows Phone 7 : Invoke Bing Search

If you let people quickly open Bing search with the selected word while navigating your application in your Windows Phone 7. //Curtsey WP7 Training Kit – MUST HAVE IT!!! WebBrowserTask wbTask = new WebBrowserTask(); string BingURL = @”http://m.bing.com/search?q={0}”; string searchKeyword = textBox2.Text; wbTask.Uri = new Uri(string.Format(BingURL, searchKeyword), UriKind.Absolute); wbTask.Show(); Namosakar!!!… Read more

Windows Phone 7 : Open URL in IE9 from Application

Launching browser from your Phone application is often required. The common term could be “Shell” for those who came to classic VB age like me. Later in .NET it was wrapped under System.Diagnostic.Process. In Windows Phone 7 we might need such functionality while working with RSS kind of application where user can click on the… Read more

Windows Phone 7 : Using Local Database for Application

Windows Phone uses concept of Local Database and by implementing LINQ to SQL you can create 100% relational database driven application. To understand more on this refer http://msdn.microsoft.com/en-us/library/hh202860(VS.92).aspx So what you need is the good old tie up between Silverlight and LINQ to SQL. Here we go. You need to refer System.Data.Linq assembly and use… Read more

Windows Phone 7 : How to change Startup Page

Windows Phone 7 Silverlight project generally starts by opening MainPage.xaml. How to change this? Under solution explorer, expand Properties and open WMAppManifest.xml and there we can change it <Tasks> <DefaultTask Name=”_default” NavigationPage=”LocalDB_WP7.xaml” /> </Tasks> Namoskar!!!!… Read more

Windows Phone 7 : IsolatedStorage Save and Read Data to a File

Windows Phone 7 apps runs in an isolated environment and often application needs store and retrieve data from files. Application can use its IsolatedStorage to store and retrieve data. The example shows how to read from a  file and display it in ListBox and save data to the file located in its isolated storage. We… Read more

Windows Phone 7 : How to play media

Windows Phone 7 can flawlessly play media files. There are list of supported codec which Windows Phone 7 can play. However below is the simple XAML which can enable the media loading. <MediaElement x:Name=“myVideo“ AutoPlay=“True“ Source=“Kalimba.mp3“ /> You can also control various behaviors through your code.  Note. 1. Now while using the Windows Phone 7 Emulator… Read more

Windows Phone 7 : Checking Network Connections before Downloading

Not every user will use unlimited data connections. So as a good application developer you should check and notify user whether they would like to proceed further or not. Some of the quick things you may want to do //Check if network is available var _isNetworkAvailable = Microsoft.Phone.Net.NetworkInformation.DeviceNetworkInformation.IsNetworkAvailable; //Check if Cell Data connection is available… Read more

Windows Phone 7 : Building Simple RSS Reader

Here we will build simple RSS reader in Windows Phone. Reading RSS is reading XML file online. So you need some engineering between XML and XAML. Here you go. Your phone UI <Grid x:Name=”ContentPanel” Grid.Row=”1″ Margin=”12,0,12,0″> <ListBox Name=”lstRSS”> <ListBox.ItemTemplate> <DataTemplate> <StackPanel> <TextBlock Text=”{Binding Path=Title}”></TextBlock> <TextBlock Text=”{Binding Path=PubDate}”></TextBlock> <TextBlock Text=” “></TextBlock> </StackPanel> </DataTemplate> </ListBox.ItemTemplate> </ListBox> </Grid>… Read more

Windows Phone 7 : Handling Hardware Back Button

Often user presses hardware back button while inside an application. This would send the existing application to the background and let other be on top. Most of the times this is acceptable but sometimes application requires user to choose whether to go back or notify about it. Handling back button through code, protected override void… Read more

Windows Phone 7 – Binding Data to ListBox through Code

In Windows Phone 7 we need to display data programmatically. Below one demonstrates the simply way of binding data through code. Suppose you have Emp class as below. public class Emp { public int Id { get; set; } public string Name { get; set; } } Let’s create List<Emp> List<Emp> myData = new List<Emp>()… Read more

Windows Phone 7 : How to get Phone and Application memory information

If you want to get the memory information of your phone and application //Total Phone Memory (in bytes) var totalMemory = Microsoft.Phone.Info.DeviceStatus.DeviceTotalMemory; textBlock1.Text += Environment.NewLine + (totalMemory/(1024 * 1024)).ToString(); //Application Current Memory Usage (bytes) var appCurrentMemoryUsage = Microsoft.Phone.Info.DeviceStatus.ApplicationCurrentMemoryUsage; textBlock1.Text += Environment.NewLine + appCurrentMemoryUsage.ToString();   Namoskar!!!… Read more

I want to develop Apps on Windows Phone

There are few new Virtual Labs available, hence you do not need full setup. All you need is your MSDN Virtual Lab MSDN Virtual Lab: Building your First Windows Phone 7 Application  MSDN Virtual Lab: Hello Windows Phone  MSDN Virtual Lab: Launchers and Choosers  MSDN Virtual Lab: Using Pivot and Panorama Controls  MSDN Virtual Lab:… Read more

Learn Windows Phone 7 in 31 Days

http://www.jeffblankenburg.com/post/31-Days-of-Windows-Phone-7.aspx Day #1: Project Template Day #2: Page Navigation Day #3: The Back Button Paradigm Day #4: Device Orientation Day #5: System Theming Day #6: Application Bar Day #7: Launchers Day #8: Choosers Day #9: Debugger Tips Day #10: Input Scope (on-screen Keyboard) Day #11: Accelerometer Day #12: Vibration Controller Day #13: Location Services Day… Read more