From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

WPF RangeCursor change postion and disable resize

Solved!
Go to solution

Hi,

 

In Previous Post we handled what we want but I have 2 problems.

 

First we want to disable RangeCursor's resizing and allow user only move it left or right.

 

Second Cursor in which stays range cursor have to move vertically up and down but not horizontally. We can  hold middle of the cursor and move it to horizontally.

 

What are your suggesstions?

 

RangeMarker1.pngRangeMarker2.png 

 

 

 

Best Regards,

Hakan.

0 Kudos
Message 1 of 5
(1,502 Views)

To only allow moving a range cursor, set the MouseInteractionAreas to Fill.

 

To completely hide the center target on a single-plot cursor, set the TargetShape to null and the TargetSize to zero.

 

In XAML:

<ni:RangeCursor MouseInteractionAreas="Fill" ... />

<ni:Cursor TargetShape="{x:Null}" TargetSize="0,0" ... />

 

 

(And sorry about missing your follow-up question in the earlier post; for some reason I never received a notification.)

~ Paul H
0 Kudos
Message 2 of 5
(1,471 Views)

Hi Paul,

 

Thank you for quick reply 🙂

 

Unfortunately, MouseInteractionArea enumarator is private and RangeCursor class does not have MouseInteractionAreas property. Do you have an another workaround about that problem?

 

Best Regards,

RangeCursorError.png

0 Kudos
Message 3 of 5
(1,465 Views)
Solution
Accepted by topic author yrnhkn

It looks like that property was added in Measurement Studio 2019.  Unfortunately, I do not know of a simple alternative available in earlier versions of Measurement Studio, short of re-implementing the render logic in RenderGraphCore.

~ Paul H
0 Kudos
Message 4 of 5
(1,458 Views)

Thank you Paul,

 

We will upgrade our version to MS2019.

 

Best Regards,

 

Hakan

0 Kudos
Message 5 of 5
(1,452 Views)