Monday
Jul252011

Windows Phone 7: Pivot Page Indicator Control

One of the first applications I did with Windows Phone 7, utilized the pivot control. I imagine that type of control to be very popular in future development as it works perfectly with a lot of different application themes.

While I won't get into any misgivings or opinions on the use of the control, I will say that I wanted to provide a better experience for my application and wanted to provide the user with some sense of how many pages were in the particular series of "pivots" and exactly what page in that series they were on.

It is a simple concept really, we see these types of UI like experiences in other popular phone and web applications including Apple and Android. So with that said I created a control that is fully skinnable that mirrors those typical devices and works great with the pivot control.

So if you were looking for a solution to make your paging look like that of an apple or android paging indicator, look no further.You can simply enter the following xaml with the dll reference as follows or check out the sample to see a full sample use case:

<cl:PivotPageIndicator PageCount="{Binding Path=Items.Count,ElementName=PivotControlName}"SelectedIndex="{Binding Path=SelectedIndex,ElementName=PivotControlName}" />

Below is the source, so feel free to use at your liesure. I provided 2 things:

The DLL Only: PivotPageIndicatorDLL.zip 4Kb

The VS Source Project (with Sample): PivotSample.zip 98Kb

And please let me know if you enjoyed this solution and found it useful.

Thursday
May262011

Silverlight 5 Talk & Demo Materials

I will be presenting at CNUG tonight at 5/26/2011 in Downer's Grove, IL to talk about Silverlight 5's new features as announced at MIX'11. Dave Bost will be covering the Windows Phone Mango announcements and I will follow up with Silverlight 5, specifically going into details of how these features work, how we can start to use them and what these features mean for you, the developer.

If you miss that talk, since I didn't give much heads up notice. I will also be doing this talk at the Silverlight User Group in Chicago on 6/1/2011 downtown at the ITA building. So if you are interested in Silverlight or want to know what's new, I encourage you to check it out.

For those who went to one of these talks or for those who just want to see code, I am attaching my demo below. Understand you will need Silverlight 5 beta 1 installed in order for this to work, but its yours to check out.

 Silverlight 5 Demo.zip 3.5mb

Friday
Aug132010

Debugging Silverlight in Firefox

Just a little tip I learned recently but if you are an avid firefox user and you want to debug Silverlight 4 applications in the firefox browser, then here are a few steps you need to take to make that happen, since it doesn't work right out of the gate.

Step 1
In firefox, at the address bar type "about:config" without the quotes. If done correctly you will see a little warning.

Step 2
Accept the warning. Tell it you will be careful, you promise.

Step 3
In the filter field, type "dom.ipc.plugins.enabled.npctrl.dll" and you should see only 1 entry.

Step 4
Change the value from "true" to "false". You can do this by just double-clicking the entry.

Step 5
Restart the browser and you should be good to go.

Of course you could ignore all that and manually attach the visual studio debugger to "plugin-container.exe" but that would be painful and the above way is much easier.

Thursday
Aug052010

Talk - XAML: Things you should know

I gave my "XAML: Things you should know" talk at Chicago's Silverlight User Group last night. For those who missed it, I will be giving the same talk at CNUG: Chicago .Net User Group on August 18th. You can find out more here.

The talk focuses on subjects that are usually overlooked on your typical Silverlight or WPF presentations. I will focus on all things XAML. Specifically, I will be talking about Layout, Animation, Visual States, and Styling. So, if you are in Chicago, check it out.

As promised I uploaded the demo samples: XamlDemo.zip (570 KB)

Sunday
Apr252010

Silverlight 4 Getting Started

Silverlight 4 has officially been released for just a little over 10 days now and I thought it was appropriate to give you some details on how to get started with it. There are a few important things to understand before working with Silverlight 4. First check Tim Heuer's blog post on what is new in Silverlight 4 here.

Visual Studio 2010
First, Silverlight 4 development is only compatable with Visual Studio 2010 and NOT 2008. Therefore, if you have not yet gotten Visual Studio 2010, then I suggest using the express editions found here. (DONT WORRY! Visual Studio 2010 will install and work side by side with Visual Studio 2008)

Silverlight Tools for VS2010
Once you have Visual Studio 2010 in place, then you can get the Visual Studio 2010 tools, because VS 2010 ships only supporting Silverlight 3 out of the gate. Now this is where some confusion can set in. The tools, unlike the actual Silverlight 4 runtime have not been officially released. Thats right, the tools are only in "release canidate" mode and Microsoft promises to release these tools to official "RTM" soon but I don't know the date for them. You can get the tools here.

Silverlight Toolkit
Silverlight toolkit has been updated to an April release specifically to support Silverlight 4 and you can get those bits here.

Expression Blend 4
Like the VS2010 tools, Expression Blend 4 is also only in "RC" status and has not officially released yet. One great thing about Expression Blend 4 is if you currently own the full version of Expression Blend 3, you can upgrade to 4 at no additional cost. WOOHOO! You can download a trial of Expression Blend 4 RC here.

Silverlight 4 Training Kit
Microsoft has just released a new free Silverlight 4 Training Kit that walks you through building business applications with Silverlight 4. You can also download the entire offline version of the kit here.  You can use the 8 modules, 25 videos, and several hands on labs online or offline from links on the Channel 9 site.