CurrentPageChanged event is not fired
Closed this issue · 6 comments
Korayem commented
I can't simply do this inside BottomBar Page
this.CurrentPageChanged += async (object sender, EventArgs e) =>
{
if (!AppSettings.IsLogged)
{
await Navigation.PushAsync(new Welcome(), false);
return;
}
};
andreinitescu commented
This method:
needs to call tell Element
property (which is the XamarinForms BottomBar) to raise CurrentPageChanged
event (BottomBar is derived from MultiPage), something like this:
Element.RaiseCurrentPageChanged()
or something similar...
a PR would be welcome :)
nbsoftware commented
+1
Any news ?
nbsoftware commented
From what I understand, it seems that Xamarin Forms TabbedPage control lacks a virtual OnCurrentPageChanged method that can be overriden and called from the renderer.
Update: Err... forget this comment, didn't look at it hard enough ;)
See final solution in PR below.
nbsoftware commented
Ok I have a fix for this.
I'll do the PR tomorrow.
nbsoftware commented
There you go. PR #15.
sschmidt commented
PR merged