How to set DrawingAttributes of InkCanvas?

DefaultDrawingAttributes property that is a type of DrawingAttributes class represents the drawing attributes of the stroke that is used to draw the ink.

The Color property represents the color of a stroke. The Width and Height properties represent the width and height of the stylus. The StylusTip property represents the shape of the stylus used to draw the Stroke. The FitToCurve property represents a value that indicates whether Bezier smoothing is used to render the Stroke. IgnorePressure property represents a value that indicates whether the thickness of a rendered Stroke changes according the amount of pressure applied. IsHighligher property represents if the stroke looks like a highlighter.

MCInkCanvas is InkCanvas object below.

private void SetDrawingAttributesOfInkCanvas()

{

    // Create a DrawingAttributes

    DrawingAttributes inkDA = new DrawingAttributes();

    inkDA.Color = Colors.DeepPink;

    inkDA.Height = 4;

    inkDA.Width = 4;

    inkDA.FitToCurve = false;

    inkDA.StylusTip = StylusTip.Ellipse;

    // Set DefaultDrawingAttributes of InkCanvas to this new DrawingAttributes

    MCInkCanvas.DefaultDrawingAttributes = inkDA;

}