tags:

views:

1048

answers:

2

Hi

Is there any way to display scrollabletext in loose xaml? The equivalent in HTML would be

<div style="overflow:scroll">some long bit of text here</div>

Can you do this in loose xaml? From my experiments so far it seems that in loose xaml

a) you cannot use TextBox it must be TextBlock b) TextBlock doesn't seem to have any styling settings which would make it scrollable c) ScrollViewer doesn't seem to be allowed in loose xaml

Any help gratefully appreciated.

Steve

A: 

you can use a textbox for scrolling text e.g.:

<TextBox Text="{Binding YourText}" VerticalContentAlignment="Top"
 TextWrapping="Wrap" AcceptsReturn="True" VerticalScrollBarVisibility="Auto"
MaxHeight="200" MaxWidth="300"/>

this will show scrollbars if your text doesn't fit in the displayed area.

Joachim Kerschbaumer
A: 

Joachim

I think works in compiled xaml - but not (to my knowledge) in loose xaml.

Anyway, ideally in loose xaml. If not any flavor of xaml which does not require the user to install anything.

Essentially all I need is just the ability to see a scrolling region of text inside a browser without requiring any installation.

(Currently am thinking of just having the visual stuff in xaml with maybe scrolling divs outside of it in html)

Steve

@Stiv: Stackoverflow is not a forum. Please comment on Joachim's answer or edit your question. Do not answer with comments.
Josh G