Traitée Scroll viewer Problem

  • jueves, 12 de abril de 2012 9:09
     
     

    from the above pic..u can see that a small corner is visible..
    i used scroll viewer to get these scrolls
    can anyone help me how to remove that...

Todas las respuestas

  • jueves, 12 de abril de 2012 9:25
     
     

    it can be removed easily by increasing the vertical/horizontal scrollbar margins inside the Scrollviewer template.

    So , if from bottom the scrollviewer margin is 0 make it -17 (Ideally you can bind it to SystemParameters.HorizontalScrollBarHeight , and use a converter to retrun back negative of the provided value). Done !!

    Usually you would like to keep that space to give user resize options (put a resize thumb) or something like that, but again it depends upon requirements.

    Hope that helps !!

    Plz dont forget to mark as answer if it helps.

    Cheers !!

  • viernes, 13 de abril de 2012 6:07
     
     

    as u said i gave a margin of 17 still it is not working

    here is the code

    <ScrollViewer Grid.Row="1" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto"  Margin="0,1,0,17">

    <StackPanel>data.....</StackPanel>

    </ScrollViewer>

    hope im following u correctly.....

  • viernes, 13 de abril de 2012 7:33
     
     Respondida

    Do you have a specific style for your ScrollViewer ?

    I would probably look after what is causing the green rectangle, and maybe make it's color into 'Transparent'.


    Developing is part of being a developer.

  • viernes, 13 de abril de 2012 8:15
     
     Respondida

    Nop , i sugested -17 margin on the vertical scrollbar inside of your scrollviewer template. That means create a template or style for the ScrollViewer and then give margins for the Vertical scrollbars.

    And also its Negative 17 so that it should start from 17 pixels down the bottommost which is at 0.

    I have also suggested to do binding and use a converter to make it a negative number bcoz its generally not good to hard code the margin as -17.That can vary as it depends upon the horizaontal scrollbar height. 

    Hope that helps !!

    Let us know if it works !!

    Cheers !!


  • martes, 17 de abril de 2012 7:39
    Moderador
     
     

    Hi Issac999,

    How is your things going on?

    Do what SharpAspirant's suggestion or Avinash's suggestion works?

    If your problem still exist, could you please share your xaml code with us, so that we can help you find the root cause of your issue.

    Thank you.

    Have a nice day.


    Annabella Luo[MSFT]
    MSDN Community Support | Feedback to us

  • jueves, 26 de abril de 2012 5:38
    Moderador
     
     
    We are temporarily marking this as "Answer", if you have any concerns or new findings; please feel free to let me know.
    Best regards.

    Annabella Luo[MSFT]
    MSDN Community Support | Feedback to us