Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. Accordion won't access theme

Accordion won't access theme

Scheduled Pinned Locked Moved WPF
wpfhelpcsharpcssdotnet
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tronix01
    wrote on last edited by
    #1

    hello, i have trouble with the wpf toolkit accordion control. i have a UserControl which creates a dynamic nested accordion control (3 levels). when the 3rd level accordionItem is clicked a new usercontrol, also a accordion but in XAML, will be added to the content of the 3rd level accordionItem. both usercontrols have a link to a ResourceDictionray (Theme) like this:

    xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Layout.Toolkit">
    <Grid Name="MainGrid">
    <Grid.Resources>
    <ResourceDictionary Source="../View/Themes/CustomAccordion.xaml"></ResourceDictionary>
    </Grid.Resources>
    </Grid>

    the problem is, that the XAML accordion display my theme configuration but the dynamic created accordion won't display the same theme. does anybody know why? thanks for any help

    T 1 Reply Last reply
    0
    • T tronix01

      hello, i have trouble with the wpf toolkit accordion control. i have a UserControl which creates a dynamic nested accordion control (3 levels). when the 3rd level accordionItem is clicked a new usercontrol, also a accordion but in XAML, will be added to the content of the 3rd level accordionItem. both usercontrols have a link to a ResourceDictionray (Theme) like this:

      xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Layout.Toolkit">
      <Grid Name="MainGrid">
      <Grid.Resources>
      <ResourceDictionary Source="../View/Themes/CustomAccordion.xaml"></ResourceDictionary>
      </Grid.Resources>
      </Grid>

      the problem is, that the XAML accordion display my theme configuration but the dynamic created accordion won't display the same theme. does anybody know why? thanks for any help

      T Offline
      T Offline
      tronix01
      wrote on last edited by
      #2

      i checked my code and found the problem

      accordionItem.SetResourceReference

      was set and does override my ResourceDictonary Source

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups