<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Sharepoint Silverlight Image Library Viewer Part</title>
	<atom:link href="http://www.binaryjam.com/2007/06/05/sharepoint-silverlight-image-library-viewer-part/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.binaryjam.com/2007/06/05/sharepoint-silverlight-image-library-viewer-part/</link>
	<description>A place for Sharepoint and rantings</description>
	<lastBuildDate>Mon, 26 Dec 2011 05:48:02 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: Ian Morrish</title>
		<link>http://www.binaryjam.com/2007/06/05/sharepoint-silverlight-image-library-viewer-part/comment-page-1/#comment-158</link>
		<dc:creator>Ian Morrish</dc:creator>
		<pubDate>Sun, 20 Jan 2008 19:04:57 +0000</pubDate>
		<guid isPermaLink="false">http://binaryjam.com/?p=298#comment-158</guid>
		<description>MOSS 2007 demo using this projects XAML and js but done with the Data View web part which means there is no need to install anything on the server.
See http://www.wssdemo.com/pages/silverlight.aspx for how to.</description>
		<content:encoded><![CDATA[<p>MOSS 2007 demo using this projects XAML and js but done with the Data View web part which means there is no need to install anything on the server.<br />
See <a href="http://www.wssdemo.com/pages/silverlight.aspx" rel="nofollow">http://www.wssdemo.com/pages/silverlight.aspx</a> for how to.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Silverlight Cream for January 18, 2008 -- #173</title>
		<link>http://www.binaryjam.com/2007/06/05/sharepoint-silverlight-image-library-viewer-part/comment-page-1/#comment-157</link>
		<dc:creator>Silverlight Cream for January 18, 2008 -- #173</dc:creator>
		<pubDate>Fri, 18 Jan 2008 14:12:47 +0000</pubDate>
		<guid isPermaLink="false">http://binaryjam.com/?p=298#comment-157</guid>
		<description>[...] Listview done using the new ADO.NET Data Service Extensions.   From SilverlightCream.com: Sharepoint Silverlight Image Viewer A somewhat older article from Simon at BinaryJam building a Silverlight Viewer as a WebPart for [...]</description>
		<content:encoded><![CDATA[<p>[...] Listview done using the new ADO.NET Data Service Extensions.   From SilverlightCream.com: Sharepoint Silverlight Image Viewer A somewhat older article from Simon at BinaryJam building a Silverlight Viewer as a WebPart for [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Binaryjam</title>
		<link>http://www.binaryjam.com/2007/06/05/sharepoint-silverlight-image-library-viewer-part/comment-page-1/#comment-139</link>
		<dc:creator>Binaryjam</dc:creator>
		<pubDate>Sat, 01 Dec 2007 09:25:24 +0000</pubDate>
		<guid isPermaLink="false">http://binaryjam.com/?p=298#comment-139</guid>
		<description>Demo working now.</description>
		<content:encoded><![CDATA[<p>Demo working now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ardeeboi</title>
		<link>http://www.binaryjam.com/2007/06/05/sharepoint-silverlight-image-library-viewer-part/comment-page-1/#comment-117</link>
		<dc:creator>ardeeboi</dc:creator>
		<pubDate>Fri, 16 Nov 2007 11:57:21 +0000</pubDate>
		<guid isPermaLink="false">http://binaryjam.com/?p=298#comment-117</guid>
		<description>Can I try deploying this webpart to WSS 3.0? I&#039;m still gonna try..The demo link above seems to be not working..</description>
		<content:encoded><![CDATA[<p>Can I try deploying this webpart to WSS 3.0? I&#8217;m still gonna try..The demo link above seems to be not working..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: binaryjam</title>
		<link>http://www.binaryjam.com/2007/06/05/sharepoint-silverlight-image-library-viewer-part/comment-page-1/#comment-116</link>
		<dc:creator>binaryjam</dc:creator>
		<pubDate>Thu, 11 Oct 2007 10:35:35 +0000</pubDate>
		<guid isPermaLink="false">http://binaryjam.com/?p=298#comment-116</guid>
		<description>Many people are contacting me about this not working.  In many cases what is happening is they have the older version of the source which included a CAB file and are just installing the CAB file.

Then there are those who do not know about -globalinstall for installing webparts like this or changing the security.

As I have said in other postings this part was developed on an x64 system so will not work on a 32 bit system.  This was a technical article for developers of webparts and not for any one to just install a webpart, hence &quot;sourcecode&quot;.

So before anyone else asks me again.

1. Be a developer, I have no time for admins, this code needs compiling BY YOU in Vis Studio 2003, then create your own installation routine.
2. I have set my web.config from wss_minimal to Full, cos its easy, I am not writing for production environments, this is a proof of concept.  You can worry about CAS.
3. Try a -globalinstall if your still having trouble.
4. Try and figure it out for yourself, plenty of others have already used this and figured it out, so I know its not the code.
5. Then and only then bother me about it, and even then I still might ignore you.


Sorry but getting a bit tired of people who can&#039;t read or won&#039;t try and figure stuff out for themselves, this is a developer article.</description>
		<content:encoded><![CDATA[<p>Many people are contacting me about this not working.  In many cases what is happening is they have the older version of the source which included a CAB file and are just installing the CAB file.</p>
<p>Then there are those who do not know about -globalinstall for installing webparts like this or changing the security.</p>
<p>As I have said in other postings this part was developed on an x64 system so will not work on a 32 bit system.  This was a technical article for developers of webparts and not for any one to just install a webpart, hence &#8220;sourcecode&#8221;.</p>
<p>So before anyone else asks me again.</p>
<p>1. Be a developer, I have no time for admins, this code needs compiling BY YOU in Vis Studio 2003, then create your own installation routine.<br />
2. I have set my web.config from wss_minimal to Full, cos its easy, I am not writing for production environments, this is a proof of concept.  You can worry about CAS.<br />
3. Try a -globalinstall if your still having trouble.<br />
4. Try and figure it out for yourself, plenty of others have already used this and figured it out, so I know its not the code.<br />
5. Then and only then bother me about it, and even then I still might ignore you.</p>
<p>Sorry but getting a bit tired of people who can&#8217;t read or won&#8217;t try and figure stuff out for themselves, this is a developer article.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Noha</title>
		<link>http://www.binaryjam.com/2007/06/05/sharepoint-silverlight-image-library-viewer-part/comment-page-1/#comment-115</link>
		<dc:creator>Noha</dc:creator>
		<pubDate>Thu, 11 Oct 2007 08:41:45 +0000</pubDate>
		<guid isPermaLink="false">http://binaryjam.com/?p=298#comment-115</guid>
		<description>I used this web part in MOSS 2007.Deployment was done successfully.
when i deployed this webpart...their is nothing that appears.
A white space appears and their is no javascript errors appear at all.</description>
		<content:encoded><![CDATA[<p>I used this web part in MOSS 2007.Deployment was done successfully.<br />
when i deployed this webpart&#8230;their is nothing that appears.<br />
A white space appears and their is no javascript errors appear at all.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lax</title>
		<link>http://www.binaryjam.com/2007/06/05/sharepoint-silverlight-image-library-viewer-part/comment-page-1/#comment-118</link>
		<dc:creator>Lax</dc:creator>
		<pubDate>Tue, 28 Aug 2007 05:19:56 +0000</pubDate>
		<guid isPermaLink="false">http://binaryjam.com/?p=298#comment-118</guid>
		<description>Hey,
This is just awesome..
I am working with MOSS for a while but now would be focussing on Silverlight and Smooth UI in MOSS...
This was a very good article in that direction..

Many Thanks...</description>
		<content:encoded><![CDATA[<p>Hey,<br />
This is just awesome..<br />
I am working with MOSS for a while but now would be focussing on Silverlight and Smooth UI in MOSS&#8230;<br />
This was a very good article in that direction..</p>
<p>Many Thanks&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: links for 2007-07-06</title>
		<link>http://www.binaryjam.com/2007/06/05/sharepoint-silverlight-image-library-viewer-part/comment-page-1/#comment-107</link>
		<dc:creator>links for 2007-07-06</dc:creator>
		<pubDate>Fri, 06 Jul 2007 15:28:35 +0000</pubDate>
		<guid isPermaLink="false">http://binaryjam.com/?p=298#comment-107</guid>
		<description>[...] Binary Jam Sharepoint Silverlight Image Library Viewer Part « (tags: sharepoint webpart silverlight) [...]</description>
		<content:encoded><![CDATA[<p>[...] Binary Jam Sharepoint Silverlight Image Library Viewer Part « (tags: sharepoint webpart silverlight) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nil_bib</title>
		<link>http://www.binaryjam.com/2007/06/05/sharepoint-silverlight-image-library-viewer-part/comment-page-1/#comment-114</link>
		<dc:creator>Nil_bib</dc:creator>
		<pubDate>Fri, 22 Jun 2007 16:14:28 +0000</pubDate>
		<guid isPermaLink="false">http://binaryjam.com/?p=298#comment-114</guid>
		<description>its nice.

But I had requirement to navigate other page in same browser rather than popup.
so did some code changes and it works..

Here is summary..
I blocked below even handler.

onPhotoItemClicked: function(sender, eventArgs) {
//this.MainImage.Source=eventArgs;

},


and added one more parameter &quot;siteUrl&quot; in below functions
which gets value dynamically from picture library(added one more column &quot;URL&quot;).

function SilverlightFilmStripPartPhotoUrls(videoUrl, videoThumbnailUrl, siteUrl)

function SilverlightFilmStripPartPhotoItem(control, target, index, thumbnailUrl, photoUrl, siteUrl, clickHandler) {

and modified below eventhandler

SilverlightFilmStripPartPhotoItem.prototype.handleMouseLeftButtonDown = function(sender, eventArgs) {

    //this.clickHandler(sender, this.photoUrl);

    location.href = this.siteUrl;

}

So on clicking of samll image it navigates to another page in same site.</description>
		<content:encoded><![CDATA[<p>its nice.</p>
<p>But I had requirement to navigate other page in same browser rather than popup.<br />
so did some code changes and it works..</p>
<p>Here is summary..<br />
I blocked below even handler.</p>
<p>onPhotoItemClicked: function(sender, eventArgs) {<br />
//this.MainImage.Source=eventArgs;</p>
<p>},</p>
<p>and added one more parameter &#8220;siteUrl&#8221; in below functions<br />
which gets value dynamically from picture library(added one more column &#8220;URL&#8221;).</p>
<p>function SilverlightFilmStripPartPhotoUrls(videoUrl, videoThumbnailUrl, siteUrl)</p>
<p>function SilverlightFilmStripPartPhotoItem(control, target, index, thumbnailUrl, photoUrl, siteUrl, clickHandler) {</p>
<p>and modified below eventhandler</p>
<p>SilverlightFilmStripPartPhotoItem.prototype.handleMouseLeftButtonDown = function(sender, eventArgs) {</p>
<p>    //this.clickHandler(sender, this.photoUrl);</p>
<p>    location.href = this.siteUrl;</p>
<p>}</p>
<p>So on clicking of samll image it navigates to another page in same site.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon</title>
		<link>http://www.binaryjam.com/2007/06/05/sharepoint-silverlight-image-library-viewer-part/comment-page-1/#comment-113</link>
		<dc:creator>Simon</dc:creator>
		<pubDate>Fri, 22 Jun 2007 10:49:54 +0000</pubDate>
		<guid isPermaLink="false">http://binaryjam.com/?p=298#comment-113</guid>
		<description>I had a question about using this to open websites heres my reply for all to see.  I also take time to describe some of the elements of the sourcecode so that hopefully its easy for anyone to add what they want.

Presuming that when you click any image you actually mean the scroller element, I guess you want to create a navigable control instead of an image display control and not the main image.

First off the Scroller bits.

Each of the thumbnails is a distinct Control.  In the function downloadCompleted  I iterate through the number of photos in my datalist to create these controls.

These controls are created by the statement  new SilverlightFilmStripPartPhotoItem(...)

It might have been a good idea for me to put references to the items created in my original data but I didnt need to.

This statement only creates the JScript object and not the Silverlight object, that is created by the

	templateInstance = this.control.content.createFromXaml(templateInstanceString, true);

statement.  That template reference is passed into the constructor of the Jscript SilverlightFilmStripPartPhotoItem.


thats all very nice, but you are interested in events.

So handling events on each control then.  In the constructor of the StrippartPhotoItems I create event handlers for the click event (plus others)

	this.target.addEventListener(&quot;MouseLeftButtonDown&quot;, Sys.Silverlight.createDelegate(this, this.handleMouseLeftButtonDown));

When you click any image, each individual control object calls its own handleMouseLeftButtonDown function.  If all I wanted to do was effect the object pressed then I could code my stuff in here, but I wanted to effect the parent.  I could have passed a reference to the parent object in the constructor and done that, but I prefer the model of event raising or in this case function pointers.

What am I talking about ? Well in the function handleMouseLeftButtonDown  I call another function

	this.clickHandler(sender, this.photoUrl);

so what is clickHanlder looks like a variable of the constructor.  Well it is and it isnt.  The constructor of each PhotoItem has as its last parameter  this statement

	Sys.Silverlight.createDelegate(this, this.onPhotoItemClicked)

This creates a function pointer to the SilverlightFilmStripPart.Scene.onPhotoItemClicked function of the main scene object.

In here we set the MainImage to the url we want, passed by the photoItem control when it called this.clickHandler(sender, this.photoUrl);

So now to open a website by clicking on the Image.  This is a change to the section

    onPhotoItemClicked: function(sender, eventArgs) {
        this.MainImage.Source=eventArgs;

    },

For quickness try this

    onPhotoItemClicked: function(sender, eventArgs) {
        //this.MainImage.Source=eventArgs;
        window.open(eventArgs);
    },

For full control over the window to open ( I presume you want to open a window and not replace the current one)

see http://msdn2.microsoft.com/en-us/library/ms536651.aspx


This will no longer try and display a large image.  Also find this line and comment it out

            if (i==0)
			this.MainImage.Source=this.PhotoItems[i].photoUrl;

In fact if your not using this as an image viwer but a fancy web page opener find all references in the xaml and the js and remove them.


Hope that helps.</description>
		<content:encoded><![CDATA[<p>I had a question about using this to open websites heres my reply for all to see.  I also take time to describe some of the elements of the sourcecode so that hopefully its easy for anyone to add what they want.</p>
<p>Presuming that when you click any image you actually mean the scroller element, I guess you want to create a navigable control instead of an image display control and not the main image.</p>
<p>First off the Scroller bits.</p>
<p>Each of the thumbnails is a distinct Control.  In the function downloadCompleted  I iterate through the number of photos in my datalist to create these controls.</p>
<p>These controls are created by the statement  new SilverlightFilmStripPartPhotoItem(&#8230;)</p>
<p>It might have been a good idea for me to put references to the items created in my original data but I didnt need to.</p>
<p>This statement only creates the JScript object and not the Silverlight object, that is created by the</p>
<p>	templateInstance = this.control.content.createFromXaml(templateInstanceString, true);</p>
<p>statement.  That template reference is passed into the constructor of the Jscript SilverlightFilmStripPartPhotoItem.</p>
<p>thats all very nice, but you are interested in events.</p>
<p>So handling events on each control then.  In the constructor of the StrippartPhotoItems I create event handlers for the click event (plus others)</p>
<p>	this.target.addEventListener(&#8220;MouseLeftButtonDown&#8221;, Sys.Silverlight.createDelegate(this, this.handleMouseLeftButtonDown));</p>
<p>When you click any image, each individual control object calls its own handleMouseLeftButtonDown function.  If all I wanted to do was effect the object pressed then I could code my stuff in here, but I wanted to effect the parent.  I could have passed a reference to the parent object in the constructor and done that, but I prefer the model of event raising or in this case function pointers.</p>
<p>What am I talking about ? Well in the function handleMouseLeftButtonDown  I call another function</p>
<p>	this.clickHandler(sender, this.photoUrl);</p>
<p>so what is clickHanlder looks like a variable of the constructor.  Well it is and it isnt.  The constructor of each PhotoItem has as its last parameter  this statement</p>
<p>	Sys.Silverlight.createDelegate(this, this.onPhotoItemClicked)</p>
<p>This creates a function pointer to the SilverlightFilmStripPart.Scene.onPhotoItemClicked function of the main scene object.</p>
<p>In here we set the MainImage to the url we want, passed by the photoItem control when it called this.clickHandler(sender, this.photoUrl);</p>
<p>So now to open a website by clicking on the Image.  This is a change to the section</p>
<p>    onPhotoItemClicked: function(sender, eventArgs) {<br />
        this.MainImage.Source=eventArgs;</p>
<p>    },</p>
<p>For quickness try this</p>
<p>    onPhotoItemClicked: function(sender, eventArgs) {<br />
        //this.MainImage.Source=eventArgs;<br />
        window.open(eventArgs);<br />
    },</p>
<p>For full control over the window to open ( I presume you want to open a window and not replace the current one)</p>
<p>see <a href="http://msdn2.microsoft.com/en-us/library/ms536651.aspx" rel="nofollow">http://msdn2.microsoft.com/en-us/library/ms536651.aspx</a></p>
<p>This will no longer try and display a large image.  Also find this line and comment it out</p>
<p>            if (i==0)<br />
			this.MainImage.Source=this.PhotoItems[i].photoUrl;</p>
<p>In fact if your not using this as an image viwer but a fancy web page opener find all references in the xaml and the js and remove them.</p>
<p>Hope that helps.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

