<?xml version="1.0" encoding="utf-8"?> <CurvesIDF xmlns=""> <Curve Name="1"> <Country>Portugal</Country> <Zone>A</Zone> <a>5</a> 10 <T>5</T> </Curve> <Curve Name="2"> <Country>Portugal</Country> <Zone>A</Zone> <a>45</a> -15 <T>10</T> </Curve> </CurvesIDF>
<Window x:Class="CurvesIDF" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300"> <Window.Resources> <XmlDataProvider x:Key="CurvesIDF" Source="CurvesIDF.xml" XPath="CurvesIDF/Curve"/> </Window.Resources> <Grid DataContext="{Binding Source={StaticResource CurvesIDF}}"> <Grid.ColumnDefinitions> <ColumnDefinition /> <ColumnDefinition /> </Grid.ColumnDefinitions> <ListBox x:Name="listBox" ItemsSource="{Binding XPath=/CurvesIDF/Curve}" DisplayMemberPath="Zone"/> </Grid> </Window>
<pre>...</pre>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)