Antialiasing primitives with MonoGame

I’m drawing simple lines with DrawUserPrimitives but they are sharp.
I was trying to set:

graphics.PreferMultiSampling = true;

But rendered image is the same. I’m developing to WP8.
How i can make my primitives smoother?

What you are looking for is anti-aliasing/Multi-sampling.

DX on WP8 (and on win8 Metro) don’t support hardware AA on the backbuffer (that’s when you SetRenderTarget=null).
Theoretically it’s possible to enable multisampling on a rendertarget -I’m not sure if this is currently implemented for the WP8 platform-, draw your scene there, and then draw it back to the backbuffer. That last full copy alone will result to a drop of about ~10fps (from 60fps) on WP8 devices.

A shader based AA would also require a full copy of rendertarget. A month ago I tested my shader-based AA from a Win8/Metro game (Dr Pickaxe) to my next WP8 game. I had a frame drop of about ~20-15fps (from 60fps). Because mobile devices are still feature level 9.3 only the weak version of FXAA (CONSOLE mode, originally designed for xBox360) could run on the phone, which doesn’t give any good results. Not much of an improvement.

Other options:
Render to a higher resolution rendertarget. Or just render to a rendertarget and draw it back with a halfpixel offset, let blending blur things for you.
Extract the silhouette of your objects and do some FX or some trick with the stencil buffer. I don’t know much on the subject but I believe Ili Milo was doing something like that on early WP7.

In the future we will see an increase to dpi which makes AA unnecessary and a jump to feature level 11 hardware on mobile which would enable good FXAA or other shader based AA.

DX12 might enable full access to hardware AA but I wouldn’t count on that. I believe hardware AA is slowly phased out.