Random programming things I'd want to remember

Monday, December 3, 2012

Today I learned (December 3, 2012)


Today I learned how to access StaticResource resources from xaml.cs codebehind files. This is how I'd return the regular PhoneForegroundBrush color from an IValueConverter:
return App.Current.Resources["PhoneForegroundBrush"] as SolidColorBrush;


And this is how I would emphasize text with the phone accent color.
return App.Current.Resources["PhoneForegroundBrush"] as SolidColorBrush;


Sources: source 1, source 2