6
나는이 같은 콤보 상자 내에서 뷰 모델 ObservableCollectoin 속성에서 얻을 내 모든 고객을 표시 해요 : XAML에서 ObservableCollection의 항목 수를 얻는 방법은 무엇입니까?
<ComboBox
ItemsSource="{Binding Customers}"
ItemTemplate="{StaticResource CustomerComboBoxTemplate}"
Margin="20"
HorizontalAlignment="Left"
SelectedItem="{Binding SelectedCustomer, Mode=TwoWay}"/>
다른 뷰 모델 속성을 만들지 않고 ObservableCollection에
의 항목 수를 얻을 수있는 방법이 있나요, 예 : 이 같은 :
의사 코드 :
<TextBlock Text="{Binding Customers.Count()}"/>
괜찮습니다. 예, ObservableCollection이 변경되면 계속 업데이트됩니다. –