How to set Icon and Title in xamarin.forms ContentView ?
Is it Possible in xaml?
Related
I'm using Xamarin Forms Shell TabBar and i'm working into renderers to customize this tabbar, i want to change icon when a tab is selected.
I found this tutorial : https://montemagno.com/tintcolor-selectedimage-xamarin-forms-ios/
I'm trying to achieve the "Selected TabItem Image" part where i have for each tab an icon for selected state and an icon for unselected state.
My issue is this tutorial using classic TabbedPage renderer where i am using a IShellTabBarAppearanceTracker (because i am using shell) and i can't access the tabs.Children[i].Icon property, only the controller.TabBar in public void SetAppearance(UITabBarController controller, ShellAppearance appearance) method.
So i have no way to access current tab icon's name to perform the following code :
icon = icon.Replace(".png", "_selected.png");
if(item?.SelectedImage?.AccessibilityIdentifier == icon)
return;
item.SelectedImage = UIImage.FromBundle(icon);
item.SelectedImage.AccessibilityIdentifier = icon;
is there a way to do it ? Or do we have to do it differently ?
I need to set AutomationId in the navigation back button in order to automate the testing. I am using Xamarin forms default navigation back button, so where I need to add the AUtomationId.
Please help me to solve this issue.
How to remove the underline from Material Picker Control in Xamarin Forms ?
Control.BorderStyle = UIKit.UITextBorderStyle.None;
has no effect
When using Prism 7+ as navigation framework in Xamarin Forms.
What would be most elegant way for changing the BarBackgroundColor of navigation page?
i Prism 6, there was a way for customizing navigation page using INavigationPageProvider , but that is no longer an option..
Ideally being able to change the color via binding to view model
In Prism 7+ you can register you own custom NavigationPage using the usual containerRegistry.RegisterForNavigation<MyNavigationPage>();
Your NavigationPage needs to be inherited from Xamarin.Forms.NavigationPage.
Of course you can set the backgroundcolor, bind to a ViewModel etc...
I'm adding ToolbarItems I need on all my other pages here.
Your first Navigation Action should look like this await NavigationService.NavigateAsync($"{nameof(MyNavigationPage)}/{nameof(MyFirstPage)}");
Is it somehow possible to have the Back button in the NavigationBar and also the Master (Hamburger) menu icon with MvvmCross for Xamarin.Forms? Like the Amazon app does it on iOS.