<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 19.7.2010 18:15, Ian Hobson wrote:
<blockquote cite="mid:4C447A07.5060505@ianhobson.co.uk" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
On 19/07/2010 16:57, Lukas Cenovsky wrote:
<blockquote cite="mid:4C4475CC.7050801@bakalari.cz" type="cite">
<blockquote type="cite" style="color: rgb(0, 0, 0);">And I need
to
know how to find out where I can get the correct definition of
Size. <br>
</blockquote>
<br>
Grid is UIElement and you need System.Windows.Size for
UIElement.Measure - not System.Drawing.Size. See <a
moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://msdn.microsoft.com/en-us/library/system.windows.uielement.measure.aspx">http://msdn.microsoft.com/en-us/library/system.windows.uielement.measure.aspx</a>.
<br>
</blockquote>
Hi Lukas, <br>
<br>
Thanks for the info. I went to the page and it told me <br>
<br>
<strong>Namespace:</strong> <a moz-do-not-send="true"
href="http://msdn.microsoft.com/en-us/library/system.windows.aspx">System.Windows</a><br>
<strong>Assembly:</strong> <span>PresentationCore</span> (in
PresentationCore.dll)<br>
<br>
Therefore I ensured my code contained the two lines<br>
<br>
clr.AddReference("PresentationCore") <br>
from Systems.Windows import Size <br>
<br>
This gives me <br>
ImportError: Cannot import name Size<br>
<br>
giving the line numebr of the import line. <br>
<br>
Conclusion : I am missing something - and I don't know how to find
it
out. <br>
</blockquote>
<br>
Well, UIElement.Measure is in assembly PresentationCore but
System.Windows.Size structure is in assembly WindowsBase: <a
href="http://msdn.microsoft.com/en-us/library/system.windows.size.aspx">http://msdn.microsoft.com/en-us/library/system.windows.size.aspx</a>.
This is the link in Parameters section of UIElement.Measure -
availableSize parameter.<br>
<br>
--<br>
-- Lukáš<br>
</body>
</html>