xml地址写在 xaml中,不能填相对地址
xaml
<!--<Window.Resources>
<XmlDataProvider x:Key="DataInfo" Source="E:\Build.xml" XPath="Build" />
</Window.Resources>-->
ListBox
<ListBox Name="lbBuildItem" Width="auto" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="16" Cursor="Hand" ItemsSource="{Binding XPath=ListItem, Source={StaticResource DataInfo}}" />
XML