I think it should be simple but can't believe how to do.
I try bind in label the count of object that have his property isWorking
set at True
Here my collection.
public readonly ObservableCollection<ComputerModel.ControleData> _ComputerList =
new ObservableCollection<ComputerModel.ControleData>();
public ObservableCollection<ComputerModel.ControleData> ComputerList { get { return _ComputerList; } }
The result I need in a label is like
int workingItems= ComputerList.Where(x=> x.isWorking == true).Count()
Then bind in label
<Label Content="{Binding workingItems}" HorizontalAlignment="Left" Margin="12,424,0,0" VerticalAlignment="Top" Height="22" Width="62"/>
But what is the right method to have this working?? I can't had condition in the WPF itself?