Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

  • vind-surfer

    vind-surfer

    Member

    3 Points

    12 Posts

    Re: Few problems using TextBlock (Scrolling and Formatting)

    Mar 28, 2010 03:57 PM | LINK

    Hi!

    I have the same problem width scrolling textblock inside a scrollviewer. Here is my code, and I cannot understand whats wrong! I have replaced real text with Mytext.

      <ScrollViewer Margin="203,8,8,8" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
       <ScrollViewer.BorderBrush>
        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
         <GradientStop Color="Black" Offset="0"/>
         <GradientStop Color="Black" Offset="1"/>
         <GradientStop Color="#FF590F0F" Offset="0.003"/>
         <GradientStop Color="#FF591111" Offset="1"/>
        </LinearGradientBrush>
       </ScrollViewer.BorderBrush>
       <TextBlock TextWrapping="Wrap" Width="560"><Run FontSize="21.333" Foreground="#FFAD2323" Text="Mytext"/><LineBreak/><Run FontSize="13.333" Text="Mytext."/><LineBreak/><Run FontSize="13.333" Text=""/><Run FontSize="21.333" Foreground="#FFAD2323" Text="Mytext"/><LineBreak/><Run FontFamily="Verdana" FontSize="21.333" Foreground="#FFAD2323" Text="Mytext."/><LineBreak/><Run FontFamily="Verdana" FontSize="13.333" Text="Mytext."/><LineBreak/><LineBreak/><Run FontSize="21.333" Foreground="#FFAD2323" Text="HP  "/><LineBreak/><Run FontSize="13.333" Text="Mytext."/><LineBreak/><Run FontSize="13.333" Text="Mytext"/><LineBreak/><Run FontSize="13.333" Text="Mytext."/><LineBreak/><LineBreak/><Run FontSize="21.333" Foreground="#FFAD2323" Text="Mytext"/><LineBreak/><Run FontFamily="Verdana" FontSize="13.333" Text="MyText."/><LineBreak/><Run FontSize="21.333" Foreground="#FFAD2323" Text=""/></TextBlock>
      </ScrollViewer>

     

    Best regards
    Jimmy