Automatic scrolling

  • (2 Pages)
  • +
  • 1
  • 2

19 Replies - 5587 Views - Last Post: 29 December 2012 - 03:53 AM Rate Topic: -----

#16 xxxpetko  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 28
  • Joined: 10-December 12

Re: Automatic scrolling

Posted 28 December 2012 - 03:01 AM

I set for scrollviewer same margins As for stack panel => then i can't see stack panel, but only a small scrollbar at right corner on top of the screen(in stack panel/scroll viewer area)
Was This Post Helpful? 0
  • +
  • -

#17 _HAWK_  Icon User is offline

  • Master(Of Foo)
  • member icon

Reputation: 1057
  • View blog
  • Posts: 4,097
  • Joined: 02-July 08

Re: Automatic scrolling

Posted 28 December 2012 - 07:59 AM

They should not be same. The ScrollViewer's margin's are distances it is from it's parent based on layout. The StackPanel should be 0,0 or close since it belongs to the scrollViewer's Content. Margins are relative to their parent containers. Once you get the feel for this it will get easier.
Was This Post Helpful? 0
  • +
  • -

#18 xxxpetko  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 28
  • Joined: 10-December 12

Re: Automatic scrolling

Posted 28 December 2012 - 11:15 AM

<ScrollViewer Margin="686,0,0,0">
            <ScrollViewer.Content>
                <StackPanel x:Name="stp1" HorizontalAlignment="Left" Height="39" VerticalAlignment="Top" Orientation="Horizontal" Margin="0,0,0,0" Background="SteelBlue" ScrollViewer.HorizontalScrollBarVisibility="Visible" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
            </ScrollViewer.Content>
        </ScrollViewer>


This result to small scrollbar on the left-top corner of the screen...but it has bad orientation(when i click on it, it do nothing) and second scrollbar is invisible.
Was This Post Helpful? 0
  • +
  • -

#19 lucky3  Icon User is offline

  • Friend lucky3 As IHelpable
  • member icon

Reputation: 231
  • View blog
  • Posts: 765
  • Joined: 19-October 11

Re: Automatic scrolling

Posted 28 December 2012 - 01:06 PM

I'm typing this from my phone, so I'll be brief: you don't have any content in your stackpanel, and avoid setting fixed size height and width.
Was This Post Helpful? 0
  • +
  • -

#20 xxxpetko  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 28
  • Joined: 10-December 12

Re: Automatic scrolling

Posted 29 December 2012 - 03:53 AM

Now it's working, but only witch touch, i can't use mouse wheel(it do nothing) or scrollbars(they are'nt visible)
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2