Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by [EMAIL PROTECTED]

http://bugzilla.ximian.com/show_bug.cgi?id=82295

--- shadow/82295        2007-08-02 14:35:11.000000000 -0400
+++ shadow/82295.tmp.2412       2007-08-02 14:35:12.000000000 -0400
@@ -0,0 +1,52 @@
+Bug#: 82295
+Product: Moonlight
+Version: 1_0
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: engine
+AssignedTo: [EMAIL PROTECTED]                            
+ReportedBy: [EMAIL PROTECTED]               
+QAContact: [EMAIL PROTECTED]
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Canvas.Top and Canvas.Left not obeyed
+
+When i add an instance of this class to my canvas, it always draws from 0,0
+as opposed to Canvas.Top and Canvas.Left. I assume it shouldn't do this
+
+    public class SelectionRectangle : Control
+    {
+               private Rectangle rect;
+               
+        public SelectionRectangle()
+            :base()
+        {
+            // Notice i just instantiate a rectangle.
+            // The 'SelectionRectangle' that i instantiate is then
+            // added to a canvas
+            InitializeFromXaml("<Rectangle Name=\"Rect\" />");
+            rect = (Rectangle)FindName("Rect");
+            rect.Opacity = 0.33;
+            rect.Fill = new SolidColorBrush(Colors.Blue);
+            rect.Stroke = new SolidColorBrush(Colors.Green);
+            rect.StrokeDashArray = new double[] {5, 5 };
+            rect.StrokeThickness = 2;
+            SetValue<int>(ZIndexProperty, int.MaxValue);
+        }
+               
+               public override object GetValue (DependencyProperty property)
+               {
+                       return rect.GetValue(property);
+               }
+               
+               public override void SetValue<T> (DependencyProperty property, 
T obj)
+               {
+                       rect.SetValue<T>(property, obj);
+               }
+
+    }
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to