SilverlightShow: Silverlight n-Puzzle Game Comments Silverlight articles, Silverlight tutorials, Silverlight videos, Silverlight samples Argotic Syndication Framework 2008.0.2.0, en-US (Emil Stoychev) Re: Silverlight n-Puzzle Game <div>Nice article!</div> I remember when I was a child, I played a lot this game!  :) <br /> Check out WPF version of it that my friend did: <a href=""></a> YuriBondarenko Wed, 13 Jun 2012 15:36:44 GMT Silverlight n-Puzzle Game hm need logic representation & logic program please kasep Tue, 15 Mar 2011 07:43:26 GMT playgames <p></p> playgames Tue, 02 Nov 2010 08:00:52 GMT RE: Silverlight n-Puzzle Game <p>This was really a great tutorial, however, i have a trouble running it on a server, it can't reach the images. I tried altering the paths, in the app and physical and nothin.</p> <p>Do you have any idea what can be the problem?</p> <p> </p> <p>I trin even uploading your source as is and even so it doeesn't worked</p> Eduardo Cis Tue, 05 Oct 2010 12:58:51 GMT RE: Silverlight n-Puzzle Game JAVA CODE! PLS ^^< Mebz Fri, 26 Mar 2010 00:37:35 GMT RE: Silverlight n-Puzzle Game this game is awesome kukinggala Sun, 07 Mar 2010 20:20:08 GMT RE: Silverlight n-Puzzle Game Hi <span id="ctl00_cphMiddle_ContentPlaceHolderContent_itemComments_dlstComments_ctl04_lblCommentAuthor">FigmentEngine</span><br /> Thank you for the idea, i was sure there is a smart solution of problem with the tile images, but I could not find it. I will try your solution.<br /> ppopadiyn Wed, 25 Mar 2009 08:04:41 GMT RE: Silverlight n-Puzzle Game I did a similar puzzle to yours <a shape="rect" href="" shape="rect"></a> a while back. You don't need a webservice to create sub-tiles fom an image - use RectangleGeometry and image.Clip (you basically copy the image, clip it to the size you need then offset it in canvas:<br /> <br /> <p>  private Canvas SetupCanvas(Uri uri, int ratio, int sourceRow, int sourceColumn)<br />   {<br />    Image image = new Image();</p> <p>   image.Width = tilewidth * ratio;<br />    image.Height = tileheight * ratio;<br />    image.Stretch = Stretch.UniformToFill;</p> <p>   RectangleGeometry r = new RectangleGeometry();<br />    r.Rect = new Rect((sourceColumn * tilewidth), (sourceRow * tileheight), tilewidth, tileheight);<br />    image.Clip = r;<br />    r.RadiusX = 7;<br />    r.RadiusY = 7;</p> <p>   image.Source = new BitmapImage(uri);<br />    image.SetValue(Canvas.TopProperty, Convert.ToDouble(sourceRow * tileheight * -1));<br />    image.SetValue(Canvas.LeftProperty, Convert.ToDouble(sourceColumn * tilewidth * -1));</p> <p>   Canvas tileCanvas = new Canvas();<br />    tileCanvas.Children.Add(image);<br />    tileCanvas.MouseLeftButtonDown += new MouseButtonEventHandler((source, msg) => Debug.WriteLine(name));</p> <p>   return tileCanvas;<br />   }</p> FigmentEngine Tue, 24 Mar 2009 18:09:29 GMT RE: Silverlight n-Puzzle Game <p>Amazing!!</p> zafi Fri, 13 Feb 2009 05:39:01 GMT RE: Silverlight n-Puzzle Game <p>Great article!!!</p> Radenko Zec Thu, 12 Feb 2009 11:30:12 GMT