Can not programmatically change displayed page in IndexPage.
Closed this issue · 2 comments
patuwwy commented
Describe the bug
Can not programmatically change displayed page in IndexPage.
To Reproduce
Steps to reproduce the behavior:
I am trying to set page2 as active at start.
public void ShowTopNavigation()
{
IndexPage indexPage = new IndexPage();
ContentPage page1 = new ContentPage();
ContentPage page2 = new ContentPage();
ContentPage page3 = new ContentPage();
indexPage.Children.Add(page1);
indexPage.Children.Add(page2);
indexPage.Children.Add(page3);
indexPage.CurrentPage = page2;
Application.Current.MainPage = indexPage;
}
page1 is displayed, top indicator has first element active
Expected behavior
Second page should be displayed.
Environment (please complete the following information):
- Emulator:
[Version]
Model=Tizen4/Unified;
Build=tizen-4.0-unified_20191115.1;
Release=20191115.1; - Tizen.NET (5.0.0.14629)
- Tizen.CircularUI 1.4.0
myroot commented
Thanks for reporting issue, We have issue on update CurrentPage
on initialize time
We will fix this issue, but you can also fix early with workaround code like below
public void ShowTopNavigation()
{
IndexPage indexPage = new IndexPage();
ContentPage page1 = new ContentPage();
ContentPage page2 = new ContentPage();
ContentPage page3 = new ContentPage();
indexPage.Children.Add(page1);
indexPage.Children.Add(page2);
indexPage.Children.Add(page3);
Device.BeginInvokeOnMainThread(() =>
{
indexPage.CurrentPage = page2;
});
Application.Current.MainPage = indexPage;
}
patuwwy commented
Thanks for reporting issue, We have issue on update
CurrentPage
on initialize time
We will fix this issue, but you can also fix early with workaround code like below
Thanks!