code_junkie

Silverlight 2.0 - scroll vertically, wrap horizontally

Nov 12th, 2011
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. <UserControl x:Class="MyProject.MyControl"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:WinControls="clr-namespace:Microsoft.Windows.Controls;
  5. assembly=Microsoft.Windows.Controls"
  6. Width="400" Height="300">
  7. <WinControls:DockPanel LastChildFill="True">
  8. ...
  9. <ScrollViewer x:Name="MessageScroll" HorizontalScrollBarVisibility="Hidden"
  10. VerticalScrollBarVisibility="Auto" BorderThickness="0" >
  11. <Controls:TextDisplay x:Name="TextDisplay"></Controls:TextDisplay>
  12. </ScrollViewer>
  13.  
  14. <UserControl x:Class="MyProject.TextDisplay"
  15. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  16. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  17. <TextBlock x:Name="TextDisplayText" TextWrapping="Wrap">
  18. </TextBlock>
  19. </UserControl>
Add Comment
Please, Sign In to add comment