Is it possible to do this:
I have a progress bar in first page and i set it IsVisible = false
i created a Dependency method in first page
[assembly:Dependency(typeof(page.view.FirstPage))]
public interface Progress
{
void StartProgress();
}
public partial class FirstPage : ContentPage
{
public FirstPage()
{
}
public void StartProgress()
{
//do progression here
and set Progress bar
IsVisible = true;
}
}
and access the method from FirstPage to SecondPage
example i have a Button in second page
private void Onpress(s, e)
{
DependencyService.Get<Progress>().StartProgress();
Navigation.PopToRootAsync();
}
then the progress bar in first page will start running.... But my code doesnt work