Есть конвертер, как следует,
public sealed class NullToVisibilityConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return value == null ? Visibility.Hidden: Visibility.Visible;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
Теперь свяжите свойство с свойством Visibility. Как,
<ListBox ItemsSource="{Binding Path=Squad}"
Visibility="{Binding Converter={StaticResource nullToVisibilityConverter},
Path=Squad}">
<ListBox.ItemTemplate>
<DataTemplate>
<CheckBox Content="{Binding}" />
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>