I have a list of items with the an interface like this
public interface INamedItem
{
string DisplayName
{
get;
}
}
In silverlight, I can bind to a listbox and show the display name, and that works.
However, depending on the value of DisplayName, I want to show it differently (use a different DataTemplate?).
If DisplayName has two '\t's it in, I want the the text before the first tab to be left justified, the text between the tabs centered, and the rest of the text right justified.
Is there any easy way to do this? I posted an "answer" below I found with google after adding this post, but I feel their has to be a better way.