UI was not rendering properly issue. #19738
-
2025-03-25.11-53-35.mp4in android application Ui was not rendering properly, if i open the application shadow container's and UserControls wand not loading, when i am click recent application button and i again open the application the container's and UserControls was loading properly. HomeModel.cs
private void OnGetBookCardStatisticsSuccess(string obj)
{
var bookCards = new ObservableCollection<BookCard>();
var statistics = JsonConvert.DeserializeObject<BookGetManyResponseDto>(obj);
if (statistics is null)
{
InfoBoxManager.ShowMessage("Book Data Received Success but DTO Not Found!", "BookCard", InfoBarSeverity.Error);
return;
}
foreach (var item in statistics.StatisticsMap)
{
bookCards.Add(new BookCard(item.Key, item.Value));
_lastFetchBookId = item.Key;
}
OnBookStatisticsLoadCompleted?.Invoke(bookCards);
} HomePage.xaml.cs
public HomePage()
{
this.InitializeComponent();
OnStart();
}
private void OnStart()
{
HomeModel.OnBookStatisticsLoadCompleted += SetBookContainerData;
HomeModel.OnVideoStatisticsLoadCompleted += SetVideoContainerData;
LoadProfileData();
}
private void SetBookContainerData(ObservableCollection<BookCard> bookCards)
{
BookContainer.ItemsSource = bookCards;
_isScrollViewerItemsLoadCompleted = true;
}
private void SetVideoContainerData(ObservableCollection<VideoCard> videoCards)
{
VideoContainer.ItemsSource = videoCards;
_isScrollViewerItemsLoadCompleted = true;
} BookCard.xaml.cs
UserControl
public BookCard(Guid bookId, BookStatisticsDto statisticsDto)
{
OnStart(bookId, statisticsDto);
}
private async void OnStart(Guid bookId, BookStatisticsDto statisticsDto)
{
await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
{
this.InitializeComponent();
_bookId = bookId;
_statisticsDto = statisticsDto;
_viewModel.OnFavoriteLoadCompleted += b => Favorite_ToggleButton.IsChecked = b;
_viewModel.LoadInteractionContent(_bookId);
});
} |
Beta Was this translation helpful? Give feedback.
Answered by
jeromelaban
Mar 31, 2025
Replies: 1 comment 4 replies
-
Can you please provide some minimal repro of this and report it as an issue? Are you seeing some errors in the debug output or in logs? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This generally means that you're trying to run with an unsupported version of Android. Which version of Android are you using?