List box:
The problem is as follows; when the user selects an item in the list box, I want to display other information by setting the visibility of the stackpanel to visible.
Any idea how To achieve this (via xaml or c#)? I tried to change the storyboard, but I did not adopt this method.
< p>
Storyboard.TargetName="ContentContainer" >
Storyboard.TargetName ="Details">
...
x:Name="ContentContainer"
ContentTemplate="{TemplateBinding ContentTemplate}"
Content="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}"
HorizontalContentAlignment= "{TemplateBinding HorizontalContentAlignment}"
Margin="{TemplateBinding Padding}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
I have one List box, which defines the following data templates:
< br />
List Box:
The problem is as follows; when the user selects an item in the list box, I want to display other information by setting the visibility of the stackpanel to visible.
Any The idea is how to achieve this (via xaml or c#)? I tried to change the storyboard, but I did not adopt this method.
Create an ItemContainerStyle, which has a default ContentControl to display the contents of the ItemTemplate, but also has Use the Visibility setting to set the detailed information content defined by Collapsed. Then, update the “Selected” VisualState to set the Visibility of the details panel to Visible:
Storyboard.TargetName="ContentContainer">
Storyboard.TargetName="Details">
...< br /> x:Name="ContentContainer"
ContentTemplate="{TemplateBinding ContentTemplate}"
Content="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
Margin="{ TemplateBinding Padding}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>