Sign In|Join
Home/Silverlight.NET Forums/General Silverlight Programming/Report a Silverlight Bug/moving silverlight beta 1 to beta 2
Last post Aug 19, 2008 08:16 AM by varish
Member
1 Points
7 Posts
Aug 18, 2008 11:46 AM | LINK
hi,
i am converting silverlight beta 1 to beta 2 and got this error..
please show me way to resolve this bug.
System.Windows.ExceptionRoutedEventHandler' to 'System.EventHandler<System.Windows.ExceptionRoutedEventArgs>
Image img = new Image(); img.SetValue(Image.NameProperty, "img" + i.ToString() + guid); img.SetValue(Image.WidthProperty, 400); img.SetValue(Image.HeightProperty, 300); img.SetValue(Image.OpacityProperty, 0);
img.ImageFailed += new ExceptionRoutedEventHandler(img_ImageFailed);
void img_ImageFailed(object sender, ExceptionRoutedEventArgs e) { try { EditorExceptionHandler.AddException("Img failed", ""); } catch (Exception ex) { ; } }
thanks
Contributor
3571 Points
658 Posts
Aug 18, 2008 11:59 AM | LINK
Try this.
Image img = new Image(); img.SetValue(Image.NameProperty, "img" + i.ToString() + guid); img.Width = 400; img.Height = 300; img.Opacity = 0; img.ImageFailed += new EventHandler<ExceptionRoutedEventArgs>(img_ImageFailed); void img_ImageFailed(object sender, ExceptionRoutedEventArgs e) { ... }
4163 Points
796 Posts
Microsoft
Aug 18, 2008 12:21 PM | LINK
Correct me if I am wrong. You can not set NameProperty. It is read only.
Aug 18, 2008 12:31 PM | LINK
tanmoy.r Correct me if I am wrong. You can not set NameProperty. It is read only.
You can't with Name property, but you can with SetValue method et NameProperty DP
Aug 18, 2008 12:57 PM | LINK
Thanks. :) I did not know it.
Aug 19, 2008 08:16 AM | LINK
its working now.... [:)]
thanks a lot
varish
Member
1 Points
7 Posts
moving silverlight beta 1 to beta 2
Aug 18, 2008 11:46 AM | LINK
hi,
i am converting silverlight beta 1 to beta 2 and got this error..
please show me way to resolve this bug.
System.Windows.ExceptionRoutedEventHandler' to 'System.EventHandler<System.Windows.ExceptionRoutedEventArgs>
Image img = new Image();
img.SetValue(Image.NameProperty, "img" + i.ToString() + guid);
img.SetValue(Image.WidthProperty, 400);
img.SetValue(Image.HeightProperty, 300);
img.SetValue(Image.OpacityProperty, 0);
img.ImageFailed += new ExceptionRoutedEventHandler(img_ImageFailed);
void img_ImageFailed(object sender, ExceptionRoutedEventArgs e)
{
try
{
EditorExceptionHandler.AddException("Img failed", "");
}
catch (Exception ex)
{
;
}
}
thanks
Skyrunner
Contributor
3571 Points
658 Posts
Re: moving silverlight beta 1 to beta 2
Aug 18, 2008 11:59 AM | LINK
Try this.
Image img = new Image();
img.SetValue(Image.NameProperty, "img" + i.ToString() + guid);
img.Width = 400;
img.Height = 300;
img.Opacity = 0;
img.ImageFailed += new EventHandler<ExceptionRoutedEventArgs>(img_ImageFailed);
void img_ImageFailed(object sender, ExceptionRoutedEventArgs e)
{
...
}
tanmoy.r
Contributor
4163 Points
796 Posts
Microsoft
Re: Re: moving silverlight beta 1 to beta 2
Aug 18, 2008 12:21 PM | LINK
Correct me if I am wrong. You can not set NameProperty. It is read only.
Thanks n Regards
~Tanmoy
Blog: http://anothersilverlight.blogspot.com/
Skyrunner
Contributor
3571 Points
658 Posts
Re: Re: moving silverlight beta 1 to beta 2
Aug 18, 2008 12:31 PM | LINK
You can't with Name property, but you can with SetValue method et NameProperty DP
tanmoy.r
Contributor
4163 Points
796 Posts
Microsoft
Re: Re: Re: moving silverlight beta 1 to beta 2
Aug 18, 2008 12:57 PM | LINK
Thanks. :) I did not know it.
Thanks n Regards
~Tanmoy
Blog: http://anothersilverlight.blogspot.com/
varish
Member
1 Points
7 Posts
Re: moving silverlight beta 1 to beta 2
Aug 19, 2008 08:16 AM | LINK
its working now.... [:)]
thanks a lot