From: Benjamin Kaplan on
On Sun, Jun 27, 2010 at 10:36 AM, Ian Hobson <ian(a)ianhobson.co.uk> wrote:
> Hi All,
>
> According to this page
>
> http://msdn.microsoft.com/en-us/library/system.windows.controls.stackpanel.aspx
>
> StackPanel is in the System.Windows.Controls Namespace
>
> When I try and set up a reference to that Namespace I get a "Could not add
> reference to assembly
> System.Windows.Controls" error on the line that reads
>
> clr.AddReference('System.Windows.Controls')
>
> Can anyone shed light on what is going wrong?
>
> Many thanks
>
> Ian
> --

You don't add references to namespaces. You add references to
assemblies and you then you import the namespace.

>From the documentation:
'''
Namespace: System.Windows.Controls
Assembly: PresentationFramework (in PresentationFramework.dll)
'''

So you would do
clr.AddReference("PresentationFramework")
import System.Windows.Controls

> http://mail.python.org/mailman/listinfo/python-list
>