Pages

Tuesday 12 March 2013

Ellipse Control in WPF

Ellipse Control in WPF

The Ellipse object represents an ellipse shape and draws an ellipse with the given height and width. The Width and Height properties of the Ellipse class represent the width and height of an ellipse. The Fill property fills the interior of an ellipse. The Stroke property sets the color and Stroke Thickness represents the width of the outer line of an ellipse. 
 
Creating an Ellipse

The Ellipse element in XAML creates an ellipse shape. The following code snippet creates an ellipse by setting its width and height properties to 200 and 100 respectively. The code also sets the black stroke of width 4.

<Ellipse
    Width="200"
    Height="100"
    Fill="Blue"
    Stroke="Black"
    StrokeThickness="4" />
 
Output-

No comments:

Post a Comment