Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

ImplicitStyleManager + PRISM (how to address Theme.xaml... RSS

1 reply

Last post Aug 05, 2009 06:16 AM by Mog Liang - MSFT

(0)
  • ChristianRuppert

    ChristianRup...

    Member

    8 Points

    20 Posts

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

    Jul 29, 2009 10:26 PM | LINK

     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 Liang -...

    All-Star

    21645 Points

    2132 Posts

    Microsoft

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

    Aug 05, 2009 06:16 AM | LINK

    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.