Posts
133
Comments
328
Trackbacks
0
April 2011 Entries
Getting Started with the Silverlight 5 Beta

Intro

I’m sure by now you have heard that the Silverlight 5 Beta has been released. I recently had a chance to Guest Blog for SSWUG on “Getting Started with the Silverlight 5 Beta” Now before we get started learning about it, let’s look at a few new features:

What is new in the Silverlight 5 Beta?

  • Multiple Window Support - Trusted app can create additional Windows.
  • Ancestor RelativeSource Binding – Enables a DataTemplate to bind to a property on the control that contains it.
  • Implicit DataTemplates – Allows you to target a data template for a specific data type.
  • ClickCount - Enables Multi-click input on left/right mouse buttons.
  • Binding on Style Setter – Allows binding to be used within styles.
  • Realtime Sound (low-latency Audio) - Enables pre-loading of an audio source for precision timing of playback. (Multiple playback is ok)
  • Variable Speed Playback (“Trick Play”) – Fast-Forward or review at variable speeds.
  • Linked Text Containers - Text will overflow from one to the next.
  • Custom Markup Extensions – Allow you to run custom code from XAML.
  • XAML Binding Debugging - Setting breakpoints in XAML
  • 3D Graphics API - accelerated visualization and rich user experiences.

So in other words, a lot of new stuff has been added and is available to play with right now. I begin this series by showing you where to get the tools to getting your development environment setup to begin developing with Silverlight 5. After that I will take a closer look at several features.

The Full Article

The full article is hosted on SSWUG and you can access it by clicking here. Don’t forget to rate it and leave comments if you have any problems.

alt Subscribe to my feed

Posted On Wednesday, April 27, 2011 10:56 AM | Feedback (0)
Best of FREE Frameworks, Tools and Controls for Windows Phone 7.

The list provided below is my “Best-Of” FREE Frameworks, Tools and Controls for Windows Phone 7. I have used everything listed below in an my WP7 applications. Most of them are in the marketplace at this point and some are still in development. Let’s get started.

image

If you are developing WP7 Applications, this is one that you have probably heard of already. It is Microsoft’s official set of controls that comes complete with full source code of course.

Project Description:

Welcome to the Silverlight Toolkit open source project, a place where the Silverlight Team at Microsoft shares new components and functionality for designers, developers, and the community to provide an efficient way to help shape product development. Toolkit releases includes full open source code, samples, documentation, and design-time support for controls focusing on both Silverlight 4 as well as the Windows Phone.

What’s included?

  • AutoCompleteBox
  • ContextMenu
  • DatePicker
  • GestureService/GestureListener
  • ListPicker
  • LongListSelector
  • Page Transitions
  • PerformanceProgressBar
  • TiltEffect
  • TimePicker
  • ToggleSwitch
  • WrapPanel

image

If I rebuild my machine, this is one of the first things I install. I’ve used it in production Silverlight Applications as well as Windows Phone 7 applications. Combine this with the code snippets and project template and you have a win.

Project Description:

The MVVM Light Toolkit is a set of components helping people to get started in the Model - View - ViewModel pattern in Silverlight and WPF. It is a light and pragmatic framework that contains only the essential components needed.

 

image

Project Description:

I blogged about this set of free controls and converters back in February. I was particularly impressed with the “About and Input Prompts”. It was very easy to use with just a few lines of code. This is one project that I will be watching and using from now on. As a matter of fact, all three of my WP7 applications use this.

What’s included?

Controls:

  • About Prompt
  • Input Prompt
  • Progress Overlay
  • Round Button
  • Round Toggle Button
  • Memory Counter
  • TimeSpan Picker
  • Toast Prompt

Abstract Classes:

  • PopUp class for things like an Input Prompt that can be GPU accelerated unlike the built in Popup control.

Converters:

  • Boolean to Visibility
  • String To Visibility
  • Themed Image Converter
  • Inversed Theme Image Converter
  • Visibility to Boolean

Binding Helpers:

  • Textbox update
    Example: <TextBox Text="{Binding FooBar, Mode=TwoWay}" local:TextBoxBinding.UpdateSourceOnChange="True" />

Data Helpers:

  • PhoneHelper for getting data out of the WMAppManifest file
    Example:  PhoneHelper.GetAppAttribute("Title")

image

Project Description:

Another excellent set of controls, helpers and other classes that I use is PhoneyTools. I am using the FadingMessage, BitlyHelper and a few others in my MichaelCrump.Net Windows Phone 7 Application. The project just keeps getting better and Shawn Wildermuth recently announced it’s out of beta status.

Controls

Helpers

Other Classes

