I have a Dictionary
where the key is the hostname of a machine that writes to a server, and the value is an list of Wr
For your ItemsControl you need to set an ItemTemplate:
<ItemsControl.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock>Server: </TextBlock>
<TextBlock Text="{Binding Server}"/>
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
That will get you started.
Set DataContext property for inner control to show WritingMachine properties. Like so :
<StackPanel DataContext="{Binding Value}" Grid.Row="1">
This will change the DataContext to List<WritingMachine>
for inner display control, where you can do normal binding. See full XAML code below :
<ListBox x:Name="LbxMachineDictionary" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Row="1">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Vertical" Margin="5">
<Grid Width="461" Height="199">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="4*"/>
</Grid.RowDefinitions>
<TextBlock HorizontalAlignment="Left" Margin="10,10,0,0" TextWrapping="Wrap" Text="{Binding Key}" VerticalAlignment="Top"/>
<StackPanel DataContext="{Binding Value}" Grid.Row="1">
<TextBlock HorizontalAlignment="Left" Grid.Row="1" TextWrapping="Wrap" Text="{Binding HostName}" VerticalAlignment="Top"/>
<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Program}" VerticalAlignment="Top"/>
<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Login}" VerticalAlignment="Top"/>
<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Server}" VerticalAlignment="Top"/>
</StackPanel>
</Grid>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>