ArcSegment Class

July 28, 2014

Represents an elliptical arc between two points.

Namespace:  System.Windows.Media
Assembly:  System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.

public sealed class ArcSegment : PathSegment
<ArcSegment .../>

The ArcSegment type exposes the following members.

Public methodArcSegmentInitializes a new instance of the ArcSegment class.

Public propertyDispatcherGets the Dispatcher this object is associated with. (Inherited from DependencyObject.)
Public propertyIsLargeArcGets or sets a value that indicates whether the arc should be greater than 180 degrees.
Public propertyPointGets or sets the endpoint of the elliptical arc.
Public propertyRotationAngleGets or sets the amount (in degrees) by which the ellipse is rotated about the x-axis.
Public propertySizeGets or sets the x- and y-radius of the arc as a Size structure.
Public propertySweepDirectionGets or sets a value that specifies whether the arc is drawn in the Clockwise or Counterclockwise direction.

Public methodCheckAccessDetermines whether the calling thread has access to this object. (Inherited from DependencyObject.)
Public methodClearValueClears the local value of a dependency property. (Inherited from DependencyObject.)
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetAnimationBaseValueReturns any base value established for a Windows Phone dependency property, which would apply in cases where an animation is not active. (Inherited from DependencyObject.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodGetValueReturns the current effective value of a dependency property from a DependencyObject. (Inherited from DependencyObject.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodReadLocalValueReturns the local value of a dependency property, if a local value is set. (Inherited from DependencyObject.)
Public methodSetValueSets the local value of a dependency property on a DependencyObject. (Inherited from DependencyObject.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)

Public fieldStatic memberIsLargeArcPropertyIdentifies the IsLargeArc dependency property.
Public fieldStatic memberPointPropertyIdentifies the Point dependency property.
Public fieldStatic memberRotationAnglePropertyIdentifies the RotationAngle dependency property.
Public fieldStatic memberSizePropertyIdentifies the Size dependency property.
Public fieldStatic memberSweepDirectionPropertyIdentifies the SweepDirection dependency property.

Use a PathFigure object to store ArcSegment objects and other segments.

An elliptical arc is defined by its start and end points, x- and y-radius, x-axis rotation factor, a value indicating whether the arc should be greater than 180 degrees, and a value describing the direction in which the arc is drawn. The ArcSegment class does not contain a property for the starting point of the arc; it only defines the destination point of the arc it represents. The beginning point of the arc is the current point of the PathFigure to which the ArcSegment is added.

The following illustrations demonstrate the different end point, Size, and RotationAngle settings.

ArcSegments with different Point settingsArcSegments with different Size settingsArcSegments with different RotationAngle settings

IsLargeArc and SweepDirection

For most arcs of a particular position, size, and rotation, there are four different arcs that can be drawn; the IsLargeArc and SweepDirection properties indicate which arc to use.

Of the four candidate arc sweeps, two represent large arcs with sweeps of 180 degrees or greater, and two represent smaller arcs with sweeps 180 degrees or less. If IsLargeArc is true, then one of the two larger arc sweeps is chosen; otherwise, if IsLargeArc is false, one of the smaller arc sweeps is chosen. The remaining two arc candidates are each drawn in a different direction: Counterclockwise or Clockwise. The SweepDirection property specifies which one to use.

The following illustrations show different IsLargeArc and SweepDirection settings.

ArcSegment objects with different IsLargeArc settings

ArcSegments with different IsLargeArc settings
ArcSegment objects with different SweepDirection settings

ArcSegments with different SweepDirection settings

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

© 2014 Microsoft