- Home
- Forum
- Xamarin.Forms
- Problem in rendering SfCardLayout after updating Xamarin.Forms
Problem in rendering SfCardLayout after updating Xamarin.Forms
Hello, I have a Xamarin Forms application and I' m using SfCardLayout inside a tabbed page. After updating Xamarin.Forms package to 5.0, I faced a problem. When my view appears for the first time, everything works as expected. But when I change tab and then go back to tab with SfCardLayout (when view appears, I clear my list, call the service again and then add items in the ObservableCollection), the control disappears from view eventhough my property is raised using RaisedPropertyChanged. I face this problem in both Android and iOS platforms and I have also tried to update Syncfusion packages to the latest available. Could you help me, please?
Best regards,
Vana
SIGN IN To post a reply.
5 Replies
1 reply marked as answer
RS
Ramya Soundar Rajan
Syncfusion Team
January 25, 2021 02:32 PM UTC
Hi Vana Chalikia,
Currently we are validating on your reported query and update you the status on or before January 27, 2021.
Regards,
Ramya S
VC
Vana Chalikia
January 25, 2021 02:44 PM UTC
Hi Ramya,
I will be waiting for your response.
Thank you in advance,
Vana
MK
Muneesh Kumar G
Syncfusion Team
January 26, 2021 09:31 AM UTC
Hi Vana Chalikia,
Thanks for your patience.
We have analyzed your query and getting empty view when clear and re-added the items dynamically has been resolved by setting the VisibleCardIndex property in CardLayout while adding the items as per below.
Code snippet
|
<cards:SfCardLayout x:Name="cardLayout" BindableLayout.ItemsSource="{Binding Colors}" Margin="10">
..
</cards:SfCardLayout>
|
|
protected override void OnAppearing()
{
base.OnAppearing();
viewModel.Colors.Clear();
viewModel.Colors.Add("Yellow");
viewModel.Colors.Add("Red");
viewModel.Colors.Add("Orange");
cardLayout.VisibleCardIndex = cardLayout.Children.Count-1;
}
|
Let us know if you have any other queries.
Thanks,
Muneesh Kumar G
Marked as answer
VC
Vana Chalikia
January 26, 2021 10:23 AM UTC
Hi Muneesh Kumar G,
This worked perfect for both Android and iOS. Thank you so much!
Best regards,
Vana
MK
Muneesh Kumar G
Syncfusion Team
January 26, 2021 11:48 AM UTC
Hi Vana Chalikia,
Thanks for the update.
We are glad to know that the given solution works. Please let us know if you need any further assistance.
Thanks,
Muneesh Kumar G
SIGN IN To post a reply.
- 5 Replies
- 3 Participants
- Marked answer
-
VC Vana Chalikia
- Jan 22, 2021 01:49 PM UTC
- Jan 26, 2021 11:48 AM UTC