?
Solved

Windows Phone 7 - Text Block not displaying all the text it is assigned.

Posted on 2011-02-14
4
Medium Priority
?
1,632 Views
Last Modified: 2014-11-12
I have a text block inside a scroll viewer.  I am reading a text file into a string and assigning it to the text block.  When I step through the code the complete text document has been properly assigned to the string and the text block displays the 1st "x" characters as it should.  The remaining text isn't visible but you can still scroll the empty text down (as if it was there) until you hit the bottom.  It's like the text block knows the character count but just isn't displaying it all... though it appears to be "using" the appropriate space it would take to display it... seems to be a weird quirk that I'm hoping will be logical to someone :)

To create the string I am doing the following...

var resource = Application.GetResourceStream(new Uri(@"/Tracker;component/HelpFileText.txt", UriKind.Relative));
StreamReader streamReader = new StreamReader(resource.Stream);
StringBuilder sb2 = new StringBuilder();
sb2.Append(streamReader.ReadToEnd());
txblTest.Text = sb2.ToString();

The xaml is very basic... inside te content panel I have a scroll viewer and the text block is inside that.  Scroll view's height is 440 x 591 and the text blocks is Auto(0) for both.

It appears to be displaying about 40% of the text in the document before it "goes black"... is there possibly some restriction to character length max in a textblock?  One thing you can't see on the screen shot is that the vertical "scroll bar indicator" is about 1/2 the way down the screen... you can continue to scroll down through the blank area until you hit the bottom.

Thanks,
Greg

 Screen shot
0
Comment
Question by:Greg_L_WER
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 4

Expert Comment

by:hb11
ID: 34911735
0
 

Author Comment

by:Greg_L_WER
ID: 34911888
Thanks hb11... unfortunately that link is to my initial question on this issue :(  It did solve part of my issue but uncovered another one...
0
 
LVL 4

Accepted Solution

by:
hb11 earned 1000 total points
ID: 34919985
I'm sorry I didn't see that yesterday.

Though you need to have some experience and time  to find out what exactly to do:
http://blogs.msdn.com/b/priozersk/archive/2010/09/08/creating-scrollable-textblock-for-wp7.aspx
may give you the answer you're looking for.

Hope this helps you a little bit more :)
0
 

Author Comment

by:Greg_L_WER
ID: 34954381
Thanks for your help hb11... looks like that will do the trick :)  I knew there had to be some logical reason... finding it is always the trick.
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By default the complete memory dump option is disabled in windows . If we want to enable the complete memory dump for a diagnostic purpose, we have a solution for it. here we are using the registry method to enable this.
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question