BindableCollection bind count

Topics: Getting Started
Nov 16, 2011 at 11:56 AM
Edited Nov 20, 2011 at 7:41 PM

I've a bindable collection and I need to bind p.count to a textbox
but if I add item to the collection count doesn't notify

public class OViewModel : Screen
public BindableCollection<OModel> p { get; set; }



<TextBlock Height="23" HorizontalAlignment="Left" Margin="458,0,0,0"
Name="textBlock1" Grid.Row="6" Grid.Column="1"
Text="{Binding p.Count}" VerticalAlignment="Bottom" />


wath I do wrong?


Nov 20, 2011 at 7:07 PM

Do you have any binding errors on run.. Only reason I ask is that Count is case sensative...  It shouldn't need twoway binding either since you aren't actually changing the value of Count by hand.

Nov 20, 2011 at 7:43 PM


no it's only a cut and paste error

I don't have binding error