Saturday, February 04, 2012    
Blog  

OpenLight Blog
Author: Created: 6/2/2009 10:17 AM RssIcon
Open Source @ Your Service
By I. T. Lackey on 8/8/2011 9:41 PM
First of all, thank all of you that attended this session at the conference. I had a great time talking with you all and hope everyone got something out of the session. I have posted the slide deck, links to the articles I referenced  in the talk and a link to the example code below.

What’s wrong with this picture - STL DODN View more presentations from Ian Lackey



Here are the links and contact information from the presentation (for easy access):

MSDN documentation on Health Monitoring:  http://msdn.microsoft.com/en-us/library/bb398933.aspx Health Monitoring FAQ article: http://forums.asp.net/t/1027461.aspx Example code: http://olgcommon.codeplex.com/releases/view/71454 My twitter account: @itlackey OpenLight Group Common CodePlex project: http://olgcommon.codeplex.com  

An audience member raised a question regarding providing event log output to SNMP. I have looked around for a bit and found this open source library...
By I. T. Lackey on 3/10/2011 2:05 AM
Prism gives you two options on how to configure the ModuleCatalog, typically in the BootStrapper, these include programmatically or from a XAML file that is embedded in the XAP file. This is a quick post to shown a very simple example of loading the ModuleCatalog for in an asynchronous fashion. This example will load the ModuleCatalog from an XML file located on the web server. The example will be abstract in implementation, but consider the scenario that you allow Administrators to upload modules into the application. When a new module is installed the catalog needs to be updated so that the Silverlight application will see them the next time it reloads the ModuleCatalog.

 

1. Create a Bootstrapper that inherits from your choice of a BootStrapper base class.

 

public class AsyncBootstrapper

: MefBootstrapper Here we are using the MefBootstrapper but there is no reason you could not use Unity or any DI framework that you choose to integrate with Prism.

 

...
By I. T. Lackey on 2/23/2011 12:47 AM
A problem I have encountered frequently on recent projects is needing an ASP.Net style RadioButtonList or CheckBoxList inside on a Silverlight application. I have tried several approaches and had moderate success given the varying scenarios of each attempt. It finally came to a point that the problem had to be solved once and for all. So after discussing it with a few of the guys on my team and doing some extra reading tonight, I have found a solution that I feel is worth sharing. This post will be a step-by-step guide to using the ToogleButtonListBoxBehavior that I have created inside of the OpenLightGroup.Common Library.

To follow this tutorial you will need to download the latest version of the OpenLightGroup.Common Library and add a reference to the included dll file. We will also be using Microsoft Blend; however, the behavior can be added in Visual Studio just as other behaviors.

Drop a ToggleButtonListBoxBehavior onto the ListBox. DropBehavior...
By I. T. Lackey on 12/22/2010 8:45 AM
This example will cover how to package a EmailComposeTask as a reusable behavior that can be dropped into any given Phone 7 app. The EmailComposeTask has a few properties that are used to pass data to the email you are launching / preparing to send.

These include the following:

Body Cc Subject To Due to the fact that there are four properties included with this task, as opposed to the one property we dealt with in Part 1 and Part 2, we will not be able to use the Tag property of the associated control in the same way as in those examples. With that said, we will in fact use the Tag property but we will have to do a little extra magic to get it to work. Thankfully that Tag property is of type object which gives us the flexibility we will need to make this work. In order to make this solution as reusable as possible I decided to use an interface that can be used in any project referencing this code. Before I loose you, give me one more moment of your time to see how simple this really...
By I. T. Lackey on 12/22/2010 8:43 AM
In this example we will look at the WebBrowserTask and how a little bit of code can create a great design time experience for the times that you need to launch a browser in a Phone 7 app. Like the PhoneCallTask, the WebBrowserTask only contains one property. So,  this example will look very similar to the one we looked at in Part 1. I will jump straight to the code as the concept will be identical to our previous example.

using System.Windows.Controls; using System.Windows.Interactivity; using Microsoft.Phone.Tasks; namespace ITLackey.Phone7.Common.Behaviors { public class LaunchBrowserAction : TriggerAction { protected override void Invoke(object parameter) { WebBrowserTask task = new WebBrowserTask(); task.URL = this.AssociatedObject.Tag.ToString(); task.Show(); } } }  

Again, we are simply using the Tag property of the associated control to pass in the data we need for our task. In this case it is the URL...
By I. T. Lackey on 12/21/2010 1:01 AM
This multiple part series will focus on packaging up a few common “tasks” into reusable behaviors. I hope to cover tasks for phone calls, sending emails, launching the browser etc. Most of the articles in this series will be short and typically will contain only a few lines of code. The majority of the code will deal with the objects contained in the Microsoft.Phone.Tasks namespace which contains several classes used to launch a task or choose a piece of data from the phone.

