Using Styles in Windows Presentation Foundation?

What you're trying to do is fundamentally flawed. For starters, your style's setter doesn't specify a target property. Presumably, the target property should be Background : Style x:Key="CompletedBackground" TargetType="ListViewItem.

What you're trying to do is fundamentally flawed. For starters, your style's setter doesn't specify a target property. Presumably, the target property should be Background: Secondly, you're then trying to assign a Style instance to the Background property, which is of type Brush, not Style.

Depending on exactly what you're trying to achieve, you should be able to just change the Style to a Brush resource: Then use it from your trigger in the same fashion you already are.

Fast answer Kent :). I can't do it faster than you :)). Also I think Filip is referencing style, which is defined inside control template's logical tree.

Probably worth mention to define it inside ... Not in the grid. Cheers. – Anvaka Sep 28 '09 at 12:22 I want it to be globally accessable by all my ListViews, so not only in that controltemplate.

Thanks – Filip Ekberg Sep 28 '09 at 12:28.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions