title: Is it possible to bind to a lambda expression in Silverlight?
body: <p>I have a listbox that simply binds to a collection.  The collection has a child collection (StepDatas).  I would like to bind to a count of the child collection but with a WHERE statement.  I can bind to ChildCollection.Count but get lost when needing to add the lambda expression.  Here's the XAML:</p>
  
  <pre><code>&lt;ListBox Height="Auto" Style="{StaticResource ListBoxStyle1}" Margin="4,46,4,4" x:Name="lstLeftNavigation" Background="{x:Null}" SelectionChanged="lstLeftNavigation_SelectionChanged"&gt;
  &lt;ListBox.ItemTemplate&gt;
      &lt;DataTemplate&gt;
          &lt;Grid Width="180" Margin="2,2,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" d:LayoutOverrides="Width" MinHeight="36"&gt;
              &lt;TextBlock Text="{Binding StepNm}" x:Name="tbStepNm" Margin="10,0,34,0" TextWrapping="Wrap" FontFamily="Portable User Interface" Foreground="White" FontSize="10" FontWeight="Bold" VerticalAlignment="Center"/&gt;
              &lt;Image Height="37" HorizontalAlignment="Right" Margin="0" VerticalAlignment="Center"  Width="37" Source="Images/imgIcoChecked.png" Stretch="Fill"/&gt;
          &lt;/Grid&gt;
      &lt;/DataTemplate&gt;
  &lt;/ListBox.ItemTemplate&gt;
  </code></pre>
  
  <p></p>
  
  <p>The above works to bind to the count of the child collection.  However I wish to show a count of the child collection where a certain condition is met.  In this specific case, the child collection has a completed property (bool).  So...I want to show the count StepDatas.Where(x => x.Completed == true).Count.</p>
  
  <p>Is this in any way possible?  Thanks for any help!</p>