using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
namespace SayHello
{
class SimpleEllipse : FrameworkElement
{
protected override void OnRender(DrawingContext dc)
{
dc.DrawEllipse( Brushes.Blue,new Pen(Brushes.Red,24),new Point(RenderSize.Width/2,RenderSize.Height/2),RenderSize.Width/2,RenderSize.Height/2) ;
}
}
class RenderTheGraphic:Window
{
[STAThread]
public static void Main()
{
Application app = new Application();
app.Run(new RenderTheGraphic());
}
public RenderTheGraphic()
{
Title = "Render The Graphic";
SimpleEllipse elips=new SimpleEllipse();
Content = elips;
}
}
}