WPF Web Based

WPF Examples

WPF

WPF Projects

WPF Project

adplus-dvertising
Ellipse Control in WPF Web Based
Previous Home Next

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.

<Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<Ellipse Fill="Blue" Stroke="Red" Canvas.Left="100"
       Canvas.Top="10" Width="160" Height="90">
<Ellipse.RenderTransform>
<RotateTransform Angle="45"/>
</Ellipse.RenderTransform>
</Ellipse>
</Canvas>
Output
Previous Home Next
WPF Examples

WPF

WPF

WPF

WPF

WPF

WPF

WPF

WPF