Max Mustermann
Max Mustermann

Reputation: 43

IronPython: Cannot import 'Rect'-struct from System.Windows

When I try to import the 'Rect'-struct from System.Windows, IronPython-Interpreter claims that it cannot import.

Since I am using the IronPython Tools for Visual Studio, i can also see that the IntelliSense-DropDown does not show this struct.

Is there a need for a special statement for importing this struct?

Thanks!

Upvotes: 1

Views: 306

Answers (1)

Dino Viehland
Dino Viehland

Reputation: 6486

You probably need to do:

import clr clr.AddReference('WindowsBase')

to load the assembly Rect is declared in before importing it.

Upvotes: 2

Related Questions