Hello again You must be getting sick of me :-P j/k
Ok I have a simple video player setup ultimately I would like to connect it to a Database. I am writing the database code but I am unsure how to $_GET a value in IronPython. Although I will be honest and haven't done to much research as of yet ;-) that will begin tonight. But if you have any advice on passing values to IronPython that would be greatly appreciated On Mon, Jan 11, 2010 at 2:32 PM, Jimmy Schementi < jimmy.scheme...@microsoft.com> wrote: > And to answer your initial question about images in buttons, here's how to > do it: > > from System.Windows.Controls import Button, Image > from System.Windows.Media.Imaging import BitmapImage > > btn = Button( > Width = 25, > Height = 20, > Content = Image( > Source = BitmapImage(Uri("images/stop.jpg", UriKind.Relative)) > ) > ) > > This assumes that "images/stop.jpg" is relative to the XAP file of your > application. To add an image to a System.Windows.Controls.Button, you must > use System.Windows.Controls.Image. The Image control then lets you set its > Source, which is where System.Windows.Media.Imaging.BitmapImage comes into > play. Confusing, I know =( > > This syntax uses IronPython's ability to use Python's named parameters to > set properties; it makes working with Silverlight and WPF objects a lot less > painful. Not using named parameters would look like this: > > btn = Button() > btn.Width = 25 > btn.Height = 20 > img = Image() > img.Source = BitmapImage(Uri("images/stop.jpg", UriKind.Relative)) > btn.Content = img > > Oy =P > > Let me know if you have any other Silverlight questions, > ~Jimmy > _______________________________________________ > 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