<Window x:Class="WpfCanvasTest.Test" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="LearnWPF - XmlDataBinding" Height="300" Width="300" x:Name="Window" > <Window.Resources> <XmlDataProvider x:Key="EmployeeData" XPath="root/advertiser"> <x:XData> <!--xml data island--> <root> <advertiser> <name>Pfizer Ltd</name> <address>Ramsgate Road, Sandwich</address> <postcode>CT13 9NJ</postcode> <adv_email /> <fax /> <tel>01304 616161</tel> </advertiser> <vacancy> <title>Product Manager</title> <refrence>62209</refrence> <contact /> <location>UK</location> <type>Permanent</type> <advjobref>942042</advjobref> <email /> <joburl></joburl> <jobdesc /> <region>UK - All</region> <sector1>Medical Sales</sector1> <sector2 /> <sector3 /> <tel>01304 616161</tel> </vacancy> </root> </x:XData> </XmlDataProvider> <XmlDataProvider x:Key="LearnWPFFeed" Source="http://learnwpf.com/Rss.ashx" XPath="//item" /> </Window.Resources> <StackPanel> <!-- binding to data island --> <StackPanel DataContext="{StaticResource EmployeeData}"> <TextBlock Text="{Binding XPath=name}" FontSize="30" /> </StackPanel> </StackPanel> </Window>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)