Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

Major Bug in Scroll viewer in Silverlight (ScrollViewer... RSS

2 replies

Last post Feb 02, 2009 03:01 AM by Amanda Wang - MSFT

(0)
  • Somnath Panja

    Somnath Panja

    Member

    184 Points

    135 Posts

    Major Bug in Scroll viewer in Silverlight (ScrollViewer is Unable to clip the content properly)

    Jan 27, 2009 06:23 AM | LINK

    Test Case: If Content width is more 98930, ScrollViewer is not showing the content properly.

    When I move horizontal scrollbar I see left and right Side of the content is suddenly clipped. Content is broken in to several parts and scattered here and there. I have checked with WPF and as well as XBAP. WPF and XBAP works fine for me.

    This problem is breaking my application in Silverlight where I have common code for Silverlight, WPF and XBAP.

    Here is the content of Page.xaml

    <UserControl x:Class="ScrollViewer.Page"

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

    Width="400" Height="300">

    <Grid x:Name="LayoutRoot" Background="White">

    <ScrollViewer Height="200" Width="400" HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Hidden" HorizontalContentAlignment="Left" VerticalContentAlignment="Top" >

    <ScrollViewer.Content>

    <Rectangle HorizontalAlignment="Left" Name="ScrollContainer" Height="150" Width="98930">

    <Rectangle.Fill>

    <LinearGradientBrush EndPoint="1.015,0.493" StartPoint="0.008,0.473">

    <GradientStop Color="#FF000000"/>

    <GradientStop Color="#FFFF0000" Offset="1"/>

    </LinearGradientBrush>

    </Rectangle.Fill>

    </Rectangle>

    </ScrollViewer.Content>

    </ScrollViewer>

    </Grid>

    </UserControl>

     

    bug ScrollViewer Bug Silveright Bug

    Regards,
    Somnath Panja
    Profile: Profile Link..
  • hmaprk

    hmaprk

    Member

    175 Points

    77 Posts

    Re: Major Bug in Scroll viewer in Silverlight (ScrollViewer is Unable to clip the content properly)

    Jan 27, 2009 02:36 PM | LINK

    I have seen thist too. Does anyone know why this happens? A workaround? I am displaying images in a scroll viewer. I have a zoom feature. Whenever I zoom to certain values, the images get clipped off from the right side!!!!

     

     

    hmaprk
    http://dotnetgui.blogspot.com/

    -Please mark As Answer if this answers your question. Thanks
  • Amanda Wang - MSFT

    Amanda Wang...

    All-Star

    17236 Points

    1466 Posts

    Re: Major Bug in Scroll viewer in Silverlight (ScrollViewer is Unable to clip the content properly)

    Feb 02, 2009 03:01 AM | LINK

    Hi Somnat,

    This is an known issue. This has been reproted here: http://silverlight.net/forums/t/61678.aspx

    And there is no workaround for such case.
    Amanda Wang
    Microsoft Online Community Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.