title: WPF QuickConverter: Hide element on empty list
body: <p>I have a <code>StackPanel</code> that holds a <code>TextBox</code> with a title and an <code>ItemsControl</code> with items. I'd like to hide the entire StackPanel if the list supplying the items is empty.
  Instead of writing a dedicated Converter for the binding, I wanted to give QuickConverter (<a href="https://quickconverter.codeplex.com/" rel="noreferrer">https://quickconverter.codeplex.com/</a>) a try. QuickConverter allows to use inline C# expressions in bindings.</p>
  
  <p>So this is my mark-up:</p>
  
  <pre><code>&lt;StackPanel Visibility="{qc:Binding '$P &gt; 0 ? Visibility.Visible : Visibility.Collapsed', P={Binding Path=Value.Count}}"&gt; &lt;!-- this does not work. It's always shown, regardless of the element count --&gt;
    &lt;TextBlock Text="{qc:Binding '$P', P={Binding Path=Value.Count}}"&gt;&lt;/TextBlock&gt; &lt;!-- for debugging purposes only. It correctly shows the element count for the list --&gt;
    &lt;TextBlock Text="{qc:Binding '$P.Count', P={Binding Path=Value}}"&gt;&lt;/TextBlock&gt; &lt;!-- for debugging purposes only. It should do the same as the line above, but it does nothing --&gt;
  
    ...
  
    &lt;ItemsControl ItemsSource="{Binding Path=Value}"&gt;
      ...
    &lt;/ItemsControl&gt;
  &lt;/StackPanel&gt;
  </code></pre>
  
  <p>The first textblock is displaying the expected result, all other QuickConverter expressions fail to work. There are no errors or exception, neither at design time nor at runtime.</p>
  
  <p>Thank you for any ideas.</p>
  
  <p>Chris.</p>