Xamarin.Forms and Iconize: IconToolbarItem are not displayed when we use MasterDetailPage

Pierre-ChristopheDusPierre-ChristopheDus FRUniversity ✭✭✭

Hello,

It seems that there is an issue that occurs in case of the IconToolbarItem is used in a IconNavigationPage, that is itself used in the Detail of a MasterDetailPage.

If we launch the UWP project from IconizeSample, the IconToolbarItems are well displayed in the TabbedPage:

var tabbedPage = new IconTabbedPage { Title = "Iconize" };
foreach (var module in Plugin.Iconize.Iconize.Modules)
{
    tabbedPage.Children.Add(new Page1
    {
        BindingContext = new ModuleWrapper(module),
        Icon = module.Keys.FirstOrDefault()
    });
}
MainPage = new IconNavigationPage(tabbedPage);

If we replace the TabbedPage by a MasterDetailPage, this also works if the Detail is not a IconNavigationPage:

var mdPage = new MasterDetailPage();
mdPage.Master = new ContentPage
{
    Title = "Iconize"
};
var module = Plugin.Iconize.Iconize.Modules.First();
mdPage.Detail = new Page1
{
    BindingContext = new ModuleWrapper(module),
    Icon = module.Keys.FirstOrDefault()
};
MainPage = new IconNavigationPage(mdPage);

But if we put the Detail in an IconNavigationPage, the icons of the IconToolbarItem are no longer visible:

var mdPage = new MasterDetailPage();
mdPage.Master = new ContentPage
{
    Title = "Iconize"
};
var module = Plugin.Iconize.Iconize.Modules.First();
mdPage.Detail = new IconNavigationPage(new Page1
{
    BindingContext = new ModuleWrapper(module),
    Icon = module.Keys.FirstOrDefault()
});
MainPage = mdPage;

Is there a way to fix this awaiting a new package version?

Answers

Sign In or Register to comment.