A Smarter TextBlock Control For Windows Phone 7

Project Description:

This controls sole purpose is to provide the missing smarts to TextBlocks by adding functionality that finds and adds appropriate hyperlinks to text—to dial a phone number, compose an email, open a web browser, open a browser to Twitter @ and # URLs (with the coming of Twitter integration in the OS, this will be expected), and even a custom browser control to allow the user to open up links with out leaving the app.

image

If you want to use OData on the Windows Phone 7 then this is your first stop. It includes the DataSvcUtil utility to generate your proxies as well as the necessary references to make OData a breeze in your WP7 Application. This is another must-have for anybody working with OData.

Project Description:

The Open Data Protocol (OData) is a Web protocol for querying and updating data that provides a way to unlock your data and free it from silos that exist in applications today. OData does this by applying and building upon Web technologies such as HTTP, Atom Publishing Protocol (AtomPub) and JSON to provide access to information from a variety of applications, services, and stores. The protocol emerged from experiences implementing AtomPub clients and servers in a variety of products over the past several years. OData is being used to expose and access information from a variety of sources including, but not limited to, relational databases, file systems, content management systems and traditional Web sites.

image

Wondering how to use Azure with the Windows Phone 7? Well, this toolkit will help you by providing Visual Studio 2010 Templates as well as everything you need to get up and running with Azure on the phone.

Project Description:

The Windows Azure Toolkit for Windows Phone 7 is designed to make it easier for you to build mobile applications that leverage cloud services running in Windows Azure.  The toolkit includes Visual Studio project templates for Windows Phone 7 and Windows Azure, class libraries optimized for use on the phone, sample applications, and documentation.

 

image

An OO data implementation that supports LINQ to Object queries over keys for FREE. What more could you want?

Project Description:


Sterling is a lightweight object-oriented database implementation for Silverlight and Windows Phone 7 that works with your existing class structures. Sterling supports full LINQ to Object queries over keys and indexes for fast retrieval of information from large data sets.

image

Microsoft attempt to help guide you through creating applications using tried and true patterns and practices.

Project Description:

This new guide from patterns & practices will help you design and build applications that target the new Windows Phone 7 platform.

image

If you want to see what is stored in Isolated Storage while working with WP7 then this is your application. You can view it from inside Visual Studio 2010 or with the Desktop Application. I became frustrated with isolated storage until I found this handy tool.

Project Description:

WP7 Isolated Storage Explorer is a tool designed to help developers and testers interact with the isolated storage file for Silverlight Windows Phone 7 applications.
The explorer can work both as a desktop application for testers or integrated in Visual Studio for developers.

WP7Contrib

Project Description:

WP7 Contrib is a set of components to help build WP7 Apps. It can be plugged into MVVM Light or used as separate components in your App. Our goal is to provide a set of tools and patterns that help WP7 developers.

Physics Helper for Blend, Silverlight, WP7 and Farseer

Project Description:

The Physics Helper for Blend, Silverlight and Windows Phone 7 contains several Behaviors which allow you to draw objects in Expression Blend 4, and have those objects translated into Physics objects using the Farseer Physics Engine. This can be a great timesaver for creating games, as it is traditionally difficult to line up underlying physics bodies and geometries with your Blend artwork.

image

Project Description:

This library adds extension methods to PhoneApplicationPage so you don't have to worry about maintaining the state of a page in your app if it gets tombstoned.

Conclusion

We have a great community as you can tell from all the work that is being done with Windows Phone 7. I believe in the future that it will only get better. If I missed your favorite Framework, Tool or Control for Windows Phone 7 then shoot me an email or tweet and I’ll be sure to check it out.

alt Subscribe to my feed

Posted On Monday, April 25, 2011 9:06 AM | Feedback (2)
Building a better MessageBox for WP7 with the help of XNA.

I’ve recently had the requirement to allow my user to choose between two items in my Windows Phone 7 application. The first way that I thought of tackling this was using the standard MessageBox.Show that is included with the System.Windows class and seeing if the enum provided a way to allow custom text.

image

Unfortunately, it did not. As you can see from the image above, it only includes an OK and an OKCancel. If we run this application, then we get the following:

image

Kinda boring and doesn’t allow any real customization. But, what if we wanted to display custom text where the ok and cancel buttons are? What if we wanted our application to look like the following?

image

This is where we could use a little help from XNA libraries.

Go ahead and open your Windows Phone 7 Project and right click on References and select Microsoft.Xna.Framework.GamerServices as shown below.

SNAGHTML84aa445

Now that we have access to the proper library, go ahead and add a button and add the following code snippet. (assuming you name it button1 and wired up the event handler)

