Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Unable to customize TitleView of NavBar (add few elements) in Razor component - Shell / ContentPage #410

Open
johnmangam opened this issue Sep 20, 2021 · 5 comments

Comments

@johnmangam
Copy link

I would like to add a few more elements to the TitleView of NavBar.

I'm able to see this NavigationPage.TitleView in XAML https://github.com/xamarin/xamarin-forms-samples/blob/main/Navigation/TitleView/NavigationPageTitleView/NavigationPageTitleView/Views/AndroidExtendedTitleViewPage.xaml

I am not able to do the same in razor of Shell or a ContentPage. Please help, thank you.

@Dreamescaper
Copy link
Contributor

Unfortunately, this property is not yet mapped in MBB.

@johnmangam
Copy link
Author

Thank you @Dreamescaper I see that there is Shell.TitleView. Could we use it in a Razor component?

@Dreamescaper
Copy link
Contributor

That one is not mapped either.
If you really need to, you can access native Xamarin.Forms elements, and assign that property directly, but you'll need to build that TitleView using native XF elements, you won't be able to use razor there.

You can read about that here:
https://docs.microsoft.com/en-us/mobile-blazor-bindings/advanced/access-native-controls#accessing-native-xamarinforms-controls-from-blazor-components

@johnmangam
Copy link
Author

Thank you for the information, @Dreamescaper

@Dreamescaper
Copy link
Contributor

Dreamescaper commented Sep 21, 2021

I think you can leave it opened - as a request to map those properties in MBB.

@Eilon Eilon reopened this Sep 21, 2021
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

3 participants