Sliverlight Slide 的左右滑动

        private void btnPrev_Click(object sender, RoutedEventArgs e)
        {

                scrollRule =   (scrollRule-200) >= 0 ?(scrollRule-200): 0;
                MessageBox.Show(scrollRule.ToString() + "原来宽度:" + sv.ScrollableWidth);
                sv.ScrollToHorizontalOffset(scrollRule);
            
        }

        private void btnNext_Click(object sender, RoutedEventArgs e)
        {
                scrollRule =   (scrollRule+200) >= sv.ScrollableWidth ? sv.ScrollableWidth: (scrollRule + 200);
                MessageBox.Show(scrollRule.ToString() + "原来宽度:" + sv.ScrollableWidth);
                sv.ScrollToHorizontalOffset(scrollRule);
            
        }

 

posted @ 2013-08-29 15:26  Space Tian  阅读(292)  评论(0编辑  收藏  举报