c# - How do I change panorama background image depending on theme color? -
i have wp7 application uses dark image panorama's background. issue when device set light theme cant make change lighter version of it.
private color lightthemebackground = color.fromargb(255, 255, 255, 255); private color darkthemebackground = color.fromargb(255, 0, 0, 0); private void displaystate() { solidcolorbrush backgroundbrush = application.current.resources["phonebackgroundbrush"] solidcolorbrush; if (backgroundbrush.color == lightthemebackground) { panoramabackgroundimage = bg_light.png; } else { // in dark theme } }
and in .xaml file can't add image (it lets me define panorama background once!
<controls:panorama title="museo"> <controls:panorama.background> <imagebrush x:name="panoramabackgroundimage" stretch="fill" imagesource="/museo;component/bg_dark.png" /> </controls:panorama.background>
thanx
Comments
Post a Comment