Note that there are some explanatory texts on larger screens.

plurals
  1. PONested Listbox wont display nested list
    text
    copied!<pre><code> &lt;ListBox Height="434" HorizontalAlignment="Left" Margin="6,238,0,0" Name="listBox1" VerticalAlignment="Top" Width="432" DataContext="{Binding}"&gt; &lt;ListBox.ItemTemplate&gt; &lt;DataTemplate&gt; &lt;StackPanel&gt; &lt;TextBlock Text="{Binding Name}" Margin="4" Foreground="{StaticResource PhoneAccentBrush}"&gt;&lt;/TextBlock&gt; &lt;StackPanel Orientation="Horizontal" Margin="4"&gt; &lt;TextBlock Text="Set" Margin="16" Foreground="{StaticResource PhoneAccentBrush}" /&gt; &lt;TextBlock Text="Weight" Margin="16" Foreground="{StaticResource PhoneAccentBrush}" /&gt; &lt;TextBlock Text="Reps" Margin="10,16,0,16" Foreground="{StaticResource PhoneAccentBrush}" /&gt; &lt;/StackPanel&gt; &lt;ListBox Name="setsAndReps" Height="auto" Width="auto" ItemsSource="{Binding Sets}"&gt; &lt;ListBox.ItemTemplate&gt; &lt;DataTemplate&gt; &lt;StackPanel Orientation="Horizontal"&gt; &lt;TextBox Text="{Binding SetNumber}"/&gt; &lt;TextBox Text="{Binding Weight}"/&gt; &lt;TextBox Text="{Binding Reps}"/&gt; &lt;/StackPanel&gt; &lt;/DataTemplate&gt; &lt;/ListBox.ItemTemplate&gt; &lt;/ListBox&gt; &lt;/StackPanel&gt; &lt;/DataTemplate&gt; &lt;/ListBox.ItemTemplate&gt; &lt;/ListBox&gt; </code></pre> <p>The outer listbox's item source is being set to an observable collection of a user defined class called excercise</p> <pre><code> public class excercise : IComparable, IEquatable&lt;excercise&gt;, INotifyPropertyChanged { string name; int max; int NUM_SETS; ObservableCollection&lt;set&gt; sets; public event PropertyChangedEventHandler PropertyChanged; public string Name { get { return this.name; } set { this.name = value; } } public excercise(string name) { this.name = name; this.NUM_SETS = 0; this.sets = new ObservableCollection&lt;set&gt;(); } public ObservableCollection&lt;set&gt; Sets { get{return this.sets; } } public ObservableCollection&lt;set&gt; getSets() { return this.sets; } } </code></pre> <p>The properties in the inner list box are from the set class but none of them are being displayed and I am not sure what the problem is.</p>
 

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