Share via


DrawingAttributes.IgnorePressure Property

Gets or sets the value that indicates whether ink gets wider with increased pressure of the pen tip on the tablet surface.

Namespace:  Microsoft.Ink
Assembly:  Microsoft.Ink (in Microsoft.Ink.dll)

Syntax

'Declaration
Public Property IgnorePressure As Boolean
'Usage
Dim instance As DrawingAttributes 
Dim value As Boolean 

value = instance.IgnorePressure

instance.IgnorePressure = value
public bool IgnorePressure { get; set; }
public:
property bool IgnorePressure {
    bool get ();
    void set (bool value);
}
public function get IgnorePressure () : boolean 
public function set IgnorePressure (value : boolean)

Property Value

Type: System.Boolean
The value that indicates whether ink gets wider with increased pressure of the pen tip on the tablet surface.

Value

Meaning

true

Ink remains a fixed width, regardless of increased pressure of the pen tip on the tablet surface.

false

Ink gets wider with increased pressure of the pen tip on the tablet surface.

Remarks

The greater the pressure on the pen tip, the more ink that is drawn. Set this property to true if you do not want this effect to occur.

The actual width of the ink varies depending on the amount of pressure applied to the drawing surface. When maximum pressure is applied, the width is 150% of the value of the Width property. When minimum pressure is applied, the width is 50% of the value of the Width property.

Examples

This C# example shows an event handler for a menu item that toggles the IgnorePressure property on and off.

using Microsoft.Ink;
//...
    private System.Windows.Forms.MenuItem menuInkIgnorePressure;
    private InkCollector theInkCollector;
//...
    private void menuInkIgnorePressure_Click(
    object sender, System.EventArgs e)
    {
        menuInkIgnorePressure.Checked = ! menuInkIgnorePressure.Checked;
        theInkCollector.DefaultDrawingAttributes.IgnorePressure =
            menuInkIgnorePressure.Checked;
        Refresh();
    }

This Microsoft® Visual Basic® .NET example shows an event handler for a menu item that toggles the IgnorePressure property on and off.

Imports Microsoft.Ink
'...
    Dim MenuInkIgnorePressure As System.Windows.Forms.MenuItem
    Dim theInkCollector As InkCollector
'...
    Private Sub MenuInkIgnorePressure_Click( _
    ByVal sender As Object, ByVal e As System.EventArgs)
        MenuInkIgnorePressure.Checked = Not MenuInkIgnorePressure.Checked
        theInkCollector.DefaultDrawingAttributes.IgnorePressure = _
            MenuInkIgnorePressure.Checked
        Refresh()
    End Sub

Platforms

Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

DrawingAttributes Class

DrawingAttributes Members

Microsoft.Ink Namespace

DrawingAttributes.Width