In this post (part 1) will we tackle what I consider to be the most obvious task to use on a phone… making a phone call. Again this will require only a few lines of code, so I will go ahead and drop it all right here and then run through what it does and how to use it.

using Microsoft.Phone.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Interactivity; namespace ITLackey.Phone7.Common.Behaviors { public class LaunchPhoneDialerAction : TriggerAction { public LaunchPhoneDialerAction()...
By I. T. Lackey on 12/4/2010 1:55 PM
I had disappeared once again for far too long; however the time has been well spent. I have been heads down coding apps for Phone7 and learning the nuances of the platform. I have also learned much about the certification process in which your apps must go through before making it to the marketplace. I hope to share a few tips & tricks with you from what I have learned in this and upcoming articles.

This post will focus on the requirement stated in the certification documentation regarding back button navigation when menus or dialog boxes are present on the current page.  Over the last few days I have had two separate apps fail certification due to an oversight in this area. I decided I would post what I have learned and hopefully help prevent others from encountering the same issues when they submit their apps.

While developing my first Phone 7 app I was stumped momentarily at the absence of a ComboBox in the phone controls. I use this control so often in Silverlight that I had to wonder what I would do without it. I quickly found that we are supposed to use a ListPicker control from the control toolkit in place of the traditional ComboBox. Great! So off I went dropping them into my app and chugging along ignorant to what this meant in regards to navigation through the app. I wasn’t until recently that I was pointed to the section of the certification requirements document that says:

“If the current page displays a context menu or a dialog, the pressing of the Back button must close the menu or dialog and cancel the backward navigation to the previous page.”

– Windows Phone 7 Application Certification Requirements.pdf Section 5.2.4

* Link to the document as of 12/04/10: direct link to the PDF file

Apparently, this includes ListPicker controls that are in the expanded mode (waiting for a selection to be made). This caused me to rework some pieces of apps I was currently developing. Then I decided instead of writing the same code in each page code-behind, I would just write a behavior I could drop on each ListPicker to handle the back button press event.

The main piece of code that takes care of the issue is simple and only takes a few lines of code:

private void page_BackKeyPress(object sender, System.ComponentModel.CancelEventArgs e)...
By I. T. Lackey on 9/2/2010 11:29 PM
Now before you go run off and start hugging the graphic artist down the hall, please finish reading this post. We don’t want any HR issues, now do we?

I tend to agree with what Michael is saying in his post (Silverlight: Why I feel “Design Is The Most Important Thing”), and think that it deserves some serious consideration by any professional developer. Far too long have we (developers) under valued how much a good “design” plays a part in good software. However, the designer I am referring to in this article spans graphic artists, UI designers, developers, machinist, architects, civil engineers… and on and on. This “designer” is the one that lives in all of us (yes you can now hug yourself if you like, but still not exactly what I’m talking about either). What I am trying to illustrate in this article is that we all have the ability to evaluate a good...
By I. T. Lackey on 8/22/2010 11:53 AM
AWESOME!

If you live anywhere near St. Louis, you have to attend this event next year! If you live further out and can still make it, it is definitely worth your time and money. Speaking of money, the registration fee was only $200 for two full days of learning. That is an amazing price! The value is incredible compared to the cost of attending TechEd or PDC or the other big conferences. I was privileged enough to attend TechEd in 2009 and had a great time, learned some cool stuff (and got to meet Michael in person for the first time). To compare the two conferences: Ounce for ounce STLDODN is either equal to or greater than the value I experienced at TechEd.

The speakers were great, the topics were on point and the atmosphere was charged with excitement and passion… or maybe that was just all the free coffee I pounded down. Seriously, you could tell that the attendees where enjoying the sessions and excited about what they were learning. The caliber of speakers, again, was on par with one of the...
By I. T. Lackey on 8/13/2010 7:23 PM
We this is a classic example of “the early bird gets the worm.” I have been on hiatus for far too long, but have not been idle. I have actually been planning this blog entry for a few weeks, along with another one (more on this in a minute). As it turns out, Michael and Haruhiro where working on pretty much the same concept. They beat me to the finish line with there solution as you can see here: Using the “Hisowa Simple PopUp Behavior” in a DataGrid. Since I took a slightly different approach, I decided to go ahead and post this article.

Additionally, I believe that the more information is examined the best solution will be formed based on pieces of all the information. I want to be very clear, I think the solution described in Haruhiro’s article is great! This article is not being posted to “one up” or discredit Haruhiro’s work in any way and I suggest that if you have not read his post, you should.

Side Note: The other blog entry I planned on posting is titled “Embrace your Designer”...
  
Copyright 2009 by OpenLightGroup.net   |  Privacy Statement  |  Terms Of Use