Note that there are some explanatory texts on larger screens.

plurals
  1. POdata templates wp7/8
    primarykey
    data
    text
    <p>I am trying to create a list of items and the items consist of multiple lines of information - I was using a listbox and used the itemtemplate to add a button and set the contents of the button as the multiple lines of text using a data template but it did not work - only 2 lines showed.Now, I am doing the same thing except I am not using the button and I cannot get the lines of text to go on the next line...</p> <p><strong>Example:</strong></p> <p>(didn't format correctly here - but each on a new line) <em>Direction\n TimePoint\n Adherence</em></p> <p><strong>Currently its doing:</strong> (no new lines) DirectionTimePointAdherence</p> <p><strong>Here is the xaml...the binding is done in the code behind</strong></p> <pre><code> &lt;ListBox Name="listBox_1" Background="Transparent" Margin="0,125,0,0" VerticalAlignment="Top"&gt; &lt;ListBox.ItemTemplate&gt; &lt;DataTemplate&gt; &lt;StackPanel Orientation="Horizontal" Height="100"&gt; &lt;TextBlock FontSize="28" Foreground="#FF348F8F" Text="{Binding Direction}" Height="40"/&gt; &lt;TextBlock FontSize="28" Foreground="White" Text="{Binding TimePoint}" Height="40"/&gt; &lt;Grid Background="#FFE3EFFF"&gt; &lt;Grid.ColumnDefinitions&gt; &lt;ColumnDefinition Width="*"/&gt; &lt;/Grid.ColumnDefinitions&gt; &lt;StackPanel Orientation="Vertical" Height="40" Margin="-2,0,0,0"&gt; &lt;TextBlock FontSize="28" Foreground="White" Text="{Binding Adherence}" Height="40"/&gt; &lt;/StackPanel&gt; &lt;/Grid&gt; &lt;/StackPanel&gt; &lt;/DataTemplate&gt; &lt;/ListBox.ItemTemplate&gt; &lt;/ListBox&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload