Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Performance issue when trying to dynamically change parts of the content of a page

$
0
0

**I have a pretty simple xamarin app. **

It's split into two sub-views/sub-pages, which splits the page 3/7 in height. This is done by a grid which holds two rowdefinitions and a contentview (BottomViewSubViewHolder) which is placed into Grid.Row=1 (bottom part).

Then I have a button for navigating the subviews, (which switches the bottom subview on tap).

What I do is that I simply switch the content of the BottomViewSubViewHolder. I set it with new different contentviews depending on how many taps.

It seems however that the intital tap, always takes longer, when the content is set, the app freeze for a couple of hundred milliseconds. After that first initial tap however, the following taps will not show any lag in the app.

This is all I do:
var view = new SubView1();
var viewModel = new SubViewModel1(new NavigationService());
view.BindingContext = viewModel;
bottomViewSubViewHolder.Content = view;

  • This worries me a bit. Have you guys experienced anything like this and do you know what to do about it?

  • Is there a better way of trying to change parts of a page dynamically? Should I Make bigger xaml-views and use IsVisible on parts of the view instead?


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>