SIlverlight in Webparts

Last post 03-27-2008 2:42 PM by Zenuke. 6 replies.

Sort Posts:

  • SIlverlight in Webparts

    03-26-2008, 2:50 PM
    • Loading...
    • Zenuke
    • Joined on 10-18-2006, 1:28 PM
    • Posts 132

    I have successfully launched a sliverlight 1.0 app and now I am up to the task of trying to create a silverlight webpart. It's nothing fancy and it follows the ideas of the helloworld webpart i've seen.

    Everything seems ok except the project will not recognize the XAML files. Everything with in the XAML file is blue as if VS2008 has no idea what it is. The project will not build because of this.

    I've built other webparts usingthe VB CLass library and adding a bunch of Imports.

    this is the error

    Error 1 The tag 'Canvas' does not exist in XML namespace 'http://schemas.microsoft.com/client/2007'. Line 3 Position 13. C:\Documents and Settings\cacarey\My Documents\Visual Studio 2008\Projects\ClassLibrary1\ClassLibrary1\ClientBin\sl\HelloSilverlight10.xaml 3 13 ClassLibrary1

    Now I was able to fix the above error by  change the  XMLNS= line to be 2006/xaml/presentation which completely breaks other XAML things I have done when it said /2007/ on it.

    I get erros like 

    "All objects added to an IDictionary must have a key attribute or some other type of associated with them."

    I have no idea what this means or how to fix it other than adding an x:key="" to everything (which I have no idea what that will do)

    What am I doing wrong? Completely silly if you can't do this in webparts without using some old code version or something.

     

  • Re: SIlverlight in Webparts

    03-26-2008, 8:17 PM
    • Loading...
    • anas
    • Joined on 09-21-2006, 4:31 AM
    • Palestine - فلسطين
    • Posts 2,351

    HI

    It seems that you are using a non existing key ...

    Did you read this :

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2819260&SiteID=1

    Best Regards,

    Anas Ghanem - انس الغانم | My Blog
  • Re: SIlverlight in Webparts

    03-27-2008, 7:57 AM
    • Loading...
    • Zenuke
    • Joined on 10-18-2006, 1:28 PM
    • Posts 132

    I understand what I'm missing, I don't undertand why i Need that now, I did not in the past. 

    what is strange in the application I wrote before using silverlight, this was never an issue. With this I can't even use things like onMouseDown="function" it doesn't allow me. I have to make all the hadlers in the javascript.

    So many things I did in Silverlight I can no longer do or I need to use a roundabout way to do it and this is the only thing that changed

    xmlns="http://schemas.microsoft.com/client/2007"

    There must be way to do this, I don't feel I should need to hand code everything when I didn't need to before.

     

     

  • Re: SIlverlight in Webparts

    03-27-2008, 10:48 AM
    • Loading...
    • anas
    • Joined on 09-21-2006, 4:31 AM
    • Palestine - فلسطين
    • Posts 2,351

    Hi

    did you installed Microsoft Silverlight Tools Beta 1 for Visual Studio 2008 ?

    As far as i know , you can add onMouseDown to the elements , (as in the silverlight 1.0 SDK)

    I want to mention here is that there is a community for silverlight and you can login with the same ID that used in this site..

    check : http://silverlight.net/

     

    I really didn't worked much with silverlight , but i used silverlight 1.0 in a project ( before 1 month ).

    Best Regards,

    Anas Ghanem - انس الغانم | My Blog
  • Re: SIlverlight in Webparts

    03-27-2008, 11:12 AM
    • Loading...
    • Zenuke
    • Joined on 10-18-2006, 1:28 PM
    • Posts 132

    I found a work around is to just build the SL and the webpart that adds the SL in different projects and just make them meet on the MOSS 07 server.

    Now I need to find out how to get SL to interact with MOSS07 Smile

     

    I did install the Beta 1 tools. Still working mainly with SL+JS but attempting to learn the VB side now. I loved SL+JS :(

  • Re: SIlverlight in Webparts

    03-27-2008, 11:30 AM
    • Loading...
    • anas
    • Joined on 09-21-2006, 4:31 AM
    • Palestine - فلسطين
    • Posts 2,351

    HI

    I found that you need to use Silverlight Blueprint for SharePoint.

    you can see this blog post from the sharepoint team :

    http://blogs.msdn.com/sharepoint/archive/2008/03/24/more-on-silverlight-in-sharepoint.aspx

     

    Regards,

    Best Regards,

    Anas Ghanem - انس الغانم | My Blog
  • Re: SIlverlight in Webparts

    03-27-2008, 2:42 PM
    • Loading...
    • Zenuke
    • Joined on 10-18-2006, 1:28 PM
    • Posts 132

    Eek, this looks beyond me at the moment. Does anyone have a much more basic example of a silverlight webpart that at least accesses something simple from MOSS07??

     

Page 1 of 1 (7 items)