rajat
rajat

Reputation: 3553

Ellipse not shown on the canvas in wpf application

I have a wpf user control , inside it i have put a canvas named VisualFeedback , now programmatically i add a eclipse using :

       Ellipse ellipse = new Ellipse
        {
            Fill = new SolidColorBrush(Colors.Red),
            Width = 5,
            Height = 5,
            Opacity = 1,
            Margin = new Thickness(10, 10, 0, 0)
        };
        VisualFeedback.Children.Add(ellipse);

But it does not show up in the canvas of usercontrol which is in the mainwindows of the application .

Upvotes: 0

Views: 1071

Answers (1)

Your code works for me - you're sure that you're not just missing it? - it's quite small.

Upvotes: 1

Related Questions