Hallo,
I have a rollovermodifier wich only moves when i press the leftmousebutton down. This means that the rollover always stays at one place unless i press a mouse button. However as soon as the mouse leaves the chartarea the rollovermodifier disapears. Is there a way to avoid this behaivour? I would like the rollover to always stay visible.
I would also like to add a second rollovermodifier and have it move only when i click on the rollover. But after one whole day of trying i keep getting the error:
“Specified Visual is already a child of another Visual or the root of a CompositionTarget.”
In this methods line:
public override void OnModifierMouseMove(ModifierMouseArgs e) { if(d) base.OnModifierMouseMove(e); }
- bochelie asked 9 years ago
- You must login to post comments
UPDATE
As it happens we’ve coded in to SciChart v3.1 a property to show tooltips on different actions:
////// Gets or sets when to show tooltips /// public ShowTooltipOptions ShowTooltipOn { get { return (ShowTooltipOptions)GetValue(ShowTooltipOnProperty); } set { SetValue(ShowTooltipOnProperty, value); } }
Where ShowTooltipOn will be defined as
////// Specifies actions that cause roolover tooltip to be shown /// public enum ShowTooltipOptions { ////// Show tooltip when mouse is over point /// MouseOver, ////// Show tooltip when mouse hovers over the surface /// MouseHover, ////// Show tooltip always /// Always, ////// Show tooltip when mouse left button is pressed /// MouseLeftButtonDown, ////// Show tooltip when mouse right button is pressed /// MouseRightButtonDown, ////// Show tooltip when mouse middle button is pressed /// MouseMiddleButtonDown }
This will be available shortly as part of SciChart v3.1.
- Andrew Burnett-Thompson answered 9 years ago
- You must login to post comments
Hi Bochelie,
Hm…I think this behavior can be overridden. Please, try creating a new modifier and inherit it from the existing one, and override the OnParentSurfaceMouseLeave() method there(leave it empty).
Regarding adding one more rollover, could you explain expected behavior a bit? What do you want to achieve? Isn’t having two VerticalLineAnnotations better suited for your purposes?
This exception you experience happens because of rollover marker caching, it’s WPF restriction that FrameworkElements can have the only parent.
Best regards,
Yuriy
- Yuriy Zadereckiy answered 9 years ago
- Yuriy, Yes i am also trying with the Horizontal en verticalLineAnnotations. However i am also interested in the exact Data values. With the Horizontal/VerticalLineAnnotations i get YAxis values and not the exact Series Data values. Regarding the OnParentSurfaceMouseLeave event, that was a good idea. It does the trick.
- We've had similar request earlier, and some users managed to achieve such a behavior using VerticalLineAnnotations. Please, take a look at this thread and also this thread(however the last one isn't much helpful).
- You must login to post comments
Please login first to submit.