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: 

Using WPF Effects on Graphs

Solved!
Go to solution

Is there anyway to add effects to a particular graph/plot graph drawn? It doesn't look like the standard graph plot inherits any effects class properties. I see you can modify the stroke color and thickness but no support for effects.

 

Basically what I'm trying to achieve is add effects to a plot to make it look more "realistic" (take advantage of some of the hardware acceleration that WPF offers).

I'm trying to recreate an oscilloscope with animated controls and use reflections and blur effects to make the signal "glow" almost making it more aesthetically pleasing.

 

Any help on this would be great.

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

Since the built-in renderers can draw to multiple render targets, the renderers do not expose many WPF vector-specific effect options.


Instead, you can use a custom renderer to generate WPF visuals with arbitrary combinations of settings and effects, like the attached blurred line example.

~ Paul H
Message 2 of 3
(5,372 Views)

Hey Paul,

 

Thanks for your response. That is actually EXACTLY what I needed. Works just fine and I can modify the polyline as needed.

 

Just a note, I had to make a few changes to get the example you attached to work like change the render mode to Vector. I think when it's set for auto, it'll chooses Raster for a simple line plot (which throws an exception).

0 Kudos
Message 3 of 3
(5,337 Views)