I now have an xml as
<Root>
<Window Width="583" Height="617">
<Group ID="Info1" Name="M1" >
<Wrap ID="1" Visibility="1">
<Parameter ID="txtName" Text="Name1" Visibility="1" />
<Parameter ID="txtName1" Visibility="1" Width="200"/>
</Wrap>
</Group>
<Group ID="Info2" Name="M2" >
<Wrap ID="1" Visibility="1">
<Parameter ID="txtcName" Text="Name2" Visibility="1" />
<Parameter ID="txtcName1" Visibility="1" Width="200"/>
</Wrap>
</Group>
</Window>
</Root>
My xaml is
<Grid Name="gridCustomer">
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" >
<GroupBox>
<GroupBox.Header>
<Binding XPath="@Name"></Binding> //I want to bind the Group ID for Info1 Name property
</GroupBox.Header>
<StackPanel>
<WrapPanel Margin="0,10,0,0">
<TextBlock Margin="10,0,0,0" Text="Name1" /> //I want to bind the Group ID for Info1 txtName property
<TextBox Margin="20,0,0,0" x:Name="txtName" Width="200"/>
</WrapPanel>
</StackPanel>
</GroupBox>
<GroupBox>
<GroupBox.Header>
<Binding XPath="@Name"></Binding>
</GroupBox.Header>
<StackPanel>
<WrapPanel Margin="0,10,0,0">
<TextBlock Margin="10,0,0,0" Text="Name2" />
<TextBox Margin="20,0,0,0" x:Name="txtName1" Width="200"/>
</WrapPanel>
</StackPanel>
</GroupBox>
</StackPanel>
</Grid>
My background code
string path = "c://1.xml";
provider.Source = new Uri(path);
provider.XPath = @"/Root/Window/Group";
gridCustomer.DataContext = provider;
I want to know how we can achieve these bindings? Specify the name of the binding to the specified node