XamarinSidemenu decoration not recognized

gbk3gbk3 USMember ✭✭

Tying to implement side menu for my app, but got warning in console like:

mvx:Warning: 0.25 No sidemenu found. To use a sidemenu decorate the viewcontroller class with the 'MvxPanelPresentationAttribute' class and set the panel to 'Left' or 'Right'.

More details here

Can some-one advice what was done incorrect?

Best Answer

  • gbk3gbk3 US ✭✭
    Accepted Answer

    Spend 2 days to figure out the reason - the issue related to detection and parsing decorator attributes.

    I have few projects that share codebase between each other, and due to some reason

       [MvxSidebarPresentation(MvxPanelEnum.Left, MvxPanelHintType.PushPanel, false)]
    

    is not taken in to account if it placed in shared project but not in project itself. In same moment

        [MvxSidebarPresentation(MvxPanelEnum.Center, MvxPanelHintType.ResetRoot, true)]
        [MvxSidebarPresentation(MvxPanelEnum.Center, MvxPanelHintType.ResetRoot, true, MvxSplitViewBehaviour.Master)]
        [MvxSidebarPresentation(MvxPanelEnum.Center, MvxPanelHintType.PushPanel, true, MvxSplitViewBehaviour.Detail)]
    

    works as expected.

    Workaround -> subclass shared menuClass (with MvxPanelEnum.Left) in each project where it should be used.

    Not sure if this issue related to mvvmCross lib or to Xamarin.

Answers

  • gbk3gbk3 USMember ✭✭
    Accepted Answer

    Spend 2 days to figure out the reason - the issue related to detection and parsing decorator attributes.

    I have few projects that share codebase between each other, and due to some reason

       [MvxSidebarPresentation(MvxPanelEnum.Left, MvxPanelHintType.PushPanel, false)]
    

    is not taken in to account if it placed in shared project but not in project itself. In same moment

        [MvxSidebarPresentation(MvxPanelEnum.Center, MvxPanelHintType.ResetRoot, true)]
        [MvxSidebarPresentation(MvxPanelEnum.Center, MvxPanelHintType.ResetRoot, true, MvxSplitViewBehaviour.Master)]
        [MvxSidebarPresentation(MvxPanelEnum.Center, MvxPanelHintType.PushPanel, true, MvxSplitViewBehaviour.Detail)]
    

    works as expected.

    Workaround -> subclass shared menuClass (with MvxPanelEnum.Left) in each project where it should be used.

    Not sure if this issue related to mvvmCross lib or to Xamarin.

Sign In or Register to comment.