DrawingAttributes Class
Specifies the appearance of a Stroke
Assembly: PresentationCore (in PresentationCore.dll)
| Name | Description | |
|---|---|---|
![]() | DrawingAttributes() | Initializes a new instance of the DrawingAttributes class. |
| Name | Description | |
|---|---|---|
![]() | Color | Gets or sets the color of a Stroke. |
![]() | FitToCurve | Gets or sets a value that indicates whether Bezier smoothing is used to render the Stroke. |
![]() | Height | Gets or sets the height of the stylus used to draw the Stroke. |
![]() | IgnorePressure | Gets or sets a value that indicates whether the thickness of a rendered Stroke changes according the amount of pressure applied. |
![]() | IsHighlighter | Gets or sets a value that indicates whether the Stroke looks like a highlighter. |
![]() | StylusTip | Gets or sets the shape of the stylus used to draw the Stroke. |
![]() | StylusTipTransform | Gets or sets the Matrix that specifies the transformation to perform on the stylus' tip. |
![]() | Width | Gets or sets the width of the stylus used to draw the Stroke. |
| Name | Description | |
|---|---|---|
![]() | AddPropertyData(Guid, Object^) | Adds a custom property to the DrawingAttributes object. |
![]() | Clone() | Copies the DrawingAttributes object. |
![]() | ContainsPropertyData(Guid) | Returns a value that indicates whether the specified property data identifier is in the DrawingAttributes object. |
![]() | Equals(Object^) | Determines whether the specified DrawingAttributes object is equal to the current DrawingAttributes object. (Overrides Object::Equals(Object^).) |
![]() | Finalize() | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.) |
![]() | GetHashCode() | Serves as a hash function for a particular type.(Overrides Object::GetHashCode().) |
![]() | GetPropertyData(Guid) | Gets the value of the custom property associated with the specified Guid. |
![]() | GetPropertyDataIds() | Returns the GUIDs of any custom properties associated with the StrokeCollection. |
![]() | GetType() | |
![]() | MemberwiseClone() | |
![]() | OnAttributeChanged(PropertyDataChangedEventArgs^) | Raises the AttributeChanged event. |
![]() | OnPropertyChanged(PropertyChangedEventArgs^) | This API supports the product infrastructure and is not intended to be used directly from your code. Occurs when any DrawingAttributes property changes. |
![]() | OnPropertyDataChanged(PropertyDataChangedEventArgs^) | Raises the PropertyDataChanged event. |
![]() | RemovePropertyData(Guid) | Removes the custom property associated with the specified Guid. |
![]() | ToString() | Returns a string that represents the current object.(Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() | AttributeChanged | Occurs when a property in the DrawingAttributes object changes. |
![]() | PropertyDataChanged | Occurs when property data is added or removed from the StrokeCollection. |
| Name | Description | |
|---|---|---|
![]() ![]() | Equality(DrawingAttributes^, DrawingAttributes^) | Determines whether the specified DrawingAttributes objects are equal. |
![]() ![]() | Inequality(DrawingAttributes^, DrawingAttributes^) | Determines whether the specified DrawingAttributes objects are not equal. |
| Name | Description | |
|---|---|---|
![]() ![]() | INotifyPropertyChanged::PropertyChanged | This API supports the product infrastructure and is not intended to be used directly from your code. Occurs when the value of any DrawingAttributes property has changed. |
Use the DrawingAttributes property to specify settings such as color, width, transparency, and the shape of the stylus tip for a Stroke.
Use the DefaultDrawingAttributes property to specify the drawing attributes for the strokes added to an InkCanvas. Only strokes that are added after the DefaultDrawingAttributes undergo change show the updated attributes. The appearance of the strokes that are already on the InkCanvas does not change.
For a list of initial property values for an instance of the DrawingAttributes class, see the DrawingAttributes constructor.
This class is not typically used in XAML.
The following example demonstrates how to use two DrawingAttributes objects to simulate using a pen and a highlighter on the same InkCanvas. The example assumes the root element in the XAML file is a DockPanel called root. It also assumes that there is a Button called switchHighlighter and that the Click event is connected to the event handler defined in this example.
Available since 3.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.








