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

Accessing ResourceDictionary from xaml to c# programmatically

$
0
0

How do I access the contents of my ResourceDictionary that is located my App.xaml page?

I am trying to make a label's text color that uses a color in my resource dictionary with key = "textColor"

var colorLabel = new Label { Text = "colored Text ", TextColor = (Color) Resources["textColor"]};

Gives me a null error


Viewing all articles
Browse latest Browse all 77050

Trending Articles



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