0

我已经ComboBox和Xml数据源绑定了,我想在ComboBox. 但现在它在ComboBox.

我怎样才能做到这一点?

<RecordSet>
    <Rows>
        <Row>Day</Row>
        <Row>Month</Row>
        <Row>Year</Row>
    </Rows>
</RecordSet>

 <ComboBox Grid.Row="1" Grid.Column="1" Name="MyDependCombo" ItemsSource="{Binding}">
        <ComboBox.DataContext>
            <XmlDataProvider Source="/Data/MyContentYearData.xml" XPath="/RecordSet/Rows"/>
        </ComboBox.DataContext>
</ComboBox>

答案将不胜感激。

4

1 回答 1

1

XPath="/RecordSet/Rows/Row"

...(28,29,30)

于 2013-01-30T16:21:52.207 回答