WPF设置ListBoxItem失去焦点时的背景色

    <!--全局ListBoxItem-->
    <Style TargetType="ListBoxItem">
        <Style.Resources>
            <!--SelectedItem with focus-->
            <!--<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="AliceBlue"/>-->
            <!--SelectedItem without focus-->
            <SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="LightBlue" />
        </Style.Resources>
    </Style>

 

posted @ 2015-09-02 14:12  三台  阅读(951)  评论(0编辑  收藏  举报