#826 – Lower-Level Elements Can Have Different Cursor
May 23, 2013 1 Comment
A Cursor set on a top-level FrameworkElement will also be used on all elements within the parent element’s logical tree. All lower-level elements will show the same cursor when the user hovers over the element.
You can, however, set a Cursor on a top-level element and then set a different value for Cursor on the lower-level element. The top-level Cursor will be used for all descendants of the top-level element except for the one that explicitly sets a different cursor.
<StackPanel Cursor="Hand"> <Label Content="Ad eundum quo nemo ante iit" Margin="5" Background="LightCoral"/> <Label Content="Noli habere bovis, vir" Margin="5" Background="DarkSeaGreen"/> <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> <Button Content="Veni, Vidi" Padding="10,5" Margin="10"/> <Button Content="Dormivi" Cursor="Wait" Padding="10,5" Margin="10"/> </StackPanel> </StackPanel>