locked
Update a ScrollViewer with it's childs size. RRS feed

  • Question

  • Hello,
    I am working on a zoomable interface and I am having a little problems with my ScrollViewer. I have a ScrollViewer which has a child that is a ViewBox. The ViewBox's child is a user control I created with my vector artwork. I made a slider control that when I update the slider it changes the scale of the ViewBox. So my graphic area zooms in and out like I would expect. The issue is when I scale the ViewBox to a smaller size than the ScrollViewer the scroll bars do not dissappear even though my ScrollViewer is set to auto. Is there a way to tell the ScrollViewer to get the updated size of the child element every time I update the size of the ViewBox?

    Any help would be appreciated and if someone needs me to build a small scale reproduction of this to help me with this problem I should be able to do that.

    Thanks,
    Brian
    Friday, October 16, 2009 1:47 PM

All replies