Hello,
Following this example, i have display problem in iOS but not in Android. Android work perfectly, but in iOS lines in the popup are empty (except the sfbusyindicator where they are all visible).
My code ( PopupStatusModel implement INotifyPropertyChanged )
private void PopulatePopUp()
{
popuplistView = new SfListView() { ItemSpacing = 5 };
popuplistView.WidthRequest = 450;
popuplistView.ItemTemplate = new DataTemplate(() =>
{
ViewCell viewCell = new ViewCell();
var grid = new Grid() { RowSpacing = 1 };
grid.ColumnDefinitions.Add(new ColumnDefinition());
grid.ColumnDefinitions.Add(new ColumnDefinition());
grid.ColumnDefinitions.Add(new ColumnDefinition());
var StatusImage = new SfBusyIndicator()
{
HorizontalOptions = LayoutOptions.Center,
HeightRequest = 50,
AnimationType = AnimationTypes.Cupertino
};
StatusImage.SetBinding(SfBusyIndicator.IsVisibleProperty, new Binding("BusyStatus"));
var StatusText = new Label()
{
HeightRequest = 50,
HorizontalTextAlignment = TextAlignment.Start,
LineBreakMode = Xamarin.Forms.LineBreakMode.NoWrap,
FontSize = Font.SystemFontOfSize(NamedSize.Medium).FontSize,
};
StatusText.SetBinding(Label.TextProperty, new Binding("textStatus"));
var StatusNumber = new Label()
{
HeightRequest = 50,
HorizontalTextAlignment = TextAlignment.Start,
FontSize = Font.SystemFontOfSize(NamedSize.Medium).FontSize,
};
StatusNumber.SetBinding(Label.TextProperty, new Binding("numberStatus"));
grid.Children.Add(StatusImage, 0, 0);
grid.Children.Add(StatusText, 1, 0);
grid.Children.Add(StatusNumber, 2, 0);
viewCell.View = grid;
return viewCell;
});
listePop = new ObservableCollection<PopupStatusModel>();
PopupStatusModel item1 = new PopupStatusModel() { BusyStatus = true, textStatus = "xyz", numberStatus = "xyz" };
PopupStatusModel item2 = new PopupStatusModel() { BusyStatus = false, textStatus = " xyz ", numberStatus = " xyz " ) };
PopupStatusModel item3 = new PopupStatusModel() { BusyStatus = false, textStatus = " xyz ", numberStatus = " xyz " };
PopupStatusModel item4 = new PopupStatusModel() { BusyStatus = false, textStatus = " xyz ", numberStatus = " xyz " };
PopupStatusModel item5 = new PopupStatusModel() { BusyStatus = false, textStatus = " xyz ", numberStatus = " xyz " };
listePop.Add(item1); listePop.Add(item2); listePop.Add(item3); listePop.Add(item4); listePop.Add(item5);
popuplistView.ItemsSource = listePop;
popupLayout.PopupView.ContentTemplate = new DataTemplate(() =>
{
return popuplistView;
});
popupLayout.Closing += PopupLayout_Closing;
popupLayout.Show();
}
Thank you for your feedback.