I'd like to create a global style that would affect every "GridSplitter" of my app to change its cursor appearance when mouse is over.
This code works for vertical GridSplitter:
<Style TargetType="GridSplitter">
<Setter Property="Cursor" Value="SizeWe"></Setter>
</Style>
But I don't know how to detect its orientation and set the Value to "SizeNs" when appropriate. I do not want to have to change every GridSplitter code. I want one style that could apply for every Gridsplitter without having to set a resource key.
Any idea ?
For all of those who have a XamlParseException : 'Provide value on 'System.Windows.Baml2006.TypeConverterMarkupExtension' threw an exception.' Line number '15' and line position '9'.
Ensure you have proper syntax for Cursor names.
You can use
ResizeDirection
property in control template triggers and set appropriate cursor.