By Ian Lackey on
3/8/2010 4:38 PM
This is a very short and sweet post about dynamically switching the ItemTemplate property of a Silverlight ListBox at runtime. First we will start with a little background of what led to this article.
I am currently working on an application that contains a list of pediatric patients and their parents. I was recently given a requirement to display a parent name to one group of medical professional and the patient name to another group. However, either group should be able to toggle this display to allow searching on either the parent or patient.
Knowing that in Silverlight, simple is usually the correct answer, I figured this should in fact be simple. Thankfully, I was correct and after only a few minutes I had the following solution working.
If Me.SearchByParent.IsChecked Then
Me.PatientListBox.SetValue(ListBox.ItemTemplateProperty, _
Me.Resources("PatientParentListBoxTemplate"))
Else
Me.PatientListBox.SetValue(ListBox.ItemTemplateProperty,...
Read More »
|
By Ian Lackey on
12/17/2009 1:38 AM
Like many other developers I have been excited to see that WCF RIA Services has gone beta and now comes with a Go-Live license. After this release my team at Wash U began developing a few applications using the new RIA Services bits. We have been very impressed with the productivity increase as well as several other features that RIA provides over the previous straight up WCF services have offered in the past.
All was going well, until it came time to publish the first application to the staging (user testing) server. Upon deployment the application started displaying the “Initializing Application” progress control for close to a minute.

...
Read More »
|
By Ian Lackey on
12/10/2009 1:29 AM
In college my instructor taught us that it is not always knowing the answer but knowing where to find it. In the mindset, this post is simply a list of other blogs, twitter accounts \ lists and books that I have found helpful in the recent past. Hopefully these will point you to information that you need to build great software, enjoy your work (or at least experience less stress), and keep up on the latest news regarding development.
Admittedly I have been almost 100% focused on Silverlight development, so most of these resources will reflect this. However, there are a few in the list are are more general. Also, for some of the more experienced developers, I realized that a few of these links are may have you wondering why they are including. Like the MSDN site, doesn’t everyone know about that? Well, maybe, but necessarily. So I included them for the new developers or people looking to get started.
(…these resources are in no particular order…)
Favorite Blogs (other than the OpenLight Members...
Read More »
|
By Ian Lackey on
12/3/2009 1:59 AM
As you may have heard, Microsoft has created their on CDN for delivering JavaScript libraries. Beginning in ASP.Net 4 the ability to use scripts hosted on the CDN will be built into the ScriptManager control. ScottGu demonstrated how this will work in one of his blog entries. In addition to hosting their own AJAX library, Microsoft is also providing the jQuery library for download.
I am assuming that many of us have not jumped on this bandwagon as of yet This, I’m sure, is partly due to the fact that the MS AJAX libraries that are available are all beta editions slated for release with ASP.Net 4. However, the jQuery script that is currently provide is the current production release of the library and can be used today. When the next version of ASP.Net is released the number of users with cached copies of jQuery...
Read More »
|
By Ian Lackey on
11/29/2009 12:01 PM
I have recently been practicing playing the bass again and during one of the practicing session my friend had suggested some features for a digital metronome. We had used a few JavaScript based ones; however none of them had a few helpful features. These features included: Adjustable tempo, support for different beats per measures, a visual counter displaying the current count of the measure, the ability to allow for multiple measures, the ability to have two different volumes for the tick sound that plays for each beat, the ability to mute the tick for specified beats of a measure and allow the metronome to be run from the computer without being connected to the internet.So since we could not find a single metronome that supported these features, I decided to build one using Silverlight, figuring that it would be a pretty simple exercise. It turns out I was right, well for the most part.
Obviously the most important feature of a metronome is to keep time, this turned out to be so easy it was almost ridiculous....
Read More »
|
|
|
By Ian Lackey on
10/9/2009 2:00 AM
I created a package and posted it to the CodePlex site associated with this series of articles. The package aims to allow you to easily implement the strategy outlined in Part 2 (Solidifying a Strategy) of these posts. This article will discuss how to integrate the code in the package with your existing ASP.Net site to allow links to be mapped between current urls and new Silverlight Deep Links. With the page mappings in place, you can effectively move your entire site to Silverlight while maintaining the links already indexed by the search engines. This also allows users that have not installed Silverlight and search engine bots to continue to use the original ASP.Net site.
A correction is needed for some information in the previous post. Apparently, I was mistaken about needing to require the...
Read More »
|
By Ian Lackey on
10/7/2009 10:40 PM
So thanks to the instructor (Kevin Grossnicklaus) of a Silverlight class I just attended, I have finally started to use twitter. Believe me, this was not an easy decision for me to make. I have seen many good people fall prey to the evil that is social networking sites. I must admit, I have made my fair share of jokes about the “tweeters” out there and had to eat a little crow when I told my wife that I signed up for an account.
The reason I was so resistant to twitter is all of the utterly useless information that is posted to that site. For example, I have no need or desire to know that someone is looking at a cloud shaped like a rabbit. I am sorry, but please do not clutter the information super highway with debris such as this. I mean, if I am next to you and you say “hey that cloud looks like a rabbit” that is great I will check it out. However, if you are in China and I am in the USA why do I need to know that?
...
Read More »
|
By Ian Lackey on
10/5/2009 9:34 PM
So I do know that "ironic" is the right word for that fact that my first post after ... way too long ... is entitled "Remember Me?" but it fitting in more than one way.
Michael brought this post to my attention : www.dotnetnuke.com/Community/Blogs/tabid/825/EntryId/1784/a-new-solution-to-an-old-problem.aspx dealing with DotNetNuke's issue of not respecting the "Remember Me" checkbox when logging into a site.
Read More »
|
By Ian Lackey on
8/5/2009 12:21 AM
So I have been one of a dwindling number of VB.Net advocates since I moved from Classic ASP (or in other words shortly after the dinosaurs went extinct and the wheel was invented). However, today was the first time I had to use C# because I simply could handle how I had to code the VB. Don’t get me wrong I am actually language agnostic and truly believe that any .Net developer worth their salt should be able to code in either C# or VB. I use C# for a few projects, but usually default to VB for production application because it is my “native” language. I figured I should preface this article with these statements in hopes of preventing the typical language wars that ensue when topics like this are addressed. Now to the point.
I have recently started an application for my employer (Washington University School of Medicine – Pediatrics Department) that would be built in Silverlight 3. It all began as every other project I have built for...
Read More »
|