I am still having problems. I don't think its a pathing issue but the Images don't display because I tried:
"/images/stop.jpg" "images/stop.jpg" and placing the images in the same folder "stop.jpg" here is a chunk of my code from System.Windows.Controls import Button, Orientation, StackPanel from System import Uri, UriKind from System.Windows.Media.Imaging import BitmapImage .................. self.stopB = Button() self.stopB.Width = 25 self.stopB.Height = 20 self.stopB.Content = BitmapImage(Uri("/images/stop.jpg", UriKind.Relative)) ..................... On Tue, Jan 5, 2010 at 1:10 PM, Jimmy Schementi < jimmy.scheme...@microsoft.com> wrote: > I think BitmapImage is what you’re looking for: > > > > from System import Uri, UriKind > > from System.Windows.Controls import Button > > from System.Windows.Media.Imaging import BitmapImage > > > > stopB = Button() > > stopB.Content = BitmapImage(Uri("images/stop.jpg", UriKind.Relative)) > > > > ~js > > > > *From:* users-boun...@lists.ironpython.com [mailto: > users-boun...@lists.ironpython.com] *On Behalf Of *Andrew Evans > *Sent:* Tuesday, January 05, 2010 12:44 PM > *To:* users@lists.ironpython.com > *Subject:* [IronPython] Can't Get an Image on a Button Ipy Silverlight > > > > I have been trying for two days now and can't seem to get it right. It > doesn't help that Silverlight returns no errors > > Can any one help me figure out how to use an image as a Button in > Silverlight > > some code I have tried > > self.stopB = Button() # stop button > imageSource = Uri("images/stop.jpg", UriKind.Relative) > stopImage = Image() > stopImage.Source = imageSource > self.stopB.Content = stopImage > > Cheers > > Andrew > > _______________________________________________ > Users mailing list > Users@lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > >
_______________________________________________ Users mailing list Users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com