Author: rolf
Date: 2007-06-12 13:40:31 -0400 (Tue, 12 Jun 2007)
New Revision: 79322

Modified:
   trunk/olive/class/agclr/System.Windows/ChangeLog
   trunk/olive/class/agclr/System.Windows/Downloader.cs
Log:
* Downloader.cs: Implement Uri property - since Uri is not an object
  inherited from DependencyObject, in unmanaged land it's stored as a
  string.

Modified: trunk/olive/class/agclr/System.Windows/ChangeLog
===================================================================
--- trunk/olive/class/agclr/System.Windows/ChangeLog    2007-06-12 17:32:50 UTC 
(rev 79321)
+++ trunk/olive/class/agclr/System.Windows/ChangeLog    2007-06-12 17:40:31 UTC 
(rev 79322)
@@ -1,5 +1,11 @@
 2007-06-12  Rolf Bjarne Kvinge <[EMAIL PROTECTED]> 
 
+       * Downloader.cs: Implement Uri property - since Uri is not an object
+         inherited from DependencyObject, in unmanaged land it's stored as a
+         string.
+
+2007-06-12  Rolf Bjarne Kvinge <[EMAIL PROTECTED]> 
+
        * DependencyProperty.cs: Delete Register.
        * Downloader.cs: Move from DependencyProperty.Register to
          DependencyProperty.Lookup.

Modified: trunk/olive/class/agclr/System.Windows/Downloader.cs
===================================================================
--- trunk/olive/class/agclr/System.Windows/Downloader.cs        2007-06-12 
17:32:50 UTC (rev 79321)
+++ trunk/olive/class/agclr/System.Windows/Downloader.cs        2007-06-12 
17:40:31 UTC (rev 79322)
@@ -35,7 +35,7 @@
                public static readonly DependencyProperty ResponseTextProperty 
= DependencyProperty.Lookup (Kind.STRING, "ResponseText", typeof (Downloader));
                public static readonly DependencyProperty StatusProperty = 
DependencyProperty.Lookup (Kind.INT32, "Status", typeof (Downloader));
                public static readonly DependencyProperty StatusTextProperty = 
DependencyProperty.Lookup (Kind.STRING, "StatusText", typeof (Downloader));
-               public static readonly DependencyProperty UriProperty;//TODO// 
= DependencyProperty.Lookup ("Uri", Kind.URI, typeof (Downloader));
+               public static readonly DependencyProperty UriProperty = 
DependencyProperty.Lookup (Kind.STRING, "Uri", typeof (Downloader));
 
 
                public Downloader ()
@@ -64,8 +64,15 @@
                }
 
                public Uri Uri {
-                       get { return (Uri) GetValue (UriProperty); }
-                       set { SetValue (UriProperty, value); }
+                       get {
+                               // Uri is not a DependencyObject, we save it as 
a string
+                               string uri = (string) GetValue (UriProperty);
+                               return new Uri (uri);
+                       }
+                       set {
+                               string uri = value.OriginalString;
+                               SetValue (UriProperty, uri); 
+                       }
                }
 
 

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to