开发者

wpf listview changing selected item display behavior

I want to change the display behavior of the selected item(s) in a WPF Listview. Specifically, I want to retain the custom textblock foreground colors that I've applied and apply a border around the item.

I am able to alter SystemColors.HighlightBrushKey and ControlBrushKey to change the background color of the selected item, but I don't know how to get it to stop changing the fon开发者_如何转开发t color or use a border instead. I've tried manipulating the control template and have also searched Google for examples of how to do this, without success.


yeah, looks like you have to go through the pain of using ControlTemplates.

Good news is that via using Expression Blend, you can get current ControlTemplate for ListView and tweak the bit that you need and use that as your default ControlTemplate.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