Skip to content
This repository has been archived by the owner on Jan 8, 2019. It is now read-only.

UWP: MasterDetailPage and IconToolbarItem can't work together. #102

Open
pcdus opened this issue Feb 1, 2018 · 0 comments
Open

UWP: MasterDetailPage and IconToolbarItem can't work together. #102

pcdus opened this issue Feb 1, 2018 · 0 comments

Comments

@pcdus
Copy link

pcdus commented Feb 1, 2018

Hello,

I've investigated about an issue on UWP with IconToolbarItem.

It seems that the issue only occur 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, it 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?

@pcdus pcdus mentioned this issue Feb 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant