Why cant I add Orientation property to the Style Setter in WPF?

Your Style isn't associated with the StackPanel type Therefore, WPF doesn't know about the Orientation property. (Because that property is defined by StackPanel ) You can explicitly tell WPF which class defines the property by changing it to StackPanel. Orientation Alternatively, you can associate the Style with the StackPanel type by adding a TargetType="StackPanel to the Style element.

Your Style isn't associated with the StackPanel type. Therefore, WPF doesn't know about the Orientation property. (Because that property is defined by StackPanel) You can explicitly tell WPF which class defines the property by changing it to StackPanel.Orientation.

Alternatively, you can associate the Style with the StackPanel type by adding a TargetType="StackPanel" to the element.

Try adding a TargetType to the style, so that it knows you are talking about StackPanels. This version should work.

OOps, forgot about it! Thank you! – 0x49D1 May 27 '10 at 13:58.

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