I think you can do it in Textblock.Loaded event
<TextBlock x:Name="ListBoxText" Text="test" Loaded="TextBlock_Loaded"></TextBlock>
private void TextBlock_Loaded(object sender, RoutedEventArgs e)
{
TextBlock t = sender as TextBlock;
DataObject data = t.DataContext as DataObject;
// based on your data you can set the style
}
sladapter
Software Engineer
Aprimo, Inc
Please remember to mark the replies as answers if they answered your question