[Mono-bugs] [Bug 82294][Wis] New - Controls. don't invalidate properly

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Aug 2 14:10:50 EDT 2007


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 alan.mcgovern at gmail.com.

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

--- shadow/82294	2007-08-02 14:10:50.000000000 -0400
+++ shadow/82294.tmp.1789	2007-08-02 14:10:50.000000000 -0400
@@ -0,0 +1,51 @@
+Bug#: 82294
+Product: Moonlight
+Version: 1_0
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: engine
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: alan.mcgovern at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Controls. don't invalidate properly
+
+I have a class as defined at the end of the description. When this control
+is removed from a canvas, it doesn't invalidate the canvas correctly. It
+still appears on the canvas, but i can 'wipe' it out by dragging another
+shape over it.
+
+public class SelectionRectangle : Control
+    {
+		private Rectangle rect;
+		
+        public SelectionRectangle()
+            :base()
+        {
+            InitializeFromXaml("<Canvas><Rectangle Name=\"Rect\" /></Canvas>");
+            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);
+		}
+
+    }


More information about the mono-bugs mailing list