Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants