Defines a closed annotation curve object.
Object Model
Syntax
XAML Object Element Usage | |
---|
<AnnClosedCurveObject .../> |
XAML Object Element Usage | |
---|
<AnnClosedCurveObject .../> |
Example
This example creates a new closed curve object with 4 points.
Visual Basic | Copy Code |
---|
Private Sub AnnClosedCurveObject_AnnClosedCurveObject(ByVal container As AnnContainer)
Dim closedCurve As AnnClosedCurveObject = New AnnClosedCurveObject()
closedCurve.Points.Add(New System.Windows.Point(100, 100))
closedCurve.Points.Add(New System.Windows.Point(200, 100))
closedCurve.Points.Add(New System.Windows.Point(200, 200))
closedCurve.Points.Add(New System.Windows.Point(100, 300))
closedCurve.Tension = 1
closedCurve.Stroke = Brushes.Red
closedCurve.StrokeThickness = 2.0
closedCurve.Fill = Brushes.White
closedCurve.FillRule = FillRule.EvenOdd
closedCurve.IsClosed = True
container.Children.Add(closedCurve)
End Sub |
C# | Copy Code |
---|
private void AnnClosedCurveObject_AnnClosedCurveObject(AnnContainer container) { AnnClosedCurveObject closedCurve = new AnnClosedCurveObject(); closedCurve.Points.Add(new Point(100, 100)); closedCurve.Points.Add(new Point(200, 100)); closedCurve.Points.Add(new Point(200, 200)); closedCurve.Points.Add(new Point(100, 300)); closedCurve.Tension = 1; closedCurve.Stroke = Brushes.Red; closedCurve.StrokeThickness = 2.0; closedCurve.Fill = Brushes.White; closedCurve.FillRule = FillRule.EvenOdd; closedCurve.IsClosed = true; container.Children.Add(closedCurve); } |
XAML | Copy Code |
---|
<Window x:Class="WPFSamples.AnnClosedCurveObject" Title="Leadtools.Windows.Annotations" Height="600" Width="800" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Leadtools_Windows_Annotations="clr-namespace:Leadtools.Windows.Annotations;assembly=Leadtools.Windows.Annotations"> <Leadtools_Windows_Annotations:AnnClosedCurveObject Stroke="Blue" StrokeThickness="3.0" FillRule="EvenOdd" IsClosed="True" Tension="1.0" Points="100,100 175, 125, 25,150 175,175 100,200" Header="Closed Curve Object"> <Leadtools_Windows_Annotations:AnnClosedCurveObject.Fill> <LinearGradientBrush> <GradientStop Offset="0.0" Color="Black" /> <GradientStop Offset="0.5" Color="Red" /> <GradientStop Offset="1.0" Color="Yellow" /> </LinearGradientBrush> </Leadtools_Windows_Annotations:AnnClosedCurveObject.Fill> </Leadtools_Windows_Annotations:AnnClosedCurveObject> </Window> |
Remarks
Inheritance Hierarchy
Requirements
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Vista, and Windows Server 2003 family
See Also