title: Bind StackPanel.Visibility to the Visibility property of its children
body: <p>I'm relatively new to DataBinding and just reading into it.
  What I want to do is the following:</p>
  
  <p>I have a StackPanel with a number of child controls:</p>
  
  <pre><code>        &lt;StackPanel Orientation="Horizontal"&gt;
              &lt;TextBox x:Name="textbox1" Width="100"&gt;1&lt;/TextBox&gt;
              &lt;TextBox x:Name="textbox2" Width="100"&gt;2&lt;/TextBox&gt;
              &lt;TextBox x:Name="textbox3" Width="100"&gt;3&lt;/TextBox&gt;
          &lt;/StackPanel&gt;
  </code></pre>
  
  <p>The <code>visibility</code> property of the textboxes can be changed by code.
  Now, if all <code>TextBoxe</code>s are set to <code>Visibility=Collapsed</code>, i also want <code>StackPanel.Visibility</code> set to <code>Collapsed</code>, but if one or more <code>TextBoxe</code>s are shown <code>(Visibility=Visible)</code>, <code>StackPanel.Visibility</code> should also be set to <code>Visible</code>.</p>
  
  <p>Can this be achieved with a simple DataBinding or do I have to implement this functionality in C# code?</p>