-1

I am trying to override the default windows cursor when a user resizes my application window. I'm successful in changing the cursor inside the app, but I don't know where to start on the sizing cursors.

My first reaction was to try to change it when the window is actually being resized, but this would be after windows has shown the default cursor right?

So in short is there a way to detect the mouse over the sizing border before windows changes cursors?

Or can I override the windows default for this? There isn't a sizing border cursor property that I am overlooking right?

Thank You, George

Edit:

I have tried various ways of using <ResizeGrip Cursor=""/> but to no avail. I don't understand how to use it properly apparently. If I put it inside of the <Grid> area it just has that cursor all the time, and still the default one when resizing.

I'm sure this is something small that I'm not grasping and I would appreciate any feedback.

Edit:

To the person who down voted and said this is answered elsewhere: That link is for C++ related function not C#. Maybe that is the answer but I do not quite understand how to translate it to C# or for that matter WPF since it seems to stem from winforms.

Phexyaa
  • 19
  • 4

1 Answers1

0

The resize grip should probably be aligned to the border of the grip. Something like this:

<Grid>
<Grid.ColumnDefinitions>
  <ColumnDefinition Width="*"/>
  <ColumnDefinition Width="2"/>
  <ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Border Background="Green"/>
<ResizeGrip Grid.Column="1" Background="Blue" Cursor="SizeWE"/>
<Border Background="Red" Grid.Column="2"/>
</Grid>
sondergard
  • 3,184
  • 1
  • 16
  • 25
  • Thanks for the explanation it does help me understand the concept, however I want to change the window resize cursor not the grid resize cursor. – Phexyaa Apr 21 '17 at 06:11