Search code examples
silverlightwindows-phone-7xamlgeneric.xaml

Load Images According To Dark And Light Theme in WP7


In my current Windows Phone 7 app, we want to use two themes: Dark And Light, and we are also using some panoramic and pivot controls in our app. Each control has a different image for each dark and light theme.

For this purpose, I made two separate themes in my project. However, I am unable to load images for the theme. Can anyone please suggest how I can load images from the theme according to whether it is the dark or light version?


Solution

  • I Guess Better Approach is Make Two Separate Themes One For Light And Dark Theme And Then Take Decsion On Application Loading By Theme Visibility Bit.

    In our Theme We Can Load Images Like That

    <BitmapImage x:Key="SearchImage" UriSource="/Images/searchIcon.png" />