The Silverlight Directory Logo

View Details

Question from the Silverlight forums: Limiting TextBlock text rendering to a specific region

Updated: 11/21/2007 7:32:49 AM
Category:Software/Web Development > Training / Video / Audio
Type:Tutorial
Target:Silverlight 1.1 Alpha
Created:11/21/2007 7:32:49 AM
Company:Justin-Josef Angel [MVP]
Website:www.JustinAngel.Net
Item Url:blogs.microsoft.co.il/ blogs/ justinangel/ archive/ 2007/ 11/ 20/ question-from-the-silverlight-forums-limiting-textblock-text-rendering-to-a-specific-region.aspx

Summary

Question: I've got this XAML code in my application: <Canvas Height="25" Width="75" Canvas.Top="250" Canvas.Left="250" Background="LightGray"> <TextBlock Width="75" FontSize="12" Text="This is a long line"></TextBlock> </Canvas> Problem is eventually the text goes beyond border of canvas. Ideally I want text string be cut right by canvas border. I though about using text wrapping. But the TextBlock would wrap the text and continue on next line which is outside of canvas as well. Does anyone know how to do that with Silverlight?

Details

No Details Posted

[Back]

 
Best Viewed With:
IE 7+ / Firefox 2.0+

Be sure to check our other sites:


Or our affiliates (USA only):

 

(C) Copyright 2007-2009 All Rights Reserved By R & J Technologies - www.RJSoft.com