Changing stroke color dynamically

Hi, I am using stylus input to draw lines in a canvas. I want to change the color of the stroke with the pen pressure. so I used:

DrawingAttributes dattribute = new DrawingAttributes();
inkcan.EditingMode = InkCanvasEditingMode.Ink;

if (stylusInput.pressureFactor < 0.5)
dattribute.Color = Colors.Red;
else
dattribute.Color = Colors.Blue;

dattribute.IgnorePressure = true;
inkcan.DefaultDrawingAttributes = dattribute;

but I have found that the color changes only when I lift off the pen from tablet. I am not sure how to fix that problem.

Any help would be greatly appreciated.