KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Sorry if this has been asked before, but I couldn't find a solution to what I'm looking for in the related questions that popped up, or on Google. In my application I'm trying to recreate Words New Document dialog, list on the left of items and on the right an icon with text underneath. In Word it has the orange gradient when you mouse over, and a darker gradient when you select an item. I've got most of this recreated, except for changing the background color once you select an item. Here's the code I'm using to create this: <ListView Margin="236,34,17,144" Name="listView1" HorizontalContentAlignment="Stretch"> <ListView.ItemsPanel> <ItemsPanelTemplate> <UniformGrid Columns="5" IsItemsHost="True" VerticalAlignment="Top" > </UniformGrid> </ItemsPanelTemplate> </ListView.ItemsPanel> <ListView.ItemTemplate> <DataTemplate > <StackPanel HorizontalAlignment="Center" Width="auto"> <Image Source="images/document32.png" HorizontalAlignment="Center"/> <TextBlock Text="{Binding}" HorizontalAlignment="Center" /> </StackPanel> </DataTemplate> </ListView.ItemTemplate> <ListView.ItemContainerStyle> <Style TargetType="{x:Type ListViewItem}" > <Style.Triggers> <Trigger Property="IsSelected" Value="true"> <Setter Property="Foreground" Value="Yellow" /> <Setter Property="Background" Value="Orange" /> </Trigger> <Trigger Property="IsMouseOver" Value="true"> <Setter Property="Foreground" Value="Black" /> <Setter Property
Tags (comma-separated)
Save Edits
Cancel