<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.silverlight.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Programming with .NET - General</title><link>http://forums.silverlight.net/forums/17.aspx</link><description>General discussions around authoring Silverlight .NET applications.</description><dc:language>en</dc:language><generator>CommunityServer 2007 (Build: 20416.853)</generator><item><title>Re: Re: 100% width &amp;amp; 100% height, dont like re-load</title><link>http://forums.silverlight.net/forums/thread/26907.aspx</link><pubDate>Thu, 17 Jan 2008 19:30:21 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:26907</guid><dc:creator>niklasnson</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/26907.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=26907</wfw:commentRss><description>&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Private&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Function&lt;/font&gt;&lt;font size="2"&gt; BrowserHeight() &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Integer&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Return&lt;/font&gt;&lt;font size="2"&gt; HtmlPage.Document.DocumentElement.GetProperty(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Of&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Integer&lt;/font&gt;&lt;font size="2"&gt;)(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;clientHeight&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;)&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;End&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Function&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Private&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Function&lt;/font&gt;&lt;font size="2"&gt; BrowserWidth() &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Integer&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Return&lt;/font&gt;&lt;font size="2"&gt; HtmlPage.Document.DocumentElement.GetProperty(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Of&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Integer&lt;/font&gt;&lt;font size="2"&gt;)(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;clientWidth&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;)&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;End&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Function&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;nbsp;&lt;/p&gt;&lt;/font&gt;And it works like a charm... Thank you all for helping me out!</description></item><item><title>Re: Re: Re: 100% width &amp;amp;amp; 100% height, dont like re-load</title><link>http://forums.silverlight.net/forums/thread/26868.aspx</link><pubDate>Thu, 17 Jan 2008 11:31:11 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:26868</guid><dc:creator>niklasnson</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/26868.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=26868</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/silverlight/images/icon-quote.gif"&gt; &lt;strong&gt;Sopheap Ly:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt; 
&lt;p&gt;Have you tried putting those code in the Resize() event yet? You need to do this because the host element width/height is fluid. &lt;br /&gt;&lt;/p&gt;
&lt;p&gt;txtLoading is still accessible from everywhere. I don&amp;#39;t know why you said if you call txtLoading in the Resize(), other parts would not be able to access it.&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Hi Sopheap Ly, &lt;br /&gt;&lt;br /&gt;Thanks for the reply. What i ment was not that i would not be abel to access txtLoading. Just that i dont want to put all of my code in the Resize() sub.&lt;br /&gt;That i want to be be abel to add text and elements in other sub&amp;#39;s / functions and still be abel to get them in correct placement of the screen. Are at work currently but will test some more when i get home. Thanks!&lt;/p&gt;</description></item><item><title>Re: Re: 100% width &amp;amp; 100% height, dont like re-load</title><link>http://forums.silverlight.net/forums/thread/26863.aspx</link><pubDate>Thu, 17 Jan 2008 10:47:58 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:26863</guid><dc:creator>Yi-Lun Luo - MSFT</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/26863.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=26863</wfw:commentRss><description>&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 0pt;"&gt;&lt;span&gt;&lt;font face="Calibri" size="3"&gt;Hello, this is a known issue in the current alpha bits, and has been fixed in Silverlight 2.0 Beta (but may be will introduce some break changes). In the current bits, BrowserHost.ActualWidth/Height will return 0 in the Loaded event. If you want to work around this issue now, you can try this:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;span&gt;&lt;font face="Calibri" size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;/span&gt; 
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 0pt;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;&lt;span style="mso-tab-count:2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Dim screenWidth As Integer = (HtmlPage.Document.DocumentElement.GetProperty(Of Integer)(&amp;quot;clientWidth&amp;quot;))&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 0pt;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;&lt;span style="mso-tab-count:2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Dim screenHeight As Integer = (HtmlPage.Document.DocumentElement.GetProperty(Of Integer)(&amp;quot;clientHeight&amp;quot;))&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 0pt;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;&lt;span style="mso-tab-count:2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;txtLoading.SetValue(Canvas.LeftProperty, ((screenWidth - test.ActualWidth) / 2))&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 0pt;"&gt;&lt;span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;&lt;span style="mso-tab-count:2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;txtLoading.SetValue(Canvas.TopProperty, ((screenHeight - test.ActualHeight) / 2))&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;span&gt;&lt;font face="Calibri" size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;/span&gt; 
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 0pt;"&gt;&lt;span&gt;&lt;font face="Calibri" size="3"&gt;You’ll probably want to wrap these code into a method, because you need to call it both in Loaded and Resize.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;span&gt;&lt;font face="Calibri" size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;/span&gt; 
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 0pt;"&gt;&lt;span&gt;&lt;font face="Calibri" size="3"&gt;But I suggest you to wait for Silverlight 2.0 Beta, because there’s likely to be some break changes. Sorry I can’t provide you with more details at this time…&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Re: Re: 100% width &amp;amp;amp; 100% height, dont like re-load</title><link>http://forums.silverlight.net/forums/thread/26844.aspx</link><pubDate>Thu, 17 Jan 2008 08:20:02 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:26844</guid><dc:creator>Sopheap Ly</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/26844.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=26844</wfw:commentRss><description>&lt;p&gt;Have you tried putting those code in the Resize() event yet? You need to do this because the host element width/height is fluid. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;txtLoading is still accessible from everywhere. I don&amp;#39;t know why you said if you call txtLoading in the Resize(), other parts would not be able to access it.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Re: 100% width &amp;amp; 100% height, dont like re-load</title><link>http://forums.silverlight.net/forums/thread/26833.aspx</link><pubDate>Thu, 17 Jan 2008 05:53:07 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:26833</guid><dc:creator>niklasnson</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/26833.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=26833</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/silverlight/images/icon-quote.gif"&gt; &lt;strong&gt;Sopheap Ly:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt; 
&lt;p&gt;Like Bill Reise mentioned before, why don&amp;#39;t you just replace with this:&lt;/p&gt;
&lt;p class="MsoNormal"&gt;Don&amp;#39;t use the _width all the time, because variable stores by value not reference. That means when &lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;Interop.BrowserHost.ActualWidth changes, the&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt; _width does not&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;. So use &lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;Interop.BrowserHost.ActualWidth directly.&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;Ok so i removed my _width and _height and so now my code looks like this: &lt;font color="#0000ff" size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;Partial&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Public&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Class&lt;/font&gt;&lt;font size="2"&gt; Page&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Inherits&lt;/font&gt;&lt;font size="2"&gt; Canvas&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Public&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Sub&lt;/font&gt;&lt;font size="2"&gt; Page_Loaded(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;ByVal&lt;/font&gt;&lt;font size="2"&gt; o &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Object&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;ByVal&lt;/font&gt;&lt;font size="2"&gt; e &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; EventArgs)&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&amp;#39; Required to initialize variables&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;InitializeComponent()&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&amp;#39; Add handlers&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;AddHandler&lt;/font&gt;&lt;font size="2"&gt; Interop.BrowserHost.Resize, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;AddressOf&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Me&lt;/font&gt;&lt;font size="2"&gt;.BrowserHost_Resize&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;txtLoading.Text = &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;Meantime Media&amp;quot;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;txtLoading.SetValue(Canvas.TopProperty, (Convert.ToDouble(Interop.BrowserHost.ActualHeight - txtLoading.ActualHeight) / 2))&lt;/p&gt;
&lt;p&gt;txtLoading.SetValue(Canvas.LeftProperty, (Convert.ToDouble(Interop.BrowserHost.ActualWidth - txtLoading.ActualWidth) / 2))&lt;/p&gt;
&lt;p&gt;txtDebuging.FontSize = 9&lt;/p&gt;txtDebuging.Text = &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;Width: &amp;quot;&lt;/font&gt;&lt;font size="2"&gt; + Interop.BrowserHost.ActualWidth.ToString + &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;, Height: &amp;quot;&lt;/font&gt;&lt;font size="2"&gt; + Interop.BrowserHost.ActualHeight.ToString&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;End&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Sub&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Private&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Sub&lt;/font&gt;&lt;font size="2"&gt; BrowserHost_Resize(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;ByVal&lt;/font&gt;&lt;font size="2"&gt; sender &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Object&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;ByVal&lt;/font&gt;&lt;font size="2"&gt; e &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; System.EventArgs)&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;font size="2"&gt; parentCanvas &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; Canvas = FindName(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;parentCanvas&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;)&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;parentCanvas.Width = Interop.BrowserHost.ActualWidth&lt;/p&gt;
&lt;p&gt;parentCanvas.Height = Interop.BrowserHost.ActualHeight&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;End&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Sub&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; 
&lt;p&gt;End&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Class&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#000000"&gt;But the trubble with Refresh (F5) is still there. Most of the time when i hit Refresh, the value of Interop.BrowserHost.ActualWidth is 0 and the same for &lt;br /&gt;Interop.BrowserHost.ActualHeight. I dont want to place all the code in BrowserHost_Resize, becourse i want to be abel to work with txtLoading etc from other parts in the code aswell. &lt;/font&gt;&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: Re: 100% width &amp;amp; 100% height, dont like re-load</title><link>http://forums.silverlight.net/forums/thread/26663.aspx</link><pubDate>Wed, 16 Jan 2008 17:29:48 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:26663</guid><dc:creator>Sopheap Ly</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/26663.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=26663</wfw:commentRss><description>&lt;p&gt;Like Bill Reise mentioned before, why don&amp;#39;t you just replace with this:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:&amp;#39;Courier New&amp;#39;;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;Private&lt;/span&gt; &lt;span style="color:blue;"&gt;Sub&lt;/span&gt; BrowserHost_Resize(&lt;span style="color:blue;"&gt;ByVal&lt;/span&gt;
sender &lt;span style="color:blue;"&gt;As&lt;/span&gt; &lt;span style="color:blue;"&gt;Object&lt;/span&gt;,
&lt;span style="color:blue;"&gt;ByVal&lt;/span&gt; e &lt;span style="color:blue;"&gt;As&lt;/span&gt;
System.EventArgs)&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:&amp;#39;Courier New&amp;#39;;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;Dim&lt;/span&gt;
parentCanvas &lt;span style="color:blue;"&gt;As&lt;/span&gt; Canvas = FindName(&lt;span&gt;&amp;quot;parentCanvas&amp;quot;&lt;/span&gt;)&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:&amp;#39;Courier New&amp;#39;;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;txtLoading.SetValue(Canvas.TopProperty,
Convert.ToDouble((Interop.BrowserHost.ActualHeight - txtLoading.ActualHeight) /
2))&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"&gt;&lt;span style="font-size:10pt;font-family:&amp;#39;Courier New&amp;#39;;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;txtLoading.SetValue(Canvas.LeftProperty,
Convert.ToDouble((Interop.BrowserHost.ActualWidth - txtLoading.ActualWidth) /
2))&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10pt;line-height:115%;font-family:&amp;#39;Courier New&amp;#39;;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;End&lt;/span&gt; &lt;span style="color:blue;"&gt;Sub&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;Don&amp;#39;t use the _width all the time, because variable stores by value not reference. That means when &lt;span style="font-size:10pt;font-family:&amp;#39;Courier New&amp;#39;;"&gt;Interop.BrowserHost.ActualWidth changes, the&lt;/span&gt;&lt;span style="font-size:10pt;font-family:&amp;#39;Courier New&amp;#39;;"&gt; _width does not&lt;/span&gt;&lt;span style="font-size:10pt;font-family:&amp;#39;Courier New&amp;#39;;"&gt;. So use &lt;/span&gt;&lt;span style="font-size:10pt;font-family:&amp;#39;Courier New&amp;#39;;"&gt;Interop.BrowserHost.ActualWidth directly.&lt;/span&gt;&lt;span style="font-size:10pt;font-family:&amp;#39;Courier New&amp;#39;;"&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: 100% width &amp; 100% height, dont like re-load</title><link>http://forums.silverlight.net/forums/thread/26603.aspx</link><pubDate>Wed, 16 Jan 2008 06:31:05 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:26603</guid><dc:creator>niklasnson</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/26603.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=26603</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/silverlight/images/icon-quote.gif"&gt; &lt;strong&gt;Bill Reiss:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt; 
&lt;p&gt;Yes that&amp;#39;s what&amp;#39;s happening, you&amp;#39;re setting the width and height of the canvas, but then setting the text to the width and height of the page object, which haven&amp;#39;t been set, so they will be 0&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Any tip on work around for this ?&lt;/p&gt;</description></item><item><title>Re: 100% width &amp; 100% height, dont like re-load</title><link>http://forums.silverlight.net/forums/thread/26601.aspx</link><pubDate>Wed, 16 Jan 2008 06:30:28 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:26601</guid><dc:creator>niklasnson</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/26601.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=26601</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/silverlight/images/icon-quote.gif"&gt; &lt;strong&gt;mario_mh:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt; 
&lt;p&gt;just don&amp;#39;t set width/height and i guess this will solve the problem ;)&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Yes im almost there, just need to pull some more hair from my head. The problem is that a relly want a full screen to work with. It would be so nice. But now i really dont know what to do anymore.... argh...&lt;/p&gt;</description></item><item><title>Re: 100% width &amp; 100% height, dont like re-load</title><link>http://forums.silverlight.net/forums/thread/26570.aspx</link><pubDate>Tue, 15 Jan 2008 22:55:35 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:26570</guid><dc:creator>mario_mh</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/26570.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=26570</wfw:commentRss><description>&lt;p&gt;just don&amp;#39;t set width/height and i guess this will solve the problem ;)&lt;/p&gt;</description></item><item><title>Re: 100% width &amp; 100% height, dont like re-load</title><link>http://forums.silverlight.net/forums/thread/26569.aspx</link><pubDate>Tue, 15 Jan 2008 22:47:17 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:26569</guid><dc:creator>Bill Reiss</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/26569.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=26569</wfw:commentRss><description>&lt;p&gt;Yes that&amp;#39;s what&amp;#39;s happening, you&amp;#39;re setting the width and height of the canvas, but then setting the text to the width and height of the page object, which haven&amp;#39;t been set, so they will be 0&lt;/p&gt;</description></item><item><title>Re: 100% width &amp; 100% height, dont like re-load</title><link>http://forums.silverlight.net/forums/thread/26557.aspx</link><pubDate>Tue, 15 Jan 2008 20:37:46 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:26557</guid><dc:creator>mario_mh</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/26557.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=26557</wfw:commentRss><description>&lt;p&gt;btw, do you overwrite your new and height-property?&lt;/p&gt;
&lt;p&gt;prepend a &amp;quot;MyBase&amp;quot; in front of height/width ... maybe you do smth with height and width ... &lt;/p&gt;</description></item><item><title>Re: 100% width &amp; 100% height, dont like re-load</title><link>http://forums.silverlight.net/forums/thread/26556.aspx</link><pubDate>Tue, 15 Jan 2008 20:34:50 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:26556</guid><dc:creator>mario_mh</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/26556.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=26556</wfw:commentRss><description>&lt;p&gt;try setting breakpoints and check the value.&lt;/p&gt;
&lt;p&gt;no, i don&amp;#39;t use 640x480 ;). mine is 1440x1280&lt;/p&gt;</description></item><item><title>Re: 100% width &amp; 100% height, dont like re-load</title><link>http://forums.silverlight.net/forums/thread/26553.aspx</link><pubDate>Tue, 15 Jan 2008 20:32:41 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:26553</guid><dc:creator>niklasnson</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/26553.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=26553</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/silverlight/images/icon-quote.gif"&gt; &lt;strong&gt;Bill Reiss:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt; 
&lt;p&gt;Set the text in the BrowserHost_Resize as well, the BroswerHost_Resize hasn&amp;#39;t executed by the time Page_Loaded runs. &lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Same thing happens, it still gets 0 value. But my application are 100% width &amp;amp; height. Hmmm... Dont know what to try out... &lt;br /&gt;&amp;nbsp;Is it just me, or does anyone elese has this trubble. I mean &lt;font size="2"&gt;BrowserHost_Resize is firering, coz in my window anywhere i right click i get a &lt;br /&gt;silverlight popup. But the text wont get it... &lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;Btw, thanks for helping out!&lt;/font&gt;</description></item><item><title>Re: 100% width &amp; 100% height, dont like re-load</title><link>http://forums.silverlight.net/forums/thread/26551.aspx</link><pubDate>Tue, 15 Jan 2008 20:28:53 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:26551</guid><dc:creator>niklasnson</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/26551.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=26551</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/silverlight/images/icon-quote.gif"&gt; &lt;strong&gt;mario_mh:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt; 
&lt;p&gt;i get 480x640&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Is that youre current resolution on screen ? &lt;/p&gt;
&lt;p&gt;&amp;nbsp;Btw, thanks for helping out!&lt;/p&gt;</description></item><item><title>Re: 100% width &amp; 100% height, dont like re-load</title><link>http://forums.silverlight.net/forums/thread/26545.aspx</link><pubDate>Tue, 15 Jan 2008 20:11:06 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:26545</guid><dc:creator>mario_mh</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/26545.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=26545</wfw:commentRss><description>&lt;p&gt;i get 480x640&lt;/p&gt;</description></item></channel></rss>