共用方式為


DrawingAttributes.IgnorePressure Property

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.

Definition

Visual Basic .NET Public Property IgnorePressure As Boolean
C# public bool IgnorePressure { get; set; }
Managed C++ public: __property bool* get_IgnorePressure();
public: __property void set_IgnorePressure(bool*);

Property Value

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

This property is read/write.

true Ink remains a fixed width, regardless of increased pressure of the pen tip on the tablet surface.
false Default. 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

[C#]

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();
    }
                

[VB.NET]

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
                  

See Also