Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Change the navbarcolor without reloading page

$
0
0

Hi, Im trying to change the navbarcolor (background and title) without reloading the page. When the colorchange trigger this code runs on the specific IOS platform.

`[assembly: Xamarin.Forms.Dependency(typeof(Color_iOS))]
namespace GSS.iOS.Providers.Color
{
public class Color_iOS : IColor
{
public void ChangeNavigationBarColor()
{

        UINavigationBar.Appearance.BarTintColor = App.Context._ColorHelper.Background.ToUIColor();
        UINavigationBar.Appearance.SetTitleTextAttributes(new UITextAttributes()
        {
            TextColor = App.Context._ColorHelper.MainTitleBlack.ToUIColor()
        });
    }

}

}`

But i dont see any changes until the next view is loaded. How do i solve this? Thank you!


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>