using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Shapes; namespace SilverlightApplication4 { public partial class MainPage : UserControl { public MainPage() { InitializeComponent(); } private void LayoutRoot_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { Rectangle r = new Rectangle(); r.Fill = new SolidColorBrush(Colors.Red); r.Width = 20; r.Height = 20; Canvas.SetLeft(r, e.GetPosition(juur).X); Canvas.SetTop(r, e.GetPosition(juur).Y); juur.Children.Add(r); } } }