Solved

scrollviewer

Posted on 2009-05-06
3
254 Views
Last Modified: 2013-11-12
HI,

I want to add a number of thumb size photos to a scrollable area.

q1)How do i do style the scroll viewer  as the scrollbars dont look that good ?

 q2) I have an image in the scrollviewer and want to invoke the click event of the image but click event doesnt appear anymore?

 img2 = New Image
        url2 = New Uri("images/armythumb.png", UriKind.Relative)
        uu2 = New BitmapImage(url)
        uu2.UriSource = url2
        img2.Source = uu2
        Canvas.SetLeft(img2, 20)
        Canvas.SetTop(img2, 5)


        sv = New ScrollViewer
        sv.Height = 80
        sv.Width = 200
        Canvas.SetLeft(sv, 100)
        Canvas.SetTop(sv, 100)
        sv.HorizontalScrollBarVisibility = ScrollBarVisibility.Visible
        sv.VerticalScrollBarVisibility = ScrollBarVisibility.Visible
        sv.Content = img1
        LayoutRoot.Children.Add(sv)
0
Comment
Question by:jagguy
  • 2
3 Comments
 

Author Comment

by:jagguy
Comment Utility
i want to style the tab where you scroll  with the mouse and the scrollbar width
0
 
LVL 9

Accepted Solution

by:
peterdungan earned 500 total points
Comment Utility
If you want to add several photos to the same scrollviewer, you need to place a canvas or a grid as the content element of the scrollviewer, and add the images to that.
The click event is only for buttons. You need to use MouseLeftButtonDown instead.
0
 

Author Comment

by:jagguy
Comment Utility
OK  i can add photos and click on them .
I really just needed to know how to style the scrollbars and the tab?
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now