CollectionView забавное поведениеC#

Место общения программистов C#
Anonymous
CollectionView забавное поведение

Сообщение Anonymous »

В моем приложении .net 9 Maui у меня есть простой контентвив : Пары Я связываю ContentView , как это:

Код: Выделить всё

public class MatchingPair
{
public string? Left { get; set; }
public string? Right { get; set; }
public bool IsLeftMatched { get; set; }
public bool IsRightMatched { get; set; }
}

public static readonly BindableProperty PairsProperty =
BindableProperty.Create(
nameof(Pairs),
typeof(ObservableCollection),
typeof(MatchingPairsView));

public ObservableCollection Pairs
{
get => (ObservableCollection)GetValue(PairsProperty);
set => SetValue(PairsProperty, value);
}
Теперь посмотрите на рендеринг:

Все слова на праве отображаются, но не слова влево. Если я удалю кадр он работает. Если я заменяю кадр на границу я получаю одинаковое поведение.

Подробнее здесь: https://stackoverflow.com/questions/797 ... -behaviour

Вернуться в «C#»