Partager via


InkPicture.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 InkPicture
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 spécifiés avec cette propriété sont les attributs assignés à un nouveau curseur.

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

Propriété

Description

AntiAliased

true

Color

Black

FitToCurve

false

Height

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

IgnorePressure

false

PenTip

PenTip

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.

ms582185.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 quelques-uns des attributs de dessin par défaut d'un contrôle InkPicture.

[C#]

using Microsoft.Ink;
//. . .
InkPicture theInkPicture = new InkPicture();

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

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

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

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

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

Cet exemple Microsoft® Visual Basic® .NET définit quelques-uns des attributs de dessin par défaut d'un contrôle InkPicture.

[Visual Basic]

Imports Microsoft.Ink
'. . .
Dim theInkCollector As New InkCollector()

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

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

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

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

'Set the initial AntiAliased attribute to true
theInkCollector.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

InkPicture, classe

Membres InkPicture

Microsoft.Ink, espace de noms

DrawingAttributes

Cursor.DrawingAttributes

Stroke.DrawingAttributes

Strokes.ModifyDrawingAttributes