Automatic Dark/Light Icon Support in Windows Phone 8

前端 未结 5 1714
滥情空心
滥情空心 2021-02-05 08:09

I think this is a very common problem, but I cannot find a suitable solution for me. As you all know, WP supports a dark and a light theme. The user can change the theme and the

5条回答
  •  青春惊慌失措
    2021-02-05 08:22

    You could use vector graphics instead of bitmap icons and use a theme-aware brush to draw them.

    If you want the App to respond to a switch of the theme you'll need to respond to it any way.

    I added a property to the base class of my Views that returns the selected theme. That way I can use/bind to that value.

    It is also possible to use a ValueConverter that turns a logical name of a resource into a name of a theme specific resource.

    Edit

    Have a look at this: Custom light/dark theme resources on Windows Phone 7

提交回复
热议问题