views:

506

answers:

2
+3  A: 

You're not seeing the Expander because you redefined its template. This one should work better :

        ...
        <Expander.Template>
          <ControlTemplate
              TargetType="Expander">
              <Border
                  BorderThickness="1">
                  <Expander Content="{TemplateBinding Content}" Header="{TemplateBinding Header}"/>
              </Border>
          </ControlTemplate>
        </Expander.Template>
        ...
Thomas Levesque
`TemplateBinding`! That's what I needed. Thanks :)
DanM
A: 

Personally I think a TreeView control would give you a much better base to work from, especially if you're using Expression Blend as a basis to create new/blank Templates from for items. Seeing the default Templates is extremely enlightening and gives you much more fine-grained control and better understanding and insight into how things work by default. Then you can go to town on them. It also looks like you're working with Hierchical Data and TreeViews inherently lend themselves well to working with such data.

tpartee
Thanks for your answer, but my data actually isn't hierarchical, which is why I decided to just put some expanders in a stack panel (rather than use an `ItemsControl`). I do agree that you can learn a lot by looking at the default control template.
DanM