As the question says, i want to use an image of an open folder if the node is expanded, and a closed folder if the node is not expanded. I have a DataTemplate already, but can'tfigure out how to make a trigger for this that depends of the node's IsExpanded property. Here's my existing XAML, showing an icon but without any code for switching the image source:
<igDT:NodeLayout Key="ReportFolder" TargetTypeName="ReportFolder" DisplayMemberPath="FolderName" > <igDT:NodeLayout.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal" > <Image Source="/Resources/Icons/closed_folder.png" /> //this is where I need a trigger to select open_folder.png if IsExpanded <TextBlock Text="{Binding Data.FolderName}"/> </StackPanel> </DataTemplate> </igDT:NodeLayout.ItemTemplate> </igDT:NodeLayout>
Hello Travis,
Rather than defining a NodeLayout.ItemTemplate, I would recommend that you look into the ExpandedIconTemplate and CollapsedIconTemplate values of the XamDataTree. If you set these to a DataTemplate with an Image inside, they will change based on whether the node is expanded or collapsed.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewDeveloper Support Engineer IInfragistics Inc.www.infragistics.com/support