Hello again<br><br>You must be getting sick of me :-P j/k<br><br>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&#39;t done to much research as of yet ;-) that will begin tonight.<br>
<br>But if you have any advice on passing values to IronPython that would be greatly appreciated<br><br><br><br><div class="gmail_quote">On Mon, Jan 11, 2010 at 2:32 PM, Jimmy Schementi <span dir="ltr">&lt;<a href="mailto:Jimmy.Schementi@microsoft.com">Jimmy.Schementi@microsoft.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">And to answer your initial question about images in buttons, here&#39;s how to do it:<br>
<br>
from System.Windows.Controls import Button, Image<br>
<div class="im">from System.Windows.Media.Imaging import BitmapImage<br>
<br>
</div>btn = Button(<br>
    Width = 25,<br>
    Height = 20,<br>
    Content = Image(<br>
        Source = BitmapImage(Uri(&quot;images/stop.jpg&quot;, UriKind.Relative))<br>
    )<br>
)<br>
<br>
This assumes that &quot;images/stop.jpg&quot; 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 =(<br>

<br>
This syntax uses IronPython&#39;s ability to use Python&#39;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:<br>

<br>
btn = Button()<br>
btn.Width = 25<br>
btn.Height = 20<br>
img = Image()<br>
img.Source = BitmapImage(Uri(&quot;images/stop.jpg&quot;, UriKind.Relative))<br>
btn.Content = img<br>
<br>
Oy =P<br>
<br>
Let me know if you have any other Silverlight questions,<br>
<font color="#888888">~Jimmy<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</a><br>
<a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><br>
</div></div></blockquote></div><br>