[no Bug] ScrollViewer Clipping Problem (1 Viewer)

offbyone

Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    Hi!
    Attached are two images of the same xaml screen. In the main part there's a ListView with ControlTemplate set to ScrollViewer.
    (selected item grows in size using a RenderTransform).

    On the first (correct) screenshot, you'll see that when the scrollbar is not visible, the (non existent) clipping behaves correct. In the second one, you'll see that when there are more items and the scrollbar shows, the items are suddenly clipped.

    I can provide the xamls if you want for testing.
     

    Attachments

    • ClipCorrect.jpg
      ClipCorrect.jpg
      82.1 KB
    • ClipInCorrect.jpg
      ClipInCorrect.jpg
      97.9 KB

    Albert

    MP2 Developer
  • Premium Supporter
  • February 18, 2008
    1,297
    1,130
    46
    Freiburg im Breisgau, Germany
    Home Country
    Germany Germany
    AW: ScrollViewer Clipping Problem

    If you look at the bottom of the list in the second screenshot, you see that the elements are clipped there too. I guess your ScrollViewer is configured to use physical scrolling. In that case, the ScrollViewer has no other option than using a clipping rect to provide such a clipping at the bottom. But if there is a clip rect, elements are also clipped when they use a RenderTransform. So one solution would be to use logical scrolling. That would also make the half-visible elements at the bottom disappear.
    Do you know how WPF solves this problem?
     

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    • Thread starter
    • Moderator
    • #3
    The clipping of the objects themselves is fine, the problem is that even the rendertransform is clipped when the scrollviewer is active. In WPF the rendertransform happens after the layouting and therefore is not clipped by any panels.
     

    Albert

    MP2 Developer
  • Premium Supporter
  • February 18, 2008
    1,297
    1,130
    46
    Freiburg im Breisgau, Germany
    Home Country
    Germany Germany
    AW: ScrollViewer Clipping Problem

    It seems that this is no bug. Even WPF behaves the same.
    We'll implement a logical scrolling function for the WrapPanel. When we have that function, the scroll viewer doesn't need to clip its contents at its borders.
     

    Users who are viewing this thread

    Top Bottom