开发者

WPF: Changing the look of a Surface Listbox "click-effect"

I'm changing the look of some Controls that I use in my Microsoft Surface Application at the moment. And today I'm working on a SurfaceListBox.

I have the template for it and already changed background and borders and other stuff. But I really cannot find where I can change the color of the rectangle that appears on the ListBoxItem when you touch the ListBox. At the moment it's just white and I want to change that.

It's not something like the effect that you can see when the item is selected. I already found that and changed that so my selected item now appears in a different color. But the effect in the second when you touch the item stays white.

So where can I change开发者_开发问答 this effect?


If you mean the bright, white highlight that happens when you press your finger against an item you should look into the SurfaceShadowChrome. It's used by (almost) all surface controls to give feedback when the user is pressing on a control.

It does have a Color property that you can modify to suit your needs. Apart from the color, and the tweaking of corner radius and shadow offset, it's not a very flexible decorator. But hopefully, you'll be able to make it do what you need.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