Note that there are some explanatory texts on larger screens.

plurals
  1. POA 'Binding' cannot be set on the 'Source' property of type 'Binding'
    primarykey
    data
    text
    <p>A 'Binding' cannot be set on the 'Source' property of type 'Binding'. A 'Binding' can only be set on a DependencyProperty of a DependencyObject.</p> <pre><code> &lt;TreeView Height="400" Width="400"&gt; &lt;TreeViewItem ItemsSource="{Binding Source={Binding Path=Data}, XPath=*, Converter={StaticResource stringToXmlDataProviderConverter},ConverterParameter=/root }" Header="header" /&gt; &lt;/TreeView&gt; </code></pre> <ul> <li><p><strong>What is wrong with ItemsSource="{Binding Source={Binding Path=Data}?</strong></p> <pre><code>Data = "&lt;root&gt;&lt;parm1&gt;1&lt;/parm1&gt;&lt;parm2&gt;2&lt;/parm2&gt;&lt;parm3&gt;3&lt;/parm3&gt;&lt;/root&gt;" </code></pre></li> </ul> <p>I try to use <a href="http://vbcity.com/blogs/xtab/archive/2009/11/14/wpf-hierarchicaldatatemplates-and-master-detail-data-display.aspx" rel="noreferrer">this</a> code sample. The differ is that I want to Bind the ItemsSource to data in datacontext. There is nothing wrong with the converter.</p> <p><strong>EDIT:</strong></p> <pre><code>&lt;TreeViewItem ItemsSource="{Binding Path=Data}" Header="Parameters" /&gt; </code></pre> <p>Fills TreeView with one element (the string). So datacontext is correct.</p> <p><strong>EDIT:</strong> This code works better. Is there a generic way to read XML in ThreeView? I don't know the structure of XML. In all examples I have seen you have to declare sub nodes types.</p> <pre><code>&lt;TreeViewItem DataContext="{Binding Path=Data, Converter={StaticResource stringToXmlDataProviderConverter}}" ItemsSource="{Binding .}" Header="Parameters" /&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload