Customizing the PropertyGrid resize cursors

Grids for WPF Forum

Posted 8 years ago by IneedHelp
Version: 16.1.0632
Avatar

Is there a way of customizing the PropertyGrid's horizontal and vertical resize cursors?

I would like to use custom animated cursors, but I can't find a way to set them for the PropertyGrid control.

Comments (1)

Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

If you clone this Style, add a Setter for Cursor, and set it to PropertyGrid.SplitterStyle, you can probably modify the one splitter:

<Style TargetType="{x:Type propgridPrimitives:TreeListViewSplitter}">
	<Setter Property="Background"
			Value="{DynamicResource {x:Static themes:AssetResourceKeys.ContainerMediumEndBackgroundNormalBrushKey}}" />
</Style>

The other one would need this Style cloned and put in your Application.Resources with the Setter for Cursor updated:

<Style x:Key="{x:Static propgridThemes:PropertyGridResourceKeys.SummarySplitterThumbStyleKey}" TargetType="{x:Type Thumb}">
	<Setter Property="Cursor" Value="SizeNS" />

	<Setter Property="MinHeight" Value="3" />
	<Setter Property="HorizontalAlignment" Value="Stretch" />
	<Setter Property="VerticalAlignment" Value="Stretch" />

	<Setter Property="SnapsToDevicePixels" Value="True" />

	<Setter Property="Template">
		<Setter.Value>
			<ControlTemplate TargetType="{x:Type Thumb}">
				<Border Background="{TemplateBinding Background}" SnapsToDevicePixels="True" />
			</ControlTemplate>
		</Setter.Value>
	</Setter>
</Style>


Actipro Software Support

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.