When I write something like this:
<Style x:Key="panelS">
<Setter Property="Orientation" Value="Horizontal" />
<Setter Property="DockPanel.Dock" Value="Top" />
</Style>
I get an error: Unable to resolve orientation to Orientation style. Verify that the owner type is a Style TargetType type or uses the Class.Property syntax to specify a property.
Of course I have a Dock with a lot of Stackpanels, so I want to move the Stackpanel properties into a style. But there is this error, and I don’t quite understand what it means and what the workaround is (.. I would like not to assign an Orientation for each Stackpanel).
source
share