结合使用Tombstone和ThemeManager [英] Using ThemeManager with Tombstone

查看:58
本文介绍了结合使用Tombstone和ThemeManager的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的应用程序中使用ThemeManager,但看来您不能多次更改主题.

I want to use the ThemeManager in my application but it seems like you cannot change the theme more than once.

http://www.jeff.wilcox.name/2012/01/phonethememanager/

http://www.jeff.wilcox.name/2012/01/phonethememanager/

如果未关闭应用程序,则主题管理器将引发异常.

If the app is not closed the theme manager throws exceptions.

当应用程序使用墓碑时,是否可以重新初始化应用程序并更改主题?

Is there a way to reinitialize the application and to change the themes when the app uses tombstone?

推荐答案

据我所知,在WP中使用DynamicResources.因此,您的应用需要重新启动才能拾取并应用主题更改(浅色/深色/重音).

You can't use DynamicResources in WP as far as I know.  So your app would need to re-start in order to pickup and apply the change of Theme (Light/Dark/Accent).

简而言之,当您在逻辑删除后重新激活应用程序时,您将无法应用主题更改.您将能够检测到更改,但不能应用更改.

So in short you cannot apply a theme change when the app is re-activated after tombstone.  You would be able to detect the change, but just not apply it.

主题管理器不应引发任何异常.如果您在此处粘贴代码段,我将为您提供帮助.

The theme manager should not be throwing any exceptions.  if you paste a code snippet here I will help you with that.


这篇关于结合使用Tombstone和ThemeManager的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