0
Follow
5
View

Change NavigationPage Backbutton color from DynamicResource

ddza888 注册会员
2023-01-26 11:45

If you want to use color from ResourceDictionary , you can access it first and pass the result color to the second parameter of method NavigationPage.SetIconColor.

Please refer to the following code:

        Color color = (Color)Application.Current.Resources["defaultBackgroundColor"];
        NavigationPage.SetIconColor(this, color);

The defaultBackgroundColor is a color in Application.Resources:

   
    
        
        Red
        #ffd966