Alan Z

Hello,

I am trying to do something that I thought would be easy, however, I am having some sincere difficulty creating the necessary ItemTemplate. I am trying to create a list of items that displays items in the following manner:

This is the first item in my list. Notice how

the text wraps, yet... (read)

This is the second item in my list. Notice

how the "read" is aligned... (read)

I have no problem creating the list. However, I am having problems defining the ItemTemplate that displays the items as mentioned. The problem is with the wrapping text, yet the "read" item is right aligned on the second line. My text items are always going to be 2 lines in length.

Can someone please help

Thanks!

Alan



Re: Windows Presentation Foundation (WPF) Text Presentation

lee d

you can use an ItemTemplate that looks something like this

<DataTemplate x:Key="dt">

<Grid Width="200">

<Grid.ColumnDefinitions>

<ColumnDefinition Width="*"/>

<ColumnDefinition Width="50"/>

</Grid.ColumnDefinitions>

<TextBlock Text="(Read)" Foreground="blue" Grid.Column="1" VerticalAlignment="Bottom"/>

<TextBlock Text="{Binding}" TextWrapping="WrapWithOverflow"/>

</Grid>

</DataTemplate>






Re: Windows Presentation Foundation (WPF) Text Presentation

Alan Z

Thanks Lee!