rid00z / FreshMvvm

FreshMvvm is a super light Mvvm Framework designed specifically for Xamarin.Forms. It's designed to be Easy, Simple and Flexible.
Apache License 2.0
594 stars 172 forks source link

Support NavigationPage.SetTitleView from XF 3.2 for FreshTabbedFONavigationContainer #267

Open eclipsed4utoo opened 5 years ago

eclipsed4utoo commented 5 years ago

I am hoping that FreshMvvm can add support for the TitleView that was added in XF 3.2. This is a great change as it's really tough getting left toolbar items on Android(pretty easy on iOS though). The TitleView allows this to be done in XF rather than renderers.

I've tested the TitleView on both a single view XF project and XF's tabbed interface implementation with TabbedPage, and both worked fine. However when trying to get it to work with FreshTabbedFONavigationContainer, I can't get the title view to show.

https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/navigation/hierarchical#displaying-views-in-the-navigation-bar

rid00z commented 5 years ago

Thanks for the feedback, we should be able to do this easily.

On Fri, 10 May 2019 at 1:18 pm, Ryan Alford notifications@github.com wrote:

I am hoping that FreshMvvm can add support for the TitleView that was added in XF 3.2. This is a great change as it's really tough getting left toolbar items on Android(pretty easy on iOS though). The TitleView allows this to be done in XF rather than renderers.

I've tested the TitleView on both a single view XF project and XF's tabbed interface implementation with TabbedPage, and both worked fine. However when trying to get it to work with FreshTabbedFONavigationContainer, I can't get the title view to show.

https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/navigation/hierarchical#displaying-views-in-the-navigation-bar

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rid00z/FreshMvvm/issues/267, or mute the thread https://github.com/notifications/unsubscribe-auth/AALZPPJTCWRIK2IM3B3HBUTPUTSSFANCNFSM4HL7Q6BQ .

--

[image: XAM-Consulting Pty Ltd] http://www.xam-consulting.com/

[image: Twitter] https://twitter.com/XAMConsulting [image: LinkedIn] https://www.linkedin.com/company-beta/5791295/

Michael Ridland / Director / Xamarin & Microsoft MVP

XAM Consulting Pty. Limited. Web | Cloud | Apps | Xamarin 210/29 Kiora Rd, Miranda NSW 2228 xam-consulting.com http://www.xam-consulting.com/

eclipsed4utoo commented 4 years ago

Any thoughts on this getting added to FreshMvvm? I have another project coming up that wants to use bottom tabs and have a clickable UI element in the left of the navigation bar.

sturlath commented 4 years ago

I´m also interested in this. I was going to move away from Shell that does this quite well actually...

adamcal commented 4 years ago

Thanks for the feedback, we should be able to do this easily.

Were you ever able to look into this? I'm having the same issue as above.

rid00z commented 4 years ago

Thanks, I have implemented this I just need to test and publish the update. I will have done in next few days.

Thanks

On Sun, 1 Dec 2019 at 11:22 am, adamcal notifications@github.com wrote:

Thanks for the feedback, we should be able to do this easily.

Were you ever able to look into this? I'm having the same issue as above.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rid00z/FreshMvvm/issues/267?email_source=notifications&email_token=AALZPPNOBCTHHCQHS4SX3W3QWL7UXA5CNFSM4HL7Q6B2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFQW2NQ#issuecomment-560033078, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALZPPNO7F3JFEKAWDKUKTLQWL7UXANCNFSM4HL7Q6BQ .

-- Michael Ridland co-CEO XAM Consulting xam-consulting.com

nexxuno commented 4 years ago

@rid00z hello, was this ever pushed? Are you going to produce a new nuget?

Thanks.

acuntex commented 4 years ago

Did anyone get it to work?

    public class MyTabbedPage: TabbedPage
    {
        protected override void OnCurrentPageChanged()
        {
            base.OnCurrentPageChanged();
            Title = CurrentPage.Title;
            View titleView = NavigationPage.GetTitleView(CurrentPage);
            if (titleView != null)
                titleView.BindingContext = CurrentPage.BindingContext;
            NavigationPage.SetTitleView(this, titleView);
        }
    }

I tried using a custom TabbedPage and did override OnCurrentPageChanged to set the Title and the TitleView from the CurrentPage to the TabbedPage so that the Navigation Container can show it.

Works pretty well with the Title, but the TitleView does only render if you go to the screen, then navigate somewhere and back again. The first time you go on the screen it's never rendered.