How can I create a material with a border?

Hi, I’m trying to make a material that outputs a visual effect that has a blue border. In GLSL I can do this by calculating a dot product between the direction to camera and the surface’s normal, if it is less than 0.2 I choose the border color. I tried to do this using UE4 Material editor, my attempt is attached:

My bad! =) It worked. Here it is the final setup:

How would I adapt this for a Material used for User Interface Widgets?