I want to set the background color of the application bar blue in windows phone 8.1 .how can i do it in xamarin.forms? Do I have to write the native code for the same how to do that?
@shubhrakushal - That was for the navigation bar.
If it's the App Bar(s) you want to change, there is a TopAppBar and a BottomAppBar in the WindowsPhonePage (you probably have a MainPage that derives from WindowsPhonePage in your WinRT project):
TopAppBar.Background = new SolidColorBrush(Color.FromArgb(255, 0, 255, 0));
TopAppBar.BorderBrush = new SolidColorBrush(Color.FromArgb(255, 0, 255, 0));
@shubhrakushal - Which form of WinPhone - Silverlight or WinRT ?
@JohnHardman I am using WinRT
@shubhrakushal - actually, it's in the common code. I have it in the App constructor in App.xaml.cs
MainMenuPageView mainPageView = new MainMenuPageView();
NavigationPage navigationPage = new NavigationPage(mainPageView);
navigationPage.BarTextColor = Color.Red;
navigationPage.BarBackgroundColor = Color.Yellow;
navigationPage.BackgroundColor = Color.Green;
I hasten to add that those aren't the colors that I use :-)
@JohnHardman Hey John I have tried that solution but it didn't work for me...... so I found the solution for the above issue is in windows phone 8.1 project there is a file name Mainpage.Xaml write the following code.
In the Picture shared below,the marked portion will get the blue color.
Xamarin Inc., as a wholly-owned Microsoft subsidiary acting as a separate legal entity, adheres to the Microsoft Privacy Statement: Privacy & cookies