{
var tab2=新接收页面(空);
var tab5=新信息页(空);
BottomBar.Children.Add(表3);
BottomBar.Children.Add(表5);
如何将侦听器添加到此
BottomBarpage
which checks which of the tabs is currently selected,so that I can add the code below to this listener.
{
}
BottomBarPage bottomBar = new BottomBarPage
{
};
var tab1 = new MainPage();
var tab2 = new ReceivePage(null);
var tab3 = new SendPage(false);
var tab4 = new SendPage(false);
var tab5 = new InfoPage(null);
bottomBar.Children.Add(tab1);
bottomBar.Children.Add(tab2);
bottomBar.Children.Add(tab3);
bottomBar.Children.Add(tab4);
bottomBar.Children.Add(tab5);
如何向此添加侦听器
BottomBarPage
if (bottomBar.SelectedItem == bottomBar.Children[3])
{
//do something
}