Click here to Skip to main content
16,012,223 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

in .NET 4.0 the selected item change only the height, not the background.
In .NET 3.0 it's work... how this work in 4.0 too?

HTML
<Style x:Key="GlowContainer" TargetType="{x:Type ListBoxItem}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ListBoxItem}">
                        <Border removed="WhiteSmoke"
                                    CornerRadius="5"
                                    BorderThickness="2"
                                    x:Name="ItemBorder"
                                    Margin="6,3,6,3" >
                            <ContentPresenter />
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsSelected" Value="true">
                                <Setter Property="Height" Value="100" />
                                <Setter TargetName="ItemBorder" 
                                            Property="Background" Value="Green" />
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
Posted
Updated 16-Oct-12 22:18pm
v2
Comments
haindl 17-Oct-12 4:04am    
Did you maybe just forget the equals sign in Value="Green"?
boehsermoe 17-Oct-12 4:20am    
I forget it but this isnt myproblem...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900