Databinding - gets horizontally formatted combobox-items - need vertically?
Hi! I am struggeling to get <Vakt>-items aligned vertically in the combobox and not horizontally (it is based on the BookData-sample code in winfx sdk documentation). What am I missing in the code?
Henning
<StackPanel
xmlns="http://schemas.microsoft.com/winfx/avalon/2005"
xmlns:x="http://schemas.microsoft.com/winfx/xaml/2005"
>
<StackPanel.Resources>
<XmlDataProvider x:Key="VaktData" XPath="/Vakter">
<Vakter xmlns="">
<Vakt>Dag</Vakt>
<Vakt>Aften</Vakt>
<Vakt>Natt</Vakt>
</Vakter>
</XmlDataProvider>
<DataTemplate x:Key="VaktDataTemplate">
<TextBlock >
<TextBlock.Text>
<Binding XPath="."/>
</TextBlock.Text>
</TextBlock>
</DataTemplate>
</StackPanel.Resources>
<ComboBox
ItemsSource="{Binding Source={StaticResource VaktData}}"
ItemTemplate="{StaticResource VaktDataTemplate}"/>
</StackPanel>

