Note that there are some explanatory texts on larger screens.

plurals
  1. POBinding error when using two same User Controls on one parent Window
    text
    copied!<p>I have a User Control defined like this:</p> <p>XAML:</p> <pre><code>&lt;UserControl&gt; &lt;Grid x:Name="LayoutRoot"&gt; &lt;TabControl x:Name="TabControl" ItemsSource="{Binding Products}" &gt; &lt;TabControl.ContentTemplate&gt; &lt;DataTemplate&gt; &lt;Grid&gt; &lt;ListView ItemsSource="{Binding Features}" Name="FeaturesListView"&gt; &lt;ListView.View&gt; &lt;GridView&gt; &lt;GridViewColumn x:Name="FeatureHeader" DisplayMemberBinding="{Binding Name}" /&gt; &lt;GridViewColumn x:Name="CounterHeader" DisplayMemberBinding="{Binding Counter}" /&gt; &lt;GridViewColumn x:Name="ExpireDateHeader" DisplayMemberBinding="{Binding ExpireDate}" /&gt; &lt;/GridView&gt; &lt;/ListView.View&gt; &lt;/ListView&gt; &lt;/Grid&gt; &lt;/DataTemplate&gt; &lt;/TabControl.ContentTemplate&gt; &lt;/TabControl&gt; &lt;/Grid&gt; </code></pre> <p></p> <p>code behind:</p> <pre><code>public partial class LicenseInfoControl : UserControl { public LicenseInfoControl(ShowableLicense license) { InitializeComponent(); DataContext = license; } } </code></pre> <p>So, if I use one User Control for one Window:</p> <pre><code>&lt;Window&gt; &lt;Grid&gt; &lt;local:LicenseInfoControl x:Name="LicenseInfoControl"/&gt; &lt;/Grid&gt; &lt;/Window&gt; </code></pre> <p>it works great. But if I use two of them:</p> <pre><code>&lt;Window&gt; &lt;Grid&gt; &lt;local:LicenseInfoControl x:Name="FileLicenseInfoControl"/&gt; &lt;local:LicenseInfoControl x:Name="SamLicenseInfoControl"/&gt; &lt;/Grid&gt; &lt;/Window&gt; </code></pre> <p>Both ListViews are empty. What am I doing wrong?</p>
 

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