Skip to main content

Microsoft Silverlight

Answered Question ImplicitStyleManager + PRISM (how to address Theme.xaml in Module)RSS Feed

(0)

ChristianRuppert
Christia...

Member

Member

8 points

20 Posts

ImplicitStyleManager + PRISM (how to address Theme.xaml in Module)

 Hi,

the question refreshingly short: I have a working ImplicitStyleManager solution by placing the Theme.xaml in the Shell project.

But thats not very nice, I want to put it into a module. How do I adress this, how can I tell the ImplicitStyleManager where and how to look?

Currently I am simply using:

 (funny, cant add the following lines via SourceInsert)
  <StackPanel Theming:ImplicitStyleManager.ResourceDictionaryUri="Theme.xaml"
Theming:ImplicitStyleManager.ApplyMode="Auto">

 It should propably look somehow like this:


  <StackPanel Theming:ImplicitStyleManager.ResourceDictionaryUri="ModuleAName/Theme.xaml"
                    Theming:ImplicitStyleManager.ApplyMode="Auto">
 

Thanks for any help,

Chris

 

EDIT: Code solution can be found here

Mog Liang - MSFT
Mog Lian...

All-Star

All-Star

15894 points

1,541 Posts

Answered Question

Re: ImplicitStyleManager + PRISM (how to address Theme.xaml in Module)

Hi,

Suppose the theme file is in assembly "AssemblyB", then you could refer to this theme by this uri (should set theme file build-action to Resource)

   <Grid x:Name="LayoutRoot"
        theming:ImplicitStyleManager.ApplyMode="Auto"
        theming:ImplicitStyleManager.ResourceDictionaryUri="/AssemblyB;component/[themefilepath]">
Thanks,

Mog Liang
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities