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. ListView Grouping W/Expander Help

ListView Grouping W/Expander Help

Scheduled Pinned Locked Moved WPF
helpwpfwcf
3 Posts 2 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.
  • A Offline
    A Offline
    aaj23
    wrote on last edited by
    #1

    Hey guys, I read a couple of the articles on here as well as the MSDN Sample for this task however I seem to be stuck; was hoping you guys could help me. The following is my code, and although the items appear in the list perfectly, the ExpanderHeader appears with no text despite my text binding and I haven't the foggiest idea what I'm doing wrong. Any help would be greatly appreciated! <Setter Property="Margin" Value="0,0,0,5"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type GroupItem}"> <Expander IsExpanded="False" BorderBrush="SlateGray" BorderThickness="0,0,0,1"> <Expander.Background> <RadialGradientBrush> <RadialGradientBrush.RelativeTransform> <TransformGroup> <ScaleTransform ScaleX="1.702" ScaleY="2.243"/> <SkewTransform AngleX="0" AngleY="0"/> <RotateTransform Angle="0"/> <TranslateTransform X="-0.368" Y="-0.152"/> </TransformGroup> </RadialGradientBrush.RelativeTransform> <GradientStop Color=</x-turndown>

    I 1 Reply Last reply
    0
    • A aaj23

      Hey guys, I read a couple of the articles on here as well as the MSDN Sample for this task however I seem to be stuck; was hoping you guys could help me. The following is my code, and although the items appear in the list perfectly, the ExpanderHeader appears with no text despite my text binding and I haven't the foggiest idea what I'm doing wrong. Any help would be greatly appreciated! <Setter Property="Margin" Value="0,0,0,5"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type GroupItem}"> <Expander IsExpanded="False" BorderBrush="SlateGray" BorderThickness="0,0,0,1"> <Expander.Background> <RadialGradientBrush> <RadialGradientBrush.RelativeTransform> <TransformGroup> <ScaleTransform ScaleX="1.702" ScaleY="2.243"/> <SkewTransform AngleX="0" AngleY="0"/> <RotateTransform Angle="0"/> <TranslateTransform X="-0.368" Y="-0.152"/> </TransformGroup> </RadialGradientBrush.RelativeTransform> <GradientStop Color=</x-turndown>

      I Offline
      I Offline
      Insincere Dave
      wrote on last edited by
      #2

      Check the output window for any data binding errors. Install Mole and examine the DataContext of the Expander.Header, I often find it useful to add a keypress handler that calls Debugger.Break() when the pause key is pressed. Some tips on debugging bindings are here.

      A 1 Reply Last reply
      0
      • I Insincere Dave

        Check the output window for any data binding errors. Install Mole and examine the DataContext of the Expander.Header, I often find it useful to add a keypress handler that calls Debugger.Break() when the pause key is pressed. Some tips on debugging bindings are here.

        A Offline
        A Offline
        aaj23
        wrote on last edited by
        #3

        Thanks for the tips...it turned out that the grouping passes the grouped data as "Name" rather than it's actual path name so all I had to do was change my binding from "Vendor" to "Name" in the text binding...guess it's just one of those oddities of programming...lol. Thank you!

        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