问题
I'm trying to let the user choose if he wants to use themed style or not. Is it possible to dynamically "load" the XPManifest?
If user accepts the themed style then use the manifest, otherwise use the classic theme. At program startup after dialog with style selection closes I would like to do something like:
if UserWantsThemedStyle then
LoadManifestSomehow
else
UseClassicStyle;
Is it even possible to do it at runtime?
Thanks
回答1:
Yes you can do this. You need to use the activation context API which allows you to activate different manifests at runtime. I have used it to enable themes in an Excel add-in.
来源:https://stackoverflow.com/questions/7526665/is-it-possible-to-conditionally-use-xpmanifest-at-runtime