private void button1_Click(object sender, RoutedEventArgs e)
{
    Guide.BeginShowMessageBox("Sport", "Which sport do you prefer?", new string[] { "Football", "Baseball" }, 1, MessageBoxIcon.None,
                              new AsyncCallback(OnMessageBoxClosed), null);
}

private void OnMessageBoxClosed(IAsyncResult ar)
{
    int? buttonIndex = Guide.EndShowMessageBox(ar);
    switch (buttonIndex)
    {
        case 0:
            Deployment.Current.Dispatcher.BeginInvoke(() => ShowMe("Football"));
            break;
        case 1:
            Deployment.Current.Dispatcher.BeginInvoke(() => ShowMe("Baseball"));
            break;
        default:
            break;
    }
}

public void ShowMe(string title)
{
    PageTitle.Text = title;
}

In this example, I added a Button and am simply changing the PageTitle.Text to be whatever you selected. As you can see this code is pretty simple, and the only thing you may be confused about is the Deployment.Current.Dispatcher.BeginInvoke() call. The reason that this is in here is because without it is is an Invalid cross-thread access as shown below.

image

 

Thanks again for reading and hopefully this bails someone out like it did for me.

alt Subscribe to my feed

Posted On Tuesday, April 19, 2011 10:45 AM | Feedback (2)
Getting started with Windows Phone 7 and Azure (with video tutorial)

image

After the excellent Azure news from MIX 11 yesterday, I thought now would be the best time to release a brand new article about how you can get started with Azure and Windows Phone 7.

Intro

I’m sure by now you have heard of Windows Azure. Now before we get started learning about it, let’s take a look at the definition:

The Windows Azure Platform[2] is a Microsoft cloud platform used to build, host and scale web applications through Microsoft datacenters. Windows Azure Platform is thus classified asplatform as a service and forms part of Microsoft's cloud computing strategy, along with theirsoftware as a service offering, Microsoft Online Services.
(information taken from WikiPedia)

So in other words, think of cloud computing. I always believe that the best way to learn something is to jump straight into it and fill the gaps as you go. So let’s begin. In this article, I am going to show you how to get started working with Windows Phone 7 and Azure. We are going to download the tools and create a new project starting from File->New Project. After that we will set up our users and add some data with our Windows Phone 7 Emulator.

The Full Article

The full article is hosted on SilverlightShow and you can access it by clicking here. Don’t forget to rate it and leave comments if you have any problems.

I have also included a video tutorial that you may want to watch as well. You can also download the slides and the source code.

 

alt Subscribe to my feed

Posted On Wednesday, April 13, 2011 3:33 PM | Feedback (1)
Bullet Points from MIX11 Day 2 –WP7, Silverlight and Kinect.

Since my blog is mainly about Silverlight, WPF and Windows Phone 7, I decided that I’d make a recap of today’s MIX 11 Event for those of you who missed it. I only included things that I thought were big enough to mention to not waste any time. Of course, you can check out the keynote yourself by visiting the MIX Site.

MIX11 Day 2 – Windows Phone 7 – “Mango” update coming shortly.

  • Microsoft showed a fan-made video that if enough people like it Microsoft will make it a Television commercial.
  • They are going to support 16 more languages (Including asian languages in general)
  • They are increasing it to more countries that you can submit apps to from 30 to 38.
  • They are increasing from 16 to 35 countries that will have access to the Marketplace.
  • Jump List support for people that have a lot of applications. Hit T for Twitter, etc.
  • Search Button to type your application you wish to search for. (Includes link to Search Marketplace)
  • You can shows apps by Top Downloads.
  • Podcasts coming to marketplace, but only in USA
  • Mango has IE9 baked into it. Markup gets handled the same as the desktop browser and phone browser.
  • HTML5 audio plays in the background.
  • Landscape Mode works properly on the Mango Update.
  • Skype on Windows Phone 7 this fall.
  • Motion Sensor makes it easier for developers to write sensor based applications on Windows Phone.
  • Spotify is going to be on the Windows Phone 7.
  • Angry birds, comes out on May 25 for Windows Phone users.
  • Live Agents, Background Notifications and Multiple Tiles w/ deep linking are coming with Mango.
  • The WP7 developer tools - mango- should be available next month.
  • Additional Tools option in the Mango Update to simulate an Accelerator.
  • This will include the ability to perform a Shake Guesture.
  • You can even emulate your location now with the new tools.
  • Profiler added to Mango tools for Windows Phone. It gives you a report that will allow you to see what is going on with your application.
  • You can even profile XAML storyboards!
  • Performance improvements on mango: smooth scroll and input, image decoding, garbage collection and memory no code changes.
  • 1500 new APIs in Mango & full SQLCE.
  • WP7 sockets demo was showed using IRC.
  • Mango allows app’s to directly control & stream content from the camera.
  • With Mango, you can now build applications that compose UI with both SL and XNA enabling much richer experiences.
  • Official announcement from the Windows Phone Team of new features for Windows Phone 7 Mango.

