Monday 15 February 2010

monotouch - Xamarin Forms show blocking loading message -



monotouch - Xamarin Forms show blocking loading message -

i have long running task , want show progress indicator , message.

i have tried using activityindicator , while shows correctly, allows underlying controls updated.

this xamarin ios code want need in using xamarin.forms.

http://developer.xamarin.com/recipes/ios/standard_controls/popovers/display_a_loading_message/

any ideas?

create custom renderer overlays boxview on entire screen. can customize color fill , opacity show underlying contents liking.

you can center xamarin.forms activityindicator in middle of screen finish off same effect.

note - however, in v1.2.3x there bug on android allows underlying controls still receive user input events, button click, despite boxview beingness on-top of everything.

this issues apparently resolved in upcoming v1.3 release.

update 1

its not extractable part of more complex control, isn't hard similar effect in link.

try next in page:-

use grid base of operations (1 row, 1 column), , set fill screen, , set row , column definitions gridunittype.star.

you can create page content normal child of grid, position at cell (0,0).

for next part (you set in control renderer) re-used across multiple pages. if not comfortable control renderers, can create function homecoming grid object can utilize across multiple pages:-

grid base

boxview kid of grid

activityindicator kid of grid.

once have grid result above, can add together page's grid root control, position 1 time again - at cell (0,0).

you can command visibility of overlaying panel on content.

naturally want set isrunning property of activityindicator whenever show / hide panel. create couple methods showactivityindicator(), , hideactivityindicator() perhaps simplify though.

monotouch xamarin xamarin.forms

No comments:

Post a Comment