From edcd2cbe463f6970f22c2ffd35ae9b93093243ba Mon Sep 17 00:00:00 2001 From: Amer Koleci Date: Mon, 21 Sep 2015 20:05:15 +0200 Subject: [PATCH] Add Canvas under Layout tab --- samples/TestApplication/Program.cs | 42 +++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/samples/TestApplication/Program.cs b/samples/TestApplication/Program.cs index f77ecd0ef8..bfbb8a17ce 100644 --- a/samples/TestApplication/Program.cs +++ b/samples/TestApplication/Program.cs @@ -675,7 +675,47 @@ namespace TestApplication }, } }, - } + new TextBlock + { + Margin = new Thickness(0, 40, 0, 0), + Text = "Canvas", + FontWeight = FontWeight.Medium, + FontSize = 20, + Foreground = SolidColorBrush.Parse("#212121"), + }, + new TextBlock + { + Text = "A panel which lays out its children by explicit coordinates.", + FontSize = 13, + Foreground = SolidColorBrush.Parse("#727272"), + Margin = new Thickness(0, 0, 0, 10) + }, + new Canvas + { + Background = Brushes.Yellow, + Width = 300, + Height = 400, + Children = new Controls + { + new Rectangle + { + Fill = Brushes.Blue, + Width = 63, + Height = 41, + [Canvas.LeftProperty] = 40, + [Canvas.TopProperty] = 31, + }, + new Ellipse + { + Fill = Brushes.Green, + Width = 58, + Height = 58, + [Canvas.LeftProperty] = 130, + [Canvas.TopProperty] = 79, + }, + } + }, + } } } };