Mega Code Archive

 
Categories / Silverlight / Shapes
 

Single Bezier

<UserControl x:Class='SilverlightApplication3.MainPage'     xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'      xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'     xmlns:d='http://schemas.microsoft.com/expression/blend/2008'      xmlns:mc='http://schemas.openxmlformats.org/markup-compatibility/2006'      mc:Ignorable='d'      d:DesignWidth='640'      d:DesignHeight='480'>     <Path Fill="Red" Stroke="Blue" StrokeThickness="3">         <Path.Data>             <GeometryGroup>                 <PathGeometry>                     <PathFigure x:Name="fig"                                  StartPoint="50 150" IsFilled="False" >                         <BezierSegment                              Point1="25 25" Point2="400 300" Point3="450 150" />                     </PathFigure>                 </PathGeometry>                      <EllipseGeometry Center="{Binding ElementName=fig,                                                    Path=StartPoint}"                                   RadiusX="5" RadiusY="5" />                 <EllipseGeometry Center="{Binding ElementName=fig,                                                    Path=Segments[0].Point1}"                                   RadiusX="5" RadiusY="5" />                 <EllipseGeometry Center="{Binding ElementName=fig,                                                    Path=Segments[0].Point2}"                                   RadiusX="5" RadiusY="5" />                 <EllipseGeometry Center="{Binding ElementName=fig,                                                    Path=Segments[0].Point3}"                                   RadiusX="5" RadiusY="5" />             </GeometryGroup>         </Path.Data>     </Path> </UserControl>