Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

moving silverlight beta 1 to beta 2 RSS

5 replies

Last post Aug 19, 2008 08:16 AM by varish

(1)
  • varish

    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 

    varish
  • Skyrunner

    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

    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.

    Please Mark as Answer if this helps you.
    Thanks n Regards
    ~Tanmoy
    Blog: http://anothersilverlight.blogspot.com/
  • Skyrunner

    Skyrunner

    Contributor

    3571 Points

    658 Posts

    Re: Re: moving silverlight beta 1 to beta 2

    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

  • tanmoy.r

    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.

    Please Mark as Answer if this helps you.
    Thanks n Regards
    ~Tanmoy
    Blog: http://anothersilverlight.blogspot.com/
  • varish

    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

    varish