MIX11 Day 2 – Silverlight 5 Beta Announced and Ready for Download.

MIX11 Day 2 – Kinect SDK Announced.

  • Sign-up today for the Kinect SDK RSS feed http://bit.ly/gaSTTm
  • A Kinect-drivable lounge chair, is an interesting demo of a Kinect SDK application was shown during MIX11 using gestures to control an onscreen.
  • Microsoft Research demoed “WorldWide Telescope” which was controlled by Kinect.

alt Subscribe to my feed

Posted On Wednesday, April 13, 2011 2:53 PM | Feedback (1)
Giving Microsoft a Passing Grade from a Failed Certification.

I released my second Windows Phone 7 application on March  23rd, 2011. It was called FullScreen Browser. It was a web browser that I had originally created for myself as I mentioned on the WP7 Dev Podcast. I decided to submit it to the marketplace and see if other people found it useful. The app was not polished at all and to be honest it should have had “Beta” on it. The biggest complaint was no backwards and forwards buttons on the browser. Other things that people complained about was that the search did not default to a mobile browser format and users were confused on how to enter web addresses. Needless to say, I fixed the reported bugs quickly and added the additional functionality and submitted the update. I was hoping that my small user base (~1500 people) didn’t abandon me before the update went out. That’s when I got this email: 

image

I stopped and thought, what exactly was wrong NOW… So I logged into my AppHub account and found this message: 

image

I went ahead and clicked on the “View Details” link and found a list of app submissions. The second says, “Testing failed”. Since I had never seen the screenshots of a failed application certification, I was not sure what to expect. 

image

After clicking on the drop down box next to the failed submission, you will see the following list:

image

Let’s talk about each option very quickly:

  • View Test Result: This option will give you a downloadable .PDF file that includes the tester notes, etc. (I have actually included the pdf that I received below)
  • Edit Application: Allows you to upload the .xap again (this time hopefully it works).
  • Edit Pricing: Change the price.
  • Delete Submission: Deletes the entire submission. Be aware you will have to do everything again if you want to resubmit.

Let’s review the “View Test Result” .PDF that I got with my submission. So under the Application Details we see pretty standard stuff. Our application name, version info and when we submitted it.

Then it starts to get interesting by telling us which devices they tested with and then telling us which capabilities failed. Not only did they give a link to the certification requirements but they provided step by step directions on how to reproduce the bug. Please scroll to the second page to see what I’m talking about.

image

I really wouldn’t expect Microsoft to do this great of a job at testing my application. I recently submitted an Android application and Google did NO testing and just accepted it into the marketplace. Knowing that Microsoft is actually testing the application will ensure us that we will have a great marketplace now and in the future. This is why I’m giving Microsoft a passing grade from a Failed Certification.

So, I resubmitted my application and got the e-mail that it was accepted into the marketplace.

image

I hope that this blog post sheds some light on what happens with a failed marketplace submission. If you want to check out the application then you can download it now for free here: FullScreen Browser

alt Subscribe to my feed

Posted On Monday, April 11, 2011 10:36 AM | Feedback (2)
A Silverlight Developer’s look at TFS 2010 Remote Hosting.

Full Disclaimer: Since I am on the GeeksWithBlog.NET Influencer list, I was issued a free 1-year subscription to DiscountASP.NET TFS2010 remote hosting. With that said, the thoughts/opinions located below are my own.

I’ve always like Team Foundation Server. The main thing that I’ve hated about it was installing/maintaining it. I’d rather spend that time learning more about things such as Silverlight/WPF/WP7. I really didn’t know what to expect as we use another source control at work and I’ve never had remote hosting like this. So how did it go? Let’s find out.

Since I’m only getting a free year, I decided that before I fall in love with it that I’d better check the prices/feature set. Below is a feature comparison that I thought would be important to someone shopping around for a remote hosted TFS 2010.

Feature Cost/Supported?
Cost $20 per user/per month
Disk Space 3GB ($10/month for 1GB extra)
Bug/Item Tracking YES
Team Web Access YES
Secure Access with HTTPS YES
Visual Studio 2010 Integration YES
Full Backups Daily

The only thing that really mattered to me was cost per user and daily backups. There was a few things that they didn’t support like Reporting, SharePoint and RDP, but that wasn’t a show stopper for me.

