次のように、ComboBox 内の ViewModel ObservableCollectoin プロパティから取得したすべての顧客を表示しています。
<ComboBox
ItemsSource="{Binding Customers}"
ItemTemplate="{StaticResource CustomerComboBoxTemplate}"
Margin="20"
HorizontalAlignment="Left"
SelectedItem="{Binding SelectedCustomer, Mode=TwoWay}"/>
別の ViewModel プロパティを作成せずに、ObservableCollection 内のアイテムの数を取得する方法はありますか。たとえば、次のようなものです。
疑似コード:
<TextBlock Text="{Binding Customers.Count()}"/>