How to display long content in wp7? - windows-phone-7

Project target on wp7.5 and above
I use a listbox to display detail information of a post in a forum.
I use a richtextbox to show the body of the post which is mixed by texts and pictures. I create a behavior and bind tje content to the RichTextBox.
But what tricks me is the RichTextBox can't display all the body. I check online, get to know the reason is the height limitations of the controls which height can not be more than 2048px.
I saw people recommend a article named The Scrollable TextBlock as a solution. But I found no way to implement this.
1 You can't put a ScrollView inside a richtextbox
2 Scrollable TextBlock only supports text, but what I want is a control which can hold both text, image.
3 can bind with text
How to solve the problem?

Just a suggestion you can use the webbrowser control in your application and for the text and images display you can generate the Run time HTML and pass to webbrowser.
you can get an idea to render your text in html form see this link
Hope it helps

Related

How to change the size (resolution) of one pageview in Spotfire

I saw a viz in the company's repository, and I wish to replicate one of the feature.
The viz is consist of several pages with an introductory page. The introductory page contained a lot of information with a scrollable canvas, while other detail page had a fixed-to-window way of presenting data, showing each segment in one screen without the overall scroll bar.
What I want to know is how to only make one or part of the pages in the dxp file able to enable the scroll bar (larger canvas height), while the rest having the fit-to screen way of displaying the viz. Any approach will be appreciated.
PS:
The Document Property→General→Visualization area size→Custom size method changes the canvas size of all visualization table. Which is not able to fulfill this feature, as this property changes the canvas size of all pages in the dxp file, which is not what I expected.
sounds like they used a Text Area but it's hard to tell without seeing the document.
you can insert a Text Area the same way you do a visualization (via the toolbar or the main menu). you can then right click the Text Area to edit it either with the WYSIWYG editor or in raw HTML. Text Areas will show scrollbars to match the length of your content.

How is/can the WP7 Office Hub panorama header markup be created?

WP7 Office hub panorama header looks like this:
What is it?
one solid image
two images (one for logo, one for "microsoft Office")
all vector elements
The answer interests me only because I know how to achieve this only in the first two cases.
Basically I need to create a TextBlock in PanoramaHeaderTemplate, that would be like this:
<TextBlock Foreground="Black"><Run Text="smallBold" FontWeight="Bold"/><Run Text="Normal"></TextBlock>
So the resulting panorama should have a look:
If I use FontWeight directive in the PanoramaHeaderTemplate - it for some reason has no effect.
If I use PanoramaTitleTemplate, I get the controllable text weight, but I have a panorama header element appear for some reason, that only displays a x:Key element name of the PanoramaItem, that results in an appearance of a header I don't need at all. This happens even if I don't define the panorama header.
So which is the correct way to achieve the look on the Panorama "upper element", whether it is Title or Header, that is shown on the smallBold.Normal figure?
I don't know what Office uses but it's irrelevant because, as a native app, it wasn't created with Silverlight.
You can create the same effect by changing the Panorama.TitleTemplate to contain whatever you want (TextBlocks, images, etc.). You may also have to adjust the defautl Style applied to the template to set a Height and Width for the PanningTitleLayer.
It's an image, straight across the panorama. It's very simple, as the panorama view was set up to display long images to support a better scrolling feel for the user.
So i would look into using images, as it's easier to achieve, what you are trying to do, with images, rather than a background image.
Some useful related questions/articles:
May Help, StackOverflow
UI Concepts For Windows Phone 7
How I made the ‘myChannel9' wp7 app
Capturing Windows Phone 7 Panorama Images

WP7 wrap text around image

I have an image with a large amount of text to the right in a textblock control. How can I get that text to wrap on the right and below the image?
The standard TextBlock and Image controls wouldn't work for you.
I think you'd either:
have to use HTML inside a WebBrowser (this is potentially very slow and ugly!)
have to use multiple TextBlock's and you'd have to measure the text in order to implement the wrapping out yourself.
It might be an idea to consider a different layout - is the text really free flowing and needs wrapped around the image? Or can the text be split up into header, caption, body, etc?

Displaying an image when hovering a label

I'm wondering if there is a simple and quick way of displaying an image when the user hovers a QLabel...
Since QLabel can be used to display QPixmap, I would like to display some kind of "preview" when hovering a QLabel...
Do you guys know how I could manage this ?
Thanks in advance !
You can set the tooltip to use html, including <img> tags. Will that do what you need?
As described in the docs, you can override the object's event handler if you need to do something fancier in a tooltip than can be done by default. (such as selecting a particular area of an image to put in the tooltip)
As long as you set the button size large enough, you should be able to capture the mouse-over events and display on mouse-over... but this seems like a somewhat strange way to go about things. Why not display all the images at first?
For those who are interested in the result proposed by jkerian :
Simply :
MyLabel->setToolTip("<html><img src="+MyImagePathAsString+"/></html>");
Will result in :
Thanks again to jkerian.
I don't know what kind of layout your QLabel is in, but I'm guessing it will cause weird layout changes if you just set the pixmap on the label when mouseovering it. Rather use a tooltip or just display a pixmap freely on the canvas.

disable text selection in gwt

i am pretty new to GWT,
i have an image that i have placed a text on top, i need the text to look as part of the image.
i have used the image widget and the HTML widget to position it on top of it, i need this text to change according the locale.
the problem that the text is selectable, so it does not look right.
1) is there any way to make the text un-selectable?
2) is there a better way to achieve that?
thanks
This is handled by the user-select attribute.
See: http://www.tek-tips.com/viewthread.cfm?qid=1184318&page=1

Resources