<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Stretch a TextBlock</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : MarkupLabel Control : Stretch a TextBlock]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 20:52:55 +0000</pubDate>
  <lastBuildDate>Fri, 17 Apr 2015 02:45:38 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=22572</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Stretch a TextBlock :  I&amp;#039;m giving up. btw: I am...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=22572&amp;PID=73252&amp;title=stretch-a-textblock#73252</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2720">Albert1</a><br /><strong>Subject:</strong> 22572<br /><strong>Posted:</strong> 17 April 2015 at 2:45am<br /><br />I'm giving up. <div>&nbsp;</div><div>btw: I am using CJ MarkupControl. To write the XAML code, instead of use MarkupPad (no offence for CJ) I prefere to create a file .xaml, write the code with Notepad++ and render the&nbsp;.xaml code in&nbsp;Internet Explorer.</div><div>&nbsp;</div><div>I dont want to stretch the container. I need to stretch the Fontsize to adapt to the container.</div><div>&nbsp;</div><div>Without Viewbox:</div><div><table width="99%"><tr><td><pre class="BBcode">&lt;Page xmlns="<a href="http://schemas.microsoft.com/winfx/2006/xaml/presentati&#111;n" target="_blank" rel="nofollow">http://schemas.microsoft.com/winfx/2006/xaml/presentation</a>" xmlns:x="<a href="http://schemas.microsoft.com/winfx/2006/xaml" target="_blank" rel="nofollow">http://schemas.microsoft.com/winfx/2006/xaml</a>"&gt;<br>&nbsp;&lt;Grid Width="200" Height="100" Background="#FFFFFF80"&gt;<br>&nbsp;&nbsp;&lt;TextBlock Background='Red' Text="Some Text" /&gt;<br>&nbsp;&lt;/Grid&gt;<br>&lt;/Page&gt;</pre></td></tr></table></div><div>&nbsp;</div><div><img src="uploads/2720/noviewbox.jpg" height="102" width="203" border="0" /></div><div>&nbsp;</div><div>and what I need (using Viewbox or something else ...):</div><div>&nbsp;</div><div><table width="99%"><tr><td><pre class="BBcode">&lt;Page xmlns="<a href="http://schemas.microsoft.com/winfx/2006/xaml/presentati&#111;n" target="_blank" rel="nofollow">http://schemas.microsoft.com/winfx/2006/xaml/presentation</a>" xmlns:x="<a href="http://schemas.microsoft.com/winfx/2006/xaml" target="_blank" rel="nofollow">http://schemas.microsoft.com/winfx/2006/xaml</a>"&gt;<br>&nbsp;&lt;Grid Width="200" Height="100" Background="#FFFFFF80"&gt;<br>&nbsp;&nbsp;&lt;Viewbox&gt;<br>&nbsp;&nbsp;&nbsp;&lt;TextBlock Background='Red' Text="Some Text" /&gt;<br>&nbsp;&nbsp;&lt;/Viewbox&gt;<br>&nbsp;&lt;/Grid&gt;<br>&lt;/Page&gt;</pre></td></tr></table></div><div>&nbsp;</div><div><img src="uploads/2720/yesviewbox.jpg" height="101" width="202" border="0" /></div><div>&nbsp;</div><div>The scope was to automatically resize the content. With MarkupLabel you can autoresize all objects excluding the text (or I am not able to so I asked here).</div><div>&nbsp;</div><div>&nbsp;</div>]]>
   </description>
   <pubDate>Fri, 17 Apr 2015 02:45:38 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=22572&amp;PID=73252&amp;title=stretch-a-textblock#73252</guid>
  </item> 
  <item>
   <title><![CDATA[Stretch a TextBlock : Any Luck? ]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=22572&amp;PID=73251&amp;title=stretch-a-textblock#73251</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 22572<br /><strong>Posted:</strong> 16 April 2015 at 8:34pm<br /><br />Any Luck?<br>]]>
   </description>
   <pubDate>Thu, 16 Apr 2015 20:34:33 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=22572&amp;PID=73251&amp;title=stretch-a-textblock#73251</guid>
  </item> 
  <item>
   <title><![CDATA[Stretch a TextBlock : Not sure what you mean by execute...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=22572&amp;PID=73202&amp;title=stretch-a-textblock#73202</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 22572<br /><strong>Posted:</strong> 14 April 2015 at 3:47pm<br /><br />Not sure what you mean by execute with Internet Explorer - are you not using Codejock's MarkupLabel or other Codejock markup enabled control?<br><br>In Codejock's XAML implementation, if I drop the unsupported "ViewBox" tag, then the TextBlock fills the width and height of the Grid.<br><br><table width="99%"><tr><td><pre class="BBcode"><br>&lt;Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"&gt;<br>&nbsp;&lt;Grid Width="400" Height="300" Background="#FFFFFF80"&gt;<br>&nbsp;&nbsp; &lt;TextBlock Background='Red' Text="Some Text" /&gt;<br>&nbsp;&lt;/Grid&gt;<br>&lt;/Page&gt;<br></pre></td></tr></table><br>]]>
   </description>
   <pubDate>Tue, 14 Apr 2015 15:47:28 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=22572&amp;PID=73202&amp;title=stretch-a-textblock#73202</guid>
  </item> 
  <item>
   <title><![CDATA[Stretch a TextBlock :  I guess you mean to extend a...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=22572&amp;PID=73197&amp;title=stretch-a-textblock#73197</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2720">Albert1</a><br /><strong>Subject:</strong> 22572<br /><strong>Posted:</strong> 14 April 2015 at 2:40am<br /><br />I guess you mean to extend a Shape or a LayoutContainer. I need to auto size a TextBlock to fill the container.<div>&nbsp;</div><div>Try to create a file .xaml with these lines:</div><div><table width="99%"><tr><td><pre class="BBcode"></div><div>&lt;Page xmlns="<a href="http://schemas.microsoft.com/winfx/2006/xaml/presentati&#111;n" target="_blank" rel="nofollow">http://schemas.microsoft.com/winfx/2006/xaml/presentation</a>" xmlns:x="<a href="http://schemas.microsoft.com/winfx/2006/xaml" target="_blank" rel="nofollow">http://schemas.microsoft.com/winfx/2006/xaml</a>"&gt;<br>&nbsp;&lt;Grid Width="400" Height="300" Background="#FFFFFF80"&gt;<br>&nbsp;&nbsp;&lt;Viewbox&gt;<br>&nbsp;&nbsp;&nbsp;&lt;TextBlock Text="Some Text" /&gt;<br>&nbsp;&nbsp;&lt;/Viewbox&gt;<br>&nbsp;&lt;/Grid&gt;<br>&lt;/Page&gt;</div><div></pre></td></tr></table></div><div>&nbsp;</div><div>and execute with Internet Explorer. That's what I need.</div><div>&nbsp;</div><div>&nbsp;</div>]]>
   </description>
   <pubDate>Tue, 14 Apr 2015 02:40:00 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=22572&amp;PID=73197&amp;title=stretch-a-textblock#73197</guid>
  </item> 
  <item>
   <title><![CDATA[Stretch a TextBlock : Try HorizontalAlignment=&amp;#039;Stretch&amp;#039;...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=22572&amp;PID=73196&amp;title=stretch-a-textblock#73196</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 22572<br /><strong>Posted:</strong> 13 April 2015 at 11:17pm<br /><br />Try HorizontalAlignment='Stretch' - it worked for me.<br>]]>
   </description>
   <pubDate>Mon, 13 Apr 2015 23:17:24 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=22572&amp;PID=73196&amp;title=stretch-a-textblock#73196</guid>
  </item> 
  <item>
   <title><![CDATA[Stretch a TextBlock :  Any idea on how to render a...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=22572&amp;PID=73193&amp;title=stretch-a-textblock#73193</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2720">Albert1</a><br /><strong>Subject:</strong> 22572<br /><strong>Posted:</strong> 13 April 2015 at 6:45am<br /><br />Any idea on how to render a TextBlock to fill available space.<div>&nbsp;</div><div>Viewbox doesnt work:</div><div>&nbsp;</div><div><table width="99%"><tr><td><pre class="BBcode"></div><div>&nbsp; &lt;Grid Width="400" Height="300"&gt;<br>&nbsp;&nbsp;&nbsp; &lt;Viewbox&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;TextBlock TextWrapping="Wrap" Text="Some Text" /&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/Viewbox&gt;<br>&nbsp;&nbsp; &lt;/Grid&gt;</div><div></pre></td></tr></table></div><div>&nbsp;</div><div>neither ScaleTransform:</div><div>&nbsp;</div><div><table width="99%"><tr><td><pre class="BBcode"></div><div>&lt;TextBlock FontSize="20" Text="Some Text"&gt;<br>&nbsp; &lt;TextBlock.RenderTransform&gt;<br>&nbsp;&nbsp;&nbsp; &lt;ScaleTransform ScaleX="2.5" ScaleY="1.0" /&gt;<br>&nbsp; &lt;/TextBlock.RenderTransform&gt;<br>&lt;/TextBlock&gt;</div><div></pre></td></tr></table></div><div>&nbsp;</div><div>Thank you</div><div>&nbsp;</div>]]>
   </description>
   <pubDate>Mon, 13 Apr 2015 06:45:27 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=22572&amp;PID=73193&amp;title=stretch-a-textblock#73193</guid>
  </item> 
 </channel>
</rss>