Since my blog targets Silverlight/WPF/WP7 developer’s, I decided to share how you would get started using a remote hosted source control and load a Silverlight Project and then load the project inside of Expression Blend 4. This is a tutorial designed for someone new to TFS2010.

Getting started with TFS 2010:

One of the best things about TFS 2010 is that if you already use Visual Studio 2010 Professional then you don’t have anything to install. Simply Hit Team –> Connect to Team Foundation Server as shown below:

image

If this is your first time using TFS 2010 then you will need to add your DiscountASP.NET TFS Server Name by clicking the button called “Server” as shown below.

SNAGHTMLf2df9f7

At this point you will simply plug in your server name that you get after you log into your TFS 2010 Control Panel.

SNAGHTMLf2ece36

The Server Name can be found on the page below. You will add this into the “Add Team Foundation Server” box above.

image

After you add your server you will be prompted to login. This login is created from the “Group Membership” located inside of the DiscountASP.net control panel. This is shown below.

SNAGHTML2076b219

Assuming you have already saved a project you can now begin working on it.

SNAGHTMLf33eaea

You must map a drive first. You can do this from inside Source Control Explorer and look for Local Path:

image

After mapping, right-click on your project and select Get Latest Version:

image

Now if I load my project, you will notice “Locks” on each item:

image

This is telling you that you will need to do a “Check Out for Edits”

image

You may select any or all of the files to checkout.

SNAGHTMLf3a7aab

Now you will notice that you can edit them by seeing the red check mark.

image

After I have made some changes I’m going to “Check-In” my Silverlight Application.

image

Now that my changes are checked it, you will see the “Locks” again.

image

One of the great features of TFS 2010 is that it works with Expression Blend 4 as well. Simply do an open project and select the local solution that you are working on.

SNAGHTMLf407eef

After you log in you will see the same “Locks” again.

image

You can also Check-In the project from inside of Blend 4. 

image

After you check-in you will notice the Red Checkbox.

image

Overall it was very easy to setup and use and I especially like the idea that I’m not responsible for maintaining it and providing backups and so forth. I’ve decided that going forward my private projects will be remote hosted using this service.  

Thanks again to DiscountASP.NET for providing excellent hosting of TFS 2010 and making my life easier.

alt Subscribe to my feed

Posted On Tuesday, April 05, 2011 9:20 AM | Feedback (0)
Producing and Consuming OData in a Silverlight and Windows Phone 7 application (Part 3)

This article is Part 3 of the series “Producing and Consuming OData in a Silverlight and Windows Phone 7 application.” You can read any of the parts you may have missed by clicking on the links below.

  1. Producing and Consuming OData in a Silverlight and Windows Phone 7 application. (Part 1) – Creating our first OData Data Source and querying data through the web browser and LinqPad.
  2. Producing and Consuming OData in a Silverlight and Windows Phone 7 application. (Part 2 ) – Consuming OData in a Silverlight Application.
  3. Producing and Consuming OData in a Silverlight and Windows Phone 7 application. (Part 3)  – Consuming OData in a Windows Phone 7 Application.
  4. Producing and Consuming OData in a Silverlight and Windows Phone 7 application. (Part 4)  – Consuming OData in a Windows Phone 7 Application (Mango).

To refresh your memory on what OData is:

The Open Data Protocol (OData) is simply an open web protocol for querying and updating data. It allows for the consumer to query the datasource (usually over HTTP) and retrieve the results in Atom, JSON or plain XML format, including pagination, ordering or filtering of the data.

To recap what we learned in the previous section on Silverlight 4:

  • We began by creating the User Interface and setting up our bindings on our elements. 
  • We added a service reference pointing to our OData Data Service inside our project. 
  • Finally, we added code behind to sort and filter the data coming from our OData Data Source into our Silverlight 4 Application.

In this article, I am going to show you how to consume an OData Data Source using Windows Phone 7. After you have read this series of articles you should be able to produce and consume an OData Data Source using the web browser, LinqPad, Silverlight 4 and Windows Phone 7. We have also learned how to do some basic sorting and filtering using all the same. Now that you are equipped with a solid understanding of producing and consuming OData Data Services, you can begin to use this in your own applications. I want to thank you for reading this series and if you ever have any questions feel free to contact me.

    The Full Article

    The full article is hosted on SilverlightShow and you can access it by clicking here. Don’t forget to rate it and leave comments if you have any problems.

    alt Subscribe to my feed

    Posted On Tuesday, April 05, 2011 8:45 AM | Feedback (0)
    Tag Cloud