I have objects I'm databinding to a ListBox in WPF. Here's what the end result should look like:
------------------------------- | Name | Opt1 | Value1 | | | Opt2 | Value2 | | | Opt3 | Value3 | | | Opt4 | Value4 | -------------------------------
Essentially i've got a DataTemplate for the overall variable, and then the Opt/Value combo has it's own DataTemplate. I'm trying to display the list of values as simply as possible.
<Label Content="{Binding Path=Identifier.Name, Mode=OneWay}" />
<ListView Grid.Column="1" HorizontalAlignment="Stretch"
ItemsSource="{Binding Path=Values, Mode=OneWay}" />
The binding for Values is currently only a <Grid>
with 2 <Label>
's and ListView has a lot of features I dont watch, such as the border styling, selections, and such, when all I really want is to be able to databind using a List.
I've tried to databind the items to a stackpanel but couldn't get it to work in XAML. I suppose another solution is to do what I'm doing, and rewrite the <Style>
for ListView. Any suggestions on the correct way to do this?