Cubic Bezier, Smooth Bezier, Quadratic Bezier, Smooth Quadratic : Curve « Windows Presentation Foundation « C# / C Sharp






Cubic Bezier, Smooth Bezier, Quadratic Bezier, Smooth Quadratic

Cubic Bezier, Smooth Bezier, Quadratic Bezier, Smooth Quadratic
     

<Window x:Class="Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="BezierCurves" Height="200" Width="500">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="0.25*" />
            <ColumnDefinition Width="0.25*" />
            <ColumnDefinition Width="0.25*" />
            <ColumnDefinition Width="0.25*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="50" />
            <RowDefinition Height="1.0*" />
        </Grid.RowDefinitions>

        <Path Stroke="Gray" StrokeThickness="5" Data="M 210,20 L 80,20 30,100 80,810" Grid.Column="0" Grid.Row="1" />
        <Path Stroke="Black" StrokeThickness="1" Data="M 210,20 C 80,20 30,100 80,810" Grid.Column="0" Grid.Row="1" />

        <Path Stroke="Gray" StrokeThickness="5" Grid.Column="1" Data="M 210,20 L 80,20 50,60 90,100 50,120" Grid.Row="1" />
        <Path Stroke="Black" StrokeThickness="1" Grid.Column="1" Data="M 210,20 S 80,20 50,60 S 90,100 50,120" Grid.Row="1" />

        <Path Stroke="Gray" StrokeThickness="5" Grid.Column="2" Data="M 210,20 L 80,20 50,60 90,100 50,120" Grid.Row="1" />
        <Path Stroke="Black" StrokeThickness="1" Grid.Column="2" Data="M 210,20 Q 80,20 50,60 Q 90,100 50,120" Grid.Row="1" />

        <Path Stroke="Gray" StrokeThickness="5" Grid.Column="3" Data="M 210,20 L 80,20 50,60 90,100" Grid.Row="1" />
        <Path Stroke="Black" StrokeThickness="1" Grid.Column="3" Data="M 210,20 T 80,20 T 50,60 T 90,100" Grid.Row="1" />

    </Grid>
</Window>

   
    
    
    
    
  








Related examples in the same category