2

I'm using the WPF InkCanvas for a drawing application. The canvas is over a image. I can scribble over the image OK but I need it to have a glow effect - i.e. the actual lines drawn must have this effect. Is there a way to do this in XAML or in the C# code?

Jeff B
  • 8,572
  • 17
  • 61
  • 140
CodeDog57
  • 21
  • 1

1 Answers1

1

You want to use a ShaderEffect and attach it to the UIElement.Effect of the InkCanvas. This MSDN article contains a sample that shows how to write ShaderEffects.

Try starting with the excellent set of ShaderEffects implemented in the Windows Presentation Foundation Pixel Shader Effects Library.

Ani
  • 10,826
  • 3
  • 27
  • 46
  • Thanks, I will look into implementing a ShaderEffect. BTW, is there a canned ShaderEffect that will do this? If not I can look into implementing one. – CodeDog57 May 01 '15 at 23:16
  • The library I linked to has some canned effects you can use to get started. – Ani May 02 '15 at 17:54
  • Thanks, I think it will be a good starting point, I'll look into trying it. – CodeDog57 May 03 '15 at 18:38