KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I've been struggling with this code for some time now and can't seem to find any complete answers to my question. I've created a small sample to illustrate the problem: <ListView > <ListView.ItemsPanel> <ItemsPanelTemplate> <StackPanel Margin="0,0,20,0" IsItemsHost="True" /> </ItemsPanelTemplate> </ListView.ItemsPanel> <ListView.Items> <TextBlock>Test1</TextBlock> <TextBlock>Test2</TextBlock> <TextBlock>Test3</TextBlock> <TextBlock>Test4</TextBlock> <TextBlock>Test5</TextBlock> </ListView.Items> <ListView.ItemContainerStyle> <Style TargetType="{x:Type ListViewItem}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ListViewItem}"> <Grid> <ContentPresenter/> </Grid> <ControlTemplate.Triggers> <MultiTrigger> <MultiTrigger.Conditions> <Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}" Value="True" /> <Condition Property="IsSelected" Value="True"/> </MultiTrigger.Conditions> <Setter Property="Visibility" Value="Collapsed"/> </MultiTrigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> </ListView.ItemContainerStyle> </ListView> According to the MultiTrigger settings, the selected item should reappear when the mouse is no
Tags (comma-separated)
Save Edits
Cancel