Partager via


InkOverlay.DefaultDrawingAttributes, propriété

Mise à jour : November 2007

Obtient ou définit l'objet DrawingAttributes par défaut, qui spécifie les attributs de dessin utilisés lors du tracé et de l'affichage de l'entrée manuscrite.

Espace de noms :  Microsoft.Ink
Assembly :  Microsoft.Ink (dans Microsoft.Ink.dll)

Syntaxe

'Déclaration
<BrowsableAttribute(False)> _
Public Property DefaultDrawingAttributes As DrawingAttributes
'Utilisation
Dim instance As InkOverlay
Dim value As DrawingAttributes

value = instance.DefaultDrawingAttributes

instance.DefaultDrawingAttributes = value
[BrowsableAttribute(false)]
public DrawingAttributes DefaultDrawingAttributes { get; set; }
[BrowsableAttribute(false)]
public:
property DrawingAttributes^ DefaultDrawingAttributes {
    DrawingAttributes^ get ();
    void set (DrawingAttributes^ value);
}
/** @property */
/** @attribute BrowsableAttribute(false) */
public DrawingAttributes get_DefaultDrawingAttributes()
/** @property */
/** @attribute BrowsableAttribute(false) */
public  void set_DefaultDrawingAttributes(DrawingAttributes value)
public function get DefaultDrawingAttributes () : DrawingAttributes
public function set DefaultDrawingAttributes (value : DrawingAttributes)

Valeur de propriété

Type : Microsoft.Ink.DrawingAttributes
Objet DrawingAttributes par défaut qui spécifie les attributs de dessin utilisés lors du tracé et de l'affichage de l'entrée manuscrite.

Notes

Les attributs de dessin DrawingAttributes spécifiés avec cette propriété sont les attributs affectés à un nouveau curseur.

Les attributs de dessin par défaut sont les suivants :

Propriété DrawingAttributes

Description

AntiAliased

true

Color

Black

FitToCurve

false

Height

1 (en unités d'espace d'entrée manuscrite)

IgnorePressure

false

PenTip

Ball

RasterOperation

CopyPen

Transparency

0 (totalement opaque)

Width

53 (en unités d'espace d'entrée manuscrite)

Pour définir des attributs différents sur un nouveau curseur, utilisez la propriété DrawingAttributes de l'objet Cursor.

Pour modifier les attributs de dessin d'un trait unique, utilisez la propriété DrawingAttributes de l'objet Stroke. Pour modifier les attributs de dessin d'une collection de traits, appelez la méthode ModifyDrawingAttributes de la collection Strokes.

ms582164.alert_note(fr-fr,VS.90).gifRemarque :

La propriété DefaultDrawingAttributes contient les attributs de dessin que tous les curseurs utilisent à moins qu'ils aient défini leur propre propriété DrawingAttributes. Par exemple, un nouvel objet Cursor utilise DefaultDrawingAttributes et un ancien objet Cursor pour lequel DefaultDrawingAttributes a la valeur nullune référence null (Nothing en Visual Basic) utilise également DefaultDrawingAttributes.

Exemples

Cet exemple C# définit certains attributs de dessin par défaut d'un InkOverlay.

using Microsoft.Ink;
//. . .
InkOverlay theInkOverlay = new InkOverlay();

// Set the initial Width attribute to thin
theInkOverlay.DefaultDrawingAttributes.Width = 30;

// Set the initial Color attribute to Black
theInkOverlay.DefaultDrawingAttributes.Color = Color.Black;

// Set the initial RasterOperation attribute to CopyPen
theInkOverlay.DefaultDrawingAttributes.RasterOperation = RasterOperation.CopyPen;

// Set the initial Transparency attribute to opaque (0)
theInkOverlay.DefaultDrawingAttributes.Transparency = 0;

// Set the initial AntiAliased attribute to true
theInkOverlay.DefaultDrawingAttributes.AntiAliased = true;

Cet exemple Microsoft Visual Basic .NET définit certains attributs de dessin par défaut d'un InkOverlay.

Imports Microsoft.Ink
'. . .
Dim theInkOverlay As New InkOverlay()

'Set the initial Width attribute to thin
theInkOverlay.DefaultDrawingAttributes.Width = 30

'Set the initial Color attribute to Black
theInkOverlay.DefaultDrawingAttributes.Color = Color.Black

'Set the initial RasterOperation attribute to CopyPen
theInkOverlay.DefaultDrawingAttributes.RasterOperation = RasterOperation.CopyPen

'Set the initial Transparency attribute to opaque (0)
theInkOverlay.DefaultDrawingAttributes.Transparency = 0

'Set the initial AntiAliased attribute to true
theInkOverlay.DefaultDrawingAttributes.AntiAliased = True

Plateformes

Windows Vista

Le .NET Framework et le .NET Compact Framework ne prennent pas en charge toutes les versions de chaque plateforme. Pour obtenir la liste des versions prises en charge, consultez Configuration requise du .NET Framework.

Informations de version

.NET Framework

Pris en charge dans : 3.0

Voir aussi

Référence

InkOverlay, classe

Membres InkOverlay

Microsoft.Ink, espace de noms

DrawingAttributes

Cursor.DrawingAttributes

Stroke.DrawingAttributes

Strokes.ModifyDrawingAttributes