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 Michael Washington on
3/7/2010 11:50 AM

At the last Microsoft MVP summit, I was eating lunch with Jeff Paries who I had collaborated with on previous Silverlight projects, but had not met in person until that week. I commented that I had not used the Silverlight gauge he created about a year ago because it was too big...
Read More »
|
By Michael Washington on
2/20/2010 6:16 PM

You are probably thinking “Didn’t he already post a free DotNetNuke Silverlight file Uploader ?”. Well yeah I did, but this one is different.
This one allows a DotNetNuke portal administrator to place an instance of the module on a page and upload files. Each file has the ModuleID saved in its database record. The module will only show files for that module instance.

Each module instance has it’s own set of files, so you can set different visibility and permissions. It uses a Silverlight upload control so you can upload large files and select multiple files to be uploaded at one time.
You can download the module and the source at this link.
Read More »
|
By Michael Washington on
2/12/2010 6:51 AM
If you have a page that contains a lot of information for users to enter, you can run into a problem where their authentication will “time out”. Usually this authentication is set to expire after 20 minutes of “inactivity” (the user has not submitted a request to the web server). The problem is that if they, for example, click the Save button after their authentication has expired, their content is not saved and they are logged out of the site instead.
To prevent this, you can install the Silverlight Keep Logged In module. When you place it on a page, there is no UI just a Title.
...
Read More »
|
By Michael Washington on
2/6/2010 4:34 PM

At my day job we have an advanced developer who was given a difficult project where he has to implement a dozen business rules. I’m talking “ask for a blessing before you go in” and “ask for forgiveness when you come out” complicated code.
I watched him work on the code, and he is methodical at writing down the rules and writing a test case to make sure he properly implemented it. This usually involves creating a “test case” by setting up data in the database just right and then clicking buttons and links and checking the expected output. I have worked with him over a year, and I can assure you he has probably deleted more good code than I have ever written. Everything is properly structured and segmented and the overall design will bring tears to you eyes with the beauty of it’s implementation.
But management keeps asking for major changes.
So I see this developer...
Read More »
|
By Michael Washington on
2/3/2010 6:44 AM
 I just posted a module that allows you to easily create a sign-up list of verified email addresses. A DotNetNuke portal administrator can place an instance of the module on a page and customize the sign-up message and the email verification message. The captured data can also be exported to Excel. The module and code are posted here: http://www.adefwebserver.com/DotNetNukeHELP/Misc/SignUp/
|
By Richard Waddell on
1/24/2010 7:21 PM
Live Example:
http://www.adefwebserver.com/Richard/ooNaEyeDevelopmentv2/ooNaEyeDevelopmentTestPage.html
I’ve been promising to get to Visual States, and this time I’m actually going to do it. In the process I cover creating a templated control from scratch, and technically I achieve my goal of not having to type in the visual states. From there I show how much control a designer has over the many versions of the UI of a templated control, entirely in Blend design view - including how to mess up the xaml if you edit the wrong thing – same choice, different menus. If you don’t already know how to create templated controls, and you want a detailed description with pictures of every step and misstep, read on:
...
Read More »
|
By Michael Washington on
1/17/2010 11:27 AM
How to make a simple Module using DotNetNuke 5 that connects to the Database
Use the following tutorial to create a simple Hello World DotNetNuke 5 Module. it will be used as the starting point for this tutorial:

Read More »
|
By Michael Washington on
1/17/2010 7:01 AM

How to make a simple Hello World Module using DotNetNuke 5...
Read More »
|
By Richard Waddell on
1/16/2010 7:02 PM
Live Example:
http://www.adefwebserver.com/Richard/SeekerPartsAndStates/SeekerPartsAndStatesTestPage.html
I’d like to acknowledge that posts by Karen Corby made it possible for me to get to this point in understanding Parts and States.
http://scorbs.com/2008/06/11/parts-states-model-with-visualstatemanager-part-1-of/
In this blog I’m going to show you how to create a multi-part templated control with visual states, then how you can manipulate those parts and states in Blend.
If you’ve...
Read More »
|