In my application, I have a class Chronometer which use a dispatcherTimer and Tick method. Each second, a variable decrease.
I would like that when the value of the variable is 0, a new xaml page is load.
I try to use NavigationService
but this method work only in a xaml.cs file.
My xaml page which is visible when the variable decrease is : WordPage.xaml The xaml page that i want to display is : FinalPage.xaml
Can you realize what I want? Please help me
EDIT :
My constructor of my class is :
public Chrono(DispatcherTimer newTimer, TextBlock chrono, TextBlock NumEquip, P1 page1)
{
//Part effaced
m_page1 = page1;
}
and the instanciation of the object Chrono is :
MonChrono = new Chrono(newTimer, this.TimeLabel, this);