- Generic.xaml: File contains style and template for custom control. This file is located in Themes folder. WP7 tools doesn't contains Resources.xaml file template. So I created xml file and name it as "Generic.xaml".
- TrimmedTextBlock.cs: It is implementation of custom control. I just copied this file. One more note: I decrement c_POINTS_COUNT to "1" because screen resolution of desktop and mobile versions are different.
Showing posts with label Trimmed. Show all posts
Showing posts with label Trimmed. Show all posts
Monday, February 7, 2011
Trimmed TextBlock for Windows Phone 7.
Wednesday, March 24, 2010
Trimmed TextBlock for Silverlight.
Download source files - hereNot always Silverlight TextBlock that contains long text has enough space for shows all this text. TextBlock clips text in this case - this behaviour isn't best way for this. Because I wait that TextBlock not only trims but also adds "..." to clipped text. WPF has brilliant property that helps to resolve this trouble - TextTrimming. I implemented this possibility for Silverlight and now want to present it for you. Furthermore I implemented ToolTip that shows trimmed text (only if text is trimmed!)
Enjoy!UPD: I have just updated performance and behaviour when width defined zero.
Subscribe to:
Posts (Atom)